summaryrefslogtreecommitdiffstats
path: root/modules.d
diff options
context:
space:
mode:
authorMartin Whitaker <xxxx@martin-whitaker.me.uk>2025-12-25 16:54:30 +0000
committerMartin Whitaker <xxxx@martin-whitaker.me.uk>2025-12-25 16:54:30 +0000
commit6cc273d2b093be559c0ef55084e434446e641c71 (patch)
tree310319c155515e12cac084b989f98e8bebfd9027 /modules.d
parentef521298d22c8e40ba6c1c94176e02e577a93007 (diff)
downloadmageia-dracut-conf-0.5.tar
mageia-dracut-conf-0.5.tar.gz
mageia-dracut-conf-0.5.tar.bz2
mageia-dracut-conf-0.5.tar.xz
mageia-dracut-conf-0.5.zip
Restore test for /run/mgalive/installed in mgalive-shutdown.sh.0.5
We want to eject the Live media on shutdown if draklive-install has been run, to ensure the machine reboots into the newly installed system. The code to do this was lost when it was moved from svn to git.
Diffstat (limited to 'modules.d')
-rw-r--r--modules.d/90mgalive/mgalive-shutdown.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules.d/90mgalive/mgalive-shutdown.sh b/modules.d/90mgalive/mgalive-shutdown.sh
index d587fb0..a4d3656 100644
--- a/modules.d/90mgalive/mgalive-shutdown.sh
+++ b/modules.d/90mgalive/mgalive-shutdown.sh
@@ -1,7 +1,7 @@
#!/usr/bin/sh
basedev=$(cat /run/mgalive/basedev)
-if strstr "$basedev" "/dev/sr" ; then
+if [ -e /run/mgalive/installed ] || strstr "$basedev" "/dev/sr" ; then
exec < /dev/tty0 > /dev/tty0
eject $basedev
clear
@@ -10,4 +10,3 @@ if strstr "$basedev" "/dev/sr" ; then
read -t 30 a
fi
return 0
-