diff options
Diffstat (limited to 'etc/etc.i386')
-rw-r--r-- | etc/etc.i386/MAKEDEV | 39 | ||||
-rw-r--r-- | etc/etc.i386/rc.i386 | 183 |
2 files changed, 155 insertions, 67 deletions
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV index 33befa4..188eca9 100644 --- a/etc/etc.i386/MAKEDEV +++ b/etc/etc.i386/MAKEDEV @@ -277,7 +277,7 @@ jail) ln -sf null kmem # --//-- ln -sf null drum # --//-- ;; - + mach-4) mknod iopl c 22 0 mknod kbd c 23 0 @@ -290,7 +290,7 @@ mach-4) wt*) umask $tape_umask u=`expr $i : '..\(.*\)'` - if [ x$u = x ]; then u=0; fi + if [ -z "${u}" ]; then u=0; fi mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks mknod nrwt${u} c 10 `expr 4 + $u` # mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks @@ -529,7 +529,7 @@ ccd*) [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1]) for part in 0 1 2 3 4 5 6 7 do - minor=`dkminor 0 $unit 0 $part` + minor=`dkminor 0 $unit 0 $part` partname=`dkitop $part` mknod $name$unit$partname b $blk $minor mknod r$name$unit$partname c $chr $minor @@ -552,7 +552,7 @@ pt[0-9]*) chr=61 name=pt unit=`expr $i : 'pt\([0-9][0-9]*\)'` - if [ "X${unit}" = "X" ]; then + if [ -z "${unit}" ]; then unit=0 fi unit=`expr $unit + 1 - 1` @@ -564,7 +564,7 @@ targ[0-9]*) chr=65 name=targ unit=`expr $i : 'targ\([0-9][0-9]*\)'` - if [ "X${unit}" = "X" ]; then + if [ -z "${unit}" ]; then unit=0 fi unit=`expr $unit + 1 - 1` @@ -579,7 +579,7 @@ xpt*) chr=104 name=xpt units=`expr $i : 'xpt\(.*\)'` - if [ "X${units}" = "X" ]; then + if [ -z "${units}" ]; then units=1 fi eval `echo ${chr} ${units} ${name} |awk \ @@ -597,7 +597,7 @@ pass*|uk*) chr=31 name=pass units=`expr $i : 'pass\(.*\)'` - if [ "X${units}" = "X" ]; then + if [ -z "${units}" ]; then units=1 fi eval `echo ${chr} ${units} ${name} |awk \ @@ -710,7 +710,7 @@ acd*|cd*|mcd*|scd*) mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;; scd*) units=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;; esac - if [ "X${units}" = "X" -o ${units} -le 0 ]; then + if [ -z "${units}" -o ${units} -le 0 ]; then units=1 fi if [ "${units}" -le 31 ]; then @@ -729,7 +729,6 @@ acd*|cd*|mcd*|scd*) name, i, c, (i * 8), name, i, c, (i * 8) + 2, name, i, name, i); }}'` - else echo "$i is invalid -- can't have more than 32 cd devices" fi @@ -837,14 +836,14 @@ ulpt*) ugen*) unit=`expr $i : 'ugen\([0-9][0-9]*\)'` endpoint=`expr $i : 'ugen.*\.\([0-9][0-9]*\)'` - if [ "x$unit" = "x" ]; then - echo $i - Invalid unit number + if [ -z "${unit}" ]; then + echo $i - Invalid unit number fi - if [ "x$endpoint" = "x" ]; then - minor=`expr $unit \* 16` + if [ -z "${endpoint}" ]; then + minor=`expr $unit \* 16` mknod ugen$unit c 114 $minor else - minor=`expr $unit \* 16 + $endpoint` + minor=`expr $unit \* 16 + $endpoint` mknod ugen$unit.$endpoint c 114 $minor fi ;; @@ -966,7 +965,7 @@ ttyA*) port=1 while [ $port -le $nports ]; do minor=`expr $port - 1` - name=`expr $port + 1000 | cut -c 3-4` + name=`expr $port + 1000 | cut -c 3-4` mknod ttyA$name c $major $minor mknod ttyiA$name c $major `expr $minor + 65536` mknod ttylA$name c $major `expr $minor + 131072` @@ -983,7 +982,7 @@ cuaA*) port=1 while [ $port -le $nports ]; do minor=`expr $port - 1` - name=`expr $port + 1000 | cut -c 3-4` + name=`expr $port + 1000 | cut -c 3-4` mknod cuaA$name c $major `expr $minor + 128` mknod cuaiA$name c $major `expr $minor + 128 + 65536` mknod cualA$name c $major `expr $minor + 128 + 131072` @@ -1098,9 +1097,9 @@ ttyR?) ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'` echo -n "Creating $ndevices devices for $i: " for dev in `jot $ndevices 0`;do - mknod /dev/ttyR$Rnum c $major $MINOR + mknod /dev/ttyR$Rnum c $major $MINOR mknod /dev/ttylR$Rnum c $major `expr $MINOR + 32` - mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64` + mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64` Rnum=`expr $Rnum + 1` MINOR=`expr $MINOR + 1` done @@ -1123,7 +1122,7 @@ cuaR?) for dev in `jot $ndevices 0`;do mknod /dev/cuaR$Rnum c $major `expr $MINOR + 128` mknod /dev/cualR$Rnum c $major `expr $MINOR + 128 + 32` - mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64` + mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64` Rnum=`expr $Rnum + 1` MINOR=`expr $MINOR + 1` done @@ -1331,7 +1330,7 @@ labpc*) die 3 "Don't know LabPC type $i" ;; esac - if [ "X${unit}" = "X" ]; then + if [ -z "${unit}" ]; then unit=all fi case $unit in diff --git a/etc/etc.i386/rc.i386 b/etc/etc.i386/rc.i386 index f7b22d9..13440de 100644 --- a/etc/etc.i386/rc.i386 +++ b/etc/etc.i386/rc.i386 @@ -5,33 +5,58 @@ # echo -n 'Initial rc.i386 initialization:' -if [ "${apm_enable}" = "YES" -o "${apmd_enable}" = "YES" ] ; then + +case ${apm_enable} in +[Yy][Ee][Ss]) echo -n ' apm' apmconf -e > /dev/null 2>&1 -fi + APMCONF_DONE=yes + ;; +esac + +case ${apmd_enable} in +[Yy][Ee][Ss]) + case ${APMCONF_DONE} in + '') + echo -n ' apm' + apmconf -e > /dev/null 2>&1 + ;; + esac -if [ "${apmd_enable}" = "YES" ] ; then echo -n ' apmd'; apmd ${apmd_flags} -fi + ;; +esac # Start the SCO binary emulation if requested. -if [ "${ibcs2_enable}" = "YES" ]; then - echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1 -fi +# +case ${ibcs2_enable} in +[Yy][Ee][Ss]) + echo -n ' ibcs2'; ibcs2 > /dev/null 2>&1 + ;; +esac # Start the Linux binary emulation if requested. -if [ "${linux_enable}" = "YES" ]; then - echo -n ' linux'; linux > /dev/null 2>&1 -fi +# +case ${linux_enable} in +[Yy][Ee][Ss]) + echo -n ' linux'; linux > /dev/null 2>&1 + ;; +esac # Start the SysVR4 binary emulation if requested. -if [ "${svr4_enable}" = "YES" ]; then - echo -n ' svr4'; svr4 > /dev/null 2>&1 -fi - -if [ "${xtend_enable}" = "YES" ]; then +# +case ${svr4_enable} in +[Yy][Ee][Ss]) + echo -n ' svr4'; svr4 > /dev/null 2>&1 + ;; +esac + +case ${xtend_enable} in +[Yy][Ee][Ss]) echo -n ' xtend'; /usr/libexec/xtend -fi + ;; +esac + echo '.' ########################################################################## @@ -39,98 +64,162 @@ echo '.' ########################################################################## # stdin must be redirected because it might be for a serial console +# kbddev=/dev/ttyv0 viddev=/dev/ttyv0 echo -n "rc.i386 configuring syscons:" # keymap -if [ "${keymap}" != "NO" ]; then +# +case ${keymap} in +[Nn][Oo] | '') + ;; +*) echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} -fi + ;; +esac # keyrate -if [ "${keyrate}" != "NO" ]; then +# +case ${keyrate} in +[Nn][Oo] | '') + ;; +*) echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate} -fi + ;; +esac # keybell -if [ "${keybell}" != "NO" ]; then +# +case ${keybell} in +[Nn][Oo] | '') + ;; +*) echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell} -fi + ;; +esac # change function keys -if [ "${keychange}" != "NO" ]; then +# +case ${keychange} in +[Nn][Oo] | '') + ;; +*) echo -n " keychange" set - ${keychange} - while [ $# -gt 0 ] - do + while [ $# -gt 0 ]; do kbdcontrol <${kbddev} -f "$1" "$2" shift; shift done -fi + ;; +esac # cursor type -if [ "${cursor}" != "NO" ]; then +# +case ${cursor} in +[Nn][Oo] | '') + ;; +*) echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor} -fi + ;; +esac # screen mapping -if [ "${scrnmap}" != "NO" ]; then +# +case ${scrnmap} in +[Nn][Oo] | '') + ;; +*) echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap} -fi + ;; +esac # font 8x16 -if [ "${font8x16}" != "NO" ]; then +# +case ${font8x16} in +[Nn][Oo] | '') + ;; +*) echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16} -fi + ;; +esac # font 8x14 -if [ "${font8x14}" != "NO" ]; then +# +case ${font8x14} in +[Nn][Oo] | '') + ;; +*) echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14} -fi + ;; +esac # font 8x8 -if [ "${font8x8}" != "NO" ]; then +# +case ${font8x8} in +[Nn][Oo] | '') + ;; +*) echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8} -fi + ;; +esac # blank time -if [ "${blanktime}" != "NO" ]; then +# +case ${blanktime} in +[Nn][Oo] | '') + ;; +*) echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime} -fi + ;; +esac # screen saver -if [ "${saver}" != "NO" ] ; then +# +case ${saver} in +[Nn][Oo] | '') + ;; +*) echo -n ' screensaver' for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do kldunload ${i} done kldstat -v | grep -q _saver || kldload ${saver}_saver -fi + ;; +esac # mouse daemon -if [ "${moused_enable}" = "YES" ] ; then +# +case ${moused_enable} in +[Yy][Ee][Ss]) echo -n ' moused' moused ${moused_flags} -p ${moused_port} -t ${moused_type} vidcontrol < ${viddev} -m on -fi + ;; +esac # set this mode for all virtual screens -if [ -n "${allscreens_flags}" ] ; then +# +if [ -n "${allscreens_flags}" ]; then echo -n ' allscreens' - for ttyv in /dev/ttyv* - do + for ttyv in /dev/ttyv*; do vidcontrol < ${ttyv} ${allscreens_flags} done fi + echo '.' # interrupts for /dev/random device -if [ "${rand_irqs}" != "NO" ] ; then +# +case ${rand_irqs} in +[Nn][Oo] | '') + ;; +*) echo -n 'entropy IRQs:' for irq in ${rand_irqs}; do echo -n " ${irq}" && rndcontrol -q -s ${irq} done echo '.' -fi + ;; +esac |