conf/distro/jlime-donkey.conf : Added parted & Dialog to distro_rdepends
[vuplus_openembedded] / packages / slugos-init / files / initscripts / umountinitrd.sh
1 #!/bin/sh
2 #
3 # umount /mnt, which is where the initrd ends up mounted
4 # if the directory /initrd is not present, if this fails
5 # then the /initrd is mounted and we want to remount that
6 # ro - this works round the shutdown -r hang problem
7 . /etc/default/functions
8 while read device directory remainder
9 do
10         case "$directory" in
11         /mnt)   echo "InitRD: unmount initrd on /mnt" >&2
12                 umount /mnt;;
13         /initrd)# need the device for a remount
14                 ffspart=Flashdisk
15                 ffsdev="$(mtblockdev $ffspart)"
16                 echo "InitRD: remount $ffdev read-only on /initrd" >&2
17                 if test -n "$ffsdev" -a -b "$ffsdev"
18                 then
19                         mount -o remount,ro "$ffsdev" /initrd
20                 else
21                         echo "Flashdisk: $ffsdev: flash device not found" >&2
22                 fi;;
23         esac
24 done </proc/mounts