mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-28 18:55:32 +03:00
Copy netboot state into /dev/.initramfs/ before switch_root
If cmdline "rdcopystate", then copy all of /tmp/* into /dev/.initramfs/ for later debugging examination.
This commit is contained in:
parent
169363e827
commit
e1ee93539f
@ -134,8 +134,18 @@ for x in "$@"; do
|
||||
[ "${x%%=*}" = "rdudevinfo" ] && continue
|
||||
[ "${x%%=*}" = "rdudevdebug" ] && continue
|
||||
[ "${x%%=*}" = "rdnetdebug" ] && continue
|
||||
[ "${x%%=*}" = "rdcopystate" ] && continue
|
||||
initargs="$initargs $x"
|
||||
done
|
||||
|
||||
# Copy state
|
||||
mkdir /dev/.initramfs/
|
||||
if getarg rdcopystate; then
|
||||
cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1
|
||||
else
|
||||
cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
exec switch_root "$NEWROOT" "$INIT" $initargs || {
|
||||
# davej doesn't like initrd bugs
|
||||
echo "Something went very badly wrong in the initrd. Please "
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock
|
||||
dracut_install mount mknod mkdir modprobe pidof sleep chroot sed ls flock cp
|
||||
if [ ! -e "${initdir}/bin/sh" ]; then
|
||||
dracut_install bash
|
||||
(ln -s bash "${initdir}/bin/sh" || :)
|
||||
|
Loading…
Reference in New Issue
Block a user