summaryrefslogtreecommitdiff
path: root/packages/openslug-init/openslug-init-0.10
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-07-17 19:41:49 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-07-17 19:41:49 +0000
commitd974a5a9ea1437acad1346ab1ee7b170690a179c (patch)
treef9d167bf2b9c7f02fc303d2736197709197bf051 /packages/openslug-init/openslug-init-0.10
parenta8653925ca6d63ba7adf7c1001c478bd8568b2b8 (diff)
Horrible hacky, maybe working, work round for shutdown -r. Please report
any future hangs on shutdown -r in slugbug 145.
Diffstat (limited to 'packages/openslug-init/openslug-init-0.10')
-rw-r--r--packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
index b7ae8b76e5..da39b425f8 100644
--- a/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
+++ b/packages/openslug-init/openslug-init-0.10/initscripts/umountinitrd.sh
@@ -1,5 +1,18 @@
#!/bin/sh
#
# umount /mnt, which is where the initrd ends up mounted
-# if the directory /initrd is not present
-exec umount /mnt 2>/dev/null
+# 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
+}