diff options
| author | Marco Amadori <amadorim@vdavda.com> | 2008-09-16 10:34:29 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:02 +0100 |
| commit | 44ed93e9a7fafb96bd0f4f937ae369e963bd3420 (patch) | |
| tree | 8d934968b8561a5400305bb4135babf0af5f412d /scripts | |
| parent | d7b7251424be21bdf7bac2958019873eb76a9f96 (diff) | |
| download | live-boot-44ed93e9a7fafb96bd0f4f937ae369e963bd3420.tar.gz live-boot-44ed93e9a7fafb96bd0f4f937ae369e963bd3420.zip | |
Skipped some runtime duplicated execution.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/live-helpers | 9 |
1 files changed, 7 insertions, 2 deletions
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 |
