home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- PUPMODE=2
- [ -f /etc/rc.d/PUPMODE ] && PUPMODE=`cat /etc/rc.d/PUPMODE`
-
- #v2.0.0
- #have avoided loading usb-storage module unless really needed. partly because it
- #slows down bootup. well, load it now... not in rc.local0, too soon...
- #not sure, but may be conflict if X accesses
- # usb keyboard/mouse while usb-storage is loading. so, doing this in ~/.xinitrc,
- # which calls /usr/sbin/delayedrun
-
- sleep 3 #let the dust settle first.
-
- #k2.6 module is usb-storage.ko but lsmod shows it as usb_storage!!!...
- if [ "`lsmod | grep --extended-regexp '^usb\-storage|^usb_storage'`" = "" ];then
- modprobe usb-storage &
- #...can take 5 seconds for usb2, 25 secs for usb1, but assume nothing accesses within this.
- fi
-
-
- #on very 1st boot, PUPMODE=5, put up a welcome box... (handle Xvesa in video-wizard)
- if [ "`readlink /usr/X11R6/bin/X`" = "Xorg" ];then
- if [ $PUPMODE -eq 5 ];then
- #rc.modules should have detected sound, loaded module, written to /etc/modprobe.conf.
- #rc.local0 executes rc.alsa to start sound. now bark...
- if [ ! "`grep 'alias snd\-card\-0' /etc/modprobe.conf`" = "" ];then
- aplay /usr/share/audio/2barks.au &
- #PIDAPLAY=$!
- fi
- dillo --rcfile /etc/welcomedillorc file:///usr/share/doc/welcome1stboot.htm
- #kill $PIDAPLAY 2> /dev/null
- killall aplay 2> /dev/null
- #...one laptop has bug, aplay barks forever, so kill it.
- fi
- fi
-