mkdir basic dirs in /run
for systemd initramfs, /run is also mounted for non-systemd the contents of /run is copied over, when mounting /runmaster
parent
8795467533
commit
56903458d7
|
|
@ -2,11 +2,6 @@
|
|||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
||||
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
||||
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
||||
[ -d /run/log ] || mkdir -p -m 0755 /run/log
|
||||
|
||||
if [ -f /dracut-state.sh ]; then
|
||||
. /dracut-state.sh 2>/dev/null
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@
|
|||
|
||||
export DRACUT_SYSTEMD
|
||||
export NEWROOT
|
||||
if [ -n "$NEWROOT" ]; then
|
||||
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
||||
fi
|
||||
|
||||
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
||||
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
||||
[ -d /run/log ] || mkdir -p -m 0755 /run/log
|
||||
|
||||
debug_off() {
|
||||
set +x
|
||||
|
|
|
|||
|
|
@ -56,17 +56,17 @@ fi
|
|||
|
||||
if ! ismounted /dev/pts; then
|
||||
mkdir -m 0755 /dev/pts
|
||||
mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null
|
||||
mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts >/dev/null
|
||||
fi
|
||||
|
||||
if ! ismounted /dev/shm; then
|
||||
mkdir -m 0755 /dev/shm
|
||||
mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
|
||||
mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm >/dev/null
|
||||
fi
|
||||
|
||||
if ! ismounted /run; then
|
||||
mkdir -m 0755 /newrun
|
||||
mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null
|
||||
cp -a /run/* /newrun >/dev/null 2>&1
|
||||
mount --move /newrun /run
|
||||
rm -fr -- /newrun
|
||||
|
|
@ -88,10 +88,6 @@ fi
|
|||
|
||||
trap "action_on_fail Signal caught!" 0
|
||||
|
||||
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
||||
[ -d /run/log ] || mkdir -p -m 0755 /run/log
|
||||
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
||||
|
||||
export UDEVVERSION=$(udevadm --version)
|
||||
if [ $UDEVVERSION -gt 166 ]; then
|
||||
# newer versions of udev use /run/udev/rules.d
|
||||
|
|
|
|||
Loading…
Reference in New Issue