summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/initscripts/umountinitrd.sh
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2006-01-07 08:58:44 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-07 08:58:44 +0000
commit8fb6b2d3d410ad2badf0c99ed7a66b698aafaa17 (patch)
tree8a700d795bdf33061b8bccc353fe0aaffa044036 /packages/slugos-init/files/initscripts/umountinitrd.sh
parent0b67482ddc4fe571d16fa094627abb447b9a8edb (diff)
slugos: Major rename of common SlugOS files and directories from openslug to slugos.
Diffstat (limited to 'packages/slugos-init/files/initscripts/umountinitrd.sh')
-rw-r--r--packages/slugos-init/files/initscripts/umountinitrd.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/slugos-init/files/initscripts/umountinitrd.sh b/packages/slugos-init/files/initscripts/umountinitrd.sh
new file mode 100644
index 0000000000..da39b425f8
--- /dev/null
+++ b/packages/slugos-init/files/initscripts/umountinitrd.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# umount /mnt, which is where the initrd ends up mounted
+# if the directory /initrd is not present, if this fails
+# then the /initrd is mounted and we want to remount that
+# ro - this works round the shutdown -r hang problem
+umount /mnt 2>/dev/null || {
+ # need the device for a remount
+ . /etc/default/functions
+ ffspart=Flashdisk
+ ffsdev="$(mtblockdev $ffspart)"
+ if test -n "$ffsdev" -a -b "$ffsdev"
+ then
+ mount -o remount,ro "$ffsdev" /initrd
+ else
+ echo "Flashdisk: $ffsdev: flash device not found" >&2
+ fi
+}