done
initargs=""
-initrdargs="$initrdargs console BOOT_IMAGE rdbreak rdinitdebug rdudevinfo rdudevdebug rdnetdebug rdcopystate rdshell"
-for x in "$@"; do
- for s in $initrdargs; do
- [ "${x%%=*}" = $s ] && continue 2
+if getarg init= >/dev/null ; then
+ ignoreargs="console BOOT_IMAGE"
+ # only pass arguments after init= to the init
+ read CLINE </proc/cmdline
+ CLINE=${CLINE#*init=}
+ set $CLINE
+ for x in "$@"; do
+ for s in $ignoreargs; do
+ [ "${x%%=*}" = $s ] && continue 2
+ done
+ initargs="$initargs $x"
done
- initargs="$initargs $x"
-done
+ unset CLINE
+fi
# Prepare network opts for passing
if [ -e /tmp/net.ifaces ]; then
info "Switching root"
exec switch_root "$NEWROOT" "$INIT" $initargs || {
- # davej doesn't like initrd bugs
- echo "Something went very badly wrong in the initrd. Please "
- echo "file a bug against mkinitrd."
+ echo "Something went very badly wrong in the initramfs. Please "
+ echo "file a bug against dracut."
emergency_shell
}