From a93d20bb3604bed86e3d1bb74513e428b21242cd Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 8 Mar 2012 15:13:02 -0500 Subject: Use /run/initramfs instead of /dev/.initramfs Current dracut saves state to /run/initramfs, since /run is standard now. This patch makes rc.sysinit and fedora-readonly check for files in /run/initramfs/rwtab and /run/initramfs/state (which is where dracut writes them). It also makes ifup-eth look for lease files in /run/initramfs. --- rc.d/rc.sysinit | 4 ++-- sysconfig/network-scripts/ifup-eth | 2 +- systemd/fedora-readonly | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 5248cfb1..6363e4ca 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -301,7 +301,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then mount -n -t tmpfs $RW_OPTIONS $mountopts none "$RW_MOUNT" fi - for file in /etc/rwtab /etc/rwtab.d/* /dev/.initramfs/rwtab ; do + for file in /etc/rwtab /etc/rwtab.d/* /run/initramfs/rwtab; do is_ignored_file "$file" && continue [ -f $file ] && cat $file | while read type path ; do case "$type" in @@ -322,7 +322,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then done # Use any state passed by initramfs - [ -d /dev/.initramfs/state ] && cp -a /dev/.initramfs/state/* $RW_MOUNT + [ -d /run/initramfs/state ] && cp -a /run/initramfs/state/* $RW_MOUNT # In theory there should be no more than one network interface active # this early in the boot process -- the one we're booting from. diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 5d2cff5c..3037941e 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -193,7 +193,7 @@ if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then DHCLIENTCONF=''; fi; # copy any lease obtained by the initrd - for file in /dev/.dhclient-${DEVICE}.leases /dev/.initramfs/net.${DEVICE}.lease /run/initramfs/net.${DEVICE}.lease; do + for file in /run/initramfs/net.${DEVICE}.lease; do if [ -f "${file}" ]; then mv -f $file /var/lib/dhclient/dhclient-${DEVICE}.leases [ -x /sbin/restorecon ] && restorecon /var/lib/dhclient/dhclient-${DEVICE}.leases > /dev/null 2>&1 diff --git a/systemd/fedora-readonly b/systemd/fedora-readonly index 13172892..0690cd45 100755 --- a/systemd/fedora-readonly +++ b/systemd/fedora-readonly @@ -81,7 +81,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then mount -n -t tmpfs $RW_OPTIONS $mountopts none "$RW_MOUNT" fi - for file in /etc/rwtab /etc/rwtab.d/* /dev/.initramfs/rwtab ; do + for file in /etc/rwtab /etc/rwtab.d/* /run/initramfs/rwtab ; do is_ignored_file "$file" && continue [ -f $file ] && cat $file | while read type path ; do case "$type" in @@ -102,7 +102,7 @@ if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then done # Use any state passed by initramfs - [ -d /dev/.initramfs/state ] && cp -a /dev/.initramfs/state/* $RW_MOUNT + [ -d /run/initramfs/state ] && cp -a /run/initramfs/state/* $RW_MOUNT # In theory there should be no more than one network interface active # this early in the boot process -- the one we're booting from. -- cgit v1.2.1