diff options
Diffstat (limited to 'initrd/initrd-stuff')
| -rw-r--r-- | initrd/initrd-stuff/etc/functions | 4 | ||||
| -rwxr-xr-x | initrd/initrd-stuff/init | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index bac1e53b..54eddc42 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -41,10 +41,6 @@ trigger_device_events () { # produce error message and if $2 is empty run (debug) shell error () { local e_msg="$1" -# fixme!! DEBUGLEVEL is exported rather early, so checking it here is -# redundant ... -if [ -z "$DEBUGLEVEL" ]; then DEBUGLEVEL=0 -fi # check if LOGFILE is really writeable if [ -n "${LOGFILE}" ] ; then [ "${LOGFILE}" != "/dev/null" ] && \ diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 2a098f1e..92bc253d 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -48,6 +48,7 @@ preinit # start device auto discovery service - distro specific function udev_hotplug + # set defaults and create waitfor files TMPFSSIZE="50%" COWSIZE="50%" @@ -71,7 +72,11 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup DEBUGLEVEL=1;; # debug level debug=*) - DEBUGLEVEL=${opts#debug=};; + DEBUGLEVEL=${opts#debug=} + # Handle empty, extremly large or non-numeric input + [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 + [[ "101" < "$DEBUGLEVEL" ]]; DEBUGLEVEL=100 + ;; # if configuration should be gathered by dhcp client dhcp) DHCP="yes" |
