[util-iso-*fs] use iso_fs var
This commit is contained in:
parent
a300acd299
commit
3109d6bfb6
2 changed files with 6 additions and 6 deletions
|
@ -11,19 +11,19 @@
|
|||
|
||||
# $1: new branch
|
||||
mount_root_image(){
|
||||
msg2 "aufs: mount [root-image] on [%s]" "${1##*/}"
|
||||
msg2 "${iso_fs}: mount [root-image] on [%s]" "${1##*/}"
|
||||
mount -t aufs -o br="$1":${work_dir}/root-image=ro none "$1"
|
||||
}
|
||||
|
||||
mount_custom_image(){
|
||||
msg2 "aufs: mount [%s] on [%s-image]" "${1##*/}" "${custom}"
|
||||
msg2 "${iso_fs}: mount [%s] on [%s-image]" "${1##*/}" "${custom}"
|
||||
mount -t aufs -o br="$1":${work_dir}/${custom}-image=ro:${work_dir}/root-image=ro none "$1"
|
||||
}
|
||||
|
||||
# $1: image path
|
||||
umount_image(){
|
||||
if mountpoint -q "$1";then
|
||||
msg2 "aufs: unmount %s" "${1##*/}"
|
||||
msg2 "${iso_fs}: unmount %s" "${1##*/}"
|
||||
umount $1
|
||||
fi
|
||||
find $1 -name '.wh.*' -delete &> /dev/null
|
||||
|
|
|
@ -11,20 +11,20 @@
|
|||
|
||||
# $1: new branch
|
||||
mount_root_image(){
|
||||
msg2 "overlayfs: mount [root-image] on [%s]" "${1##*/}"
|
||||
msg2 "${iso_fs}: mount [root-image] on [%s]" "${1##*/}"
|
||||
mkdir -p "${work_dir}/work"
|
||||
mount -t overlay overlay -olowerdir="${work_dir}/root-image",upperdir="$1",workdir="${work_dir}/work" "$1"
|
||||
}
|
||||
|
||||
mount_custom_image(){
|
||||
msg2 "overlayfs: mount [%s] on [%s-image]" "${1##*/}" "${custom}"
|
||||
msg2 "${iso_fs}: mount [%s] on [%s-image]" "${1##*/}" "${custom}"
|
||||
mkdir -p "${work_dir}/work"
|
||||
mount -t overlay overlay -olowerdir="${work_dir}/${custom}-image":"${work_dir}/root-image",upperdir="$1",workdir="${work_dir}/work" "$1"
|
||||
}
|
||||
|
||||
umount_image(){
|
||||
if mountpoint -q "$1";then
|
||||
msg2 "overlayfs: unmount %s" "${1##*/}"
|
||||
msg2 "${iso_fs}: unmount %s" "${1##*/}"
|
||||
umount $1
|
||||
rm -rf "${work_dir}/work"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue