From: Harald Hoyer Date: Thu, 24 Mar 2011 10:31:49 +0000 (+0100) Subject: base/init: fixed /dev/.initramfs creation, for no "/run" X-Git-Tag: 009~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e43df9e3425bfd281ba39fd9598b497adbe4b98e;p=thirdparty%2Fdracut.git base/init: fixed /dev/.initramfs creation, for no "/run" --- diff --git a/modules.d/99base/init b/modules.d/99base/init index 7e0443d31..fcd6ad725 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -355,7 +355,7 @@ fi # Debug: Copy state if getargbool 0 rd.copystate -y rdcopystate; then - cp /init.log /tmp/* /run/initramfs/ >/dev/null 2>&1 + cp -axr /init.log /tmp/* /run/initramfs/ >/dev/null 2>&1 fi if getargbool 1 rd.timestamp; then @@ -373,11 +373,14 @@ export PATH="$OLD_PATH" if [ -d "$NEWROOT"/run ]; then mount --move /run "$NEWROOT"/run else - # make compat symlinks for old systems without /run - mkdir -m 0755 /dev/.run - mount --move /run /dev/.run - ln -s /dev/.run/initramfs /dev/.initramfs - [ -e /dev/.run/mdadm ] && ln -s /dev/.run/mdadm /dev/.mdadm + if [ -e /run/initramfs ]; then + mkdir -m 0755 /dev/.initramfs + cp -axr /run/initramfs/* /dev/.initramfs >/dev/null 2>&1 + fi + if [ -e /run/mdadm ]; then + mkdir -m 0755 /dev/.mdadm + cp -axr /run/mdadm/* /dev/.mdadm >/dev/null 2>&1 + fi fi if [ -f /etc/capsdrop ]; then diff --git a/test/TEST-50-MULTINIC/client-init b/test/TEST-50-MULTINIC/client-init index 52b24dd26..a65a68684 100755 --- a/test/TEST-50-MULTINIC/client-init +++ b/test/TEST-50-MULTINIC/client-init @@ -5,6 +5,6 @@ export TERM=linux export PS1='initramfs-test:\w\$ ' stty sane echo "made it to the rootfs! Powering down." -echo OK $(cat /dev/.run/initramfs/net.ifaces) > /dev/sda +echo OK $(cat /dev/.initramfs/net.ifaces) > /dev/sda #sh -i poweroff -f