diff --git a/playbook/blancco-init.sh b/playbook/blancco-init.sh index 5aa6e6e..70fae8e 100644 --- a/playbook/blancco-init.sh +++ b/playbook/blancco-init.sh @@ -152,7 +152,11 @@ mkdir -p /run/upper/upper /run/upper/work mount -t overlay overlay -o lowerdir=/run/lower,upperdir=/run/upper/upper,workdir=/run/upper/work /run/newroot echo " [5/5] Loading drivers and settings" -wget -q -T 30 -O /tmp/kmod.tar.gz http://$SERVER/blancco/kmod.tar.gz 2>&1 +# Modules (+ iwlwifi firmware) for the running kernel. kmod-$KVER.tar.gz +# lets several boot kernels share one web root; kmod.tar.gz is the +# original single-kernel name, kept as the fallback. +wget -q -T 30 -O /tmp/kmod.tar.gz "http://$SERVER/blancco/kmod-$KVER.tar.gz" 2>/dev/null || + wget -q -T 30 -O /tmp/kmod.tar.gz http://$SERVER/blancco/kmod.tar.gz 2>&1 [ -s /tmp/kmod.tar.gz ] && (cd /run/newroot && gunzip -c /tmp/kmod.tar.gz | tar xf - && rm -f /tmp/kmod.tar.gz) mkdir -p /run/newroot/albus @@ -221,13 +225,21 @@ XEOF # Restart after an erasure stalled on "A stop job is running for # /mnt/share": the network goes down before the SMB report share is -# unmounted, and the CIFS umount waits out systemd's 90s default. Reports -# are written long before shutdown, so cap stop jobs at 10s. -mkdir -p /run/newroot/etc/systemd/system.conf.d +# unmounted, and the CIFS umount waits out the 90s timeout. A mount unit's +# timeout is TimeoutSec= (default: the START timeout), so +# DefaultTimeoutStopSec alone does not reach it. Lazy + forced umount +# detaches the dead share at once; reports are written long before this. +mkdir -p /run/newroot/etc/systemd/system.conf.d /run/newroot/etc/systemd/system/mnt-share.mount.d cat > /run/newroot/etc/systemd/system.conf.d/10-fast-stop.conf << XEOF [Manager] DefaultTimeoutStopSec=10s XEOF +cat > /run/newroot/etc/systemd/system/mnt-share.mount.d/10-fast-umount.conf << XEOF +[Mount] +TimeoutSec=10s +LazyUnmount=yes +ForceUnmount=yes +XEOF # Disable Xorg screensaver + DPMS so display stays on during long erasures. # Numbered 00-* to run before vendor xinitrc.d hooks.