: loadsys1
:
: Programmet skapar en del av ett ABCenix Ver 5.1 prel. operativsystem
:
: Luxor Datorer AB Motala Sweden
:
: anv{ndning: loadsys1 [-wt winchestertyp     -we winchesterenhet
:		       -ws winchesterstorlek -ke k{llenhet -bs blockstorlek]
: exempel:	1: loadsys1	Detta ger standardv{rden p} alla argument
:		2: loadsys1 -we sa48  -ke mf0	Inneb{r att ett system 
:			   skapas p} en enhet /dev/sa48  och disketten
:			   sitter p} enhet /dev/mf0
KSAK="kanske saknas"
KSAKP="$KSAK programmet"
KSAKB="$KSAK biblioteket"
KSAKF="$KSAK filen"
EK="En konstig"
HASA="har angivits som argument"
ERROR="N}gonting har g}tt snett, felet kan vara n}got av f|ljande"
HLP1="Om Du inte kan }tg{rda felet sj{lv,"
HLP2="kontakta }terf|rs{ljare eller i andra hand"
HELP="$HLP1 E$HLP2 ELuxor Datorer AB kundsupport 014"
we=sa40
   
echo "Skapar olika enheter p} /dev/$we."
if /etc/mknod /dev/mem c 3 0 ; chmod 600 /dev/mem
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/kmem c 3 1 ; chmod 600 /dev/kmem
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi 
if /etc/mknod /dev/autosw c 3 5 ; chmod 444 /dev/autosw
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/bclock c 3 6 ; chmod 644 /dev/bclock
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/nvram c 3 7 ; chmod 644 /dev/nvram
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/log c 3 9 ; chmod 600 /dev/log
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/mf2-ibm c 9 66 ; chmod 666 /dev/mf2-ibm
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/wd40 c 14 40 ; chmod 644 /dev/wd40
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/st0 c 5 178 ; chmod 644 /dev/st0
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/lp c 1 0 ; chmod 622 /dev/lp
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/tty02 c 1 2 ; chmod 666 /dev/tty02
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/tty03 c 1 3 ; chmod 666 /dev/tty03
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/tty c 2 0 ; chmod 666 /dev/tty
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/DBinoutb c 3 8 ; chmod 600 /dev/DBinoutb
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
if /etc/mknod /dev/DBIdrv c 13 0 ; chmod 600 /dev/DBIdrv
then : 
else
  echo -e $ERROR
  echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
  echo -e "2: $KSAKB /mnt."
  echo -e $HELP
  exit 1
fi
echo "Skapar enheter f|r f|nsterhanteraren."
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
do
  if /etc/mknod /dev/wtty$i c 3 2 ; chmod 666 /dev/wtty$i
  then : 
  else
    echo -e $ERROR
    echo -e "1: $KSAKP /etc/mknod eller /bin/chmod."
    echo -e "2: $KSAKB /mnt eller /dev."
    echo -e $HELP
    exit 1
  fi
done


