|
From: Friedrich L. <fr...@us...> - 2006-05-03 19:45:06
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8203a/config/etc/initrd Modified Files: linuxrc mount_cdrom Added Files: colordefs Log Message: forward port changes from 1.2 to 1.3 Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- linuxrc 23 Apr 2006 13:29:40 -0000 1.86 +++ linuxrc 3 May 2006 19:44:58 -0000 1.87 @@ -13,14 +13,10 @@ # - starts up the real system # -NORMAL="echo -en \\033[0;39m" -GREEN="echo -en \\033[1;32m" -YELLOW="echo -en \\033[1;33m" -RED="echo -en \\033[1;31m" -BLUE="echo -en \\033[1;34m" -alias beep='echo -en "\007"' +export PATH=$PATH:/sbin:/usr/sbin:/ -alias l="ls -la" +# include our color definitions +. colordefs $RED echo @@ -33,7 +29,21 @@ echo $NORMAL -export PATH=$PATH:/sbin:/usr/sbin +beep() { + # $1 = optional, number of times to beep (default=1) + # $2 = optional, sleep that many seconds between beeps (default=1) + # $3 = optional, print this with 'echo -n' after each sleep + local count=${1:-1} + local waitcnt=${2:-1} + local string=$3 + + while [ $count -gt 0 ]; do + echo -en "\007" + [ -n "$string" ] && echo -en "$string" + let count-- + [ $count -gt 0 ] && sleep $waitcnt + done +} scan_devices_for_config() { # $1 = filename @@ -132,7 +142,7 @@ * ) $RED echo -n "Improper config parameter : \"$CONFIG_USER\". Ignored." - beep; sleep 1; echo -n "."; sleep 1; beep; echo "." + beep 2 1 "." $NORMAL ;; esac @@ -173,7 +183,7 @@ echo Kernel $(uname -r) -# mount shared memory filesystem with a limit of 40GB (for now) +# mount shared memory filesystem with the default limit of ram-memory/2 mount -n -t shm shmfs /shm 2> /dev/null || mount -n -t tmpfs none /shm # get rid of modprobe warnings @@ -189,10 +199,6 @@ echo "waiting until usb-storage driver has initialized all devices ..." sleep 10 -# save loaded config -DL_CONFIG_SOURCE="" -DL_CONFIG_FILE="" - $GREEN echo "Searching for configuration media" $NORMAL @@ -217,6 +223,9 @@ CDROMS=$(grep -i "drive name" /proc/sys/dev/cdrom/info) +# search for configuration information +DL_CONFIG_SOURCE="" +DL_CONFIG_FILE="" until [ "$DL_CONFIG_SOURCE" != "" ] ; do if [ "$CONFIG_USER" != "" ]; then parse_config_cmdline $CONFIG_USER && continue @@ -235,7 +244,7 @@ # offer to copy the configuration file if device is not a CD IS_CDROM=$(echo $CDROMS | grep "${CFG_SRC##/*/}" ) if [ -z "$IS_CDROM" ];then - beep; + beep $YELLOW echo -e "\n*** Found empty configuration media - $CFG_SRC. ***" $NORMAL @@ -263,7 +272,7 @@ fi done - beep; sleep 1; beep; sleep 1; beep; + beep 3 $RED echo -e "Would you really like to load DL without Configuration Media?" $NORMAL @@ -344,7 +353,7 @@ echo "* *" echo "* !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! *" echo "********************************************************************************" - beep; sleep 1; beep; sleep 1; beep; sleep 1; beep; sleep 1; beep; sleep 1; beep; + beep 6 $NORMAL echo echo -n "Do you want to continue? " --- NEW FILE: colordefs --- #!/bin/sh # $Id: colordefs,v 1.2 2006/05/03 19:44:58 friedl Exp $ # # $Source: /cvsroot/devil-linux/build/config/etc/initrd/colordefs,v $ # $Revision: 1.2 $ # $Date: 2006/05/03 19:44:58 $ # # http://www.devil-linux.org # # color definitions for use by initrd script # NORMAL="echo -en \\033[0;39m" GREEN="echo -en \\033[1;32m" YELLOW="echo -en \\033[1;33m" RED="echo -en \\033[1;31m" BLUE="echo -en \\033[1;34m" Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- mount_cdrom 19 Feb 2006 17:01:07 -0000 1.36 +++ mount_cdrom 3 May 2006 19:44:58 -0000 1.37 @@ -8,12 +8,8 @@ # http://www.devil-linux.org # -NORMAL="echo -en \\033[0;39m" -GREEN="echo -en \\033[1;32m" -YELLOW="echo -en \\033[1;33m" -RED="echo -en \\033[1;31m" -BLUE="echo -en \\033[1;34m" -alias beep='echo -en "\007"' +# include our color definitions +. colordefs if [ "$3" != "silent" ]; then $GREEN |