From ffdc0c74e13b6c194053a2cf909e15ebb6fae5b4 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 14 May 2023 23:12:22 +0200 Subject: [PATCH] mount --- bash/alias/mount.sh | 10 ++++++++++ bash/mount.sh | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 bash/alias/mount.sh diff --git a/bash/alias/mount.sh b/bash/alias/mount.sh new file mode 100644 index 0000000..ca11b0e --- /dev/null +++ b/bash/alias/mount.sh @@ -0,0 +1,10 @@ +alias m="\ +mount \ +" + +# remount read-only medium in read-write +alias remount="\ +mount \ +-o \"remount,rw\" \ +\"/usr/lib/live/mount/medium\" \ +" diff --git a/bash/mount.sh b/bash/mount.sh index b33b12c..65131f1 100644 --- a/bash/mount.sh +++ b/bash/mount.sh @@ -1,9 +1,3 @@ -alias m='mount' - -# remount read-only medium in read-write -alias remount='mount -o remount,rw /usr/lib/live/mount/medium' - - function mo { local directory="${1}" local file @@ -44,10 +38,19 @@ for f in 'dev' 'dev/pts' 'proc' 'sys' ; do done } -alias cr='chroot overlay/mount' +alias cr="\ +chroot \ +\"overlay/mount\" \ +" + +alias cru="\ +chroot \ +--userspec \"1000:1000\" \ +\"overlay/mount\" \ +" function ur { -for f in 'dev/pts' 'dev' 'proc' 'sys' ; do +for f in 'sys' 'proc' 'dev/pts' 'dev' ; do umount --lazy "overlay/mount/${f}" done }