summaryrefslogtreecommitdiffstats
path: root/files/halt.pre
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2011-03-15 13:58:31 +0000
committerOlivier Blin <blino@mageia.org>2011-03-15 13:58:31 +0000
commit4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5 (patch)
treef6d8d18d835eb7a25088d351663a29c5058532d5 /files/halt.pre
downloaddraklive-config-4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5.tar
draklive-config-4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5.tar.gz
draklive-config-4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5.tar.bz2
draklive-config-4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5.tar.xz
draklive-config-4c4328833cb84e7e5e4eccbb385c9d4851bfd7b5.zip
import initial live config
Diffstat (limited to 'files/halt.pre')
-rw-r--r--files/halt.pre20
1 files changed, 20 insertions, 0 deletions
diff --git a/files/halt.pre b/files/halt.pre
new file mode 100644
index 0000000..8b2583e
--- /dev/null
+++ b/files/halt.pre
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+mypath=$_
+roottype=`awk '$2 == "/" { print $3 }' /etc/fstab`
+
+maybe_umount() {
+ eval d=\$$#
+ awk "\$2 == \"$d\" { system(\"umount \" \$d) }" /proc/mounts
+}
+
+if [ "$roottype" == unionfs ]; then
+ maybe_umount /var/lib/rpm
+ maybe_umount /tmp/rpm/real
+ maybe_umount /tmp/rpm
+fi
+
+# disable self during first halt when installed
+rm -f $mypath
+
+/bin/plymouth quit