shutdown: guard against read-only /run
remount the switch rooted /run writeable again.master
parent
88ba9372be
commit
54e09dfb72
|
@ -14,7 +14,7 @@ depends() {
|
|||
# called by dracut
|
||||
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
|
||||
|
|
|
@ -12,6 +12,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
|
||||
|
|
Loading…
Reference in New Issue