shutdown: guard against read-only /run

remount the switch rooted /run writeable again.

(cherry picked from commit 54e09dfb72)
Harald Hoyer 2015-11-30 11:27:03 +01:00
parent 68021e85c9
commit 8fb06a0562
2 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,7 @@ depends() {

install() {
local _d
inst_multiple umount poweroff reboot halt losetup
inst_multiple umount poweroff reboot halt losetup stat
inst_multiple -o kexec
inst "$moddir/shutdown.sh" "$prefix/shutdown"
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib

View File

@ -14,6 +14,10 @@ export TERM=linux
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
. /lib/dracut-lib.sh

if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then
mount -o remount,rw /
fi

mkdir /oldsys
for i in sys proc run dev; do
mkdir /oldsys/$i