Rework ugly `echo "debug:..` message to use log_{begin,end}_msg.
[live-boot-grml.git] / scripts / live-helpers
index e1f69dd..bb5653c 100644 (file)
@@ -1,4 +1,3 @@
-#!/bin/sh
 # live-initramfs helper functions, used by live-initramfs on boot and by live-snapshot
 
 if [ ! -x "/bin/fstype" ]
@@ -33,6 +32,12 @@ is_supported_fs ()
 {
        fstype="${1}"
 
+       # Validate input first
+       if [ -z "${fstype}" ]
+       then
+               return 1
+       fi
+
        # Try to look if it is already supported by the kernel
        if grep -q ${fstype} /proc/filesystems
        then
@@ -184,7 +189,15 @@ setup_loop ()
        local readonly=${6}
 
        modprobe -q -b "${module}"
-       udevsettle
+
+       if [ -x /sbin/udevadm ]
+       then
+               # lenny
+               udevadm settle
+       else
+               # etch
+               udevsettle
+       fi
 
        for loopdev in ${pattern}
        do