Adding debian version 3.0~a1-1.
[live-boot-grml.git] / scripts / live-helpers
index 0cdc755..2719eea 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
@@ -76,13 +76,7 @@ is_supported_fs ()
 
 get_fstype ()
 {
-       # udev >=146-1 no longer provides vol_id:
-       if [ -x /lib/udev/vol_id ]
-       then
-               /lib/udev/vol_id -t ${1} 2>/dev/null
-       else
-               /sbin/blkid -s TYPE -o value $1 2>/dev/null
-       fi
+       /sbin/blkid -s TYPE -o value $1 2>/dev/null
 }
 
 where_is_mounted ()
@@ -185,7 +179,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
 
@@ -339,20 +337,10 @@ find_cow_device ()
                                done
                        fi
 
-                       # udev >=146-1 no longer provides vol_id:
-                       if [ -x /lib/udev/vol_id ]
+                       if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]
                        then
-                               if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${pers_label}" ]
-                               then
-                                       echo "${devname}"
-                                       return 0
-                               fi
-                       else
-                               if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]
-                               then
-                                       echo "${devname}"
-                                       return 0
-                               fi
+                               echo "${devname}"
+                               return 0
                        fi
 
                        if [ "${PERSISTENT}" = "nofiles" ]