diff --git a/init b/init index cbebbd6..0432c5e 100755 --- a/init +++ b/init @@ -371,7 +371,13 @@ level 4s set >/environ echo -e "$color_fg_grn>>>$color_rst Switching Root" exec 3>&- -exec switch_root ${newroot:-/newroot} ${init:-/sbin/init} +while read _env; do + case "$_env" in + init=*) : ;; + [Cbcdefhiklmnrsz]*=*) unset "${_env%%=*}" ;; + esac +done >>$color_rst Failed to switch root!" exec >${SHELL:-/bin/sh} -lim