Dropping really_export dead code.
[live-boot-grml.git] / components / 9990-misc-helpers.sh
index 194b871..d85a1d1 100755 (executable)
@@ -2,17 +2,12 @@
 
 #set -e
 
-file_pattern_matches()
-{
-       [ -e "$1" ]
-}
-
 is_live_path()
 {
        DIRECTORY="${1}/${LIVE_MEDIA_PATH}"
        for FILESYSTEM in squashfs ext2 ext3 ext4 xfs dir jffs
        do
-               if file_pattern_matches "${DIRECTORY}/"*.${FILESYSTEM}
+               if ls "${DIRECTORY}/"*.${FILESYSTEM} > /dev/null 2>&1
                then
                        return 0
                fi
@@ -199,9 +194,9 @@ check_dev ()
        if is_supported_fs ${fstype}
        then
                devuid=$(blkid -o value -s UUID "$devname")
-               [ -n "$devuid" ] && grep -qs "\<$devuid\>" $tried && continue
+               [ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue
                mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
-               [ -n "$devuid" ] && echo "$devuid" >> $tried
+               [ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount
 
                if [ -n "${FINDISO}" ]
                then
@@ -334,21 +329,6 @@ find_livefs ()
        return 1
 }
 
-really_export ()
-{
-       STRING="${1}"
-       VALUE="$(eval echo -n \${$STRING})"
-
-       if [ -f /live.vars ] && grep -sq "export ${STRING}" /live.vars
-       then
-               sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
-       else
-               echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
-       fi
-
-       eval export "${STRING}"="${VALUE}"
-}
-
 is_in_list_separator_helper ()
 {
        local sep element list
@@ -1286,9 +1266,6 @@ get_custom_mounts ()
                if [ -r "${backing}/${persistence_list}" ]
                then
                        include_list="${backing}/${persistence_list}"
-               elif [ -r "${backing}/${old_persistence_list}" ]
-               then
-                       include_list="${backing}/${old_persistence_list}"
                else
                        continue
                fi