X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=990c0883418d9de08181576b54508e1eda87f497;hb=f3d517cffe3b5fdc2b962b2e0e9c2f819ff858da;hp=e1f69dd7c95af0893aa9071b3b9f2aeda6098e7e;hpb=fbfb4d9feddca5f14025d200d032bd05959772e7;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index e1f69dd..990c088 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -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 @@ -72,7 +77,7 @@ get_fstype () return fi - eval $(fstype < ${1}) + eval $(fstype < ${1} 2>/dev/null) if [ "${FSTYPE}" != "unknown" ] 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