X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Fpostinst;h=f6bbd4cf80c527f766ae65e00c255bb94b44de74;hb=6157770f65e83668bb953925facac0d61dcc419d;hp=2f269adf6f9edb51e4f64393da5ab426b2dd4b38;hpb=b61d40e6c90d6dd5e95d67b6521c281e28f4b66a;p=debian%2Fmakedev diff --git a/debian/postinst b/debian/postinst index 2f269ad..f6bbd4c 100644 --- a/debian/postinst +++ b/debian/postinst @@ -14,28 +14,28 @@ then exit 0 fi -/sbin/MAKEDEV std consoleonly fd - -/bin/chmod g-r,o= /dev/tty[0-9]* +MAKEDEV std consoleonly fd # ensure base tty set exists, since debootstrap no longer does for i in tty0 tty1 tty2 tty3 tty4 tty5 tty6 tty7 tty8 tty9; do - test -e /dev/$i || /sbin/MAKEDEV $i + test -e /dev/$i || MAKEDEV $i done -test -e /dev/random || /sbin/MAKEDEV random -test -e /dev/urandom || /sbin/MAKEDEV urandom -test -e /dev/audio || /sbin/MAKEDEV audio -test -e /dev/agpgart || /sbin/MAKEDEV agpgart +chmod g-r,o= /dev/tty[0-9]* + +test -e /dev/random || MAKEDEV random +test -e /dev/urandom || MAKEDEV urandom +test -e /dev/audio || MAKEDEV audio +test -e /dev/agpgart || MAKEDEV agpgart [ ! -f /dev/mouse ] && [ -f /dev/sunmouse ] && ln -s sunmouse mouse -# force update of fb devices if kernel is >= 2.4 and they already exist +# force update of fb devices if kernel is Linux >= 2.4 and they already exist kern_rev1=`uname -r | sed -e 's@^\([^.]*\)\..*@\1@'` kern_rev2=`uname -r | sed -e 's@^[^.]*\.\([^.]*\)\..*@\1@'` -if [ $kern_rev1 -ge 2 ] && [ $kern_rev2 -ge 4 ] && [ -e /dev/fb0 ] +if [ `uname -s` = "Linux" ] && [ $kern_rev1 -ge 2 ] && [ $kern_rev2 -ge 4 ] && [ -e /dev/fb0 ] then - /sbin/MAKEDEV fb + MAKEDEV fb fi for A in sda16 sdb16 sdc16 sdd16 sde16 sdf16 sdg16 sdh16 \ @@ -58,7 +58,7 @@ LIST="" for TYPE in tty pty ; do for LETTER in p q r s t u v w x y z a b c d e ; do if [ -e /dev/$TYPE$LETTER"0" ]; then - MAJOR="`/bin/ls -l /dev/$TYPE$LETTER"0"|cut -c33-36`" + MAJOR="`ls -l /dev/$TYPE$LETTER"0"|cut -c33-36`" if [ "$MAJOR" = 4 ] ; then LIST="$LIST $TYPE$LETTER" fi @@ -71,7 +71,7 @@ if [ -n "$LIST" ]; then #!/bin/sh echo "Creating new console devices" -/sbin/MAKEDEV $LIST +MAKEDEV $LIST rm /etc/rc.boot/makedev ; exit 0 EOF