alias/overlay
This commit is contained in:
parent
8911523e83
commit
5d93e311a8
1 changed files with 11 additions and 9 deletions
|
@ -1,4 +1,6 @@
|
||||||
obm() { a__overlay_bind_mount "${@}"; }
|
# overlay functions to manipulate squashfs manually
|
||||||
|
|
||||||
|
#= obm
|
||||||
a__overlay_bind_mount() {
|
a__overlay_bind_mount() {
|
||||||
local directory
|
local directory
|
||||||
for directory in "dev" "dev/pts" "proc" "sys"; do
|
for directory in "dev" "dev/pts" "proc" "sys"; do
|
||||||
|
@ -9,7 +11,7 @@ a__overlay_bind_mount() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
obu() { a__overlay_bind_unmount "${@}"; }
|
#= obu
|
||||||
a__overlay_bind_unmount() {
|
a__overlay_bind_unmount() {
|
||||||
local directory
|
local directory
|
||||||
for directory in "sys" "proc" "dev/pts" "dev"; do
|
for directory in "sys" "proc" "dev/pts" "dev"; do
|
||||||
|
@ -20,30 +22,30 @@ a__overlay_bind_unmount() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
ocr() { a__overlay_command_root "${@}"; }
|
#= ocr
|
||||||
a__overlay_command_root() {
|
a__overlay_command_root() {
|
||||||
chroot \
|
chroot \
|
||||||
"overlay/mount" "${@}"
|
"overlay/mount" "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
ocu() { a__overlay_command_user "${@}"; }
|
#= ocu
|
||||||
a__overlay_command_user() {
|
a__overlay_command_user() {
|
||||||
chroot \
|
chroot \
|
||||||
--userspec "1000:1000" \
|
--userspec "1000:1000" \
|
||||||
"overlay/mount" "${@}"
|
"overlay/mount" "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
omm() { a__overlay_mirror_mount "${@}"; }
|
#= omm
|
||||||
a__overlay_mirror_mount() {
|
a__overlay_mirror_mount() {
|
||||||
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
|
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
|
||||||
}
|
}
|
||||||
|
|
||||||
omu() { a__overlay_mirror_unmount "${@}"; }
|
#= omu
|
||||||
a__overlay_mirror_unmount() {
|
a__overlay_mirror_unmount() {
|
||||||
umount --recursive "overlay/mount/deb"
|
umount --recursive "overlay/mount/deb"
|
||||||
}
|
}
|
||||||
|
|
||||||
orm() { a__overlay_root_mount "${@}"; }
|
#= orm
|
||||||
a__overlay_root_mount() {
|
a__overlay_root_mount() {
|
||||||
local root="${1}"
|
local root="${1}"
|
||||||
if [ -z "${root}" ]; then
|
if [ -z "${root}" ]; then
|
||||||
|
@ -82,7 +84,7 @@ a__overlay_root_mount() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
ors() { a__overlay_root_squash "${@}"; }
|
#= ors
|
||||||
a__overlay_root_squash() {
|
a__overlay_root_squash() {
|
||||||
local directory="${1}"
|
local directory="${1}"
|
||||||
local file
|
local file
|
||||||
|
@ -102,7 +104,7 @@ a__overlay_root_squash() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
oru() { a__overlay_root_unmount "${@}"; }
|
#= oru
|
||||||
a__overlay_root_unmount() {
|
a__overlay_root_unmount() {
|
||||||
(
|
(
|
||||||
if ! cd "overlay"; then
|
if ! cd "overlay"; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue