summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-05-31 10:53:55 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:47:59 +0100
commitf7844126b88fd104016316b0dfa5a8c731a63a05 (patch)
tree5f6b0f6cee38028df5adc949e54192ba905ceea4 /scripts
parent9608fba805c3a518bd63a17dc138b8c0ed41b760 (diff)
downloadlive-boot-f7844126b88fd104016316b0dfa5a8c731a63a05.tar.gz
live-boot-f7844126b88fd104016316b0dfa5a8c731a63a05.zip
Merging casper 1.132.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live27
-rw-r--r--scripts/live-helpers44
2 files changed, 41 insertions, 30 deletions
diff --git a/scripts/live b/scripts/live
index 867d4f9..29832c9 100755
--- a/scripts/live
+++ b/scripts/live
@@ -556,20 +556,6 @@ is_nice_device ()
return 1
}
-is_supported_fs ()
-{
- # FIXME: do something better like the scan of supported filesystems
- fstype="${1}"
-
- case ${fstype} in
- vfat|iso9660|udf|ext2|ext3|ntfs|jffs2)
- return 0
- ;;
- esac
-
- return 1
-}
-
copy_live_to ()
{
copyfrom="${1}"
@@ -1164,6 +1150,19 @@ check_dev ()
devname="${loopdevname}"
fi
+ if [ -d "${devname}" ]
+ then
+ mount -o bind "${devname}" $mountpoint || continue
+
+ if is_live_path $mountpoint
+ then
+ echo $mountpoint
+ return 0
+ else
+ umount $mountpoint
+ fi
+ fi
+
fstype=$(get_fstype "${devname}")
if is_supported_fs ${fstype}
diff --git a/scripts/live-helpers b/scripts/live-helpers
index 3c89c95..cc73aa3 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -29,6 +29,20 @@ subdevices ()
echo ${r}
}
+is_supported_fs ()
+{
+ # FIXME: do something better like the scan of supported filesystems
+ fstype="${1}"
+
+ case ${fstype} in
+ vfat|iso9660|udf|ext2|ext3|ntfs|jffs2)
+ return 0
+ ;;
+ esac
+
+ return 1
+}
+
get_fstype ()
{
local FSTYPE
@@ -281,24 +295,22 @@ find_files ()
devname=$(sys2dev "${dev}")
devfstype="$(get_fstype ${devname})"
- case "${devfstype}" in
- vfat|ext2|ext3|jffs2)
- # FIXME: all supported block devices should be scanned
- mkdir -p "${snap_backing}"
- try_mount "${devname}" "${snap_backing}" "ro"
+ if is_supported_fs ${devfstype}
+ then
+ mkdir -p "${snap_backing}"
+ try_mount "${devname}" "${snap_backing}" "ro"
- for filename in ${filenames}
+ for filename in ${filenames}
do
- if [ -f "${snap_backing}/${filename}" ]
- then
- echo "${devname} ${snap_backing} ${filename}"
- return 0
- fi
- done
-
- umount ${snap_backing}
- ;;
- esac
+ if [ -f "${snap_backing}/${filename}" ]
+ then
+ echo "${devname} ${snap_backing} ${filename}"
+ return 0
+ fi
+ done
+
+ umount ${snap_backing}
+ fi
done
done
}