mount
This commit is contained in:
parent
44adf7cc8f
commit
fbfb4c27e6
1 changed files with 52 additions and 48 deletions
|
@ -8,8 +8,10 @@ if [ "${directory}" ] ; then
|
||||||
cd "overlay"
|
cd "overlay"
|
||||||
mkdir {lower,upper,work,mount}
|
mkdir {lower,upper,work,mount}
|
||||||
if mount "${file}" "lower" ; then
|
if mount "${file}" "lower" ; then
|
||||||
mount -t "overlay" "overlay" "mount" \
|
mount \
|
||||||
-o lowerdir="lower",upperdir="upper",workdir="work"
|
-o lowerdir="lower",upperdir="upper",workdir="work"
|
||||||
|
-t "overlay" \
|
||||||
|
"overlay" "mount"
|
||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
@ -33,6 +35,7 @@ rmdir "overlay"
|
||||||
|
|
||||||
|
|
||||||
mr() {
|
mr() {
|
||||||
|
local f
|
||||||
for f in "dev" "dev/pts" "proc" "sys" ; do
|
for f in "dev" "dev/pts" "proc" "sys" ; do
|
||||||
mount --bind "/${f}" "overlay/mount/${f}"
|
mount --bind "/${f}" "overlay/mount/${f}"
|
||||||
done
|
done
|
||||||
|
@ -50,6 +53,7 @@ chroot \
|
||||||
"
|
"
|
||||||
|
|
||||||
ur() {
|
ur() {
|
||||||
|
local f
|
||||||
for f in "sys" "proc" "dev/pts" "dev" ; do
|
for f in "sys" "proc" "dev/pts" "dev" ; do
|
||||||
umount --lazy "overlay/mount/${f}"
|
umount --lazy "overlay/mount/${f}"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue