projects
/
rrq
/
overlay-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug fix
[rrq/overlay-boot.git]
/
overlay-boot
diff --git
a/overlay-boot
b/overlay-boot
index 5e6bef92a9b7451627b5d257ce14ade89a66381b..e94620ec70746b22f14fc61373811b9ef39e8090 100755
(executable)
--- a/
overlay-boot
+++ b/
overlay-boot
@@
-4,10
+4,10
@@
# is an overlay of the subhost's root and an OS root. The service
# subhost is defined by a configuration file named on teh command line
# is an overlay of the subhost's root and an OS root. The service
# subhost is defined by a configuration file named on teh command line
-OVERLAYDIR="$(
realpath $(dirname
$0))"
+OVERLAYDIR="$(
dirname $(realpath
$0))"
[ $(id -u) = 0 ] || exec sudo $0 $@
[ $(id -u) = 0 ] || exec sudo $0 $@
-. $
(dirname $(realpath $0))
/functions $*
+. $
OVERLAYDIR
/functions $*
CONFIG="$1"
[ -r "$CONFIG" ] || die "Missing configuration $CONFIG"
CONFIG="$1"
[ -r "$CONFIG" ] || die "Missing configuration $CONFIG"
@@
-44,10
+44,11
@@
config CABLES ""
config START "networking ssh"
config SUBSHELL /bin/sh
config START "networking ssh"
config SUBSHELL /bin/sh
-# Setup virtual cabling
and subhost's /etc/network/interfaces
+# Setup virtual cabling
setup_veth_cables $NAME $CABLES
# Set up the mount for this subhost, including a new tmpfs on its /run
setup_veth_cables $NAME $CABLES
# Set up the mount for this subhost, including a new tmpfs on its /run
+# and a default $UPPER/etc/network/interfaces if needed
echo setup_overlay "$NAME" "$LIVE" "$LOWER" "$UPPER" "$WORK"
setup_overlay "$NAME" "$LIVE" "$LOWER" "$UPPER" "$WORK"
echo setup_overlay "$NAME" "$LIVE" "$LOWER" "$UPPER" "$WORK"
setup_overlay "$NAME" "$LIVE" "$LOWER" "$UPPER" "$WORK"
@@
-59,7
+60,7
@@
exithandler() {
}
trap "exithandler" 0
}
trap "exithandler" 0
-CMD="unshare -fp --mount-proc ip netns exec $NAME chroot $LIVE /bin/sh"
+CMD="unshare -fp --mount-proc
-i -u
ip netns exec $NAME chroot $LIVE /bin/sh"
echo "$CMD"
config RAM_SIZE 50M
echo "$CMD"
config RAM_SIZE 50M