base/dracut-lib.sh: s/RDDEBUG/RD_DEBUG/g
RDDEBUG would be unset by the environment cleanup in init and logging would be turned off afterwards.master
parent
0b53ca70b6
commit
9e7a3bf242
|
|
@ -69,24 +69,24 @@ getarg() {
|
|||
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
|
||||
}
|
||||
|
||||
|
|
@ -134,10 +134,10 @@ getargs() {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -195,16 +195,16 @@ splitsep() {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@ fi
|
|||
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
|
||||
|
|
@ -393,6 +394,7 @@ if [ -f /etc/capsdrop ]; then
|
|||
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."
|
||||
|
|
|
|||
Loading…
Reference in New Issue