case $1 in
-y) if _dogetarg $2; then
echo 1
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 0
fi
shift 2;;
-n) if _dogetarg $2; then
echo 0;
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 1
fi
shift 2;;
*) if _dogetarg $1; then
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 0;
fi
shift;;
esac
done
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 1
}
done
if [ -n "$_val" ]; then
echo -n $_val
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 0
fi
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
return 1;
}
}
setdebug() {
- if [ -z "$RDDEBUG" ]; then
+ if [ -z "$RD_DEBUG" ]; then
if [ -e /proc/cmdline ]; then
- RDDEBUG=no
+ RD_DEBUG=no
if getargbool 0 rd.debug -y rdinitdebug -y rdnetdebug; then
- RDDEBUG=yes
+ RD_DEBUG=yes
fi
fi
- export RDDEBUG
+ export RD_DEBUG
fi
- [ "$RDDEBUG" = "yes" ] && set -x
+ [ "$RD_DEBUG" = "yes" ] && set -x
}
setdebug
if [ -f /etc/capsdrop ]; then
. /etc/capsdrop
info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."
+ unset RD_DEBUG
exec /usr/sbin/capsh --drop="$CAPS_INIT_DROP" -- -c "exec /sbin/switch_root \"$NEWROOT\" \"$INIT\" $initargs" || {
warn "Command:"
warn capsh --drop=$CAPS_INIT_DROP -- -c exec switch_root "$NEWROOT" "$INIT" $initargs
emergency_shell
}
else
+ unset RD_DEBUG
exec /sbin/switch_root "$NEWROOT" "$INIT" $initargs || {
warn "Something went very badly wrong in the initramfs. Please "
warn "file a bug against dracut."