summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-02-02 15:30:32 +0100
committerSimon Rettberg2024-02-02 15:30:32 +0100
commit2bf4b31c775e9d2af5c50d9dda27ede960983e73 (patch)
tree61cc8b1c5085b2f5c34a6041e0ec6447a0339bc1
parentMake useradd and groupadd return 0 (diff)
downloadmltk-2bf4b31c775e9d2af5c50d9dda27ede960983e73.tar.gz
mltk-2bf4b31c775e9d2af5c50d9dda27ede960983e73.tar.xz
mltk-2bf4b31c775e9d2af5c50d9dda27ede960983e73.zip
[vbox-src] Add progress output, skip udev reload with MaxiLinux
-rwxr-xr-xcore/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env b/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
index 3226d270..a1711f0a 100755
--- a/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
+++ b/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
@@ -44,10 +44,12 @@ else
fi
# check/create vboxusers group
-getent group vboxusers || addgroup --system vboxusers
+echo "Handling group"
+getent group vboxusers &> /dev/null || addgroup --system vboxusers
[[ " $( id -Gn demo ) " = *" vboxusers "* ]] || adduser demo vboxusers
# set their permissions
+echo "Setting up /dev"
chmod 0600 /dev/vboxdrv /dev/vboxnetctl
chmod 0666 /dev/vboxdrvu
mkdir -p /dev/vboxusb
@@ -57,11 +59,16 @@ chown root:vboxusers /dev/vboxusb
# create required standard directories
mkdir -p "/tmp/virt/virtualbox" -m 1777
-# reload udev rules since aufs'ing the layer on top do not trigger its inotify watch
-udevadm control --reload
+if ! [ -e "/run/openslx/dmsetup.state" ]; then
+ # reload udev rules since aufs'ing the layer on top do not trigger its inotify watch
+ echo "Reloading udev rules"
+ udevadm control --reload
+fi
# pretty dumb, you can only create host-only interfaces,
# but not assign a specific name/number
+echo "Setting up vbox network interfaces"
+
if ! [ -e "/sys/class/net/vboxnet0" ]; then
${VBOX_MANAGE} hostonlyif create || exit_code=1
ip link set dev vboxnet0 up
@@ -83,6 +90,7 @@ fi
if [ "$SLX_BRIDGE_OTHER_NICS" = "yes" ]; then
# These will have been set up in our init, or by bridge-other-nics.service
+ echo "Setting up additional bridged network interfaces"
vboxnet=3
for nic in /sys/class/net/br-nic-*; do
nic="${nic##*-}"