From: Marco Amadori Date: Tue, 16 Sep 2008 08:34:29 +0000 (+0200) Subject: Skipped some runtime duplicated execution. X-Git-Tag: debian/1.139.1-3~10 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=67b01b3fc59e5535b28d89c46895c94c5aa06d26;hp=f3d517cffe3b5fdc2b962b2e0e9c2f819ff858da;p=live-boot-grml.git Skipped some runtime duplicated execution. Signed-off-by: Marco Amadori --- diff --git a/scripts/live-helpers b/scripts/live-helpers index 990c088..0b9bd5f 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -269,6 +269,7 @@ try_mount () dev="${1}" mountp="${2}" opts="${3}" + fstype="${4}" old_mountp="$(where_is_mounted ${dev})" @@ -277,7 +278,11 @@ try_mount () mount -o remount,"${opts}" "${dev}" "${old_mountp}" || panic "Remounting ${dev} ${opts} on ${old_mountp} failed" mount -o bind "${old_mountp}" "${mountp}" || panic "Cannot bind-mount ${old_mountp} on ${mountp}" else - mount -t $(get_fstype "${dev}") -o "${opts}" "${dev}" "${mountp}" || panic "Cannot mount ${dev} on ${mountp}" + if [ -z "${fstype}" ] + then + fstype=$(get_fstype "${dev}") + fi + mount -t "${fstype}" -o "${opts}" "${dev}" "${mountp}" || panic "Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" fi } @@ -336,7 +341,7 @@ find_files () if is_supported_fs ${devfstype} then mkdir -p "${snap_backing}" - try_mount "${devname}" "${snap_backing}" "ro" + try_mount "${devname}" "${snap_backing}" "ro" ${devfstype} for filename in ${filenames} do