projects
/
rrq
/
overlay-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cecfed8
)
Zap spurious sudo usage
master
author
Ralph Ronnquist
<rrq@rrq.au>
Sun, 13 Jul 2025 02:54:30 +0000
(12:54 +1000)
committer
Ralph Ronnquist
<rrq@rrq.au>
Sun, 13 Jul 2025 02:54:30 +0000
(12:54 +1000)
overlay-go
patch
|
blob
|
history
overlay-share
patch
|
blob
|
history
diff --git
a/overlay-go
b/overlay-go
index 991067d5a453c20bf629d4392097499a10087331..8724fbd5fa133346a9ceb4c06bd2c1800df567d1 100755
(executable)
--- a/
overlay-go
+++ b/
overlay-go
@@
-1,6
+1,5
@@
#!/bin/sh
#!/bin/sh
-[ $(id -u) = 0 ] || exec sudo $0 $@
. $(dirname $(realpath $0))/functions XXX
NAME="$1"
. $(dirname $(realpath $0))/functions XXX
NAME="$1"
@@
-21,7
+20,7
@@
EOF
exit 1
fi
exit 1
fi
-
sudo
nsenter -t "$RSPID" -n -m -p -r -w -i -u -C /bin/bash
+nsenter -t "$RSPID" -n -m -p -r -w -i -u -C /bin/bash
if [ $? = 137 ] ; then
echo "######### please 'fg' this again (if stopped)" >&2
stty sane # a killed bash might leave the tty insane and stty
if [ $? = 137 ] ; then
echo "######### please 'fg' this again (if stopped)" >&2
stty sane # a killed bash might leave the tty insane and stty
diff --git
a/overlay-share
b/overlay-share
index 1ed74fc395658ab7561c5059ad594337fd39ea9b..7058b90da79c92f52ccbdcbb6a1e16ab18f5bf5f 100755
(executable)
--- a/
overlay-share
+++ b/
overlay-share
@@
-30,7
+30,7
@@
EOF
exit 1
fi
exit 1
fi
-
sudo
nsenter -t "$RSPID" -n -m -p /bin/bash <<EOF
+nsenter -t "$RSPID" -n -m -p /bin/bash <<EOF
set -e
LIVE=\$(awk '\$1=="$NAME" && \$3=="overlay" {print \$2;}' < /proc/mounts)
[ -d "\$LIVE" ] && mount --bind $SHARE "\$LIVE$SHARE"
set -e
LIVE=\$(awk '\$1=="$NAME" && \$3=="overlay" {print \$2;}' < /proc/mounts)
[ -d "\$LIVE" ] && mount --bind $SHARE "\$LIVE$SHARE"