Adding live-system script from live-tools.
[live-boot-grml.git] / scripts / live-helpers
index 6777f99..47674e6 100644 (file)
@@ -1,4 +1,4 @@
-# live-initramfs helper functions, used by live-initramfs on boot and by live-snapshot
+# live-boot helper functions, used by live-boot on boot and by live-snapshot
 
 if [ ! -x "/bin/fstype" ]
 then
@@ -187,7 +187,11 @@ setup_loop ()
        local encryption=${5}
        local readonly=${6}
 
-       modprobe -q -b "${module}"
+       # the output of setup_loop is evaluated in other functions,
+       # modprobe leaks kernel options like "libata.dma=0"
+       # as "options libata dma=0" on stdout, causing serious
+       # problems therefor, so instead always avoid output to stdout
+       modprobe -q -b "${module}" 1>/dev/null
 
        udevadm settle
 
@@ -305,7 +309,7 @@ find_cow_device ()
                do
                        devname=$(sys2dev "${dev}")
 
-                       if echo "${black_listed_devices}" | grep -q "${devname}"
+                       if echo "${black_listed_devices}" | grep -q -w "${devname}"
                        then
                                # skip this device enterely
                                break
@@ -404,7 +408,7 @@ find_files ()
                        devname=$(sys2dev "${dev}")
                        devfstype="$(get_fstype ${devname})"
 
-                       if echo "${black_listed_devices}" | grep -q "${devname}"
+                       if echo "${black_listed_devices}" | grep -q -w "${devname}"
                        then
                                # skip this device enterely
                                break