From: Benjamin Drung Date: Sat, 31 Jan 2026 00:39:21 +0000 (+0100) Subject: fix(dracut-logger): do not export maxloglvl and syslogfacility X-Git-Tag: 110~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7fd8d3f083b75a7a373cb335320009e69fdaaae;p=thirdparty%2Fdracut-ng.git fix(dracut-logger): do not export maxloglvl and syslogfacility Commit 46265a9d3e0a ("dracut-logger: make $maxloglvl public") exports the `maxloglvl` variable, but this is not needed. Exporting variables is only needed when subprocesses need to access those variables. `maxloglvl` is only used in `dracut-logger.sh` and `dracut.sh`. `dracut.sh` sources `dracut-logger.sh`. So exporting `maxloglvl` is not needed. `syslogfacility` is only used in `dracut-logger.sh`. So do not export `maxloglvl` and `syslogfacility`. --- diff --git a/dracut-logger.sh b/dracut-logger.sh index 81fe2726b..1f87e4578 100644 --- a/dracut-logger.sh +++ b/dracut-logger.sh @@ -166,7 +166,6 @@ dlog_init() { else readonly syslogfacility=daemon fi - export syslogfacility fi local lvl @@ -175,7 +174,6 @@ dlog_init() { ((lvl > maxloglvl_l)) && maxloglvl_l=$lvl done readonly maxloglvl=$maxloglvl_l - export maxloglvl if ((stdloglvl < 6)) && ((kmsgloglvl < 6)) && ((fileloglvl < 6)) && ((sysloglvl < 6)); then unset dtrace