Task #49 - dracut-059-22.fc40/scan-results.err
back to task #49download
Error: SHELLCHECK_WARNING (CWE-398): /usr/bin/dracut:961:23: warning[SC2184]: Quote arguments to unset so they're not glob expanded. # 959| case ${dracut_args[$i]} in # 960| --regenerate-all | --parallel) # 961|-> unset dracut_args["$i"] # 962| ;; # 963| esac Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/dracut-functions.sh:369:11: warning[SC2154]: use_fstab is referenced but not assigned. # 367| _find_mpt="$1" # 368| # 369|-> if [[ $use_fstab != yes ]]; then # 370| [[ -d $_find_mpt/. ]] # 371| findmnt -e -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/dracut-functions.sh:726:41: warning[SC2154]: kernel is referenced but not assigned. # 724| local _config_opt="$1" # 725| local _config_file # 726|-> [[ -f $dracutsysrootdir/boot/config-$kernel ]] \ # 727| && _config_file="/boot/config-$kernel" # 728| [[ -f $dracutsysrootdir/lib/modules/$kernel/config ]] \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/dracut-init.sh:162:8: warning[SC2154]: no_kernel is referenced but not assigned. # 160| # 161| # Ignore kernel module requirement for no-kernel build # 162|-> [[ $no_kernel == yes ]] && return 0 # 163| # 164| if [[ $1 == "-m" ]]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/dracut-initramfs-restore:77:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 75| fi # 76| # 77|-> if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ]; then # 78| . /etc/selinux/config # 79| [ -n "${SELINUXTYPE}" ] && /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null Error: SHELLCHECK_WARNING (CWE-758): /usr/lib/dracut/dracut-version.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. # 1|-> DRACUT_VERSION=059-22.fc41 Error: SHELLCHECK_WARNING (CWE-563): /usr/lib/dracut/dracut-version.sh:1:1: warning[SC2034]: DRACUT_VERSION appears unused. Verify use (or export if used externally). # 1|-> DRACUT_VERSION=059-22.fc41 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00bash/module-setup.sh:30:11: warning[SC2154]: initdir is referenced but not assigned. # 28| # 29| # Prefer bash as default shell if no other shell is preferred. # 30|-> [[ -L $initdir/bin/sh ]] || ln -sf bash "${initdir}/bin/sh" # 31| # 32| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| [[ $mount_needs ]] && return 1 # 8| # If the binary(s) requirements are not fulfilled the module can't be installed # 9|-> require_binaries "$systemdutildir"/systemd || return 1 # 10| # Return 255 to only include the module, if another module requires it. # 11| return 255 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:28:11: warning[SC2154]: prefix is referenced but not assigned. # 26| local _mods # 27| # 28|-> if [[ $prefix == /run/* ]]; then # 29| dfatal 'systemd does not work with a prefix, which contains "/run"!!' # 30| exit 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:52:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 50| "$systemdutildir"/system-generators/systemd-gpt-auto-generator \ # 51| \ # 52|-> "$systemdsystemunitdir"/debug-shell.service \ # 53| "$systemdsystemunitdir"/cryptsetup.target \ # 54| "$systemdsystemunitdir"/cryptsetup-pre.target \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:138:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 136| "$systemdsystemunitdir"/-.slice \ # 137| \ # 138|-> "$tmpfilesdir"/systemd.conf \ # 139| \ # 140| journalctl systemctl \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:155:19: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 153| modules_load_get() { # 154| local _line i # 155|-> for i in "$dracutsysrootdir$1"/*.conf; do # 156| [[ -f $i ]] || continue # 157| while read -r _line || [ -n "$_line" ]; do Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:180:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 178| /etc/systemd/system.conf \ # 179| /etc/systemd/system.conf.d/*.conf \ # 180|-> "$systemdsystemconfdir"/modprobe@.service \ # 181| "$systemdsystemconfdir/modprobe@.service.d/*.conf" \ # 182| /etc/hosts \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00systemd/module-setup.sh:198:17: warning[SC2154]: initdir is referenced but not assigned. # 196| fi # 197| # 198|-> if ! [[ -e "$initdir/etc/machine-id" ]]; then # 199| : > "$initdir/etc/machine-id" # 200| chmod 444 "$initdir/etc/machine-id" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/00warpclock/module-setup.sh:10:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 8| # hwclock does not exist on S390(x), bail out silently then # 9| local _arch=${DRACUT_ARCH:-$(uname -m)} # 10|-> [ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1 # 11| # 12| # If the binary(s) requirements are not fulfilled the module can't be installed. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/00warpclock/module-setup.sh:31:31: warning[SC2154]: moddir is referenced but not assigned. # 29| install() { # 30| # 31|-> inst_hook pre-trigger 00 "$moddir/warpclock.sh" # 32| # 33| inst_multiple -o \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/01fips/fips.sh:80:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 78| # 79| fips_load_crypto() { # 80|-> local _k # 81| local _v # 82| local _module Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/01fips/fips.sh:81:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 79| fips_load_crypto() { # 80| local _k # 81|-> local _v # 82| local _module # 83| local _found Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/01fips/fips.sh:82:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 80| local _k # 81| local _v # 82|-> local _module # 83| local _found # 84| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/01fips/fips.sh:83:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 81| local _v # 82| local _module # 83|-> local _found # 84| # 85| read -d '' -r FIPSMODULES < /etc/fipsmodules Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/01fips/fips.sh:85:10: warning[SC3045]: In POSIX sh, read -d is undefined. # 83| local _found # 84| # 85|-> read -d '' -r FIPSMODULES < /etc/fipsmodules # 86| # 87| fips_info "Loading and integrity checking all crypto modules" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/01fips/fips.sh:95:39: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 93| _found=0 # 94| while read -r _k _ _v || [ -n "$_k" ]; do # 95|-> [ "$_k" != "name" -a "$_k" != "driver" ] && continue # 96| [ "$_v" != "$_module" ] && continue # 97| _found=1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01fips/module-setup.sh:16:15: warning[SC2154]: srcmods is referenced but not assigned. # 14| installkernel() { # 15| local _fipsmodules _mod _bootfstype # 16|-> if [[ -f "${srcmods}/modules.fips" ]]; then # 17| read -d '' -r _fipsmodules < "${srcmods}/modules.fips" # 18| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01fips/module-setup.sh:43:23: warning[SC2154]: initdir is referenced but not assigned. # 41| # 42| # shellcheck disable=SC2174 # 43|-> mkdir -m 0755 -p "${initdir}/etc/modprobe.d" # 44| # 45| for _mod in $_fipsmodules; do Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01fips/module-setup.sh:53:30: warning[SC2154]: hostonly_default_device is referenced but not assigned. # 51| # 52| # with hostonly_default_device fs module for /boot is not installed by default # 53|-> if [[ $hostonly ]] && [[ $hostonly_default_device == "no" ]]; then # 54| _bootfstype=$(find_mp_fstype /boot) # 55| if [[ -n $_bootfstype ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01fips/module-setup.sh:65:29: warning[SC2154]: moddir is referenced but not assigned. # 63| # called by dracut # 64| install() { # 65|-> inst_hook pre-mount 01 "$moddir/fips-boot.sh" # 66| inst_hook pre-pivot 01 "$moddir/fips-noboot.sh" # 67| inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ac-power/module-setup.sh:24:17: warning[SC2154]: moddir is referenced but not assigned. # 22| install() { # 23| # 24|-> inst_rules "$moddir/99-initrd-power-targets.rules" # 25| inst_simple "$systemdutildir"/systemd-ac-power # 26| inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ac-power/module-setup.sh:25:18: warning[SC2154]: systemdutildir is referenced but not assigned. # 23| # 24| inst_rules "$moddir/99-initrd-power-targets.rules" # 25|-> inst_simple "$systemdutildir"/systemd-ac-power # 26| inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target" # 27| inst_simple "$moddir/initrd-on-battery-power.target" "$systemdsystemunitdir/initrd-on-battery-power.target" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ac-power/module-setup.sh:26:54: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 24| inst_rules "$moddir/99-initrd-power-targets.rules" # 25| inst_simple "$systemdutildir"/systemd-ac-power # 26|-> inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target" # 27| inst_simple "$moddir/initrd-on-battery-power.target" "$systemdsystemunitdir/initrd-on-battery-power.target" # 28| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ask-password/module-setup.sh:31:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 29| # 30| inst_multiple -o \ # 31|-> "$systemdsystemunitdir"/systemd-ask-password-console.path \ # 32| "$systemdsystemunitdir"/systemd-ask-password-console.service \ # 33| "$systemdsystemunitdir"/multi-user.target.wants/systemd-ask-password-wall.path \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ask-password/module-setup.sh:39:27: warning[SC2154]: initdir is referenced but not assigned. # 37| # 38| # Enable the systemd type service unit for systemd-ask-password. # 39|-> $SYSTEMCTL -q --root "$initdir" enable systemd-ask-password-console.service # 40| # 41| # Install systemd-ask-password plymouth units if plymouth is enabled. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| coredumpctl \ # 11|-> "$systemdutildir"/systemd-coredump \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:34:10: warning[SC2154]: sysctld is referenced but not assigned. # 32| inst_dir /var/lib/systemd/coredump # 33| inst_multiple -o \ # 34|-> "$sysctld"/50-coredump.conf \ # 35| "$systemdutildir"/coredump.conf \ # 36| "$systemdutildir"/systemd-coredump \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:37:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 35| "$systemdutildir"/coredump.conf \ # 36| "$systemdutildir"/systemd-coredump \ # 37|-> "$systemdsystemunitdir"/systemd-coredump.socket \ # 38| "$systemdsystemunitdir"/systemd-coredump@.service \ # 39| "$systemdsystemunitdir"/sockets.target.wants/systemd-coredump.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:40:10: warning[SC2154]: sysusers is referenced but not assigned. # 38| "$systemdsystemunitdir"/systemd-coredump@.service \ # 39| "$systemdsystemunitdir"/sockets.target.wants/systemd-coredump.socket \ # 40|-> "$sysusers"/systemd-coredump.conf \ # 41| coredumpctl # 42| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:46:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 44| if [[ $hostonly ]]; then # 45| inst_multiple -H -o \ # 46|-> "$systemdutilconfdir"/coredump.conf \ # 47| "$systemdsystemconfdir/coredump.conf.d/*.conf" \ # 48| "$systemdsystemconfdir"/systemd-coredump.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:47:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 45| inst_multiple -H -o \ # 46| "$systemdutilconfdir"/coredump.conf \ # 47|-> "$systemdsystemconfdir/coredump.conf.d/*.conf" \ # 48| "$systemdsystemconfdir"/systemd-coredump.socket \ # 49| "$systemdsystemconfdir/systemd-coredump.socket.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:53:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 51| "$systemdsystemconfdir/systemd-coredump@.service.d/*.conf" \ # 52| "$systemdsystemconfdir"/sockets.target.wants/systemd-coredump.socket \ # 53|-> "$sysusersconfdir"/systemd-coredump.conf # 54| fi # 55| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| hostnamectl \ # 11|-> "$systemdutildir"/systemd-hostnamed \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:32:18: warning[SC2154]: moddir is referenced but not assigned. # 30| install() { # 31| # 32|-> inst_simple "$moddir/systemd-hostname-dracut.conf" "$sysusers/systemd-hostname-dracut.conf" # 33| inst_simple "$moddir/org.freedesktop.hostname1_dracut.conf" "$dbussystem/org.freedesktop.hostname1_dracut.conf" # 34| inst_simple "$moddir/99-systemd-networkd-dracut.conf" "$systemdsystemunitdir/systemd-hostnamed.service.d/99-systemd-networkd-dracut.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:32:57: warning[SC2154]: sysusers is referenced but not assigned. # 30| install() { # 31| # 32|-> inst_simple "$moddir/systemd-hostname-dracut.conf" "$sysusers/systemd-hostname-dracut.conf" # 33| inst_simple "$moddir/org.freedesktop.hostname1_dracut.conf" "$dbussystem/org.freedesktop.hostname1_dracut.conf" # 34| inst_simple "$moddir/99-systemd-networkd-dracut.conf" "$systemdsystemunitdir/systemd-hostnamed.service.d/99-systemd-networkd-dracut.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:33:66: warning[SC2154]: dbussystem is referenced but not assigned. # 31| # 32| inst_simple "$moddir/systemd-hostname-dracut.conf" "$sysusers/systemd-hostname-dracut.conf" # 33|-> inst_simple "$moddir/org.freedesktop.hostname1_dracut.conf" "$dbussystem/org.freedesktop.hostname1_dracut.conf" # 34| inst_simple "$moddir/99-systemd-networkd-dracut.conf" "$systemdsystemunitdir/systemd-hostnamed.service.d/99-systemd-networkd-dracut.conf" # 35| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:34:60: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 32| inst_simple "$moddir/systemd-hostname-dracut.conf" "$sysusers/systemd-hostname-dracut.conf" # 33| inst_simple "$moddir/org.freedesktop.hostname1_dracut.conf" "$dbussystem/org.freedesktop.hostname1_dracut.conf" # 34|-> inst_simple "$moddir/99-systemd-networkd-dracut.conf" "$systemdsystemunitdir/systemd-hostnamed.service.d/99-systemd-networkd-dracut.conf" # 35| # 36| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:38:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 36| inst_multiple -o \ # 37| "$dbussystem"/org.freedesktop.hostname1.conf \ # 38|-> "$dbussystemservices"/org.freedesktop.hostname1.service \ # 39| "$systemdutildir"/systemd-hostnamed \ # 40| "$systemdsystemunitdir"/systemd-hostnamed.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:49:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 47| inst_multiple -H -o \ # 48| /etc/hostname \ # 49|-> "$systemdsystemconfdir"/systemd-hostnamed.service \ # 50| "$systemdsystemconfdir/systemd-hostnamed.service.d/*.conf" # 51| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-initrd/module-setup.sh:22:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 20| install() { # 21| inst_multiple -o \ # 22|-> "$systemdsystemunitdir"/initrd.target \ # 23| "$systemdsystemunitdir"/initrd-fs.target \ # 24| "$systemdsystemunitdir"/initrd-root-device.target \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-initrd/module-setup.sh:33:27: warning[SC2154]: initdir is referenced but not assigned. # 31| "$systemdsystemunitdir"/initrd-parse-etc.service # 32| # 33|-> $SYSTEMCTL -q --root "$initdir" set-default initrd.target # 34| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-integritysetup/module-setup.sh:10:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 8| # If the binary(s) requirements are not fulfilled the module can't be installed. # 9| require_binaries \ # 10|-> "$systemdutildir"/systemd-integritysetup \ # 11| "$systemdutildir"/system-generators/systemd-integritysetup-generator \ # 12| || return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-integritysetup/module-setup.sh:39:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 37| "$systemdutildir"/systemd-integritysetup \ # 38| "$systemdutildir"/system-generators/systemd-integritysetup-generator \ # 39|-> "$systemdsystemunitdir"/integritysetup-pre.target \ # 40| "$systemdsystemunitdir"/integritysetup.target \ # 41| "$systemdsystemunitdir"/sysinit.target.wants/integritysetup.target Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-integritysetup/module-setup.sh:47:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 45| inst_multiple -H -o \ # 46| /etc/integritytab \ # 47|-> "$systemdsystemconfdir"/integritysetup.target \ # 48| "$systemdsystemconfdir/integritysetup.target.wants/*.target" \ # 49| "$systemdsystemconfdir"/integritysetup-pre.target \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| journalctl \ # 11|-> "$systemdutildir"/systemd-journald \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:30:18: warning[SC2154]: moddir is referenced but not assigned. # 28| install() { # 29| # 30|-> inst_simple "$moddir/initrd.conf" "$systemdutildir/journald.conf.d/initrd.conf" # 31| # 32| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:36:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 34| "$systemdutildir/journald.conf.d/*.conf" \ # 35| "$systemdutildir"/systemd-journald \ # 36|-> "$systemdsystemunitdir"/systemd-journald.service \ # 37| "$systemdsystemunitdir"/systemd-journald.socket \ # 38| "$systemdsystemunitdir"/systemd-journald@.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:49:10: warning[SC2154]: sysusers is referenced but not assigned. # 47| "$systemdsystemunitdir"/sockets.target.wants/systemd-journald.socket \ # 48| "$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \ # 49|-> "$sysusers"/systemd-journal.conf \ # 50| journalctl # 51| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:62:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 60| if [[ $hostonly ]]; then # 61| inst_multiple -H -o \ # 62|-> "$systemdutilconfdir"/journald.conf \ # 63| "$systemdutilconfdir/journald.conf.d/*.conf" \ # 64| "$systemdsystemconfdir"/systemd-journald.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:64:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 62| "$systemdutilconfdir"/journald.conf \ # 63| "$systemdutilconfdir/journald.conf.d/*.conf" \ # 64|-> "$systemdsystemconfdir"/systemd-journald.service \ # 65| "$systemdsystemconfdir/systemd-journald.service.d/*.conf" \ # 66| "$systemdsystemconfdir"/systemd-journal-flush.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:70:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 68| "$systemdsystemconfdir"/systemd-journal-catalog-update.service \ # 69| "$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf" \ # 70|-> "$sysusersconfdir"/systemd-journal.conf # 71| fi # 72| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ldconfig/module-setup.sh:33:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 31| /etc/ld.so.conf \ # 32| "/etc/ld.so.conf.d/*.conf" \ # 33|-> "$systemdsystemunitdir"/ldconfig.service \ # 34| "$systemdsystemunitdir/ldconfig.service.d/*.conf" \ # 35| "$systemdsystemunitdir"/sysinit.target.wants/ldconfig.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-ldconfig/module-setup.sh:45:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 43| if [[ $hostonly ]]; then # 44| inst_multiple -H -o \ # 45|-> "$systemdsystemconfdir"/ldconfig.service \ # 46| "$systemdsystemconfdir/ldconfig.service.d/*.conf" # 47| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # 8| # If the binary(s) requirements are not fulfilled the module can't be installed # 9|-> require_binaries "$systemdutildir"/systemd-modules-load || return 1 # 10| # 11| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:28:10: warning[SC2154]: modulesload is referenced but not assigned. # 26| # 27| inst_multiple -o \ # 28|-> "$modulesload/*.conf" \ # 29| "$systemdutildir"/systemd-modules-load \ # 30| "$systemdsystemunitdir"/systemd-modules-load.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:30:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 28| "$modulesload/*.conf" \ # 29| "$systemdutildir"/systemd-modules-load \ # 30|-> "$systemdsystemunitdir"/systemd-modules-load.service \ # 31| "$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service # 32| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:34:27: warning[SC2154]: initdir is referenced but not assigned. # 32| # 33| # Enable systemd type unit(s) # 34|-> $SYSTEMCTL -q --root "$initdir" enable systemd-modules-load.service # 35| # 36| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:39:14: warning[SC2154]: modulesloadconfdir is referenced but not assigned. # 37| if [[ $hostonly ]]; then # 38| inst_multiple -H -o \ # 39|-> "$modulesloadconfdir/*.conf" \ # 40| "$systemdsystemconfdir"/systemd-modules-load.service \ # 41| "$systemdsystemconfdir/systemd-modules-load.service.d/*.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:40:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 38| inst_multiple -H -o \ # 39| "$modulesloadconfdir/*.conf" \ # 40|-> "$systemdsystemconfdir"/systemd-modules-load.service \ # 41| "$systemdsystemconfdir/systemd-modules-load.service.d/*.conf" # 42| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| # If the binary(s) requirements are not fulfilled the module can't be installed # 10| require_binaries ip networkctl \ # 11|-> "$systemdutildir"/systemd-networkd \ # 12| "$systemdutildir"/systemd-network-generator \ # 13| "$systemdutildir"/systemd-networkd-wait-online \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:35:10: warning[SC2154]: dbussystem is referenced but not assigned. # 33| # 34| inst_multiple -o \ # 35|-> "$dbussystem"/org.freedesktop.network1.conf \ # 36| "$dbussystemservices"/org.freedesktop.network1.service \ # 37| "$systemdutildir"/networkd.conf \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:36:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 34| inst_multiple -o \ # 35| "$dbussystem"/org.freedesktop.network1.conf \ # 36|-> "$dbussystemservices"/org.freedesktop.network1.service \ # 37| "$systemdutildir"/networkd.conf \ # 38| "$systemdutildir/networkd.conf.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:42:10: warning[SC2154]: systemdnetwork is referenced but not assigned. # 40| "$systemdutildir"/systemd-network-generator \ # 41| "$systemdutildir"/systemd-networkd-wait-online \ # 42|-> "$systemdnetwork"/80-container-host0.network \ # 43| "$systemdnetwork"/80-container-ve.network \ # 44| "$systemdnetwork"/80-container-vz.network \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:49:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 47| "$systemdnetwork"/98-default-mac-none.link \ # 48| "$systemdnetwork"/99-default.link \ # 49|-> "$systemdsystemunitdir"/systemd-networkd.service \ # 50| "$systemdsystemunitdir"/systemd-networkd.socket \ # 51| "$systemdsystemunitdir"/systemd-network-generator.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:54:10: warning[SC2154]: sysusers is referenced but not assigned. # 52| "$systemdsystemunitdir"/systemd-networkd-wait-online.service \ # 53| "$systemdsystemunitdir"/systemd-network-generator.service \ # 54|-> "$sysusers"/systemd-network.conf \ # 55| networkctl ip # 56| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:63:31: warning[SC2154]: initdir is referenced but not assigned. # 61| systemd-network-generator.service \ # 62| systemd-networkd-wait-online.service; do # 63|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 64| done # 65| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:69:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 67| if [[ $hostonly ]]; then # 68| inst_multiple -H -o \ # 69|-> "$systemdutilconfdir"/networkd.conf \ # 70| "$systemdutilconfdir/networkd.conf.d/*.conf" \ # 71| "$systemdnetworkconfdir/*" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:71:14: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned. # 69| "$systemdutilconfdir"/networkd.conf \ # 70| "$systemdutilconfdir/networkd.conf.d/*.conf" \ # 71|-> "$systemdnetworkconfdir/*" \ # 72| "$systemdsystemconfdir"/systemd-networkd.service \ # 73| "$systemdsystemconfdir/systemd-networkd.service/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:72:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 70| "$systemdutilconfdir/networkd.conf.d/*.conf" \ # 71| "$systemdnetworkconfdir/*" \ # 72|-> "$systemdsystemconfdir"/systemd-networkd.service \ # 73| "$systemdsystemconfdir/systemd-networkd.service/*.conf" \ # 74| "$systemdsystemconfdir"/systemd-networkd.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:80:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 78| "$systemdsystemconfdir"/systemd-networkd-wait-online.service \ # 79| "$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf" \ # 80|-> "$sysusersconfdir"/systemd-network.conf # 81| fi # 82| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # 8| # If the binary(s) requirements are not fulfilled the module can't be installed. # 9|-> require_binaries "$systemdutildir"/systemd-pcrextend || return 1 # 10| # 11| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:31:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 29| inst_multiple -o \ # 30| "$systemdutildir"/systemd-pcrextend \ # 31|-> "$systemdsystemunitdir"/systemd-pcrphase.service \ # 32| "$systemdsystemunitdir/systemd-pcrphase.service.d/*.conf" \ # 33| "$systemdsystemunitdir"/systemd-pcrphase-sysinit.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:42:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 40| if [[ $hostonly ]]; then # 41| inst_multiple -H -o \ # 42|-> "$systemdsystemconfdir"/systemd-pcrphase.service \ # 43| "$systemdsystemconfdir/systemd-pcrphase.service.d/*.conf" \ # 44| "$systemdsystemconfdir"/systemd-pcrphase-sysinit.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| portablectl \ # 11|-> "$systemdutildir"/systemd-portabled \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:48:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 46| "/var/lib/portables/*.raw" \ # 47| "/usr/lib/portables/*.raw" \ # 48|-> "$tmpfilesdir/portables.conf" \ # 49| "$dbussystem"/org.freedesktop.portable1.conf \ # 50| "$dbussystemservices"/org.freedesktop.portable1.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:49:10: warning[SC2154]: dbussystem is referenced but not assigned. # 47| "/usr/lib/portables/*.raw" \ # 48| "$tmpfilesdir/portables.conf" \ # 49|-> "$dbussystem"/org.freedesktop.portable1.conf \ # 50| "$dbussystemservices"/org.freedesktop.portable1.service \ # 51| "$systemdutildir"/systemd-portabled \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:50:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 48| "$tmpfilesdir/portables.conf" \ # 49| "$dbussystem"/org.freedesktop.portable1.conf \ # 50|-> "$dbussystemservices"/org.freedesktop.portable1.service \ # 51| "$systemdutildir"/systemd-portabled \ # 52| "$systemdutildir/portable/profile/default/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:56:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 54| "$systemdutildir/portable/profile/strict/*.conf" \ # 55| "$systemdutildir/portable/profile/trusted/*.conf" \ # 56|-> "$systemdsystemunitdir"/systemd-portabled.service \ # 57| "$systemdsystemunitdir/systemd-portabled.service.d/*.conf" \ # 58| "$systemdsystemunitdir"/dbus-org.freedesktop.portable1.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:62:12: warning[SC2154]: initdir is referenced but not assigned. # 60| # 61| # The existence of this file is required # 62|-> touch "$initdir"/etc/resolv.conf # 63| # 64| # Enable systemd type unit(s) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:72:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 70| inst_multiple -H -o \ # 71| "/etc/portables/*.raw" \ # 72|-> "$systemdutilconfdir/system.attached/*" \ # 73| "$systemdutilconfdir/system.attached/*/*" \ # 74| "$systemdutilconfdir/portable/profile/default/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-portabled/module-setup.sh:78:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 76| "$systemdutilconfdir/portable/profile/strict/*.conf" \ # 77| "$systemdutilconfdir/portable/profile/trusted/*.conf" \ # 78|-> "$systemdsystemconfdir"/systemd-portabled.service \ # 79| "$systemdsystemconfdir/systemd-portabled.service.d/*.conf" # 80| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # 8| # If the binary(s) requirements are not fulfilled the module can't be installed. # 9|-> require_binaries "$systemdutildir"/systemd-pstore || return 1 # 10| # 11| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:36:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 34| inst_dir /var/lib/systemd/pstore # 35| inst_multiple -o \ # 36|-> "$tmpfilesdir/systemd-pstore.conf" \ # 37| "$systemdutildir"/systemd-pstore \ # 38| "$systemdsystemunitdir"/systemd-pstore.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:38:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 36| "$tmpfilesdir/systemd-pstore.conf" \ # 37| "$systemdutildir"/systemd-pstore \ # 38|-> "$systemdsystemunitdir"/systemd-pstore.service \ # 39| "$systemdsystemunitdir/systemd-pstore.service.d/*.conf" # 40| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:42:27: warning[SC2154]: initdir is referenced but not assigned. # 40| # 41| # Enable systemd type unit(s) # 42|-> $SYSTEMCTL -q --root "$initdir" enable systemd-pstore.service # 43| # 44| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:47:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 45| if [[ $hostonly ]]; then # 46| inst_multiple -H -o \ # 47|-> "$systemdutilconfdir"/pstore.conf \ # 48| "$systemdutilconfdir/pstore.conf.d/*.conf" \ # 49| "$systemdsystemconfdir"/systemd-pstore.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-pstore/module-setup.sh:49:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 47| "$systemdutilconfdir"/pstore.conf \ # 48| "$systemdutilconfdir/pstore.conf.d/*.conf" \ # 49|-> "$systemdsystemconfdir"/systemd-pstore.service \ # 50| "$systemdsystemconfdir/systemd-pstore.service.d/*.conf" # 51| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-repart/module-setup.sh:28:10: warning[SC2154]: libdir is referenced but not assigned. # 26| # 27| inst_multiple -o \ # 28|-> "$libdir/repart.d/*.conf" \ # 29| "$systemdsystemunitdir"/systemd-repart.service \ # 30| "$systemdsystemunitdir"/initrd-root-fs.target.wants/systemd-repart.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-repart/module-setup.sh:29:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 27| inst_multiple -o \ # 28| "$libdir/repart.d/*.conf" \ # 29|-> "$systemdsystemunitdir"/systemd-repart.service \ # 30| "$systemdsystemunitdir"/initrd-root-fs.target.wants/systemd-repart.service \ # 31| systemd-repart Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-repart/module-setup.sh:37:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 35| inst_multiple -H -o \ # 36| "/etc/repart.d/*.conf" \ # 37|-> "$systemdsystemconfdir"/systemd-repart.service \ # 38| "$systemdsystemconfdir/systemd-repart.service.d/*.conf" # 39| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| resolvectl \ # 11|-> "$systemdutildir"/systemd-resolved \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:32:18: warning[SC2154]: moddir is referenced but not assigned. # 30| install() { # 31| # 32|-> inst_simple "$moddir/resolved-tmpfile-dracut.conf" "$tmpfilesdir/resolved-tmpfile-dracut.conf" # 33| # 34| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:32:57: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 30| install() { # 31| # 32|-> inst_simple "$moddir/resolved-tmpfile-dracut.conf" "$tmpfilesdir/resolved-tmpfile-dracut.conf" # 33| # 34| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:35:10: warning[SC2154]: dbussystem is referenced but not assigned. # 33| # 34| inst_multiple -o \ # 35|-> "$dbussystem"/org.freedesktop.resolve1.conf \ # 36| "$dbussystemservices"/org.freedesktop.resolve1.service \ # 37| "$systemdutildir"/resolv.conf \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:36:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 34| inst_multiple -o \ # 35| "$dbussystem"/org.freedesktop.resolve1.conf \ # 36|-> "$dbussystemservices"/org.freedesktop.resolve1.service \ # 37| "$systemdutildir"/resolv.conf \ # 38| "$systemdutildir"/resolved.conf \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:41:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 39| "$systemdutildir/resolved.conf.d/*.conf" \ # 40| "$systemdutildir"/systemd-resolved \ # 41|-> "$systemdsystemunitdir"/systemd-resolved.service \ # 42| "$systemdsystemunitdir/systemd-resolved.service.d/*.conf" \ # 43| "$sysusers"/systemd-resolve.conf \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:43:10: warning[SC2154]: sysusers is referenced but not assigned. # 41| "$systemdsystemunitdir"/systemd-resolved.service \ # 42| "$systemdsystemunitdir/systemd-resolved.service.d/*.conf" \ # 43|-> "$sysusers"/systemd-resolve.conf \ # 44| resolvectl # 45| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:47:27: warning[SC2154]: initdir is referenced but not assigned. # 45| # 46| # Enable systemd type unit(s) # 47|-> $SYSTEMCTL -q --root "$initdir" enable systemd-resolved.service # 48| # 49| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:52:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 50| if [[ $hostonly ]]; then # 51| inst_multiple -H -o \ # 52|-> "$systemdutilconfdir"/resolved.conf \ # 53| "$systemdutilconfdir/resolved.conf.d/*.conf" \ # 54| "$systemdsystemconfdir"/systemd-resolved.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:54:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 52| "$systemdutilconfdir"/resolved.conf \ # 53| "$systemdutilconfdir/resolved.conf.d/*.conf" \ # 54|-> "$systemdsystemconfdir"/systemd-resolved.service \ # 55| "$systemdsystemconfdir/systemd-resolved.service/*.conf" \ # 56| "$sysusersconfdir"/systemd-resolve.conf Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:56:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 54| "$systemdsystemconfdir"/systemd-resolved.service \ # 55| "$systemdsystemconfdir/systemd-resolved.service/*.conf" \ # 56|-> "$sysusersconfdir"/systemd-resolve.conf # 57| fi # 58| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-rfkill/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # 8| # If the binary(s) requirements are not fulfilled the module can't be installed. # 9|-> require_binaries "$systemdutildir"/systemd-rfkill || return 1 # 10| # 11| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-rfkill/module-setup.sh:31:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 29| inst_multiple -o \ # 30| "$systemdutildir"/systemd-rfkill \ # 31|-> "$systemdsystemunitdir"/systemd-rfkill.service \ # 32| "$systemdsystemunitdir"/systemd-rfkill.socket # 33| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-rfkill/module-setup.sh:37:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 35| if [[ $hostonly ]]; then # 36| inst_multiple -H -o \ # 37|-> "$systemdsystemconfdir"/systemd-rfkill.service \ # 38| "$systemdsystemconfdir/systemd-rfkill.service.d/*.conf" \ # 39| "$systemdsystemconfdir"/systemd-rfkill.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:9:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # 8| # If the binary(s) requirements are not fulfilled the module can't be installed # 9|-> require_binaries "$systemdutildir"/systemd-sysctl || return 1 # 10| # 11| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:30:10: warning[SC2154]: sysctld is referenced but not assigned. # 28| # 29| inst_multiple -o \ # 30|-> "$sysctld/*.conf" \ # 31| "$systemdsystemunitdir"/systemd-sysctl.service \ # 32| "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:31:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 29| inst_multiple -o \ # 30| "$sysctld/*.conf" \ # 31|-> "$systemdsystemunitdir"/systemd-sysctl.service \ # 32| "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \ # 33| "$systemdutildir"/systemd-sysctl Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:39:14: warning[SC2154]: sysctlconfdir is referenced but not assigned. # 37| inst_multiple -H -o \ # 38| /etc/sysctl.conf \ # 39|-> "$sysctlconfdir/*.conf" \ # 40| "$systemdsystemconfdir"/systemd-sysctl.service \ # 41| "$systemdsystemconfdir/systemd-sysctl.service.d/*.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:40:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 38| /etc/sysctl.conf \ # 39| "$sysctlconfdir/*.conf" \ # 40|-> "$systemdsystemconfdir"/systemd-sysctl.service \ # 41| "$systemdsystemconfdir/systemd-sysctl.service.d/*.conf" # 42| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:45:27: warning[SC2154]: initdir is referenced but not assigned. # 43| # 44| # Enable the systemd type service unit for sysctl. # 45|-> $SYSTEMCTL -q --root "$initdir" enable systemd-sysctl.service # 46| # 47| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:32:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 30| "/usr/lib/extensions/*" \ # 31| "/usr/lib/extension-release.d/extension-release.*" \ # 32|-> "$systemdsystemunitdir"/systemd-sysext.service \ # 33| "$systemdsystemunitdir/systemd-sysext.service.d/*.conf" \ # 34| systemd-sysext Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:37:27: warning[SC2154]: initdir is referenced but not assigned. # 35| # 36| # Enable systemd type unit(s) # 37|-> $SYSTEMCTL -q --root "$initdir" enable systemd-sysext.service # 38| # 39| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:43:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 41| inst_multiple -H -o \ # 42| "/etc/extensions/*" \ # 43|-> "$systemdsystemconfdir"/systemd-sysext.service \ # 44| "$systemdsystemconfdir/systemd-sysext.service.d/*.conf" # 45| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:27:18: warning[SC2154]: moddir is referenced but not assigned. # 25| install() { # 26| # 27|-> inst_simple "$moddir/sysusers-dracut.conf" "$systemdsystemunitdir/systemd-sysusers.service.d/sysusers-dracut.conf" # 28| # 29| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:27:49: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 25| install() { # 26| # 27|-> inst_simple "$moddir/sysusers-dracut.conf" "$systemdsystemunitdir/systemd-sysusers.service.d/sysusers-dracut.conf" # 28| # 29| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:30:10: warning[SC2154]: sysusers is referenced but not assigned. # 28| # 29| inst_multiple -o \ # 30|-> "$sysusers"/basic.conf \ # 31| "$sysusers"/systemd.conf \ # 32| "$systemdsystemunitdir"/systemd-sysusers.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:39:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 37| if [[ $hostonly ]]; then # 38| inst_multiple -H -o \ # 39|-> "$sysusersconfdir"/basic.conf \ # 40| "$sysusersconfdir"/systemd.conf \ # 41| "$systemdsystemconfdir"/systemd-sysusers.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:41:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 39| "$sysusersconfdir"/basic.conf \ # 40| "$sysusersconfdir"/systemd.conf \ # 41|-> "$systemdsystemconfdir"/systemd-sysusers.service \ # 42| "$systemdsystemconfdir/systemd-sysusers.service.d/*.conf" # 43| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timedated/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| timedatectl \ # 11|-> "$systemdutildir"/systemd-timedated \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timedated/module-setup.sh:33:10: warning[SC2154]: dbussystem is referenced but not assigned. # 31| # 32| inst_multiple -o \ # 33|-> "$dbussystem"/org.freedesktop.timedate1.conf \ # 34| "$dbussystemservices"/org.freedesktop.timedate1.service \ # 35| "$systemdutildir"/systemd-timedated \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timedated/module-setup.sh:34:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 32| inst_multiple -o \ # 33| "$dbussystem"/org.freedesktop.timedate1.conf \ # 34|-> "$dbussystemservices"/org.freedesktop.timedate1.service \ # 35| "$systemdutildir"/systemd-timedated \ # 36| "$systemdsystemunitdir"/systemd-timedated.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timedated/module-setup.sh:36:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 34| "$dbussystemservices"/org.freedesktop.timedate1.service \ # 35| "$systemdutildir"/systemd-timedated \ # 36|-> "$systemdsystemunitdir"/systemd-timedated.service \ # 37| "$systemdsystemunitdir"/dbus-org.freedesktop.timedate1.service \ # 38| timedatectl Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timedated/module-setup.sh:43:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 41| if [[ $hostonly ]]; then # 42| inst_multiple -H -o \ # 43|-> "$systemdsystemconfdir"/systemd-timedated.service \ # 44| "$systemdsystemconfdir/systemd-timedated.service/*.conf" # 45| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:10:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 8| # If the binary(s) requirements are not fulfilled the module can't be installed # 9| require_binaries \ # 10|-> "$systemdutildir"/systemd-timesyncd \ # 11| "$systemdutildir"/systemd-time-wait-sync \ # 12| || return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:36:10: warning[SC2154]: dbussystem is referenced but not assigned. # 34| # 35| inst_multiple -o \ # 36|-> "$dbussystem"/org.freedesktop.timesync1.conf \ # 37| "$dbussystemservices"/org.freedesktop.timesync1.service \ # 38| "$systemdntpunits/*.list" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:37:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 35| inst_multiple -o \ # 36| "$dbussystem"/org.freedesktop.timesync1.conf \ # 37|-> "$dbussystemservices"/org.freedesktop.timesync1.service \ # 38| "$systemdntpunits/*.list" \ # 39| "$systemdutildir"/systemd-timesyncd \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:38:10: warning[SC2154]: systemdntpunits is referenced but not assigned. # 36| "$dbussystem"/org.freedesktop.timesync1.conf \ # 37| "$dbussystemservices"/org.freedesktop.timesync1.service \ # 38|-> "$systemdntpunits/*.list" \ # 39| "$systemdutildir"/systemd-timesyncd \ # 40| "$systemdutildir"/systemd-time-wait-sync \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:42:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 40| "$systemdutildir"/systemd-time-wait-sync \ # 41| "$systemdutildir/timesyncd.conf.d/*.conf" \ # 42|-> "$systemdsystemunitdir"/systemd-timesyncd.service \ # 43| "$systemdsystemunitdir/systemd-timesyncd.service.d/*.conf" \ # 44| "$systemdsystemunitdir"/systemd-time-wait-sync.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:46:10: warning[SC2154]: sysusers is referenced but not assigned. # 44| "$systemdsystemunitdir"/systemd-time-wait-sync.service \ # 45| "$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf" \ # 46|-> "$sysusers"/systemd-timesync.conf # 47| # 48| # Enable systemd type unit(s) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:52:31: warning[SC2154]: initdir is referenced but not assigned. # 50| systemd-timesyncd.service \ # 51| systemd-time-wait-sync.service; do # 52|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 53| done # 54| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:58:14: warning[SC2154]: systemdntpunitsconfdir is referenced but not assigned. # 56| if [[ $hostonly ]]; then # 57| inst_multiple -H -o \ # 58|-> "$systemdntpunitsconfdir/*.list" \ # 59| "$systemdutilconfdir"/timesyncd.conf \ # 60| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:59:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 57| inst_multiple -H -o \ # 58| "$systemdntpunitsconfdir/*.list" \ # 59|-> "$systemdutilconfdir"/timesyncd.conf \ # 60| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ # 61| "$systemdsystemconfdir"/systemd-timesyncd.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:61:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 59| "$systemdutilconfdir"/timesyncd.conf \ # 60| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ # 61|-> "$systemdsystemconfdir"/systemd-timesyncd.service \ # 62| "$systemdsystemconfdir/systemd-timesyncd.service.d/*.conf" \ # 63| "$systemdsystemconfdir"/systemd-time-wait-sync.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:65:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 63| "$systemdsystemconfdir"/systemd-time-wait-sync.service \ # 64| "$systemdsystemconfdir/systemd-time-wait-sync.service.d/*.conf" \ # 65|-> "$sysusersconfdir"/systemd-timesync.conf # 66| fi # 67| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:37:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 35| /usr/lib/group \ # 36| /usr/lib/passwd \ # 37|-> "$tmpfilesdir/etc.conf" \ # 38| "$tmpfilesdir/static-nodes-permissions.conf" \ # 39| "$tmpfilesdir/systemd-tmp.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:42:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 40| "$tmpfilesdir/systemd.conf" \ # 41| "$tmpfilesdir/var.conf" \ # 42|-> "$systemdsystemunitdir"/systemd-tmpfiles-clean.service \ # 43| "$systemdsystemunitdir/systemd-tmpfiles-clean.service.d/*.conf" \ # 44| "$systemdsystemunitdir"/systemd-tmpfiles-setup.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:59:14: warning[SC2154]: tmpfilesconfdir is referenced but not assigned. # 57| /etc/group \ # 58| /etc/passwd \ # 59|-> "$tmpfilesconfdir/*.conf" \ # 60| "$systemdsystemconfdir"/systemd-tmpfiles-clean.service \ # 61| "$systemdsystemconfdir/systemd-tmpfiles-clean.service.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:60:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 58| /etc/passwd \ # 59| "$tmpfilesconfdir/*.conf" \ # 60|-> "$systemdsystemconfdir"/systemd-tmpfiles-clean.service \ # 61| "$systemdsystemconfdir/systemd-tmpfiles-clean.service.d/*.conf" \ # 62| "$systemdsystemconfdir"/systemd-tmpfiles-setup.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:11:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 9| require_binaries \ # 10| udevadm \ # 11|-> "$systemdutildir"/systemd-udevd \ # 12| || return 1 # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:33:10: warning[SC2154]: udevdir is referenced but not assigned. # 31| # 32| inst_multiple -o \ # 33|-> "$udevdir"/hwdb.bin \ # 34| "$udevdir"/udev.conf \ # 35| "$udevdir"/ata_id \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:43:10: warning[SC2154]: udevrulesdir is referenced but not assigned. # 41| "$udevdir"/scsi_id \ # 42| "$udevdir"/v4l_id \ # 43|-> "$udevrulesdir"/50-udev-default.rules \ # 44| "$udevrulesdir"/60-autosuspend.rules \ # 45| "$udevrulesdir"/60-block.rules \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:71:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 69| "$udevrulesdir"/99-systemd.rules \ # 70| "$systemdutildir"/systemd-udevd \ # 71|-> "$systemdsystemunitdir"/systemd-udevd.service \ # 72| "$systemdsystemunitdir/systemd-udevd.service.d/*.conf" \ # 73| "$systemdsystemunitdir"/systemd-udev-trigger.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:88:14: warning[SC2154]: udevconfdir is referenced but not assigned. # 86| if [[ $hostonly ]]; then # 87| inst_multiple -H -o \ # 88|-> "$udevconfdir"/hwdb.bin \ # 89| "$udevconfdir"/udev.conf \ # 90| "$udevrulesconfdir/*.rules" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:90:14: warning[SC2154]: udevrulesconfdir is referenced but not assigned. # 88| "$udevconfdir"/hwdb.bin \ # 89| "$udevconfdir"/udev.conf \ # 90|-> "$udevrulesconfdir/*.rules" \ # 91| "$systemdutilconfdir"/hwdb/hwdb.bin \ # 92| "$systemdsystemconfdir"/systemd-udevd.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:91:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 89| "$udevconfdir"/udev.conf \ # 90| "$udevrulesconfdir/*.rules" \ # 91|-> "$systemdutilconfdir"/hwdb/hwdb.bin \ # 92| "$systemdsystemconfdir"/systemd-udevd.service \ # 93| "$systemdsystemconfdir/systemd-udevd.service.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:92:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 90| "$udevrulesconfdir/*.rules" \ # 91| "$systemdutilconfdir"/hwdb/hwdb.bin \ # 92|-> "$systemdsystemconfdir"/systemd-udevd.service \ # 93| "$systemdsystemconfdir/systemd-udevd.service.d/*.conf" \ # 94| "$systemdsystemconfdir"/systemd-udev-trigger.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-veritysetup/module-setup.sh:10:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 8| # If the binary(s) requirements are not fulfilled the module can't be installed. # 9| require_binaries \ # 10|-> "$systemdutildir"/systemd-veritysetup \ # 11| "$systemdutildir"/system-generators/systemd-veritysetup-generator \ # 12| || return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-veritysetup/module-setup.sh:35:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 33| "$systemdutildir"/systemd-veritysetup \ # 34| "$systemdutildir"/system-generators/systemd-veritysetup-generator \ # 35|-> "$systemdsystemunitdir"/remote-veritysetup.target \ # 36| "$systemdsystemunitdir"/veritysetup-pre.target \ # 37| "$systemdsystemunitdir"/veritysetup.target \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/01systemd-veritysetup/module-setup.sh:45:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 43| inst_multiple -H -o \ # 44| /etc/veritytab \ # 45|-> "$systemdsystemconfdir"/veritysetup.target \ # 46| "$systemdsystemconfdir/veritysetup.target.wants/*.target" \ # 47| "$systemdsystemconfdir"/veritysetup-pre.target \ Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/02caps/caps.sh:15:41: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 13| for i in $CAPS_MODULES; do modprobe "$i" 2>&1 > /dev/null | vinfo; done # 14| # 15|-> if [ "$CAPS_MODULES_DISABLED" = "1" -a -e /proc/sys/kernel/modules_disabled ]; then # 16| info "Disabling module loading." # 17| echo "$CAPS_MODULES_DISABLED" > /proc/sys/kernel/modules_disabled Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/02caps/caps.sh:20:39: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 18| fi # 19| # 20|-> if [ "$CAPS_KEXEC_DISABLED" = "1" -a -e /proc/sys/kernel/kexec_disabled ]; then # 21| info "Disabling kexec." # 22| echo "$CAPS_KEXEC_DISABLED" > /proc/sys/kernel/kexec_disabled Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/02caps/module-setup.sh:18:33: warning[SC2154]: moddir is referenced but not assigned. # 16| install() { # 17| if ! dracut_module_included "systemd"; then # 18|-> inst_hook pre-pivot 00 "$moddir/caps.sh" # 19| inst "$(find_binary capsh 2> /dev/null)" /usr/sbin/capsh # 20| # capsh wants bash and we need bash also Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/03modsign/module-setup.sh:15:19: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 13| # if no keys are present # 14| if [[ $hostonly ]]; then # 15|-> x=$(echo "$dracutsysrootdir"/lib/modules/keys/*) # 16| [[ ${x} == "$dracutsysrootdir/lib/modules/keys/*" ]] && return 255 # 17| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/03modsign/module-setup.sh:32:31: warning[SC2154]: moddir is referenced but not assigned. # 30| inst_binary keyctl # 31| # 32|-> inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh" # 33| # 34| for x in "$dracutsysrootdir"/lib/modules/keys/*; do Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/04watchdog-modules/module-setup.sh:38:17: warning[SC2154]: initdir is referenced but not assigned. # 36| IFS=, # 37| echo "${!_drivers[*]}" # 38|-> )\"" > "${initdir}"/etc/cmdline.d/00-watchdog.conf # 39| fi # 40| return 0 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/04watchdog/module-setup.sh:19:31: warning[SC2154]: moddir is referenced but not assigned. # 17| # In that case, systemd will manage watchdog kick # 18| if ! dracut_module_included "systemd"; then # 19|-> inst_hook cmdline 00 "$moddir/watchdog.sh" # 20| inst_hook cmdline 50 "$moddir/watchdog.sh" # 21| inst_hook pre-trigger 00 "$moddir/watchdog.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:31:15: warning[SC2154]: dbus is referenced but not assigned. # 29| # 30| # Create dbus related directories. # 31|-> inst_dir "$dbus" # 32| inst_dir "$dbusinterfaces" # 33| inst_dir "$dbusservices" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:32:15: warning[SC2154]: dbusinterfaces is referenced but not assigned. # 30| # Create dbus related directories. # 31| inst_dir "$dbus" # 32|-> inst_dir "$dbusinterfaces" # 33| inst_dir "$dbusservices" # 34| inst_dir "$dbussession" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:33:15: warning[SC2154]: dbusservices is referenced but not assigned. # 31| inst_dir "$dbus" # 32| inst_dir "$dbusinterfaces" # 33|-> inst_dir "$dbusservices" # 34| inst_dir "$dbussession" # 35| inst_dir "$dbussystem" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:34:15: warning[SC2154]: dbussession is referenced but not assigned. # 32| inst_dir "$dbusinterfaces" # 33| inst_dir "$dbusservices" # 34|-> inst_dir "$dbussession" # 35| inst_dir "$dbussystem" # 36| inst_dir "$dbussystemservices" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:35:15: warning[SC2154]: dbussystem is referenced but not assigned. # 33| inst_dir "$dbusservices" # 34| inst_dir "$dbussession" # 35|-> inst_dir "$dbussystem" # 36| inst_dir "$dbussystemservices" # 37| inst_dir "$dbusconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:36:15: warning[SC2154]: dbussystemservices is referenced but not assigned. # 34| inst_dir "$dbussession" # 35| inst_dir "$dbussystem" # 36|-> inst_dir "$dbussystemservices" # 37| inst_dir "$dbusconfdir" # 38| inst_dir "$dbusinterfacesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:37:15: warning[SC2154]: dbusconfdir is referenced but not assigned. # 35| inst_dir "$dbussystem" # 36| inst_dir "$dbussystemservices" # 37|-> inst_dir "$dbusconfdir" # 38| inst_dir "$dbusinterfacesconfdir" # 39| inst_dir "$dbusservicesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:38:15: warning[SC2154]: dbusinterfacesconfdir is referenced but not assigned. # 36| inst_dir "$dbussystemservices" # 37| inst_dir "$dbusconfdir" # 38|-> inst_dir "$dbusinterfacesconfdir" # 39| inst_dir "$dbusservicesconfdir" # 40| inst_dir "$dbussessionconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:39:15: warning[SC2154]: dbusservicesconfdir is referenced but not assigned. # 37| inst_dir "$dbusconfdir" # 38| inst_dir "$dbusinterfacesconfdir" # 39|-> inst_dir "$dbusservicesconfdir" # 40| inst_dir "$dbussessionconfdir" # 41| inst_dir "$dbussystemconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:40:15: warning[SC2154]: dbussessionconfdir is referenced but not assigned. # 38| inst_dir "$dbusinterfacesconfdir" # 39| inst_dir "$dbusservicesconfdir" # 40|-> inst_dir "$dbussessionconfdir" # 41| inst_dir "$dbussystemconfdir" # 42| inst_dir "$dbussystemservicesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:41:15: warning[SC2154]: dbussystemconfdir is referenced but not assigned. # 39| inst_dir "$dbusservicesconfdir" # 40| inst_dir "$dbussessionconfdir" # 41|-> inst_dir "$dbussystemconfdir" # 42| inst_dir "$dbussystemservicesconfdir" # 43| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:42:15: warning[SC2154]: dbussystemservicesconfdir is referenced but not assigned. # 40| inst_dir "$dbussessionconfdir" # 41| inst_dir "$dbussystemconfdir" # 42|-> inst_dir "$dbussystemservicesconfdir" # 43| # 44| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:50:10: warning[SC2154]: sysusers is referenced but not assigned. # 48| "$dbusservicesconfdir"/org.freedesktop.systemd1.service \ # 49| "$dbussystemservices"/org.freedesktop.systemd1.service \ # 50|-> "$sysusers"/dbus.conf \ # 51| "$systemdcatalog"/dbus-broker.catalog \ # 52| "$systemdcatalog"/dbus-broker-launch.catalog \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:51:10: warning[SC2154]: systemdcatalog is referenced but not assigned. # 49| "$dbussystemservices"/org.freedesktop.systemd1.service \ # 50| "$sysusers"/dbus.conf \ # 51|-> "$systemdcatalog"/dbus-broker.catalog \ # 52| "$systemdcatalog"/dbus-broker-launch.catalog \ # 53| "$systemdsystemunitdir"/dbus-broker.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:53:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 51| "$systemdcatalog"/dbus-broker.catalog \ # 52| "$systemdcatalog"/dbus-broker-launch.catalog \ # 53|-> "$systemdsystemunitdir"/dbus-broker.service \ # 54| "$systemduser"/dbus-broker.service \ # 55| "$systemdsystemunitdir"/dbus.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:54:10: warning[SC2154]: systemduser is referenced but not assigned. # 52| "$systemdcatalog"/dbus-broker-launch.catalog \ # 53| "$systemdsystemunitdir"/dbus-broker.service \ # 54|-> "$systemduser"/dbus-broker.service \ # 55| "$systemdsystemunitdir"/dbus.socket \ # 56| "$systemduser"/dbus.socket \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:69:10: warning[SC2154]: initdir is referenced but not assigned. # 67| Before=shutdown.target # 68| /^\[Socket\]/aRemoveOnStop=yes' \ # 69|-> "$initdir$systemdsystemunitdir/dbus.socket" # 70| # 71| $SYSTEMCTL -q --root "$initdir" enable dbus-broker.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:78:14: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 76| "$dbusconfdir"/session.conf \ # 77| "$dbusconfdir"/system.conf \ # 78|-> "$sysusersconfdir"/dbus.conf \ # 79| "$systemdsystemconfdir"/dbus.socket \ # 80| "$systemdsystemconfdir"/dbus.socket.d/*.conf \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:79:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 77| "$dbusconfdir"/system.conf \ # 78| "$sysusersconfdir"/dbus.conf \ # 79|-> "$systemdsystemconfdir"/dbus.socket \ # 80| "$systemdsystemconfdir"/dbus.socket.d/*.conf \ # 81| "$systemdsystemconfdir"/dbus-broker.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:35:15: warning[SC2154]: dbus is referenced but not assigned. # 33| # 34| # Create dbus related directories. # 35|-> inst_dir "$dbus" # 36| inst_dir "$dbusinterfaces" # 37| inst_dir "$dbusservices" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:36:15: warning[SC2154]: dbusinterfaces is referenced but not assigned. # 34| # Create dbus related directories. # 35| inst_dir "$dbus" # 36|-> inst_dir "$dbusinterfaces" # 37| inst_dir "$dbusservices" # 38| inst_dir "$dbussession" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:37:15: warning[SC2154]: dbusservices is referenced but not assigned. # 35| inst_dir "$dbus" # 36| inst_dir "$dbusinterfaces" # 37|-> inst_dir "$dbusservices" # 38| inst_dir "$dbussession" # 39| inst_dir "$dbussystem" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:38:15: warning[SC2154]: dbussession is referenced but not assigned. # 36| inst_dir "$dbusinterfaces" # 37| inst_dir "$dbusservices" # 38|-> inst_dir "$dbussession" # 39| inst_dir "$dbussystem" # 40| inst_dir "$dbussystemservices" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:39:15: warning[SC2154]: dbussystem is referenced but not assigned. # 37| inst_dir "$dbusservices" # 38| inst_dir "$dbussession" # 39|-> inst_dir "$dbussystem" # 40| inst_dir "$dbussystemservices" # 41| inst_dir "$dbusconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:40:15: warning[SC2154]: dbussystemservices is referenced but not assigned. # 38| inst_dir "$dbussession" # 39| inst_dir "$dbussystem" # 40|-> inst_dir "$dbussystemservices" # 41| inst_dir "$dbusconfdir" # 42| inst_dir "$dbusinterfacesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:41:15: warning[SC2154]: dbusconfdir is referenced but not assigned. # 39| inst_dir "$dbussystem" # 40| inst_dir "$dbussystemservices" # 41|-> inst_dir "$dbusconfdir" # 42| inst_dir "$dbusinterfacesconfdir" # 43| inst_dir "$dbusservicesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:42:15: warning[SC2154]: dbusinterfacesconfdir is referenced but not assigned. # 40| inst_dir "$dbussystemservices" # 41| inst_dir "$dbusconfdir" # 42|-> inst_dir "$dbusinterfacesconfdir" # 43| inst_dir "$dbusservicesconfdir" # 44| inst_dir "$dbussessionconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:43:15: warning[SC2154]: dbusservicesconfdir is referenced but not assigned. # 41| inst_dir "$dbusconfdir" # 42| inst_dir "$dbusinterfacesconfdir" # 43|-> inst_dir "$dbusservicesconfdir" # 44| inst_dir "$dbussessionconfdir" # 45| inst_dir "$dbussystemconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:44:15: warning[SC2154]: dbussessionconfdir is referenced but not assigned. # 42| inst_dir "$dbusinterfacesconfdir" # 43| inst_dir "$dbusservicesconfdir" # 44|-> inst_dir "$dbussessionconfdir" # 45| inst_dir "$dbussystemconfdir" # 46| inst_dir "$dbussystemservicesconfdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:45:15: warning[SC2154]: dbussystemconfdir is referenced but not assigned. # 43| inst_dir "$dbusservicesconfdir" # 44| inst_dir "$dbussessionconfdir" # 45|-> inst_dir "$dbussystemconfdir" # 46| inst_dir "$dbussystemservicesconfdir" # 47| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:46:15: warning[SC2154]: dbussystemservicesconfdir is referenced but not assigned. # 44| inst_dir "$dbussessionconfdir" # 45| inst_dir "$dbussystemconfdir" # 46|-> inst_dir "$dbussystemservicesconfdir" # 47| # 48| inst_multiple -o \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:53:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 51| "$dbusservicesconfdir"/org.freedesktop.systemd1.service \ # 52| "$dbussystemservices"/org.freedesktop.systemd1.service \ # 53|-> "$systemdsystemunitdir"/dbus.service \ # 54| "$systemdsystemunitdir"/dbus.socket \ # 55| "$systemdsystemunitdir"/dbus.target.wants \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:64:10: warning[SC2154]: initdir is referenced but not assigned. # 62| Conflicts=shutdown.target\ # 63| Before=shutdown.target' \ # 64|-> "$initdir$systemdsystemunitdir/dbus.service" # 65| # 66| # Adjusting dependencies for initramfs in the dbus socket unit. Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:76:33: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 74| # 75| # Adding the user and group for dbus # 76|-> grep '^\(d\|message\)bus:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd" # 77| grep '^\(d\|message\)bus:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group" # 78| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:83:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 81| inst_multiple -H -o \ # 82| "$dbusconfdir"/system.conf \ # 83|-> "$systemdsystemconfdir"/dbus.socket \ # 84| "$systemdsystemconfdir"/dbus.socket.d/*.conf \ # 85| "$systemdsystemconfdir"/dbus.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06rngd/module-setup.sh:35:18: warning[SC2154]: moddir is referenced but not assigned. # 33| install() { # 34| inst rngd # 35|-> inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service" # 36| # make sure dependant libs are installed too # 37| inst_libdir_file opensc-pkcs11.so Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06rngd/module-setup.sh:35:43: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 33| install() { # 34| inst rngd # 35|-> inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service" # 36| # make sure dependant libs are installed too # 37| inst_libdir_file opensc-pkcs11.so Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/06rngd/module-setup.sh:39:27: warning[SC2154]: initdir is referenced but not assigned. # 37| inst_libdir_file opensc-pkcs11.so # 38| # 39|-> $SYSTEMCTL -q --root "$initdir" add-wants sysinit.target rngd.service # 40| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/10i18n/console_init.sh:5:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 3| [ -n "$DRACUT_SYSTEMD" ] && exit 0 # 4| # 5|-> if [ -x "$systemdutildir"/systemd-vconsole-setup ]; then # 6| "$systemdutildir"/systemd-vconsole-setup "$@" # 7| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/console_init.sh:15:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 13| # 14| set_keyboard() { # 15|-> local param # 16| # 17| [ "${UNICODE}" = 1 ] && param=-u || param=-a Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/console_init.sh:22:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 20| # 21| set_terminal() { # 22|-> local dev=$1 # 23| # 24| if [ "${UNICODE}" = 1 ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/console_init.sh:34:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 32| # 33| set_keymap() { # 34|-> local utf_switch # 35| # 36| if [ -z "${KEYMAP}" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/console_init.sh:61:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 59| # 60| dev_open() { # 61|-> local dev=$1 # 62| # 63| exec 6< "${dev}" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/10i18n/module-setup.sh:25:16: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 23| unset KEYMAP # 24| # shellcheck disable=SC1090 # 25|-> [[ -f "$dracutsysrootdir"/etc/vconsole.conf ]] && . "$dracutsysrootdir"/etc/vconsole.conf # 26| fi # 27| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/10i18n/module-setup.sh:126:19: warning[SC2154]: moddir is referenced but not assigned. # 124| # 125| if ! dracut_module_included "systemd"; then # 126|-> inst "${moddir}"/console_init.sh /lib/udev/console_init # 127| inst_rules "${moddir}"/10-console.rules # 128| inst_hook cmdline 20 "${moddir}/parse-i18n.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/10i18n/module-setup.sh:134:25: warning[SC2154]: initdir is referenced but not assigned. # 132| inst_dir /usr/share # 133| for _src in "${KBDSUBDIRS[@]}"; do # 134|-> [ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}" # 135| done # 136| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/10i18n/module-setup.sh:291:38: warning[SC2154]: i18n_install_all is referenced but not assigned. # 289| fi # 290| # 291|-> if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then # 292| install_local_i18n || install_all_kbd # 293| else Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/parse-i18n.sh:4:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 2| # 3| inst_key_val() { # 4|-> local _value # 5| local _file # 6| local _default Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/parse-i18n.sh:5:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 3| inst_key_val() { # 4| local _value # 5|-> local _file # 6| local _default # 7| _file="$1" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/10i18n/parse-i18n.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| local _value # 5| local _file # 6|-> local _default # 7| _file="$1" # 8| shift Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/30convertfs/convertfs.sh:24:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 22| done # 23| # 24|-> if [ ! -L "$ROOT"/var/run -a -e "$ROOT"/var/run ]; then # 25| echo "Converting /var/run to symlink" # 26| mv -f "$ROOT"/var/run "$ROOT"/var/run.runmove~ Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/30convertfs/convertfs.sh:30:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 28| fi # 29| # 30|-> if [ ! -L "$ROOT"/var/lock -a -e "$ROOT"/var/lock ]; then # 31| echo "Converting /var/lock to symlink" # 32| mv -f "$ROOT"/var/lock "$ROOT"/var/lock.lockmove~ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/30convertfs/convertfs.sh:99:6: warning[SC2154]: ret is referenced but not assigned. # 97| } # 98| # 99|-> trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT # 100| trap 'exit 1;' SIGINT # 101| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/30convertfs/module-setup.sh:17:29: warning[SC2154]: moddir is referenced but not assigned. # 15| install() { # 16| inst_multiple bash find ldconfig mv rm cp ln # 17|-> inst_hook pre-pivot 99 "$moddir/do-convertfs.sh" # 18| inst_script "$moddir/convertfs.sh" /usr/bin/convertfs # 19| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/cm-lib.sh:7:19: warning[SC2154]: hookdir is referenced but not assigned. # 5| cm_generate_connections() { # 6| if getargbool 0 rd.neednet; then # 7|-> mkdir -p "$hookdir"/initqueue/finished # 8| echo '[ -f /tmp/cm.done ]' > "$hookdir"/initqueue/finished/cm.sh # 9| mkdir -p /run/connman/initrd Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/module-setup.sh:28:18: warning[SC2154]: moddir is referenced but not assigned. # 26| inst_multiple ip sed grep # 27| # 28|-> inst_script "$moddir/netroot.sh" "/sbin/netroot" # 29| inst connmand # 30| inst connmanctl Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/module-setup.sh:32:11: warning[SC2154]: dbussystem is referenced but not assigned. # 30| inst connmanctl # 31| inst connmand-wait-online # 32|-> inst "$dbussystem"/connman.conf # 33| [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf # 34| inst_dir /usr/lib/connman/plugins Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/module-setup.sh:33:30: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 31| inst connmand-wait-online # 32| inst "$dbussystem"/connman.conf # 33|-> [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf # 34| inst_dir /usr/lib/connman/plugins # 35| inst_dir /var/lib/connman Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/module-setup.sh:39:46: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 37| inst_hook cmdline 99 "$moddir/cm-config.sh" # 38| # 39|-> inst_simple "$moddir"/cm-initrd.service "$systemdsystemunitdir"/cm-initrd.service # 40| inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service # 41| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/module-setup.sh:42:27: warning[SC2154]: initdir is referenced but not assigned. # 40| inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service # 41| # 42|-> $SYSTEMCTL -q --root "$initdir" enable cm-initrd.service # 43| # 44| inst_hook initqueue/settled 99 "$moddir/cm-run.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35connman/netroot.sh:54:19: warning[SC2154]: hookdir is referenced but not assigned. # 52| fi # 53| # 54|-> rm -f -- "$hookdir"/initqueue/finished/dhcp.sh # 55| # 56| # Set netroot to new_root_path, so cmdline parsers don't call Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:36:27: warning[SC2154]: moddir is referenced but not assigned. # 34| inst_multiple -o /usr/{lib,libexec}/nm-daemon-helper # 35| inst_multiple -o teamd dhclient # 36|-> inst_hook cmdline 99 "$moddir/nm-config.sh" # 37| if dracut_module_included "systemd"; then # 38| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:39:15: warning[SC2154]: dbussystem is referenced but not assigned. # 37| if dracut_module_included "systemd"; then # 38| # 39|-> inst "$dbussystem"/org.freedesktop.NetworkManager.conf # 40| inst_multiple nmcli nm-online # 41| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:45:14: warning[SC2154]: dbussystemconfdir is referenced but not assigned. # 43| inst_multiple -o \ # 44| "$dbussystem"/teamd.conf \ # 45|-> "$dbussystemconfdir"/teamd.conf # 46| # 47| # Install a configuration snippet to prevent the automatic creation of Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:51:50: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 49| inst_simple "$moddir"/initrd-no-auto-default.conf /usr/lib/NetworkManager/conf.d/ # 50| # 51|-> inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service # 52| inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service # 53| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:56:14: warning[SC2154]: systemdnetwork is referenced but not assigned. # 54| # Adding default link and (if exists) 98-default-mac-none.link # 55| inst_multiple -o \ # 56|-> "${systemdnetwork}/99-default.link" \ # 57| "${systemdnetwork}/98-default-mac-none.link" # 58| [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:58:49: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned. # 56| "${systemdnetwork}/99-default.link" \ # 57| "${systemdnetwork}/98-default-mac-none.link" # 58|-> [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" # 59| # 60| $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/module-setup.sh:60:31: warning[SC2154]: initdir is referenced but not assigned. # 58| [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link" # 59| # 60|-> $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service # 61| fi # 62| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-manager/nm-lib.sh:23:23: warning[SC2154]: hookdir is referenced but not assigned. # 21| /etc/sysconfig/network-scripts/ifcfg-*; do # 22| [ -f "$i" ] || continue # 23|-> mkdir -p "$hookdir"/initqueue/finished # 24| echo '[ -f /tmp/nm.done ]' > "$hookdir"/initqueue/finished/nm.sh # 25| mkdir -p /run/NetworkManager/initrd Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-wicked/module-setup.sh:26:27: warning[SC2154]: moddir is referenced but not assigned. # 24| local -a wicked_units # 25| # 26|-> inst_hook cmdline 99 "$moddir/wicked-config.sh" # 27| # 28| # Seems to not execute if in initqueue/settled Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/35network-wicked/module-setup.sh:66:52: warning[SC2154]: initdir is referenced but not assigned. # 64| # 65| for unit in "${wicked_units[@]}"; do # 66|-> sed -i 's/^After=.*/After=dbus.service/g' "$initdir/$unit" # 67| sed -i 's/^Before=\(.*\)/Before=\1 dracut-pre-udev.service/g' "$initdir/$unit" # 68| sed -i 's/^Wants=\(.*\)/Wants=\1 dbus.service/g' "$initdir/$unit" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/dhcp-root.sh:29:52: warning[SC2154]: hookdir is referenced but not assigned. # 27| [ -z "$root" ] && root="dhcp" # 28| # shellcheck disable=SC2016 # 29|-> echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > "$hookdir"/initqueue/finished/dhcp.sh # 30| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/ifname-genrules.sh:14:30: warning[SC2154]: ifname_mac is referenced but not assigned. # 12| parse_ifname_opts "$p" # 13| # 14|-> if [ -f /tmp/ifname-"$ifname_mac" ]; then # 15| read -r oldif < /tmp/ifname-"$ifname_mac" # 16| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/ifname-genrules.sh:17:30: warning[SC2154]: ifname_if is referenced but not assigned. # 15| read -r oldif < /tmp/ifname-"$ifname_mac" # 16| fi # 17|-> if [ -f /tmp/ifname-"$ifname_if" ]; then # 18| read -r oldmac < /tmp/ifname-"$ifname_if" # 19| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/ifname-genrules.sh:20:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 18| read -r oldmac < /tmp/ifname-"$ifname_if" # 19| fi # 20|-> if [ -n "$oldif" -a -n "$oldmac" -a "$oldif" = "$ifname_if" -a "$oldmac" = "$ifname_mac" ]; then # 21| # skip same ifname= declaration # 22| continue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/ifname-genrules.sh:20:42: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 18| read -r oldmac < /tmp/ifname-"$ifname_if" # 19| fi # 20|-> if [ -n "$oldif" -a -n "$oldmac" -a "$oldif" = "$ifname_if" -a "$oldmac" = "$ifname_mac" ]; then # 21| # skip same ifname= declaration # 22| continue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/ifname-genrules.sh:20:69: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 18| read -r oldmac < /tmp/ifname-"$ifname_if" # 19| fi # 20|-> if [ -n "$oldif" -a -n "$oldmac" -a "$oldif" = "$ifname_if" -a "$oldmac" = "$ifname_mac" ]; then # 21| # skip same ifname= declaration # 22| continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/module-setup.sh:20:18: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 18| # 19| if [ -z "$network_handler" ]; then # 20|-> if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then # 21| network_handler="network-wicked" # 22| elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/module-setup.sh:20:35: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 18| # 19| if [ -z "$network_handler" ]; then # 20|-> if [[ -e $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then # 21| network_handler="network-wicked" # 22| elif [[ -e $dracutsysrootdir$systemdsystemunitdir/connman.service ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/module-setup.sh:26:37: warning[SC2154]: systemdutildir is referenced but not assigned. # 24| elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then # 25| network_handler="network-manager" # 26|-> elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then # 27| network_handler="systemd-networkd" # 28| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/module-setup.sh:43:18: warning[SC2154]: moddir is referenced but not assigned. # 41| # called by dracut # 42| install() { # 43|-> inst_script "$moddir/netroot.sh" "/sbin/netroot" # 44| inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" # 45| inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:19:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 17| # 18| get_ip() { # 19|-> local iface="$1" ip="" # 20| ip=$(ip -f inet addr show "$iface") # 21| ip=${ip%%/*} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:39:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 37| # 38| iface_for_mac() { # 39|-> local interface="" # 40| local mac # 41| mac="$(echo "$@" | sed 'y/ABCDEF/abcdef/')" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:40:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 38| iface_for_mac() { # 39| local interface="" # 40|-> local mac # 41| mac="$(echo "$@" | sed 'y/ABCDEF/abcdef/')" # 42| for interface in /sys/class/net/*; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:60:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 58| # list the configured interfaces # 59| configured_ifaces() { # 60|-> local IFACES="" iface_id="" rv=1 # 61| [ -e "/tmp/net.ifaces" ] && read -r IFACES < /tmp/net.ifaces # 62| if { pidof udevd || pidof systemd-udevd; } > /dev/null; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:76:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 74| # 75| all_ifaces_up() { # 76|-> local iface="" IFACES="" # 77| [ -e "/tmp/net.ifaces" ] && read -r IFACES < /tmp/net.ifaces # 78| for iface in $IFACES; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:84:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 82| # 83| all_ifaces_setup() { # 84|-> local iface="" IFACES="" # 85| [ -e "/tmp/net.ifaces" ] && read -r IFACES < /tmp/net.ifaces # 86| for iface in $IFACES; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:92:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 90| # 91| get_netroot_ip() { # 92|-> local prefix="" server="" rest="" # 93| splitsep ":" "$1" prefix server rest # 94| case $server in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:112:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 110| # 111| ifdown() { # 112|-> local netif="$1" # 113| # ip down/flush ensures that routing info goes away as well # 114| ip link set "$netif" down Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:125:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 123| # 124| setup_net() { # 125|-> local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" # 126| local _p # 127| [ -e /tmp/net."$netif".did-setup ] && return Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:126:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 124| setup_net() { # 125| local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES="" # 126|-> local _p # 127| [ -e /tmp/net."$netif".did-setup ] && return # 128| [ -z "$DO_VLAN" ] \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/net-lib.sh:178:34: warning[SC2154]: netroot is referenced but not assigned. # 176| # 177| # Get the "netroot" IP (if there's an IP address in there) # 178|-> netroot_ip=$(get_netroot_ip "$netroot") # 179| # 180| # try netroot if it's local (or there's no gateway) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:208:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 206| # 207| save_netinfo() { # 208|-> local netif="$1" IFACES="" f="" i="" # 209| [ -e /tmp/net.ifaces ] && read -r IFACES < /tmp/net.ifaces # 210| # Add $netif to the front of IFACES (if it's not there already). Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:224:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 222| # 223| set_ifname() { # 224|-> local name="$1" mac="$2" num=-1 n="" # 225| # if it's already set, return the existing name # 226| for n in $(getargs ifname=); do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:246:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 244| # pxelinux provides macaddr '-' separated, but we need ':' # 245| fix_bootif() { # 246|-> local macaddr=${1} # 247| local IFS='-' # 248| # shellcheck disable=SC2086 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:247:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 245| fix_bootif() { # 246| local macaddr=${1} # 247|-> local IFS='-' # 248| # shellcheck disable=SC2086 # 249| macaddr=$(printf '%s:' ${macaddr}) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:258:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 256| # 257| ibft_to_cmdline() { # 258|-> local iface="" # 259| modprobe -q iscsi_ibft # 260| ( Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:262:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 260| ( # 261| for iface in /sys/firmware/ibft/ethernet*; do # 262|-> local mac="" dev="" # 263| local dhcp="" ip="" gw="" mask="" hostname="" # 264| local dns1 dns2 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:263:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 261| for iface in /sys/firmware/ibft/ethernet*; do # 262| local mac="" dev="" # 263|-> local dhcp="" ip="" gw="" mask="" hostname="" # 264| local dns1 dns2 # 265| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:264:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 262| local mac="" dev="" # 263| local dhcp="" ip="" gw="" mask="" hostname="" # 264|-> local dns1 dns2 # 265| # 266| [ -e "${iface}"/mac ] || continue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:322:49: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 320| fi # 321| fi # 322|-> if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then # 323| echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" # 324| else Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:362:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 360| # 361| parse_iscsi_root() { # 362|-> local v # 363| v=${1#iscsi:} # 364| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:470:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 468| # 469| ip_to_var() { # 470|-> local v=${1}: # 471| local i # 472| set -- Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:471:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 469| ip_to_var() { # 470| local v=${1}: # 471|-> local i # 472| set -- # 473| while [ -n "$v" ]; do Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:521:24: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 519| fi # 520| # 521|-> if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then # 522| # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] # 523| [ -n "$1" ] && dev="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:521:39: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 519| fi # 520| # 521|-> if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then # 522| # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] # 523| [ -n "$1" ] && dev="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:521:55: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 519| fi # 520| # 521|-> if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then # 522| # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] # 523| [ -n "$1" ] && dev="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:521:73: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 519| fi # 520| # 521|-> if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then # 522| # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] # 523| [ -n "$1" ] && dev="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:521:91: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 519| fi # 520| # 521|-> if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" -o "$2" = "either6" ]; then # 522| # format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]] # 523| [ -n "$1" ] && dev="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:550:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 548| [0-9]*) # 549| mtu="$8" # 550|-> if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552| elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:552:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 550| if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 553| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 554| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:552:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 550| if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 553| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 554| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:552:58: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 550| if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 553| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 554| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:552:72: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 550| if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 553| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 554| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:552:86: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 550| if [ -n "${9}" -a -z "${10}" ]; then # 551| macaddr="${9}" # 552|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 553| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 554| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:557:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 555| ;; # 556| *) # 557|-> if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559| elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:559:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 557| if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 560| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 561| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:559:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 557| if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 560| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 561| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:559:58: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 557| if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 560| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 561| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:559:72: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 557| if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 560| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 561| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/40network/net-lib.sh:559:86: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 557| if [ -n "${9}" -a -z "${10}" ]; then # 558| macaddr="${9}" # 559|-> elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then # 560| macaddr="${9}:${10}:${11}:${12}:${13}:${14}" # 561| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:568:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 566| # 567| route_to_var() { # 568|-> local v=${1}: # 569| local i # 570| set -- Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:569:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 567| route_to_var() { # 568| local v=${1}: # 569|-> local i # 570| set -- # 571| while [ -n "$v" ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:602:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 600| # 601| parse_ifname_opts() { # 602|-> local IFS=: # 603| # shellcheck disable=SC2086 # 604| set -- $1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:635:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 633| # some network driver need long time to initialize, wait before it's ready. # 634| wait_for_if_link() { # 635|-> local cnt=0 # 636| local li # 637| local timeout Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:636:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 634| wait_for_if_link() { # 635| local cnt=0 # 636|-> local li # 637| local timeout # 638| timeout=$(getargs rd.net.timeout.iflink=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:637:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 635| local cnt=0 # 636| local li # 637|-> local timeout # 638| timeout=$(getargs rd.net.timeout.iflink=) # 639| timeout=${timeout:-60} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:652:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 650| # 651| wait_for_if_up() { # 652|-> local cnt=0 # 653| local li # 654| local timeout Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:653:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 651| wait_for_if_up() { # 652| local cnt=0 # 653|-> local li # 654| local timeout # 655| timeout=$(getargs rd.net.timeout.ifup=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:654:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 652| local cnt=0 # 653| local li # 654|-> local timeout # 655| timeout=$(getargs rd.net.timeout.ifup=) # 656| timeout=${timeout:-20} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:686:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 684| # 685| wait_for_route_ok() { # 686|-> local cnt=0 # 687| local timeout # 688| timeout=$(getargs rd.net.timeout.route=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:687:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 685| wait_for_route_ok() { # 686| local cnt=0 # 687|-> local timeout # 688| timeout=$(getargs rd.net.timeout.route=) # 689| timeout=${timeout:-20} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:702:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 700| # 701| wait_for_ipv6_dad_link() { # 702|-> local cnt=0 # 703| local timeout # 704| timeout=$(getargs rd.net.timeout.ipv6dad=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:703:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 701| wait_for_ipv6_dad_link() { # 702| local cnt=0 # 703|-> local timeout # 704| timeout=$(getargs rd.net.timeout.ipv6dad=) # 705| timeout=${timeout:-50} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:721:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 719| # 720| wait_for_ipv6_dad() { # 721|-> local cnt=0 # 722| local timeout # 723| timeout=$(getargs rd.net.timeout.ipv6dad=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:722:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 720| wait_for_ipv6_dad() { # 721| local cnt=0 # 722|-> local timeout # 723| timeout=$(getargs rd.net.timeout.ipv6dad=) # 724| timeout=${timeout:-50} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:741:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 739| # 740| wait_for_ipv6_auto() { # 741|-> local cnt=0 # 742| local timeout # 743| timeout=$(getargs rd.net.timeout.ipv6auto=) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:742:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 740| wait_for_ipv6_auto() { # 741| local cnt=0 # 742|-> local timeout # 743| timeout=$(getargs rd.net.timeout.ipv6auto=) # 744| timeout=${timeout:-40} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:767:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 765| # 766| iface_has_carrier() { # 767|-> local cnt=0 # 768| local iface="$1" flags="" # 769| local timeout Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:768:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 766| iface_has_carrier() { # 767| local cnt=0 # 768|-> local iface="$1" flags="" # 769| local timeout # 770| local iface_sys_path Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:769:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 767| local cnt=0 # 768| local iface="$1" flags="" # 769|-> local timeout # 770| local iface_sys_path # 771| [ -n "$iface" ] || return 2 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:770:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 768| local iface="$1" flags="" # 769| local timeout # 770|-> local iface_sys_path # 771| [ -n "$iface" ] || return 2 # 772| iface_sys_path="/sys/class/net/$iface" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:805:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 803| # 804| iface_is_enslaved() { # 805|-> local _li # 806| _li=$(ip link show dev "$@") # 807| strstr "$_li" " master " || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:812:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 810| # 811| find_iface_with_link() { # 812|-> local iface_path="" iface="" # 813| for iface_path in /sys/class/net/*; do # 814| iface=${iface_path##*/} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:825:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 823| # 824| is_persistent_ethernet_name() { # 825|-> local _netif="$1" # 826| local _name_assign_type="0" # 827| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:826:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 824| is_persistent_ethernet_name() { # 825| local _netif="$1" # 826|-> local _name_assign_type="0" # 827| # 828| [ -f "/sys/class/net/$_netif/name_assign_type" ] \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:860:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 858| # 859| is_kernel_ethernet_name() { # 860|-> local _netif="$1" # 861| local _name_assign_type="1" # 862| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:861:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 859| is_kernel_ethernet_name() { # 860| local _netif="$1" # 861|-> local _name_assign_type="1" # 862| # 863| if [ -e "/sys/class/net/$_netif/name_assign_type" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:893:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 891| # 892| iface_get_subchannels() { # 893|-> local _netif # 894| local _subchannels # 895| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/40network/net-lib.sh:894:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 892| iface_get_subchannels() { # 893| local _netif # 894|-> local _subchannels # 895| # 896| _netif="$1" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/40network/netroot.sh:54:19: warning[SC2154]: hookdir is referenced but not assigned. # 52| fi # 53| # 54|-> rm -f -- "$hookdir"/initqueue/finished/dhcp.sh # 55| # 56| # Set netroot to new_root_path, so cmdline parsers don't call Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/module-setup.sh:5:11: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 3| # called by dracut # 4| check() { # 5|-> [[ -d $dracutsysrootdir/etc/sysconfig/network-scripts ]] && return 0 # 6| return 255 # 7| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/module-setup.sh:18:29: warning[SC2154]: moddir is referenced but not assigned. # 16| install() { # 17| inst_binary awk # 18|-> inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh" # 19| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:14:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 12| # 13| get_config_line_by_subchannel() { # 14|-> local CHANNELS # 15| local line # 16| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:15:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 13| get_config_line_by_subchannel() { # 14| local CHANNELS # 15|-> local line # 16| # 17| CHANNELS="$1" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:28:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 26| # 27| print_s390() { # 28|-> local _netif # 29| local SUBCHANNELS # 30| local OPTIONS Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:29:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 27| print_s390() { # 28| local _netif # 29|-> local SUBCHANNELS # 30| local OPTIONS # 31| local NETTYPE Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:30:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 28| local _netif # 29| local SUBCHANNELS # 30|-> local OPTIONS # 31| local NETTYPE # 32| local CONFIG_LINE Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:31:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 29| local SUBCHANNELS # 30| local OPTIONS # 31|-> local NETTYPE # 32| local CONFIG_LINE # 33| local i Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:32:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| local OPTIONS # 31| local NETTYPE # 32|-> local CONFIG_LINE # 33| local i # 34| local channel Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| local NETTYPE # 32| local CONFIG_LINE # 33|-> local i # 34| local channel # 35| local OLD_IFS Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:34:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 32| local CONFIG_LINE # 33| local i # 34|-> local channel # 35| local OLD_IFS # 36| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:35:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 33| local i # 34| local channel # 35|-> local OLD_IFS # 36| # 37| _netif="$1" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:54:16: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 52| CONFIG_LINE=$(get_config_line_by_subchannel "$SUBCHANNELS") # 53| # shellcheck disable=SC2181 # 54|-> [ $? -ne 0 -o -z "$CONFIG_LINE" ] && return 0 # 55| # 56| OLD_IFS=$IFS Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:79:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 77| # 78| hw_bind() { # 79|-> local _netif="$1" # 80| local _macaddr="$2" # 81| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:80:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 78| hw_bind() { # 79| local _netif="$1" # 80|-> local _macaddr="$2" # 81| # 82| [ -n "$_macaddr" ] \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:103:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 101| # 102| interface_bind() { # 103|-> local _netif="$1" # 104| local _macaddr="$2" # 105| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:104:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 102| interface_bind() { # 103| local _netif="$1" # 104|-> local _macaddr="$2" # 105| # 106| if [ ! -e "/sys/class/net/$_netif" ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:155:22: warning[SC2154]: bridgename is referenced but not assigned. # 153| # 154| read -r uuid < /proc/sys/kernel/random/uuid # 155|-> if [ "$netif" = "$bridgename" ]; then # 156| bridge=yes # 157| elif [ "$netif" = "$teammaster" ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:157:24: warning[SC2154]: teammaster is referenced but not assigned. # 155| if [ "$netif" = "$bridgename" ]; then # 156| bridge=yes # 157|-> elif [ "$netif" = "$teammaster" ]; then # 158| team=yes # 159| elif [ "$netif" = "$bondname" ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:159:24: warning[SC2154]: bondname is referenced but not assigned. # 157| elif [ "$netif" = "$teammaster" ]; then # 158| team=yes # 159|-> elif [ "$netif" = "$bondname" ]; then # 160| # $netif can't be bridge and bond at the same time # 161| bond=yes Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:178:52: warning[SC2154]: macaddr is referenced but not assigned (did you mean '_macaddr'?). # 176| echo "# Generated by dracut initrd" # 177| echo "NAME=\"$netif\"" # 178|-> [ -z "$vlan" ] && interface_bind "$netif" "$macaddr" # 179| echo "ONBOOT=yes" # 180| echo "NETBOOT=yes" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:196:27: warning[SC2154]: ip is referenced but not assigned. # 194| # shellcheck disable=SC1090 # 195| [ -e /tmp/net."$netif".override ] && . /tmp/net."$netif".override # 196|-> if strglobin "$ip" '*:*:*'; then # 197| echo "IPV6INIT=yes" # 198| echo "IPV6_AUTOCONF=no" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:199:38: warning[SC2154]: mask is referenced but not assigned. # 197| echo "IPV6INIT=yes" # 198| echo "IPV6_AUTOCONF=no" # 199|-> echo "IPV6ADDR=\"$ip/$mask\"" # 200| else # 201| if [ -f /tmp/net."$netif".has_ibft_config ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:233:29: warning[SC2154]: phydevice is referenced but not assigned. # 231| echo "DEVICE=\"$netif\"" # 232| echo "VLAN=yes" # 233|-> echo "PHYSDEV=\"$phydevice\"" # 234| } >> /tmp/ifcfg/ifcfg-"$netif" # 235| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:241:34: warning[SC2154]: bondoptions is referenced but not assigned. # 239| { # 240| # This variable is an indicator of a bond interface for initscripts # 241|-> echo "BONDING_OPTS=\"$bondoptions\"" # 242| echo "NAME=\"$netif\"" # 243| echo "TYPE=Bond" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:246:22: warning[SC2154]: bondslaves is referenced but not assigned. # 244| } >> /tmp/ifcfg/ifcfg-"$netif" # 245| # 246|-> for slave in $bondslaves; do # 247| # write separate ifcfg file for the raw eth interface # 248| ( Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:271:22: warning[SC2154]: bridgeslaves is referenced but not assigned. # 269| echo "NAME=\"$netif\"" # 270| } >> /tmp/ifcfg/ifcfg-"$netif" # 271|-> for slave in $bridgeslaves; do # 272| # write separate ifcfg file for the raw eth interface # 273| ( Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:289:37: warning[SC2154]: dns1 is referenced but not assigned. # 287| fi # 288| i=1 # 289|-> for ns in $(getargs nameserver) $dns1 $dns2; do # 290| echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-"$netif" # 291| i=$((i + 1)) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:289:43: warning[SC2154]: dns2 is referenced but not assigned. # 287| fi # 288| i=1 # 289|-> for ns in $(getargs nameserver) $dns1 $dns2; do # 290| echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-"$netif" # 291| i=$((i + 1)) Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:299:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 297| # 298| # Pass network opts # 299|-> mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts # 300| mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient # 301| echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:300:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 298| # Pass network opts # 299| mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts # 300|-> mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient # 301| echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab # 302| echo "files /var/lib/dhclient" >> /run/initramfs/rwtab Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45url-lib/module-setup.sh:19:18: warning[SC2154]: moddir is referenced but not assigned. # 17| install() { # 18| local _dir _crt _crts _found _lib _nssckbi _p11roots _p11root # 19|-> inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh" # 20| inst_multiple -o ctorrent # 21| inst_multiple curl sed Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45url-lib/module-setup.sh:30:17: warning[SC2154]: libdirs is referenced but not assigned. # 28| fi # 29| # 30|-> for _dir in $libdirs; do # 31| [[ -d $dracutsysrootdir$_dir ]] || continue # 32| for _lib in "$dracutsysrootdir$_dir"/libcurl.so.* "$dracutsysrootdir$_dir"/libcrypto.so.*; do Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45url-lib/module-setup.sh:31:15: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 29| # 30| for _dir in $libdirs; do # 31|-> [[ -d $dracutsysrootdir$_dir ]] || continue # 32| for _lib in "$dracutsysrootdir$_dir"/libcurl.so.* "$dracutsysrootdir$_dir"/libcrypto.so.*; do # 33| [[ -e $_lib ]] || continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/45url-lib/module-setup.sh:79:38: warning[SC2154]: initdir is referenced but not assigned. # 77| # so now we know it's really a p11-kit trust dir; # 78| # install everything in it # 79|-> mkdir -p -- "${initdir}/${_p11root}" # 80| if ! $DRACUT_CP -L -t "${initdir}/${_p11root}" "${dracutsysrootdir}${_p11root}"/*; then # 81| dwarn "Couldn't install from p11-kit trust dir '${_p11root#$dracutsysrootdir}'; HTTPS might not work." Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:22:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 20| # other: fetch command failure (whatever curl/mount/etc return) # 21| fetch_url() { # 22|-> local url="$1" outloc="$2" # 23| local handler # 24| handler="$(get_url_handler "$url")" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:23:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 21| fetch_url() { # 22| local url="$1" outloc="$2" # 23|-> local handler # 24| handler="$(get_url_handler "$url")" # 25| [ -n "$handler" ] || return 254 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| # returns the first HANDLERNAME corresponding to the URL's scheme # 32| get_url_handler() { # 33|-> local scheme="${1%%:*}" item="" # 34| for item in $url_handler_map; do # 35| [ "$scheme" = "${item%%:*}" ] && echo "${item#*:}" && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:43:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 41| # associate the named handler with the named scheme(s). # 42| add_url_handler() { # 43|-> local handler="$1" # 44| shift # 45| local schemes="$*" scheme="" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:45:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 43| local handler="$1" # 44| shift # 45|-> local schemes="$*" scheme="" # 46| set -- # 47| for scheme in $schemes; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:66:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 64| # 65| curl_fetch_url() { # 66|-> local url="$1" outloc="$2" # 67| echo "$url" > /proc/self/fd/0 # 68| if [ -n "$outloc" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:72:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 70| curl $curl_args --output "$outloc" -- "$url" || return $? # 71| else # 72|-> local outdir # 73| outdir="$(mkuniqdir /tmp curl_fetch_url)" # 74| ( Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:98:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 96| # 97| ctorrent_fetch_url() { # 98|-> local url="$1" outloc="$2" # 99| url=${url#*//} # 100| torrent_outloc="$outloc.torrent" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:106:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 104| curl $curl_args --output "$torrent_outloc" -- "$url" || return $? # 105| else # 106|-> local outdir # 107| outdir="$(mkuniqdir /tmp torrent_fetch_url)" # 108| ( Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:137:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 135| # 136| nfs_already_mounted() { # 137|-> local server="$1" path="$2" s="" p="" # 138| while read -r src mnt rest || [ -n "$src" ]; do # 139| splitsep ":" "$src" s p Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:151:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 149| # 150| nfs_fetch_url() { # 151|-> local url="$1" outloc="$2" nfs="" server="" path="" options="" # 152| nfs_to_var "$url" || return 255 # 153| local filepath="${path%/*}" filename="${path##*/}" mntdir="" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:153:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 151| local url="$1" outloc="$2" nfs="" server="" path="" options="" # 152| nfs_to_var "$url" || return 255 # 153|-> local filepath="${path%/*}" filename="${path##*/}" mntdir="" # 154| # 155| # skip mount if server:/filepath is already mounted Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:158:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 156| mntdir=$(nfs_already_mounted "$server" "$path") # 157| if [ -z "$mntdir" ]; then # 158|-> local mntdir # 159| mntdir="$(mkuniqdir /run nfs_mnt)" # 160| mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:11:18: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 9| fi # 10| for _dir in $_dirs; do # 11|-> if [ -x "$dracutsysrootdir""$_dir"/plymouth-populate-initrd ]; then # 12| echo "$_dir" # 13| return Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:37:12: warning[SC2154]: moddir is referenced but not assigned. # 35| || [ ! -x "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd ]; then # 36| # shellcheck disable=SC1090 # 37|-> . "$moddir"/plymouth-populate-initrd.sh # 38| else # 39| PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:39:45: warning[SC2154]: dracutfunctions is referenced but not assigned. # 37| . "$moddir"/plymouth-populate-initrd.sh # 38| else # 39|-> PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ # 40| "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir" # 41| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:40:76: warning[SC2154]: initdir is referenced but not assigned. # 38| else # 39| PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ # 40|-> "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir" # 41| fi # 42| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/plymouth-populate-initrd.sh:12:19: warning[SC2154]: initdir is referenced but not assigned. # 10| # 11| # shellcheck disable=SC2174 # 12|-> mkdir -m 0755 -p "${initdir}/usr/share/plymouth" # 13| # 14| inst_libdir_file "plymouth/text.so" "plymouth/details.so" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/50plymouth/plymouth-populate-initrd.sh:21:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 19| "/usr/share/plymouth/themes/text/text.plymouth" # 20| # 21|-> if [[ -d $dracutsysrootdir/usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then # 22| for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/*; do # 23| [[ -f "$dracutsysrootdir$x" ]] || break Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh:21:37: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 19| read -r consoledev rest < /sys/class/tty/console/active # 20| consoledev=${consoledev:-tty0} # 21|-> [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" # 22| plymouthd --attach-to-session --pid-file /run/plymouth/pid # 23| plymouth --show-splash 2>&1 | vinfo Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh:25:37: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 23| plymouth --show-splash 2>&1 | vinfo # 24| # reset tty after plymouth messed with it # 25|-> [ -x /lib/udev/console_init -a -e "/dev/$consoledev" ] && /lib/udev/console_init "/dev/$consoledev" # 26| fi # 27| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:51:10: warning[SC2154]: dbussystem is referenced but not assigned. # 49| # 50| inst_multiple -o \ # 51|-> "$dbussystem"/bluetooth.conf \ # 52| "${systemdsystemunitdir}/bluetooth.target" \ # 53| "${systemdsystemunitdir}/bluetooth.service" \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:52:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 50| inst_multiple -o \ # 51| "$dbussystem"/bluetooth.conf \ # 52|-> "${systemdsystemunitdir}/bluetooth.target" \ # 53| "${systemdsystemunitdir}/bluetooth.service" \ # 54| bluetoothctl Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:65:14: warning[SC2154]: dbussystemconfdir is referenced but not assigned. # 63| inst_multiple -o \ # 64| /etc/bluetooth/main.conf \ # 65|-> "$dbussystemconfdir"/bluetooth.conf \ # 66| "${var_lib_files[@]#"$dracutsysrootdir"}" # 67| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:77:10: warning[SC2154]: initdir is referenced but not assigned. # 75| Before=shutdown.target\ # 76| After=dbus.service' \ # 77|-> "${initdir}/${systemdsystemunitdir}/bluetooth.service" # 78| # 79| $SYSTEMCTL -q --root "$initdir" enable bluetooth.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80lvmmerge/module-setup.sh:24:27: warning[SC2154]: moddir is referenced but not assigned. # 22| install() { # 23| inst_multiple dd swapoff # 24|-> inst_hook cleanup 01 "$moddir/lvmmerge.sh" # 25| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80lvmthinpool-monitor/module-setup.sh:20:18: warning[SC2154]: moddir is referenced but not assigned. # 18| install() { # 19| inst_multiple sort tr awk # 20|-> inst_script "$moddir/start-thinpool-monitor.sh" "/bin/start-thinpool-monitor" # 21| # 22| inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80lvmthinpool-monitor/module-setup.sh:22:52: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 20| inst_script "$moddir/start-thinpool-monitor.sh" "/bin/start-thinpool-monitor" # 21| # 22|-> inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" # 23| $SYSTEMCTL -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service # 24| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80lvmthinpool-monitor/module-setup.sh:23:27: warning[SC2154]: initdir is referenced but not assigned. # 21| # 22| inst "$moddir/start-thinpool-monitor.service" "$systemdsystemunitdir/start-thinpool-monitor.service" # 23|-> $SYSTEMCTL -q --root "$initdir" add-wants initrd.target start-thinpool-monitor.service # 24| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/80lvmthinpool-monitor/start-thinpool-monitor.sh:12:43: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten. # 10| --nosuffix --noheadings -o vg_name,lv_name "$_device_path" 2> /dev/null) # 11| # 12|-> [ -n "$_lvm2_thin_device" ] && return $? # 13| } # 14| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80test-makeroot/module-setup.sh:14:38: warning[SC2154]: moddir is referenced but not assigned. # 12| install() { # 13| inst_multiple poweroff cp umount sync dd # 14|-> inst_hook initqueue/finished 01 "$moddir/finished-false.sh" # 15| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80test-root/module-setup.sh:22:18: warning[SC2154]: dracutbasedir is referenced but not assigned. # 20| inst_multiple -o ${_terminfodir}/l/linux # 21| # 22|-> inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 23| ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" # 24| ln -s dracut-util "${initdir}/usr/bin/dracut-getargs" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80test-root/module-setup.sh:23:24: warning[SC2154]: initdir is referenced but not assigned. # 21| # 22| inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 23|-> ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" # 24| ln -s dracut-util "${initdir}/usr/bin/dracut-getargs" # 25| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/80test/module-setup.sh:14:39: warning[SC2154]: moddir is referenced but not assigned. # 12| install() { # 13| inst poweroff # 14|-> inst_hook shutdown-emergency 000 "$moddir/hard-off.sh" # 15| inst_hook emergency 000 "$moddir/hard-off.sh" # 16| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90btrfs/btrfs_device_ready.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| # 5| btrfs_check_complete() { # 6|-> local _rootinfo _dev # 7| _dev="${1:-/dev/root}" # 8| [ -e "$_dev" ] || return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90btrfs/btrfs_finished.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| # 5| btrfs_check_complete() { # 6|-> local _rootinfo _dev # 7| _dev="${1:-/dev/root}" # 8| [ -e "$_dev" ] || return 0 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90btrfs/module-setup.sh:10:20: warning[SC2154]: host_fs_types is referenced but not assigned. # 8| # 9| [[ $hostonly ]] || [[ $mount_needs ]] && { # 10|-> for fs in "${host_fs_types[@]}"; do # 11| [[ $fs == "btrfs" ]] && return 0 # 12| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90btrfs/module-setup.sh:33:21: warning[SC2154]: moddir is referenced but not assigned. # 31| install() { # 32| if ! inst_rules 64-btrfs.rules; then # 33|-> inst_rules "$moddir/80-btrfs.rules" # 34| case "$(btrfs --help)" in # 35| *device\ ready*) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90btrfs/module-setup.sh:54:35: warning[SC2154]: initdir is referenced but not assigned. # 52| # Hack for slow machines # 53| # see https://github.com/dracutdevs/dracut/issues/658 # 54|-> echo "rd.driver.pre=btrfs" > "${initdir}"/etc/cmdline.d/00-btrfs.conf # 55| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-cleanup.sh:8:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| if ! getarg rd.luks.uuid -d rd_LUKS_UUID > /dev/null 2>&1 && getargbool 1 rd.luks -d -n rd_NO_LUKS > /dev/null 2>&1; then # 7| while true; do # 8|-> local do_break="y" # 9| for i in /dev/mapper/luks-*; do # 10| cryptsetup luksClose "$i" > /dev/null 2>&1 && do_break=n Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| # check if the crypttab contains an entry for a LUKS UUID # 6| crypttab_contains() { # 7|-> local luks="$1" # 8| local dev="$2" # 9| local l d rest Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:8:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| crypttab_contains() { # 7| local luks="$1" # 8|-> local dev="$2" # 9| local l d rest # 10| if [ -f /etc/crypttab ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:9:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 7| local luks="$1" # 8| local dev="$2" # 9|-> local l d rest # 10| if [ -f /etc/crypttab ]; then # 11| while read -r l d rest || [ -n "$l" ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:16:30: warning[SC3013]: In POSIX sh, -ef is undefined. # 14| if [ -n "$dev" ]; then # 15| for _dev in $(devnames "$d"); do # 16|-> [ "$dev" -ef "$_dev" ] && return 0 # 17| done # 18| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:52:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 50| # It's useful when password is read from stdin. # 51| ask_for_password() { # 52|-> local ply_cmd # 53| local ply_prompt # 54| local ply_tries=3 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:53:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 51| ask_for_password() { # 52| local ply_cmd # 53|-> local ply_prompt # 54| local ply_tries=3 # 55| local tty_cmd Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:54:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 52| local ply_cmd # 53| local ply_prompt # 54|-> local ply_tries=3 # 55| local tty_cmd # 56| local tty_prompt Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:55:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 53| local ply_prompt # 54| local ply_tries=3 # 55|-> local tty_cmd # 56| local tty_prompt # 57| local tty_tries=3 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:56:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 54| local ply_tries=3 # 55| local tty_cmd # 56|-> local tty_prompt # 57| local tty_tries=3 # 58| local ret Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:57:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 55| local tty_cmd # 56| local tty_prompt # 57|-> local tty_tries=3 # 58| local ret # 59| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:58:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 56| local tty_prompt # 57| local tty_tries=3 # 58|-> local ret # 59| # 60| while [ $# -gt 0 ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:120:13: warning[SC3043]: In POSIX sh, 'local' is undefined. # 118| fi # 119| # 120|-> local i=1 # 121| while [ $i -le "$tty_tries" ]; do # 122| [ -n "$tty_prompt" ] \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:144:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 142| # test_dev -f LABEL="nice label" /some/file1 # 143| test_dev() { # 144|-> local test_op=$1 # 145| local dev="$2" # 146| local f="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:145:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 143| test_dev() { # 144| local test_op=$1 # 145|-> local dev="$2" # 146| local f="$3" # 147| local ret=1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:146:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 144| local test_op=$1 # 145| local dev="$2" # 146|-> local f="$3" # 147| local ret=1 # 148| local mount_point Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:147:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 145| local dev="$2" # 146| local f="$3" # 147|-> local ret=1 # 148| local mount_point # 149| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:148:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 146| local f="$3" # 147| local ret=1 # 148|-> local mount_point # 149| # 150| mount_point=$(mkuniqdir /mnt testdev) Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:151:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 149| # 150| mount_point=$(mkuniqdir /mnt testdev) # 151|-> [ -n "$dev" -a -n "$*" ] || return 1 # 152| [ -d "$mount_point" ] || die 'Mount point does not exist!' # 153| Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:178:15: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 176| # Returns true if /dev/dm-1 UUID starts with "123". # 177| match_dev() { # 178|-> [ -z "$1" -o "$1" = '*' ] && return 0 # 179| local devlist # 180| local dev Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:179:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 177| match_dev() { # 178| [ -z "$1" -o "$1" = '*' ] && return 0 # 179|-> local devlist # 180| local dev # 181| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:180:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 178| [ -z "$1" -o "$1" = '*' ] && return 0 # 179| local devlist # 180|-> local dev # 181| # 182| devlist="$(devnames "$1")" || return 255 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:203:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 201| # /dev/sdc1:/keys/some.key # 202| getkey() { # 203|-> local keys_file="$1" # 204| local for_dev="$2" # 205| local luks_dev Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:204:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 202| getkey() { # 203| local keys_file="$1" # 204|-> local for_dev="$2" # 205| local luks_dev # 206| local key_dev Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:205:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 203| local keys_file="$1" # 204| local for_dev="$2" # 205|-> local luks_dev # 206| local key_dev # 207| local key_path Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:206:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 204| local for_dev="$2" # 205| local luks_dev # 206|-> local key_dev # 207| local key_path # 208| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:207:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 205| local luks_dev # 206| local key_dev # 207|-> local key_path # 208| # 209| [ -z "$keys_file" -o -z "$for_dev" ] && die 'getkey: wrong usage!' Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:209:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 207| local key_path # 208| # 209|-> [ -z "$keys_file" -o -z "$for_dev" ] && die 'getkey: wrong usage!' # 210| [ -f "$keys_file" ] || return 1 # 211| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:229:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 227| # informational purpose. # 228| readkey() { # 229|-> local keypath="$1" # 230| local keydev="$2" # 231| local device="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:230:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 228| readkey() { # 229| local keypath="$1" # 230|-> local keydev="$2" # 231| local device="$3" # 232| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:231:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 229| local keypath="$1" # 230| local keydev="$2" # 231|-> local device="$3" # 232| # 233| # No mounting needed if the keyfile resides inside the initrd Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:235:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 233| # No mounting needed if the keyfile resides inside the initrd # 234| if [ "/" = "$keydev" ]; then # 235|-> local mntp=/ # 236| else # 237| # This creates a unique single mountpoint for *, or several for explicitly Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:240:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 238| # given LUKS devices. It accomplishes unlocking multiple LUKS devices with # 239| # a single password entry. # 240|-> local mntp # 241| mntp="/mnt/$(str_replace "keydev-$keydev-$keypath" '/' '-')" # 242| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:262:71: warning[SC2154]: hookdir is referenced but not assigned. # 260| . /lib/dracut-crypt-loop-lib.sh # 261| loop_decrypt "$mntp" "$keypath" "$keydev" "$device" # 262|-> printf "%s\n" "umount \"$mntp\"; rmdir \"$mntp\";" > "${hookdir}/cleanup/crypt-loop-cleanup-99-${mntp##*/}".sh # 263| return 0 # 264| else Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:11:10: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 9| . /lib/dracut-lib.sh # 10| # 11|-> mkdir -p -m 0700 /run/cryptsetup # 12| # 13| # if device name is /dev/dm-X, convert to /dev/mapper/name Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:33:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 31| while read -r name dev luksfile luksoptions || [ -n "$name" ]; do # 32| # ignore blank lines and comments # 33|-> if [ -z "$name" -o "${name#\#}" != "$name" ]; then # 34| continue # 35| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:123:39: warning[SC2154]: luksdev is referenced but not assigned. # 121| if discarduuids=$(getargs "rd.luks.allow-discards"); then # 122| discarduuids=$(str_replace "$discarduuids" 'luks-' '') # 123|-> if strstr " $discarduuids " " ${luksdev##luks-}"; then # 124| allowdiscards="--allow-discards" # 125| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:140:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 138| ask_passphrase=1 # 139| # 140|-> if [ -n "$luksfile" -a "$luksfile" != "none" -a -e "$luksfile" ]; then # 141| # shellcheck disable=SC2086 # 142| if readkey "$luksfile" / "$device" \ Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:140:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 138| ask_passphrase=1 # 139| # 140|-> if [ -n "$luksfile" -a "$luksfile" != "none" -a -e "$luksfile" ]; then # 141| # shellcheck disable=SC2086 # 142| if readkey "$luksfile" / "$device" \ Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:190:28: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 188| fi # 189| # 190|-> if [ "$is_keysource" -ne 0 -a "${luksname##luks-}" != "$luksname" ]; then # 191| luks_close="$(command -v cryptsetup) close" # 192| { Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/cryptroot-ask.sh:195:11: warning[SC2154]: hookdir is referenced but not assigned. # 193| printf -- '[ -e /dev/mapper/%s ] && ' "$luksname" # 194| printf -- '%s "%s"\n' "$luks_close" "$luksname" # 195|-> } >> "$hookdir/cleanup/31-crypt-keysource.sh" # 196| unset luks_close # 197| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:7:25: warning[SC2154]: systemdutildir is referenced but not assigned. # 5| local fs # 6| # if cryptsetup is not installed, then we cannot support encrypted devices. # 7|-> require_any_binary "$systemdutildir"/systemd-cryptsetup cryptsetup || return 1 # 8| # 9| [[ $hostonly ]] || [[ $mount_needs ]] && { Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:23:28: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 21| local deps # 22| deps="dm rootfs-block" # 23|-> if [[ $hostonly && -f "$dracutsysrootdir"/etc/crypttab ]]; then # 24| if grep -q -e "fido2-device=" -e "fido2-cid=" "$dracutsysrootdir"/etc/crypttab; then # 25| deps+=" fido2" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:92:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 90| install() { # 91| # 92|-> if [[ $hostonly_cmdline == "yes" ]]; then # 93| local _cryptconf # 94| _cryptconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:95:62: warning[SC2154]: initdir is referenced but not assigned. # 93| local _cryptconf # 94| _cryptconf=$(cmdline) # 95|-> [[ $_cryptconf ]] && printf "%s\n" "$_cryptconf" >> "${initdir}/etc/cmdline.d/90crypt.conf" # 96| fi # 97| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:98:27: warning[SC2154]: moddir is referenced but not assigned. # 96| fi # 97| # 98|-> inst_hook cmdline 30 "$moddir/parse-crypt.sh" # 99| if ! dracut_module_included "systemd"; then # 100| inst_multiple cryptsetup rmdir readlink umount Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:167:14: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 165| # the enablement symlinks # 166| inst_multiple -o \ # 167|-> "$tmpfilesdir"/cryptsetup.conf \ # 168| "$systemdutildir"/system-generators/systemd-cryptsetup-generator \ # 169| "$systemdutildir"/systemd-cryptsetup \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/module-setup.sh:170:14: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 168| "$systemdutildir"/system-generators/systemd-cryptsetup-generator \ # 169| "$systemdutildir"/systemd-cryptsetup \ # 170|-> "$systemdsystemunitdir"/systemd-ask-password-console.path \ # 171| "$systemdsystemunitdir"/systemd-ask-password-console.service \ # 172| "$systemdsystemunitdir"/cryptsetup.target \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90crypt/parse-crypt.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| _cryptgetargsname() { # 6| debug_off # 7|-> local _o _found _key # 8| unset _o # 9| unset _found Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90crypt/parse-crypt.sh:170:25: warning[SC2154]: hookdir is referenced but not assigned. # 168| while [ "$uuid" != "${uuid#*-}" ]; do uuid=${uuid%%-*}${uuid#*-}; done # 169| printf -- '[ -e /dev/disk/by-id/dm-uuid-CRYPT-LUKS?-*%s*-* ] || exit 1\n' "$uuid" \ # 170|-> >> "$hookdir/initqueue/finished/90-crypt.sh" # 171| { # 172| printf -- '[ -e /dev/disk/by-uuid/*%s* ] || ' "$luksid" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90crypt/probe-keydev.sh:9:21: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 7| luksdev="$3" # 8| # 9|-> [ -z "$real_keydev" -o -z "$keypath" ] && die 'probe-keydev: wrong usage!' # 10| [ -z "$luksdev" ] && luksdev='*' # 11| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:4:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 2| # 3| _remove_dm() { # 4|-> local dev=$1 # 5| local s # 6| local devname Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:5:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 3| _remove_dm() { # 4| local dev=$1 # 5|-> local s # 6| local devname # 7| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| local dev=$1 # 5| local s # 6|-> local devname # 7| # 8| for s in /sys/block/"${dev}"/holders/dm-*; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:28:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 26| # 27| _do_dm_shutdown() { # 28|-> local ret=0 # 29| local final=$1 # 30| local dev Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:29:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 27| _do_dm_shutdown() { # 28| local ret=0 # 29|-> local final=$1 # 30| local dev # 31| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:30:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 28| local ret=0 # 29| local final=$1 # 30|-> local dev # 31| # 32| info "Disassembling device-mapper devices" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dm/module-setup.sh:21:17: warning[SC2154]: kernel is referenced but not assigned. # 19| # called by dracut # 20| install() { # 21|-> modinfo -k "$kernel" dm_mod > /dev/null 2>&1 \ # 22| && inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh" # 23| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dm/module-setup.sh:22:35: warning[SC2154]: moddir is referenced but not assigned. # 20| install() { # 21| modinfo -k "$kernel" dm_mod > /dev/null 2>&1 \ # 22|-> && inst_hook pre-udev 30 "$moddir/dm-pre-udev.sh" # 23| # 24| inst_multiple dmsetup Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmraid/dmraid.sh:18:36: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 16| SETS=$(dmraid -c -s) # 17| # 18|-> if [ "$SETS" = "no raid disks" -o "$SETS" = "no raid sets" ]; then # 19| return # 20| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmraid/module-setup.sh:14:21: warning[SC2154]: host_fs_types is referenced but not assigned. # 12| # 13| [[ $hostonly ]] || [[ $mount_needs ]] && { # 14|-> for dev in "${!host_fs_types[@]}"; do # 15| [[ ${host_fs_types[$dev]} != *_raid_member ]] && continue # 16| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmraid/module-setup.sh:69:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 67| local _raidconf # 68| # 69|-> if [[ $hostonly_cmdline == "yes" ]]; then # 70| _raidconf=$(cmdline) # 71| [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90dmraid.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmraid/module-setup.sh:71:60: warning[SC2154]: initdir is referenced but not assigned. # 69| if [[ $hostonly_cmdline == "yes" ]]; then # 70| _raidconf=$(cmdline) # 71|-> [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90dmraid.conf" # 72| fi # 73| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmraid/module-setup.sh:78:11: warning[SC2154]: moddir is referenced but not assigned. # 76| inst "$(command -v partx)" /sbin/partx # 77| # 78|-> inst "$moddir/dmraid.sh" /sbin/dmraid_scan # 79| # 80| inst_rules 66-kpartx.rules 67-kpartx-compat.rules Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live-ntfs/module-setup.sh:15:18: warning[SC2154]: moddir is referenced but not assigned. # 13| install() { # 14| inst_multiple fusermount mount.fuse ntfs-3g # 15|-> inst_script "$moddir/mount-ntfs-3g.sh" "/sbin/mount-ntfs-3g" # 16| dracut_need_initqueue # 17| } Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/apply-live-updates.sh:3:57: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 1| #!/usr/bin/sh # 2| # 3|-> if [ -h /dev/root ] && [ -d /run/initramfs/live/updates -o -d /updates ]; then # 4| info "Applying updates to live image..." # 5| mount -o bind /run "$NEWROOT"/run Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/apply-live-updates.sh:19:41: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 17| # release resources on iso-scan boots with rd.live.ram # 18| if [ -d /run/initramfs/isoscan ] \ # 19|-> && [ -f /run/initramfs/squashed.img -o -f /run/initramfs/rootfs.img ]; then # 20| umount --detach-loop /run/initramfs/live # 21| umount /run/initramfs/isoscan Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-genrules.sh:3:7: warning[SC2154]: root is referenced but not assigned. # 1| #!/usr/bin/sh # 2| # 3|-> case "$root" in # 4| live:/dev/*) # 5| { Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:39:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 37| # Otherwise returns the original path # 38| get_check_dev() { # 39|-> local _udevinfo # 40| dev_path="$(udevadm info -q path --name "$1")" # 41| _udevinfo="$(udevadm info -q property --path "${dev_path}")" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:65:24: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 63| # CD/DVD media check # 64| [ -b "$check_dev" ] && fs=$(blkid -s TYPE -o value "$check_dev") # 65|-> if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then # 66| check="yes" # 67| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:103:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 101| # 102| # mount the backing of the live image first # 103|-> mkdir -m 0755 -p /run/initramfs/live # 104| if [ -f "$livedev" ]; then # 105| # no mount needed - we've already got the LiveOS image in initramfs Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:145:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 143| fi # 144| # 145|-> if [ -z "$pathspec" -o "$pathspec" = "auto" ]; then # 146| pathspec="/${live_dir}/overlay-$l-$u" # 147| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:151:22: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 149| # 150| # need to know where to look for the overlay # 151|-> if [ -z "$setup" -a -n "$devspec" -a -n "$pathspec" -a -n "$overlay" ]; then # 152| mkdir -m 0755 -p /run/initramfs/overlayfs # 153| if ismounted "$devspec"; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:151:39: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 149| # 150| # need to know where to look for the overlay # 151|-> if [ -z "$setup" -a -n "$devspec" -a -n "$pathspec" -a -n "$overlay" ]; then # 152| mkdir -m 0755 -p /run/initramfs/overlayfs # 153| if ismounted "$devspec"; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:151:57: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 149| # 150| # need to know where to look for the overlay # 151|-> if [ -z "$setup" -a -n "$devspec" -a -n "$pathspec" -a -n "$overlay" ]; then # 152| mkdir -m 0755 -p /run/initramfs/overlayfs # 153| if ismounted "$devspec"; then Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:152:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 150| # need to know where to look for the overlay # 151| if [ -z "$setup" -a -n "$devspec" -a -n "$pathspec" -a -n "$overlay" ]; then # 152|-> mkdir -m 0755 -p /run/initramfs/overlayfs # 153| if ismounted "$devspec"; then # 154| devmnt=$(findmnt -e -v -n -o 'TARGET' --source "$devspec") Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:161:51: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 159| mount -n -t auto "$devspec" /run/initramfs/overlayfs || : # 160| fi # 161|-> if [ -f /run/initramfs/overlayfs$pathspec -a -w /run/initramfs/overlayfs$pathspec ]; then # 162| OVERLAY_LOOPDEV=$(losetup -f --show ${readonly_overlay:+-r} /run/initramfs/overlayfs$pathspec) # 163| over=$OVERLAY_LOOPDEV Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:213:22: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 211| fi # 212| # 213|-> if [ -z "$setup" -o -n "$readonly_overlay" ]; then # 214| if [ -n "$setup" ]; then # 215| warn "Using temporary overlay." Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:216:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 214| if [ -n "$setup" ]; then # 215| warn "Using temporary overlay." # 216|-> elif [ -n "$devspec" -a -n "$pathspec" ]; then # 217| [ -z "$m" ] \ # 218| && m=' Unable to find a persistent overlay; using a temporary one.' Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:260:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 258| else # 259| dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((overlay_size * 1024)) 2> /dev/null # 260|-> if [ -n "$setup" -a -n "$readonly_overlay" ]; then # 261| RO_OVERLAY_LOOPDEV=$(losetup -f --show /overlay) # 262| over=$RO_OVERLAY_LOOPDEV Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:282:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 280| if [ -n "$thin_snapshot" ]; then # 281| modprobe dm_thin_pool # 282|-> mkdir -m 0755 -p /run/initramfs/thin-overlay # 283| # 284| # In block units (512b) Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:328:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 326| SQUASHED_LOOPDEV=$(losetup -f) # 327| losetup -r "$SQUASHED_LOOPDEV" $SQUASHED # 328|-> mkdir -m 0755 -p /run/initramfs/squashfs # 329| mount -n -t squashfs -o ro "$SQUASHED_LOOPDEV" /run/initramfs/squashfs # 330| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:367:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 365| # mount the provided filesystem read/write # 366| echo "Unpacking live filesystem (may take some time)" > /dev/kmsg # 367|-> mkdir -m 0755 -p /run/initramfs/fsimg/ # 368| if [ -n "$SQUASHED" ]; then # 369| cp -v $FSIMG /run/initramfs/fsimg/rootfs.img Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:377:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 375| # For writable DM images... # 376| readonly_base=1 # 377|-> if [ -z "$SQUASHED" -a -n "$live_ram" -a -z "$overlayfs" ] \ # 378| || [ -n "$writable_fsimg" ] \ # 379| || [ "$overlay" = none -o "$overlay" = None -o "$overlay" = NONE ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:377:43: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 375| # For writable DM images... # 376| readonly_base=1 # 377|-> if [ -z "$SQUASHED" -a -n "$live_ram" -a -z "$overlayfs" ] \ # 378| || [ -n "$writable_fsimg" ] \ # 379| || [ "$overlay" = none -o "$overlay" = None -o "$overlay" = NONE ]; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:379:32: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 377| if [ -z "$SQUASHED" -a -n "$live_ram" -a -z "$overlayfs" ] \ # 378| || [ -n "$writable_fsimg" ] \ # 379|-> || [ "$overlay" = none -o "$overlay" = None -o "$overlay" = NONE ]; then # 380| if [ -z "$readonly_overlay" ]; then # 381| unset readonly_base Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:379:53: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 377| if [ -z "$SQUASHED" -a -n "$live_ram" -a -z "$overlayfs" ] \ # 378| || [ -n "$writable_fsimg" ] \ # 379|-> || [ "$overlay" = none -o "$overlay" = None -o "$overlay" = NONE ]; then # 380| if [ -z "$readonly_overlay" ]; then # 381| unset readonly_base Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:414:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 412| if [ -n "$overlayfs" ]; then # 413| if [ -n "$FSIMG" ]; then # 414|-> mkdir -m 0755 -p /run/rootfsbase # 415| mount -r $FSIMG /run/rootfsbase # 416| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:422:79: warning[SC2154]: hookdir is referenced but not assigned. # 420| if [ -z "$DRACUT_SYSTEMD" ]; then # 421| [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS" # 422|-> printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh # 423| fi # 424| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-liveiso-genrules.sh:3:7: warning[SC2154]: root is referenced but not assigned. # 1| #!/usr/bin/sh # 2| # 3|-> if [ "${root%%:*}" = "liveiso" ]; then # 4| { # 5| # shellcheck disable=SC2016 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dmsquash-live/iso-scan.sh:16:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| # 15| do_iso_scan() { # 16|-> local _name # 17| local dev # 18| for dev in /dev/disk/by-uuid/*; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90dmsquash-live/iso-scan.sh:17:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 15| do_iso_scan() { # 16| local _name # 17|-> local dev # 18| for dev in /dev/disk/by-uuid/*; do # 19| _name=$(dev_unit_name "$dev") Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/iso-scan.sh:27:23: warning[SC2154]: job is referenced but not assigned. # 25| udevadm trigger --action=add > /dev/null 2>&1 # 26| ln -s "$dev" /run/initramfs/isoscandev # 27|-> rm -f -- "$job" # 28| exit 0 # 29| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/module-setup.sh:27:27: warning[SC2154]: moddir is referenced but not assigned. # 25| inst_multiple umount dmsetup blkid dd losetup blockdev find rmdir grep # 26| inst_multiple -o checkisomd5 # 27|-> inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh" # 28| inst_hook cmdline 31 "$moddir/parse-iso-scan.sh" # 29| inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90dmsquash-live/module-setup.sh:35:54: warning[SC2154]: systemdutildir is referenced but not assigned. # 33| inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan" # 34| if dracut_module_included "systemd-initrd"; then # 35|-> inst_script "$moddir/dmsquash-generator.sh" "$systemdutildir"/system-generators/dracut-dmsquash-generator # 36| inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service" # 37| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules-extra/module-setup.sh:103:31: warning[SC2154]: kernel is referenced but not assigned. # 101| # 102| if [[ '*' == "$kverpat" ]] \ # 103|-> || [[ $kernel =~ $kverpat ]]; then # 104| overrides+=("${path}/${mod}") # 105| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:101:37: warning[SC2154]: srcmods is referenced but not assigned. # 99| fi # 100| # 101|-> awk -F: '/^\// {print $1}' "$srcmods/modules.dep" 2> /dev/null | instmods # 102| # 103| # if not on hostonly mode, or there are hostonly block device Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:109:19: warning[SC2154]: hostonly_mode is referenced but not assigned. # 107| hostonly='' instmods sg sr_mod sd_mod scsi_dh ata_piix # 108| # 109|-> if [[ $hostonly_mode == "strict" ]]; then # 110| install_block_modules_strict # 111| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:137:23: warning[SC2154]: depmodd is referenced but not assigned. # 135| fi # 136| # 137|-> inst_multiple -o "$depmodd/*.conf" # 138| if [[ $hostonly ]]; then # 139| inst_multiple -H -o "$depmodconfdir/*.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:139:30: warning[SC2154]: depmodconfdir is referenced but not assigned. # 137| inst_multiple -o "$depmodd/*.conf" # 138| if [[ $hostonly ]]; then # 139|-> inst_multiple -H -o "$depmodconfdir/*.conf" # 140| fi # 141| : Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:150:31: warning[SC2154]: moddir is referenced but not assigned. # 148| [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf # 149| if ! dracut_module_included "systemd"; then # 150|-> inst_hook cmdline 01 "$moddir/parse-kernel.sh" # 151| fi # 152| inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90kernel-network-modules/module-setup.sh:25:11: warning[SC2154]: hostonly_mode is referenced but not assigned. # 23| fi # 24| # 25|-> if [[ $hostonly_mode == 'strict' ]] && [[ -n ${hostonly_nics+x} ]]; then # 26| for _nic in $hostonly_nics; do # 27| mapfile -t _net_drivers < <(get_dev_module /sys/class/net/"$_nic") Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90livenet/livenetroot.sh:27:52: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten. # 25| # shellcheck disable=SC2181 # 26| if [ $? != 0 ]; then # 27|-> warn "failed to download live image: error $?" # 28| imgfile= # 29| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90livenet/livenetroot.sh:31:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 29| fi # 30| # 31|-> if [ -n "$imgfile" -a -s "$imgfile" ]; then # 32| break # 33| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90livenet/module-setup.sh:17:27: warning[SC2154]: moddir is referenced but not assigned. # 15| # called by dracut # 16| install() { # 17|-> inst_hook cmdline 29 "$moddir/parse-livenet.sh" # 18| inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh" # 19| inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90livenet/module-setup.sh:21:53: warning[SC2154]: systemdutildir is referenced but not assigned. # 19| inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot" # 20| if dracut_module_included "systemd-initrd"; then # 21|-> inst_script "$moddir/livenet-generator.sh" "$systemdutildir"/system-generators/dracut-livenet-generator # 22| fi # 23| dracut_need_initqueue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90livenet/parse-livenet.sh:17:10: warning[SC2154]: hookdir is referenced but not assigned. # 15| echo "$updates" > /tmp/liveupdates.info # 16| echo '[ -e /tmp/liveupdates.done ]' > \ # 17|-> "$hookdir"/initqueue/finished/liveupdates.sh # 18| fi # 19| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90lvm/lvm_scan.sh:13:26: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 11| # shellcheck disable=SC2174 # 12| [ -d /etc/lvm ] || mkdir -m 0755 -p /etc/lvm # 13|-> [ -d /run/lvm ] || mkdir -m 0755 -p /run/lvm # 14| # build a list of devices to scan # 15| lvmdevs=$( Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:9:20: warning[SC2154]: host_fs_types is referenced but not assigned. # 7| # 8| [[ $hostonly ]] || [[ $mount_needs ]] && { # 9|-> for fs in "${host_fs_types[@]}"; do # 10| [[ $fs == LVM*_member ]] && return 0 # 11| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:53:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 51| inst_multiple lvm grep # 52| # 53|-> if [[ $hostonly_cmdline == "yes" ]]; then # 54| local _lvmconf # 55| _lvmconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:56:58: warning[SC2154]: initdir is referenced but not assigned. # 54| local _lvmconf # 55| _lvmconf=$(cmdline) # 56|-> [[ $_lvmconf ]] && printf "%s\n" "$_lvmconf" >> "${initdir}/etc/cmdline.d/90lvm.conf" # 57| fi # 58| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:59:17: warning[SC2154]: moddir is referenced but not assigned. # 57| fi # 58| # 59|-> inst_rules "$moddir/64-lvm.rules" # 60| # 61| if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:61:30: warning[SC2154]: lvmconf is referenced but not assigned (did you mean '_lvmconf'?). # 59| inst_rules "$moddir/64-lvm.rules" # 60| # 61|-> if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then # 62| if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then # 63| inst_simple -H /etc/lvm/lvm.conf Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:62:18: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 60| # 61| if [[ $hostonly ]] || [[ $lvmconf == "yes" ]]; then # 62|-> if [[ -f $dracutsysrootdir/etc/lvm/lvm.conf ]]; then # 63| inst_simple -H /etc/lvm/lvm.conf # 64| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:72:15: warning[SC2154]: system_id_source is referenced but not assigned. # 70| fi # 71| eval "$(lvm dumpconfig global/system_id_source &> /dev/null)" # 72|-> if [ "$system_id_source" == "file" ]; then # 73| eval "$(lvm dumpconfig global/system_id_file)" # 74| if [ -f "$system_id_file" ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90lvm/module-setup.sh:74:22: warning[SC2154]: system_id_file is referenced but not assigned. # 72| if [ "$system_id_source" == "file" ]; then # 73| eval "$(lvm dumpconfig global/system_id_file)" # 74|-> if [ -f "$system_id_file" ]; then # 75| inst_simple -H "$system_id_file" # 76| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/md-shutdown.sh:4:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 2| # 3| _do_md_shutdown() { # 4|-> local ret # 5| local final=$1 # 6| info "Waiting for mdraid devices to be clean." Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/md-shutdown.sh:5:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 3| _do_md_shutdown() { # 4| local ret # 5|-> local final=$1 # 6| info "Waiting for mdraid devices to be clean." # 7| mdadm -vv --wait-clean --scan | vinfo Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdmon-pre-shutdown.sh:4:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 2| # 3| _do_mdmon_takeover() { # 4|-> local ret # 5| mdmon --takeover --all # 6| ret=$? Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90mdraid/mdmon-pre-udev.sh:3:28: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 1| #!/usr/bin/sh # 2| # save state dir for mdmon/mdadm for the real root # 3|-> [ -d /run/mdadm ] || mkdir -m 0755 -p /run/mdadm # 4| # backward compat link Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| # 5| _md_start() { # 6|-> local _udevinfo # 7| local _path_s # 8| local _path_d Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| _md_start() { # 6| local _udevinfo # 7|-> local _path_s # 8| local _path_d # 9| local _md="$1" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:8:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| local _udevinfo # 7| local _path_s # 8|-> local _path_d # 9| local _md="$1" # 10| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:9:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 7| local _path_s # 8| local _path_d # 9|-> local _md="$1" # 10| # 11| _udevinfo="$(udevadm info --query=property --name="${_md}")" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:28:10: warning[SC2154]: hookdir is referenced but not assigned. # 26| _path_d="${_path_s%/*}/degraded" # 27| [ ! -r "$_path_d" ] && return 0 # 28|-> : > "$hookdir"/initqueue/work # 29| } # 30| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:32:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| # 31| _md_force_run() { # 32|-> local _md # 33| local _UUID # 34| local _MD_UUID Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| _md_force_run() { # 32| local _md # 33|-> local _UUID # 34| local _MD_UUID # 35| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:34:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 32| local _md # 33| local _UUID # 34|-> local _MD_UUID # 35| # 36| _MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:11:21: warning[SC2154]: host_fs_types is referenced but not assigned. # 9| # 10| [[ $hostonly ]] || [[ $mount_needs ]] && { # 11|-> for dev in "${!host_fs_types[@]}"; do # 12| [[ ${host_fs_types[$dev]} != *_raid_member ]] && continue # 13| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:74:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 72| inst "$(command -v mdadm)" /sbin/mdadm # 73| # 74|-> if [[ $hostonly_cmdline == "yes" ]]; then # 75| local _raidconf # 76| _raidconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:77:60: warning[SC2154]: initdir is referenced but not assigned. # 75| local _raidconf # 76| _raidconf=$(cmdline) # 77|-> [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90mdraid.conf" # 78| fi # 79| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:89:30: warning[SC2154]: udevdir is referenced but not assigned. # 87| # assembled # 88| for rule in 64-md-raid.rules 64-md-raid-assembly.rules; do # 89|-> rule_path="${initdir}${udevdir}/rules.d/${rule}" # 90| # shellcheck disable=SC2016 # 91| [ -f "${rule_path}" ] && sed -i -r \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:96:17: warning[SC2154]: moddir is referenced but not assigned. # 94| done # 95| # 96|-> inst_rules "$moddir/65-md-incremental-imsm.rules" # 97| # 98| inst_rules "$moddir/59-persistent-storage-md.rules" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:101:30: warning[SC2154]: mdadmconf is referenced but not assigned. # 99| prepare_udev_rules 59-persistent-storage-md.rules # 100| # 101|-> if [[ $hostonly ]] || [[ $mdadmconf == "yes" ]]; then # 102| if [[ -f $dracutsysrootdir/etc/mdadm.conf ]]; then # 103| inst -H /etc/mdadm.conf Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:102:18: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 100| # 101| if [[ $hostonly ]] || [[ $mdadmconf == "yes" ]]; then # 102|-> if [[ -f $dracutsysrootdir/etc/mdadm.conf ]]; then # 103| inst -H /etc/mdadm.conf # 104| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:125:35: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 123| inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start # 124| if dracut_module_included "systemd"; then # 125|-> if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdmon@.service ]]; then # 126| inst_simple "$systemdsystemunitdir"/mdmon@.service # 127| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90mdraid/parse-md.sh:45:15: warning[SC2154]: hookdir is referenced but not assigned. # 43| if [ -e /etc/mdadm.conf ] && getargbool 1 rd.md.conf -d -n rd_NO_MDADMCONF; then # 44| udevproperty rd_MDADMCONF=1 # 45|-> rm -f -- "$hookdir"/pre-pivot/*mdraid-cleanup.sh # 46| fi # 47| Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:56:28: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 54| local _funcs='scsi_register_device_handler|dm_dirty_log_type_register|dm_register_path_selector|dm_register_target' # 55| # 56|-> if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then # 57| _s390drivers="=drivers/s390/scsi" # 58| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:109:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 107| /etc/multipath/* \ # 108| "$config_dir"/* \ # 109|-> "$tmpfilesdir/multipath.conf" # 110| # 111| mpathconf_installed \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:112:34: warning[SC2154]: hostonly_mode is referenced but not assigned. # 110| # 111| mpathconf_installed \ # 112|-> && [[ $hostonly ]] && [[ $hostonly_mode == "strict" ]] && { # 113| for_each_host_dev_and_slaves_all add_hostonly_mpath_conf # 114| if ((${#_allow[@]} > 0)); then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:120:48: warning[SC2154]: initdir is referenced but not assigned. # 118| _args+=("--allow" "$_dev") # 119| done # 120|-> mpathconf "${_args[@]}" --outfile "${initdir}"/etc/multipath.conf # 121| fi # 122| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:137:26: warning[SC2154]: moddir is referenced but not assigned. # 135| if dracut_module_included "systemd"; then # 136| if mpathconf_installed; then # 137|-> inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" # 138| $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service # 139| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90multipath/module-setup.sh:137:67: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 135| if dracut_module_included "systemd"; then # 136| if mpathconf_installed; then # 137|-> inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" # 138| $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service # 139| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90overlayfs/module-setup.sh:17:25: warning[SC2154]: moddir is referenced but not assigned. # 15| # 16| install() { # 17|-> inst_hook mount 01 "$moddir/mount-overlayfs.sh" # 18| } Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90overlayfs/mount-overlayfs.sh:13:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 11| if [ -n "$overlayfs" ]; then # 12| if ! [ -e /run/rootfsbase ]; then # 13|-> mkdir -m 0755 -p /run/rootfsbase # 14| mount --bind "$NEWROOT" /run/rootfsbase # 15| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90overlayfs/mount-overlayfs.sh:17:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 15| fi # 16| # 17|-> mkdir -m 0755 -p /run/overlayfs # 18| mkdir -m 0755 -p /run/ovlwork # 19| if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/90overlayfs/mount-overlayfs.sh:18:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 16| # 17| mkdir -m 0755 -p /run/overlayfs # 18|-> mkdir -m 0755 -p /run/ovlwork # 19| if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then # 20| ovlfsdir=$(readlink /run/overlayfs) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/90ppcmac/load-thermal.sh:9:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 7| # 8| load_windfarm() { # 9|-> local pm_model # 10| pm_model="$(sed -n '/model/p' /proc/cpuinfo)" # 11| pm_model="${pm_model##*: }" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/90ppcmac/module-setup.sh:82:28: warning[SC2154]: moddir is referenced but not assigned. # 80| install() { # 81| # this will attempt to load the appropriate modules # 82|-> inst_hook pre-udev 99 "$moddir/load-thermal.sh" # 83| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:14:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 12| # device - device to be opened by cryptsetup; only to display in prompt # 13| gpg_decrypt() { # 14|-> local mntp="$1" # 15| local keypath="$2" # 16| local keydev="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:15:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 13| gpg_decrypt() { # 14| local mntp="$1" # 15|-> local keypath="$2" # 16| local keydev="$3" # 17| local device="$4" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:16:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| local mntp="$1" # 15| local keypath="$2" # 16|-> local keydev="$3" # 17| local device="$4" # 18| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:17:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 15| local keypath="$2" # 16| local keydev="$3" # 17|-> local device="$4" # 18| # 19| local gpghome=/tmp/gnupg Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:19:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 17| local device="$4" # 18| # 19|-> local gpghome=/tmp/gnupg # 20| local opts="--homedir $gpghome --no-mdc-warning --skip-verify --quiet" # 21| opts="$opts --logger-file /dev/null --batch --no-tty --passphrase-fd 0" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:20:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 18| # 19| local gpghome=/tmp/gnupg # 20|-> local opts="--homedir $gpghome --no-mdc-warning --skip-verify --quiet" # 21| opts="$opts --logger-file /dev/null --batch --no-tty --passphrase-fd 0" # 22| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:23:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 21| opts="$opts --logger-file /dev/null --batch --no-tty --passphrase-fd 0" # 22| # 23|-> mkdir -m 0700 -p "$gpghome" # 24| # 25| # Setup GnuPG home and gpg-agent for usage of OpenPGP smartcard. Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:31:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 29| # program needed with GnuPG < 2.1), making for uncomplicated # 30| # integration with the existing codebase. # 31|-> local useSmartcard="0" # 32| local gpgMajorVersion # 33| local gpgMinorVersion Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:32:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| # integration with the existing codebase. # 31| local useSmartcard="0" # 32|-> local gpgMajorVersion # 33| local gpgMinorVersion # 34| gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| local useSmartcard="0" # 32| local gpgMajorVersion # 33|-> local gpgMinorVersion # 34| gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" # 35| gpgMinorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:43:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 41| GNUPGHOME="$gpghome" gpg-agent --quiet --daemon # 42| GNUPGHOME="$gpghome" gpg --quiet --no-tty --import < /root/crypt-public-key.gpg # 43|-> local smartcardSerialNumber # 44| smartcardSerialNumber="$(GNUPGHOME=$gpghome gpg --no-tty --card-status \ # 45| | sed -n -r -e 's|Serial number.*: ([0-9]*)|\1|p' | tr -d '\n')" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91crypt-gpg/module-setup.sh:27:11: warning[SC2154]: moddir is referenced but not assigned. # 25| install() { # 26| inst_multiple gpg tr # 27|-> inst "$moddir/crypt-gpg-lib.sh" "/lib/dracut-crypt-gpg-lib.sh" # 28| # 29| if sc_requested; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91crypt-gpg/module-setup.sh:33:13: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 31| inst_multiple gpg-connect-agent # 32| inst_multiple -o /usr/libexec/scdaemon /usr/lib/gnupg/scdaemon # 33|-> cp "$dracutsysrootdir$(sc_public_key)" "${initdir}/root/" # 34| fi # 35| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91crypt-gpg/module-setup.sh:33:49: warning[SC2154]: initdir is referenced but not assigned. # 31| inst_multiple gpg-connect-agent # 32| inst_multiple -o /usr/libexec/scdaemon /usr/lib/gnupg/scdaemon # 33|-> cp "$dracutsysrootdir$(sc_public_key)" "${initdir}/root/" # 34| fi # 35| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:14:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 12| # device - device to be opened by cryptsetup; only to display in prompt # 13| loop_decrypt() { # 14|-> local mntp="$1" # 15| local keypath="$2" # 16| local keydev="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:15:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 13| loop_decrypt() { # 14| local mntp="$1" # 15|-> local keypath="$2" # 16| local keydev="$3" # 17| local device="$4" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:16:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| local mntp="$1" # 15| local keypath="$2" # 16|-> local keydev="$3" # 17| local device="$4" # 18| local key Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:17:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 15| local keypath="$2" # 16| local keydev="$3" # 17|-> local device="$4" # 18| local key # 19| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:18:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 16| local keydev="$3" # 17| local device="$4" # 18|-> local key # 19| # 20| key="/dev/mapper/$(str_replace "loop-$keydev-$mntp-$keypath" '/' '-')" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:23:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 21| # 22| if [ ! -b "$key" ]; then # 23|-> local loopdev # 24| local opts # 25| loopdev=$(losetup -f "${mntp}/${keypath}" --show) Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:24:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 22| if [ ! -b "$key" ]; then # 23| local loopdev # 24|-> local opts # 25| loopdev=$(losetup -f "${mntp}/${keypath}" --show) # 26| opts="-d - luksOpen $loopdev ${key##*/}" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91crypt-loop/crypt-loop-lib.sh:35:58: warning[SC2154]: hookdir is referenced but not assigned. # 33| [ -b "$key" ] || die "Failed to unlock $keypath on $keydev for $device." # 34| # 35|-> printf "%s\n" "cryptsetup luksClose \"$key\"" > "${hookdir}/cleanup/crypt-loop-cleanup-10-${key##*/}.sh" # 36| printf "%s\n" "losetup -d \"$loopdev\"" > "${hookdir}/cleanup/crypt-loop-cleanup-20-${loopdev##*/}.sh" # 37| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91crypt-loop/module-setup.sh:23:11: warning[SC2154]: moddir is referenced but not assigned. # 21| install() { # 22| inst_multiple losetup # 23|-> inst "$moddir/crypt-loop-lib.sh" "/lib/dracut-crypt-loop-lib.sh" # 24| dracut_need_initqueue # 25| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91pcsc/module-setup.sh:28:18: warning[SC2154]: moddir is referenced but not assigned. # 26| # Install the required file(s) and directories for the module in the initramfs. # 27| install() { # 28|-> inst_simple "$moddir/pcscd.service" "${systemdsystemunitdir}"/pcscd.service # 29| inst_simple "$moddir/pcscd.socket" "${systemdsystemunitdir}"/pcscd.socket # 30| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91pcsc/module-setup.sh:28:42: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 26| # Install the required file(s) and directories for the module in the initramfs. # 27| install() { # 28|-> inst_simple "$moddir/pcscd.service" "${systemdsystemunitdir}"/pcscd.service # 29| inst_simple "$moddir/pcscd.socket" "${systemdsystemunitdir}"/pcscd.socket # 30| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91pcsc/module-setup.sh:39:31: warning[SC2154]: initdir is referenced but not assigned. # 37| pcscd.service \ # 38| pcscd.socket; do # 39|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 40| done # 41| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:35:10: warning[SC2154]: sysusers is referenced but not assigned. # 33| # 34| inst_multiple -o \ # 35|-> "$sysusers"/tpm2-tss.conf \ # 36| "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37| "$udevrulesdir"/60-tpm-udev.rules \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:36:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 34| inst_multiple -o \ # 35| "$sysusers"/tpm2-tss.conf \ # 36|-> "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37| "$udevrulesdir"/60-tpm-udev.rules \ # 38| tpm2_pcrread tpm2_pcrextend tpm2_createprimary tpm2_createpolicy \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:37:10: warning[SC2154]: udevrulesdir is referenced but not assigned. # 35| "$sysusers"/tpm2-tss.conf \ # 36| "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37|-> "$udevrulesdir"/60-tpm-udev.rules \ # 38| tpm2_pcrread tpm2_pcrextend tpm2_createprimary tpm2_createpolicy \ # 39| tpm2_create tpm2_load tpm2_unseal tpm2 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95cifs/cifs-lib.sh:11:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 9| # 10| cifs_to_var() { # 11|-> local cifsuser # 12| local cifspass # 13| # Check required arguments Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95cifs/cifs-lib.sh:12:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 10| cifs_to_var() { # 11| local cifsuser # 12|-> local cifspass # 13| # Check required arguments # 14| server=${1##cifs://} Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95cifs/cifs-lib.sh:33:24: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 31| server=${server%/*} # 32| # 33|-> if [ ! "$cifsuser" -o ! "$cifspass" ]; then # 34| die "For CIFS support you need to specify a cifsuser and cifspass either in the cifsuser and cifspass commandline parameters or in the root= CIFS URL." # 35| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95cifs/module-setup.sh:9:20: warning[SC2154]: host_fs_types is referenced but not assigned. # 7| # 8| [[ $hostonly ]] || [[ $mount_needs ]] && { # 9|-> for fs in "${host_fs_types[@]}"; do # 10| [[ $fs == "cifs" ]] && return 0 # 11| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95cifs/module-setup.sh:45:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 43| # 44| _nsslibs=$( # 45|-> cat "$dracutsysrootdir"/{,usr/}etc/nsswitch.conf 2> /dev/null \ # 46| | sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' \ # 47| | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|' Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95cifs/module-setup.sh:54:27: warning[SC2154]: moddir is referenced but not assigned. # 52| inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' # 53| # 54|-> inst_hook cmdline 90 "$moddir/parse-cifsroot.sh" # 55| inst "$moddir/cifsroot.sh" "/sbin/cifsroot" # 56| inst "$moddir/cifs-lib.sh" "/lib/cifs-lib.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95cifs/parse-cifsroot.sh:51:32: warning[SC2154]: hookdir is referenced but not assigned. # 49| # 50| # shellcheck disable=SC2016 # 51|-> echo '[ -e $NEWROOT/proc ]' > "$hookdir"/initqueue/finished/cifsroot.sh Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95debug/module-setup.sh:21:23: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 19| fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck # 20| # 21|-> grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" # 22| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95debug/module-setup.sh:21:70: warning[SC2154]: initdir is referenced but not assigned. # 19| fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck # 20| # 21|-> grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" # 22| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fcoe-uefi/module-setup.sh:26:27: warning[SC2154]: moddir is referenced but not assigned. # 24| # called by dracut # 25| install() { # 26|-> inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" # 27| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/fcoe-edd.sh:8:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| # 7| check_edd() { # 8|-> local cnt=0 # 9| # 10| [ -d /sys/firmware/edd ] && return 0 Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95fcoe/fcoe-edd.sh:37:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 35| for nic in "${disk}"/pci_dev/net/*; do # 36| [ -d "$nic" ] || continue # 37|-> if [ -n "${dev_port}" -a -e "${nic}/dev_port" ]; then # 38| if [ "$(cat "${nic}"/dev_port)" -ne "${dev_port}" ]; then # 39| continue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95fcoe/fcoe-up.sh:14:11: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 12| # 13| # Huh? Missing arguments ?? # 14|-> [ -z "$1" -o -z "$2" ] && exit 1 # 15| # 16| netif=$1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:100:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 98| install() { # 99| inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm tr # 100|-> if [[ -e $dracutsysrootdir/etc/hba.conf ]]; then # 101| inst_libdir_file 'libhbalinux.so*' # 102| inst_simple "/etc/hba.conf" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:105:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 103| fi # 104| # 105|-> mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 106| mkdir -m 0755 -p "$initdir/etc/fcoe" # 107| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:105:23: warning[SC2154]: initdir is referenced but not assigned. # 103| fi # 104| # 105|-> mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 106| mkdir -m 0755 -p "$initdir/etc/fcoe" # 107| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:106:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 104| # 105| mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 106|-> mkdir -m 0755 -p "$initdir/etc/fcoe" # 107| # 108| if [[ $hostonly_cmdline == "yes" ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:108:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 106| mkdir -m 0755 -p "$initdir/etc/fcoe" # 107| # 108|-> if [[ $hostonly_cmdline == "yes" ]]; then # 109| local _fcoeconf # 110| _fcoeconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:115:11: warning[SC2154]: moddir is referenced but not assigned. # 113| inst_multiple "/etc/fcoe/cfg-*" # 114| # 115|-> inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" # 116| inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" # 117| inst_hook pre-trigger 03 "$moddir/lldpad.sh" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| # 32| parse_fcoe_opts() { # 33|-> local fcoe_interface # 34| local fcoe_dcb # 35| local fcoe_mode Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:34:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 32| parse_fcoe_opts() { # 33| local fcoe_interface # 34|-> local fcoe_dcb # 35| local fcoe_mode # 36| local fcoe_mac Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:35:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 33| local fcoe_interface # 34| local fcoe_dcb # 35|-> local fcoe_mode # 36| local fcoe_mac # 37| local OLDIFS="$IFS" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:36:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 34| local fcoe_dcb # 35| local fcoe_mode # 36|-> local fcoe_mac # 37| local OLDIFS="$IFS" # 38| local IFS=: Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:37:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 35| local fcoe_mode # 36| local fcoe_mac # 37|-> local OLDIFS="$IFS" # 38| local IFS=: # 39| # shellcheck disable=SC2086 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:38:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 36| local fcoe_mac # 37| local OLDIFS="$IFS" # 38|-> local IFS=: # 39| # shellcheck disable=SC2086 # 40| # shellcheck disable=SC2048 Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:75:33: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 73| esac # 74| # 75|-> if [ "$fcoe_dcb" != "nodcb" -a "$fcoe_dcb" != "dcb" ]; then # 76| warn "Invalid FCoE DCB option: $fcoe_dcb" # 77| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95fcoe/parse-fcoe.sh:84:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 82| fi # 83| # 84|-> if [ -z "$fcoe_interface" -a -z "$fcoe_mac" ]; then # 85| warn "fcoe: Neither interface nor MAC specified for fcoe=$fcoe" # 86| return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fstab-sys/module-setup.sh:5:11: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 3| # called by dracut # 4| check() { # 5|-> [[ -f $dracutsysrootdir/etc/fstab.sys ]] || [[ -n $add_fstab || -n $fstab_lines ]] # 6| } # 7| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95fstab-sys/module-setup.sh:16:29: warning[SC2154]: moddir is referenced but not assigned. # 14| install() { # 15| [[ -f $dracutsysrootdir/etc/fstab.sys ]] && inst_simple /etc/fstab.sys # 16|-> inst_hook pre-pivot 00 "$moddir/mount-sys.sh" # 17| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95fstab-sys/mount-sys.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| # 6| fstab_mount() { # 7|-> local _dev _mp _fs _opts _pass # 8| test -e "$1" || return 1 # 9| info "Mounting from $1" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:48:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 46| # 47| handle_firmware() { # 48|-> local ifaces retry _res # 49| # 50| # Depending on the 'ql4xdisablesysfsboot' qla4xxx Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:96:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 94| # 95| handle_netroot() { # 96|-> local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port # 97| local iscsi_target_group iscsirw iscsi_lun # 98| local iscsi_username iscsi_password Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:97:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 95| handle_netroot() { # 96| local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port # 97|-> local iscsi_target_group iscsirw iscsi_lun # 98| local iscsi_username iscsi_password # 99| local iscsi_in_username iscsi_in_password Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:98:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 96| local iscsi_initiator iscsi_target_name iscsi_target_ip iscsi_target_port # 97| local iscsi_target_group iscsirw iscsi_lun # 98|-> local iscsi_username iscsi_password # 99| local iscsi_in_username iscsi_in_password # 100| local iscsi_iface_name iscsi_netdev_name Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:99:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 97| local iscsi_target_group iscsirw iscsi_lun # 98| local iscsi_username iscsi_password # 99|-> local iscsi_in_username iscsi_in_password # 100| local iscsi_iface_name iscsi_netdev_name # 101| local iscsi_param param Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:100:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 98| local iscsi_username iscsi_password # 99| local iscsi_in_username iscsi_in_password # 100|-> local iscsi_iface_name iscsi_netdev_name # 101| local iscsi_param param # 102| local p found Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:101:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 99| local iscsi_in_username iscsi_in_password # 100| local iscsi_iface_name iscsi_netdev_name # 101|-> local iscsi_param param # 102| local p found # 103| local login_retry_max_seen= Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:102:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 100| local iscsi_iface_name iscsi_netdev_name # 101| local iscsi_param param # 102|-> local p found # 103| local login_retry_max_seen= # 104| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:103:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 101| local iscsi_param param # 102| local p found # 103|-> local login_retry_max_seen= # 104| # 105| # override conf settings by command line options Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:164:25: warning[SC2154]: InitiatorName is referenced but not assigned. # 162| [ -f /etc/initiatorname.iscsi ] && . /etc/initiatorname.iscsi # 163| [ -f /etc/iscsi/initiatorname.iscsi ] && . /etc/iscsi/initiatorname.iscsi # 164|-> iscsi_initiator=$InitiatorName # 165| fi # 166| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:212:11: warning[SC2154]: root is referenced but not assigned (did you mean 'iroot'?). # 210| # FIXME $iscsi_protocol?? # 211| # 212|-> if [ "$root" = "dhcp" ] || [ "$netroot" = "dhcp" ]; then # 213| # if root is not specified try to mount the whole iSCSI LUN # 214| printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' "$iscsi_lun" >> /etc/udev/rules.d/99-iscsi-root.rules Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:212:35: warning[SC2154]: netroot is referenced but not assigned. # 210| # FIXME $iscsi_protocol?? # 211| # 212|-> if [ "$root" = "dhcp" ] || [ "$netroot" = "dhcp" ]; then # 213| # if root is not specified try to mount the whole iSCSI LUN # 214| printf 'SYMLINK=="disk/by-path/*-iscsi-*-%s", SYMLINK+="root"\n' "$iscsi_lun" >> /etc/udev/rules.d/99-iscsi-root.rules Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:221:68: warning[SC2154]: hookdir is referenced but not assigned. # 219| # install mount script # 220| [ -z "$DRACUT_SYSTEMD" ] \ # 221|-> && echo "iscsi_lun=$iscsi_lun . /bin/mount-lun.sh " > "$hookdir"/mount/01-$$-iscsi.sh # 222| fi # 223| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95iscsi/iscsiroot.sh:232:129: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten. # 230| done # 231| }) # 232|-> [ -z "$targets" ] && warn "Target discovery to $iscsi_target_ip:${iscsi_target_port:+$iscsi_target_port} failed with status $?" && return 1 # 233| # 234| found= Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:112:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 110| ip_params_for_remote_addr "$iscsi_address" # 111| # 112|-> if [ -n "$iscsi_address" -a -n "$iscsi_targetname" ]; then # 113| if [ -n "$iscsi_port" -a "$iscsi_port" -eq 3260 ]; then # 114| iscsi_port= Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:113:31: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 111| # 112| if [ -n "$iscsi_address" -a -n "$iscsi_targetname" ]; then # 113|-> if [ -n "$iscsi_port" -a "$iscsi_port" -eq 3260 ]; then # 114| iscsi_port= # 115| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:116:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 114| iscsi_port= # 115| fi # 116|-> if [ -n "$iscsi_lun" -a "$iscsi_lun" -eq 0 ]; then # 117| iscsi_lun= # 118| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:166:28: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 164| hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs # 165| # 166|-> if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then # 167| _s390drivers="=drivers/s390/scsi" # 168| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:194:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 192| # 193| inst_multiple -o \ # 194|-> "$systemdsystemunitdir"/iscsid.socket \ # 195| "$systemdsystemunitdir"/iscsid.service \ # 196| "$systemdsystemunitdir"/iscsiuio.service \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:212:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 210| # 211| # Detect iBFT and perform mandatory steps # 212|-> if [[ $hostonly_cmdline == "yes" ]]; then # 213| local _iscsiconf # 214| _iscsiconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:215:62: warning[SC2154]: initdir is referenced but not assigned. # 213| local _iscsiconf # 214| _iscsiconf=$(cmdline) # 215|-> [[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" # 216| fi # 217| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:218:27: warning[SC2154]: moddir is referenced but not assigned. # 216| fi # 217| # 218|-> inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" # 219| inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" # 220| inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/mount-lun.sh:8:39: warning[SC2154]: rflags is referenced but not assigned. # 6| # 7| for disk in /dev/disk/by-path/*-iscsi-*-"$iscsi_lun"; do # 8|-> if mount -t "${fstype:-auto}" -o "$rflags" "$disk" "$NEWROOT"; then # 9| if [ ! -d "$NEWROOT"/proc ]; then # 10| umount "$disk" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95iscsi/parse-iscsiroot.sh:87:118: warning[SC2154]: hookdir is referenced but not assigned. # 85| modprobe -b -q iscsi_ibft # 86| # if no ip= is given, but firmware # 87|-> echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f '/tmp/iscsistarted-firmware' ]" > "$hookdir"/initqueue/finished/iscsi_started.sh # 88| initqueue --unique --online /sbin/iscsiroot online "iscsi:" "$NEWROOT" # 89| initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "iscsi:" "$NEWROOT" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:63:18: warning[SC2154]: moddir is referenced but not assigned. # 61| # called by dracut # 62| install() { # 63|-> inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh # 64| inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh # 65| inst_hook cmdline 30 "$moddir/parse-lunmask.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:66:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 64| inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh # 65| inst_hook cmdline 30 "$moddir/parse-lunmask.sh" # 66|-> if [[ $hostonly_cmdline == "yes" ]]; then # 67| local _lunmask # 68| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:70:43: warning[SC2154]: initdir is referenced but not assigned. # 68| # 69| for _lunmask in $(cmdline); do # 70|-> printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf" # 71| done # 72| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| # 5| create_udev_rule() { # 6|-> local transport=$1 # 7| local tgtid=$2 # 8| local lun=$3 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| create_udev_rule() { # 6| local transport=$1 # 7|-> local tgtid=$2 # 8| local lun=$3 # 9| local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:8:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| local transport=$1 # 7| local tgtid=$2 # 8|-> local lun=$3 # 9| local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules # 10| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:9:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 7| local tgtid=$2 # 8| local lun=$3 # 9|-> local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules # 10| # 11| [ -e "${_rule}" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:28:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 26| for lunmask_arg in $(getargs rd.lunmask); do # 27| ( # 28|-> local OLDIFS="$IFS" # 29| local IFS="," # 30| # shellcheck disable=SC2086 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95lunmask/parse-lunmask.sh:29:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 27| ( # 28| local OLDIFS="$IFS" # 29|-> local IFS="," # 30| # shellcheck disable=SC2086 # 31| set $lunmask_arg Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nbd/module-setup.sh:33:27: warning[SC2154]: moddir is referenced but not assigned. # 31| install() { # 32| inst nbd-client # 33|-> inst_hook cmdline 90 "$moddir/parse-nbdroot.sh" # 34| inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot" # 35| if dracut_module_included "systemd-initrd"; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nbd/module-setup.sh:36:49: warning[SC2154]: systemdutildir is referenced but not assigned. # 34| inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot" # 35| if dracut_module_included "systemd-initrd"; then # 36|-> inst_script "$moddir/nbd-generator.sh" "$systemdutildir"/system-generators/dracut-nbd-generator # 37| fi # 38| dracut_need_initqueue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95nbd/nbdroot.sh:63:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 61| break # 62| fi # 63|-> if [ -z "${f%bs=*}" -o -z "${f%timeout=*}" ]; then # 64| preopts="$preopts $f" # 65| continue Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95nbd/nbdroot.sh:78:22: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 76| break # 77| fi # 78|-> if [ "$f" = "ro" -o "$f" = "rw" ]; then # 79| nbdrw=$f # 80| continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nbd/nbdroot.sh:99:7: warning[SC2154]: root is referenced but not assigned (did you mean 'nroot'?). # 97| # If we didn't get a root= on the command line, then we need to # 98| # add the udev rules for mounting the nbd0 device # 99|-> if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then # 100| printf 'KERNEL=="nbd0", ENV{DEVTYPE}!="partition", ENV{ID_FS_TYPE}=="?*", SYMLINK+="root"\n' > /etc/udev/rules.d/99-nbd-root.rules # 101| udevadm control --reload Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95nbd/nbdroot.sh:99:34: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 97| # If we didn't get a root= on the command line, then we need to # 98| # add the udev rules for mounting the nbd0 device # 99|-> if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then # 100| printf 'KERNEL=="nbd0", ENV{DEVTYPE}!="partition", ENV{ID_FS_TYPE}=="?*", SYMLINK+="root"\n' > /etc/udev/rules.d/99-nbd-root.rules # 101| udevadm control --reload Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nbd/nbdroot.sh:111:16: warning[SC2154]: hookdir is referenced but not assigned. # 109| printf '/bin/mount %s\n' \ # 110| "$NEWROOT" \ # 111|-> > "$hookdir"/mount/01-$$-nbd.sh # 112| else # 113| mkdir -p /run/systemd/system/sysroot.mount.d Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nbd/parse-nbdroot.sh:64:56: warning[SC2154]: hookdir is referenced but not assigned. # 62| fi # 63| # 64|-> echo 'nbd-client -check /dev/nbd0 > /dev/null 2>&1' > "$hookdir"/initqueue/finished/nbdroot.sh Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:10:16: warning[SC2154]: host_fs_types is referenced but not assigned. # 8| local _nfs _nfs4 # 9| # 10|-> for fs in "${host_fs_types[@]}"; do # 11| [[ $fs == "nfs" ]] && _nfs=1 # 12| [[ $fs == "nfs3" ]] && _nfs=1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:79:93: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 77| install() { # 78| local _nsslibs # 79|-> inst_multiple -o rpc.idmapd mount.nfs mount.nfs4 umount sed /etc/netconfig chmod chown "$tmpfilesdir/rpcbind.conf" # 80| inst_multiple -o /etc/idmapd.conf # 81| inst_multiple -o /etc/services /etc/nsswitch.conf /etc/rpc /etc/protocols Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:84:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 82| inst_multiple -o /usr/etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols # 83| # 84|-> if [[ $hostonly_cmdline == "yes" ]]; then # 85| local _netconf # 86| _netconf="$(cmdline)" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:87:58: warning[SC2154]: initdir is referenced but not assigned. # 85| local _netconf # 86| _netconf="$(cmdline)" # 87|-> [[ $_netconf ]] && printf "%s\n" "$_netconf" >> "${initdir}/etc/cmdline.d/95nfs.conf" # 88| fi # 89| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:90:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 88| fi # 89| # 90|-> if [[ -f $dracutsysrootdir/lib/modprobe.d/nfs.conf ]]; then # 91| inst_multiple /lib/modprobe.d/nfs.conf # 92| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:109:27: warning[SC2154]: moddir is referenced but not assigned. # 107| inst_libdir_file -n "$_nsslibs" 'libnss_*.so*' # 108| # 109|-> inst_hook cmdline 90 "$moddir/parse-nfsroot.sh" # 110| inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh" # 111| inst_hook cleanup 99 "$moddir/nfsroot-cleanup.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:115:11: warning[SC2154]: hostonly_mode is referenced but not assigned. # 113| # 114| # For strict hostonly, only install rpcbind for NFS < 4 # 115|-> if [[ $hostonly_mode != "strict" ]] || [[ "$(get_nfs_type)" != "nfs4" ]]; then # 116| inst_multiple -o portmap rpcbind rpc.statd # 117| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:120:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 118| # 119| inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh" # 120|-> mkdir -m 0755 -p "$initdir/var/lib/nfs" # 121| mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" # 122| mkdir -m 0770 -p "$initdir/var/lib/rpcbind" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:121:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 119| inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh" # 120| mkdir -m 0755 -p "$initdir/var/lib/nfs" # 121|-> mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" # 122| mkdir -m 0770 -p "$initdir/var/lib/rpcbind" # 123| [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:122:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 120| mkdir -m 0755 -p "$initdir/var/lib/nfs" # 121| mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" # 122|-> mkdir -m 0770 -p "$initdir/var/lib/rpcbind" # 123| [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" # 124| [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:123:45: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 121| mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs" # 122| mkdir -m 0770 -p "$initdir/var/lib/rpcbind" # 123|-> [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" # 124| [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" # 125| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/module-setup.sh:124:39: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 122| mkdir -m 0770 -p "$initdir/var/lib/rpcbind" # 123| [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" # 124|-> [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" # 125| # 126| # Rather than copy the passwd file in, just set a user for rpcbind Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:26:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 24| # if there's a "%s" in the path, replace it with the hostname/IP # 25| if strstr "$path" "%s"; then # 26|-> local node="" # 27| read -r node < /proc/sys/kernel/hostname # 28| [ "$node" = "(none)" ] && node=$(get_ip "$2") Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:37:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 35| nfsroot_to_var() { # 36| # strip nfs[4]: # 37|-> local arg="$*:" # 38| nfs="${arg%%:*}" # 39| arg="${arg##$nfs:}" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:73:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 71| server="${server%%/*}" # 72| server="${server%%:}" # anaconda compat (nfs://<server>:/<path>) # 73|-> local port="${server##*:}" # 74| [ "$port" != "$server" ] && options="port=$port" # 75| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:108:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 106| # fill in missing server/path from DHCP options. # 107| nfsroot_from_dhcp() { # 108|-> local f # 109| for f in /tmp/net.$1.override /tmp/dhclient.$1.dhcpopts; do # 110| # shellcheck disable=SC1090 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:115:32: warning[SC2154]: srv is referenced but not assigned. # 113| [ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path" # 114| [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s # 115|-> [ -z "$server" ] && server=$srv # 116| [ -z "$server" ] && server=$new_next_server # 117| [ -z "$server" ] && server=$new_dhcp_server_identifier Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:116:32: warning[SC2154]: new_next_server is referenced but not assigned. # 114| [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s # 115| [ -z "$server" ] && server=$srv # 116|-> [ -z "$server" ] && server=$new_next_server # 117| [ -z "$server" ] && server=$new_dhcp_server_identifier # 118| [ -z "$server" ] && server=${new_root_path%%:*} Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:117:32: warning[SC2154]: new_dhcp_server_identifier is referenced but not assigned. # 115| [ -z "$server" ] && server=$srv # 116| [ -z "$server" ] && server=$new_next_server # 117|-> [ -z "$server" ] && server=$new_dhcp_server_identifier # 118| [ -z "$server" ] && server=${new_root_path%%:*} # 119| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:123:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 121| # Look through $options, fix "rw"/"ro", move "lock"/"nolock" to $nfslock # 122| munge_nfs_options() { # 123|-> local f="" flags="" nfsrw="ro" OLDIFS="$IFS" # 124| IFS=, # 125| for f in $options; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:143:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 141| # mount_nfs NFSROOT MNTDIR [NETIF] # 142| mount_nfs() { # 143|-> local nfsroot="$1" mntdir="$2" netif="$3" # 144| local nfs="" server="" path="" options="" # 145| nfs_to_var "$nfsroot" "$netif" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nfs/nfs-lib.sh:144:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 142| mount_nfs() { # 143| local nfsroot="$1" mntdir="$2" netif="$3" # 144|-> local nfs="" server="" path="" options="" # 145| nfs_to_var "$nfsroot" "$netif" # 146| munge_nfs_options Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/95nfs/nfsroot-cleanup.sh:20:18: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 18| # try to create the destination directory # 19| [ -d "$NEWROOT"/$rpcpipefspath ] \ # 20|-> || mkdir -m 0755 -p "$NEWROOT"/$rpcpipefspath 2> /dev/null # 21| # 22| if [ -d "$NEWROOT"/$rpcpipefspath ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/nfsroot.sh:26:76: warning[SC2154]: hookdir is referenced but not assigned. # 24| # inject new exit_if_exists # 25| # shellcheck disable=SC2016 # 26|-> echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm -- "$job"' > "$hookdir"/initqueue/nfs.sh # 27| # force udevsettle to break # 28| : > "$hookdir"/initqueue/work Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/parse-nfsroot.sh:101:4: warning[SC2154]: path is referenced but not assigned. # 99| # 100| nfsroot_to_var "$netroot" # 101|-> [ "$path" = "error" ] && die "Argument nfsroot must contain a valid path!" # 102| # 103| # Set fstype, might help somewhere Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/parse-nfsroot.sh:104:8: warning[SC2154]: nfs is referenced but not assigned. # 102| # 103| # Set fstype, might help somewhere # 104|-> fstype=${nfs#/dev/} # 105| # 106| # Rewrite root so we don't have to parse this uglyness later on again Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/parse-nfsroot.sh:107:32: warning[SC2154]: options is referenced but not assigned. # 105| # 106| # Rewrite root so we don't have to parse this uglyness later on again # 107|-> netroot="$fstype:$server:$path:$options" # 108| # 109| # If we don't have a server, we need dhcp Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nfs/parse-nfsroot.sh:124:32: warning[SC2154]: hookdir is referenced but not assigned. # 122| # 123| # shellcheck disable=SC2016 # 124|-> echo '[ -e $NEWROOT/proc ]' > "$hookdir"/initqueue/finished/nfsroot.sh # 125| # 126| mkdir -p /var/lib/rpcbind Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:128:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 126| # called by dracut # 127| install() { # 128|-> if [[ $hostonly_cmdline == "yes" ]]; then # 129| local _nvmf_args # 130| _nvmf_args=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:131:62: warning[SC2154]: initdir is referenced but not assigned. # 129| local _nvmf_args # 130| _nvmf_args=$(cmdline) # 131|-> [[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/95nvmf-args.conf" # 132| fi # 133| inst_simple "/etc/nvme/hostnqn" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:138:18: warning[SC2154]: moddir is referenced but not assigned. # 136| inst_multiple ip sed # 137| # 138|-> inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh # 139| inst_script "${moddir}/nbftroot.sh" /sbin/nbftroot # 140| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:84:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 82| # 83| nbft_run_jq() { # 84|-> local st # 85| local opts="-e" # 86| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:85:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 83| nbft_run_jq() { # 84| local st # 85|-> local opts="-e" # 86| # 87| while [ $# -gt 0 ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:126:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 124| # false positive of shellcheck - no expansion in variable assignments # 125| # shellcheck disable=2086 # 126|-> local hfi_json=$1 # 127| local mac iface ipaddr prefix vlan gateway dns1 dns2 hostname adrfam dhcp # 128| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:127:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 125| # shellcheck disable=2086 # 126| local hfi_json=$1 # 127|-> local mac iface ipaddr prefix vlan gateway dns1 dns2 hostname adrfam dhcp # 128| # 129| mac=$(nbft_run_jq -r .mac_addr "$hfi_json") || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:201:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 199| # 200| nbft_parse() { # 201|-> local nbft_json n_nbft all_hfi_json n_hfi # 202| local j=0 i # 203| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95nvmf/parse-nvmf-boot-connections.sh:202:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 200| nbft_parse() { # 201| local nbft_json n_nbft all_hfi_json n_hfi # 202|-> local j=0 i # 203| # 204| nbft_json=$(nvme nbft show -H -o json) || return 0 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:7:22: warning[SC2154]: swap_devs is referenced but not assigned. # 5| swap_on_netdevice() { # 6| local _dev # 7|-> for _dev in "${swap_devs[@]}"; do # 8| block_is_netdevice "$(get_maj_min "$_dev")" && return 0 # 9| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:26:17: warning[SC2154]: host_fs_types is referenced but not assigned. # 24| local _resume # 25| # 26|-> for dev in "${!host_fs_types[@]}"; do # 27| [[ ${host_fs_types[$dev]} =~ ^(swap|swsuspend|swsupend)$ ]] || continue # 28| _resume=$(shorten_persistent_dev "$(get_persistent_dev "$dev")") Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:38:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 36| local _resumeconf # 37| # 38|-> if [[ $hostonly_cmdline == "yes" ]]; then # 39| _resumeconf=$(cmdline) # 40| [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:40:64: warning[SC2154]: initdir is referenced but not assigned. # 38| if [[ $hostonly_cmdline == "yes" ]]; then # 39| _resumeconf=$(cmdline) # 40|-> [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" # 41| fi # 42| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:44:50: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 42| # 43| # if systemd is included and has the hibernate-resume tool, use it and nothing else # 44|-> if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then # 45| inst_multiple -o \ # 46| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:44:67: warning[SC2154]: systemdutildir is referenced but not assigned. # 42| # 43| # if systemd is included and has the hibernate-resume tool, use it and nothing else # 44|-> if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then # 45| inst_multiple -o \ # 46| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:47:14: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 45| inst_multiple -o \ # 46| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ # 47|-> "$systemdsystemunitdir"/systemd-hibernate-resume.service \ # 48| "$systemdsystemunitdir"/systemd-hibernate-resume@.service \ # 49| "$systemdutildir"/systemd-hibernate-resume Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/module-setup.sh:63:31: warning[SC2154]: moddir is referenced but not assigned. # 61| # 62| if ! dracut_module_included "systemd"; then # 63|-> inst_hook cmdline 10 "$moddir/parse-resume.sh" # 64| else # 65| inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/parse-resume.sh:61:48: warning[SC2154]: hookdir is referenced but not assigned. # 59| # shellcheck disable=SC2016 # 60| printf '[ -e "%s" ] && { ln -fs "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \ # 61|-> "$resume" "$resume" "$hookdir" >> "$hookdir"/initqueue/settled/resume.sh # 62| # 63| { Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95resume/resume.sh:5:15: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 3| PATH=/usr/sbin:/usr/bin:/sbin:/bin # 4| # 5|-> [ -s /.resume -a -b "$resume" ] && { # 6| # First try user level resume; it offers splash etc # 7| case "$splash" in Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/resume.sh:5:22: warning[SC2154]: resume is referenced but not assigned. # 3| PATH=/usr/sbin:/usr/bin:/sbin:/bin # 4| # 5|-> [ -s /.resume -a -b "$resume" ] && { # 6| # First try user level resume; it offers splash etc # 7| case "$splash" in Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95resume/resume.sh:7:11: warning[SC2154]: splash is referenced but not assigned (did you mean 'a_splash'?). # 5| [ -s /.resume -a -b "$resume" ] && { # 6| # First try user level resume; it offers splash etc # 7|-> case "$splash" in # 8| quiet) # 9| a_splash="-P splash=y" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:15:21: warning[SC2154]: host_fs_types is referenced but not assigned. # 13| cmdline_journal() { # 14| if [[ $hostonly ]]; then # 15|-> for dev in "${!host_fs_types[@]}"; do # 16| [[ ${host_fs_types[$dev]} == "reiserfs" ]] || [[ ${host_fs_types[$dev]} == "xfs" ]] || continue # 17| rootopts=$(find_dev_fsopts "$dev") Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:39:11: warning[SC2154]: root_devs is referenced but not assigned. # 37| # 38| # "--no-hostonly-default-device" can result in empty root_devs # 39|-> if [ "${#root_devs[@]}" -eq 0 ]; then # 40| return # 41| fi Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:43:23: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 41| fi # 42| # 43|-> if [ -n "$_block" -a -b "$_dev" ]; then # 44| printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")" # 45| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:56:11: warning[SC2154]: use_fstab is referenced but not assigned. # 54| printf " rootfstype=%s" "$_fstype" # 55| fi # 56|-> if [[ $use_fstab != yes ]] && [[ $_fstype == btrfs ]]; then # 57| _subvol=$(findmnt -e -v -n -o FSROOT --target /) \ # 58| && _subvol=${_subvol#/} Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:74:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 72| # called by dracut # 73| install() { # 74|-> if [[ $hostonly_cmdline == "yes" ]]; then # 75| local _journaldev # 76| _journaldev=$(cmdline_journal) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:77:64: warning[SC2154]: initdir is referenced but not assigned. # 75| local _journaldev # 76| _journaldev=$(cmdline_journal) # 77|-> [[ $_journaldev ]] && printf "%s\n" "$_journaldev" >> "${initdir}/etc/cmdline.d/95root-journaldev.conf" # 78| local _rootdev # 79| _rootdev=$(cmdline_rootfs) Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/module-setup.sh:86:31: warning[SC2154]: moddir is referenced but not assigned. # 84| inst_multiple tr # 85| if ! dracut_module_included "systemd"; then # 86|-> inst_hook cmdline 95 "$moddir/parse-block.sh" # 87| inst_hook pre-udev 30 "$moddir/block-genrules.sh" # 88| inst_hook mount 99 "$moddir/mount-root.sh" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95rootfs-block/mount-root.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| # 6| mount_root() { # 7|-> local _rflags_ro # 8| # sanity - determine/fix fstype # 9| rootfs=$(det_fs "${root#block:}" "$fstype") Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/mount-root.sh:9:39: warning[SC2154]: fstype is referenced but not assigned. # 7| local _rflags_ro # 8| # sanity - determine/fix fstype # 9|-> rootfs=$(det_fs "${root#block:}" "$fstype") # 10| # 11| journaldev=$(getarg "root.journaldev=") Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95rootfs-block/mount-root.sh:110:33: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 108| # 109| if fsck_able "$rootfs" \ # 110|-> && [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] \ # 111| && ! strstr "${rflags}" _netdev \ # 112| && ! getargbool 0 rd.skipfsck; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95rootfs-block/mount-root.sh:110:51: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 108| # 109| if fsck_able "$rootfs" \ # 110|-> && [ "$rootfsck" != "0" -a -z "$fastboot" -a "$READONLY" != "yes" ] \ # 111| && ! strstr "${rflags}" _netdev \ # 112| && ! getargbool 0 rd.skipfsck; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95rootfs-block/mount-root.sh:133:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 131| } # 132| # 133|-> if [ -n "$root" -a -z "${root%%block:*}" ]; then # 134| mount_root # 135| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95rootfs-block/rootfallback.sh:22:7: warning[SC2154]: job is referenced but not assigned. # 20| done # 21| # 22|-> [ -e "$job" ] && rm -f "$job" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95ssh-client/module-setup.sh:13:17: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 11| # 12| if [[ $sshkey ]]; then # 13|-> [[ ! -f $dracutsysrootdir$sshkey ]] && { # 14| derror "ssh key: $sshkey is not found!" # 15| return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95ssh-client/module-setup.sh:31:20: warning[SC2154]: initdir is referenced but not assigned. # 29| if [[ -d $dracutsysrootdir/root/.ssh ]]; then # 30| inst_dir /root/.ssh # 31|-> chmod 700 "${initdir}"/root/.ssh # 32| fi # 33| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95terminfo/module-setup.sh:8:15: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 6| # terminfo bits make things work better if you fall into interactive mode # 7| for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do # 8|-> [[ -f $dracutsysrootdir${_terminfodir}/l/linux ]] && break # 9| done # 10| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95terminfo/module-setup.sh:14:31: warning[SC2154]: initdir is referenced but not assigned. # 12| for i in "l/linux" "v/vt100" "v/vt102" "v/vt220"; do # 13| inst_dir "$_terminfodir/${i%/*}" # 14|-> $DRACUT_CP -L -t "${initdir}/${_terminfodir}/${i%/*}" "$dracutsysrootdir$_terminfodir/$i" # 15| done # 16| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:14:11: warning[SC2154]: initdir is referenced but not assigned. # 12| inst_multiple -o /etc/udev/udev.conf # 13| # 14|-> [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 15| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 16| [[ -x $dracutsysrootdir$_i ]] || continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:14:22: warning[SC2154]: systemdutildir is referenced but not assigned. # 12| inst_multiple -o /etc/udev/udev.conf # 13| # 14|-> [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 15| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 16| [[ -x $dracutsysrootdir$_i ]] || continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:15:50: warning[SC2154]: udevdir is referenced but not assigned. # 13| # 14| [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 15|-> for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 16| [[ -x $dracutsysrootdir$_i ]] || continue # 17| inst "$_i" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:16:15: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 14| [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 15| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 16|-> [[ -x $dracutsysrootdir$_i ]] || continue # 17| inst "$_i" # 18| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:50:10: warning[SC2154]: moddir is referenced but not assigned. # 48| 80-net-name-slot.rules 80-net-setup-link.rules \ # 49| 95-late.rules \ # 50|-> "$moddir/59-persistent-storage.rules" \ # 51| "$moddir/61-persistent-storage.rules" # 52| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtfs/module-setup.sh:6:20: warning[SC2154]: host_fs_types is referenced but not assigned. # 4| check() { # 5| [[ $hostonly ]] || [[ $mount_needs ]] && { # 6|-> for fs in "${host_fs_types[@]}"; do # 7| [[ $fs == "9p" ]] && return 0 # 8| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtfs/module-setup.sh:29:27: warning[SC2154]: moddir is referenced but not assigned. # 27| # called by dracut # 28| install() { # 29|-> inst_hook cmdline 95 "$moddir/parse-virtfs.sh" # 30| inst_hook mount 99 "$moddir/mount-virtfs.sh" # 31| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95virtfs/mount-virtfs.sh:8:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 6| rootopts=$1 # 7| # strip ro and rw options # 8|-> local OLDIFS="$IFS" # 9| IFS=, # 10| # shellcheck disable=SC2086 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/95virtfs/mount-virtfs.sh:13:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 11| set -- $rootopts # 12| IFS="$OLDIFS" # 13|-> local v # 14| while [ $# -gt 0 ]; do # 15| case $1 in Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95virtfs/mount-virtfs.sh:71:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 69| } # 70| # 71|-> if [ -n "$root" -a -z "${root%%virtfs:*}" ]; then # 72| mount_root # 73| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtfs/parse-virtfs.sh:3:7: warning[SC2154]: root is referenced but not assigned. # 1| #!/usr/bin/sh # 2| # 3|-> if [ "${root%%:*}" = "virtfs" ]; then # 4| modprobe 9pnet_virtio # 5| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/module-setup.sh:8:20: warning[SC2154]: host_fs_types is referenced but not assigned. # 6| is_qemu_virtualized && return 0 # 7| # 8|-> for fs in "${host_fs_types[@]}"; do # 9| [[ $fs == "virtiofs" ]] && return 0 # 10| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/module-setup.sh:29:27: warning[SC2154]: moddir is referenced but not assigned. # 27| # called by dracut # 28| install() { # 29|-> inst_hook cmdline 95 "$moddir/parse-virtiofs.sh" # 30| inst_hook pre-mount 99 "$moddir/mount-virtiofs.sh" # 31| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/mount-virtiofs.sh:5:7: warning[SC2154]: fstype is referenced but not assigned. # 3| type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh # 4| # 5|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 6| if ! load_fstype virtiofs; then # 7| die "virtiofs is required but not available." Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95virtiofs/mount-virtiofs.sh:5:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 3| type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh # 4| # 5|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 6| if ! load_fstype virtiofs; then # 7| die "virtiofs is required but not available." Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/mount-virtiofs.sh:5:35: warning[SC2154]: root is referenced but not assigned. # 3| type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh # 4| # 5|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 6| if ! load_fstype virtiofs; then # 7| die "virtiofs is required but not available." Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/mount-virtiofs.sh:10:27: warning[SC2154]: rflags is referenced but not assigned. # 8| fi # 9| # 10|-> mount -t virtiofs -o "$rflags" "${root#virtiofs:}" "$NEWROOT" 2>&1 | vinfo # 11| if ! ismounted "$NEWROOT"; then # 12| die "virtiofs: failed to mount root fs" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/parse-virtiofs.sh:6:7: warning[SC2154]: fstype is referenced but not assigned. # 4| # root=virtiofs:<tag> # 5| # 6|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 7| # shellcheck disable=SC2034 # 8| rootok=1 Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/95virtiofs/parse-virtiofs.sh:6:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 4| # root=virtiofs:<tag> # 5| # 6|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 7| # shellcheck disable=SC2034 # 8| rootok=1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/95virtiofs/parse-virtiofs.sh:6:35: warning[SC2154]: root is referenced but not assigned. # 4| # root=virtiofs:<tag> # 5| # 6|-> if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then # 7| # shellcheck disable=SC2034 # 8| rootok=1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/96securityfs/module-setup.sh:15:27: warning[SC2154]: moddir is referenced but not assigned. # 13| # called by dracut # 14| install() { # 15|-> inst_hook cmdline 60 "$moddir/securityfs.sh" # 16| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/97masterkey/module-setup.sh:25:29: warning[SC2154]: moddir is referenced but not assigned. # 23| install() { # 24| inst_multiple keyctl uname # 25|-> inst_hook pre-pivot 60 "$moddir/masterkey.sh" # 26| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/dracut-cmdline-ask.sh:17:15: warning[SC3045]: In POSIX sh, read -p is undefined. # 15| echo # 16| echo "Enter additional kernel command line parameter (end with ctrl-d or .)" # 17|-> while read -r -p "> " ${BASH:+-e} line || [ -n "$line" ]; do # 18| [ "$line" = "." ] && break # 19| [ -n "$line" ] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/dracut-emergency.sh:17:39: warning[SC2154]: fstype is referenced but not assigned. # 15| # 16| if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then # 17|-> FSTXT="/run/dracut/fsck/fsck_help_$fstype.txt" # 18| RDSOSREPORT="$(rdsosreport)" # 19| source_hook "$hook" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/dracut-emergency.sh:36:34: warning[SC2154]: _name is referenced but not assigned. # 34| done < /proc/consoles # 35| [ -f /etc/profile ] && . /etc/profile # 36|-> [ -z "$PS1" ] && export PS1="$_name:\${PWD}# " # 37| exec sulogin -e # 38| else Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/dracut-initqueue.sh:26:38: warning[SC2154]: hookdir is referenced but not assigned. # 24| check_finished && break # 25| # 26|-> udevadm settle --exit-if-exists="$hookdir"/initqueue/work # 27| # 28| check_finished && break Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/dracut-mount.sh:21:15: warning[SC2154]: hookdir is referenced but not assigned. # 19| umount "$NEWROOT" # 20| fi # 21|-> for f in "$hookdir"/mount/*.sh; do # 22| # shellcheck disable=SC1090 # 23| [ -f "$f" ] && . "$f" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:22:18: warning[SC2154]: moddir is referenced but not assigned. # 20| # called by dracut # 21| install() { # 22|-> inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency # 23| inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/emergency.service # 24| inst_simple "$moddir/dracut-emergency.service" "${systemdsystemunitdir}"/dracut-emergency.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:23:46: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 21| install() { # 22| inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency # 23|-> inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/emergency.service # 24| inst_simple "$moddir/dracut-emergency.service" "${systemdsystemunitdir}"/dracut-emergency.service # 25| inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/rescue.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:38:48: warning[SC2154]: systemdutildir is referenced but not assigned. # 36| inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot # 37| # 38|-> inst_script "$moddir/rootfs-generator.sh" "$systemdutildir"/system-generators/dracut-rootfs-generator # 39| # 40| for i in \ Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:50:31: warning[SC2154]: initdir is referenced but not assigned. # 48| dracut-pre-udev.service; do # 49| inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}" # 50|-> $SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i" # 51| done # 52| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:53:49: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 51| done # 52| # 53|-> inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" # 54| # 55| inst_multiple sulogin Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:6:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 4| # 5| generator_wait_for_dev() { # 6|-> local _name # 7| local _timeout # 8| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| generator_wait_for_dev() { # 6| local _name # 7|-> local _timeout # 8| # 9| _name="$(str_replace "$1" '/' '\x2f')" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:13:16: warning[SC2154]: hookdir is referenced but not assigned. # 11| _timeout=${_timeout:-0} # 12| # 13|-> if ! [ -e "$hookdir/initqueue/finished/devexists-${_name}.sh" ]; then # 14| # 15| # If a LUKS device needs unlocking via systemd in the initrd, assume Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:47:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 45| # 46| generator_mount_rootfs() { # 47|-> local _type=$2 # 48| local _flags=$3 # 49| local _name Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:48:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 46| generator_mount_rootfs() { # 47| local _type=$2 # 48|-> local _flags=$3 # 49| local _name # 50| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:49:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 47| local _type=$2 # 48| local _flags=$3 # 49|-> local _name # 50| # 51| [ -z "$1" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:75:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 73| # 74| generator_fsck_after_pre_mount() { # 75|-> local _name # 76| # 77| [ -z "$1" ] && return 0 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98ecryptfs/module-setup.sh:21:29: warning[SC2154]: moddir is referenced but not assigned. # 19| # called by dracut # 20| install() { # 21|-> inst_hook pre-pivot 63 "$moddir/ecryptfs-mount.sh" # 22| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98integrity/evm-enable.sh:84:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 82| fi # 83| # 84|-> local evm_pubid line # 85| if line=$(keyctl describe %keyring:.evm); then # 86| # the kernel already setup a trusted .evm keyring so use that one Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98integrity/evm-enable.sh:102:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 100| # load the default EVM public key onto the EVM keyring along # 101| # with all the other ones in $EVMKEYSDIR # 102|-> local key_imported=1 # 103| for PUBKEY in ${EVMX509PATH} "${NEWROOT}${EVMKEYSDIR}"/*; do # 104| if [ ! -f "${PUBKEY}" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98integrity/evm-enable.sh:143:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 141| fi # 142| # 143|-> local evm_configured=0 # 144| local EVM_INIT_HMAC=1 EVM_INIT_X509=2 # 145| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98integrity/evm-enable.sh:144:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 142| # 143| local evm_configured=0 # 144|-> local EVM_INIT_HMAC=1 EVM_INIT_X509=2 # 145| # 146| # try to load the EVM encrypted key Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98integrity/module-setup.sh:17:29: warning[SC2154]: moddir is referenced but not assigned. # 15| install() { # 16| dracut_install evmctl keyctl ls # 17|-> inst_hook pre-pivot 61 "$moddir/evm-enable.sh" # 18| inst_hook pre-pivot 61 "$moddir/ima-keys-load.sh" # 19| inst_hook pre-pivot 62 "$moddir/ima-policy-load.sh" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98pollcdrom/module-setup.sh:15:37: warning[SC2154]: moddir is referenced but not assigned. # 13| # called by dracut # 14| install() { # 15|-> inst_hook initqueue/settled 99 "$moddir/pollcdrom.sh" # 16| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98selinux/module-setup.sh:15:29: warning[SC2154]: moddir is referenced but not assigned. # 13| # called by dracut # 14| install() { # 15|-> inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh" # 16| inst_multiple setenforce chroot # 17| } Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:21:45: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 19| # 20| # Attempt to load SELinux Policy # 21|-> if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then # 22| local ret=0 # 23| local out Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:22:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 20| # Attempt to load SELinux Policy # 21| if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then # 22|-> local ret=0 # 23| local out # 24| info "Loading SELinux policy" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:23:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 21| if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ]; then # 22| local ret=0 # 23|-> local out # 24| info "Loading SELinux policy" # 25| mount -o bind /sys "$NEWROOT"/sys Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:44:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 42| fi # 43| # 44|-> if [ $ret -eq 0 -o $ret -eq 2 ]; then # 45| # If machine requires a relabel, force to permissive mode # 46| [ -e "$NEWROOT"/.autorelabel ] && LANG=C /usr/sbin/setenforce 0 Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:54:25: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 52| # 53| warn "Initial SELinux policy load failed." # 54|-> if [ $ret -eq 3 -o $permissive -eq 0 ]; then # 55| warn "Machine in enforcing mode." # 56| warn "Not continuing" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh:61:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 59| fi # 60| return 0 # 61|-> elif [ $permissive -eq 0 -a "$SELINUX" != "disabled" ]; then # 62| warn "Machine in enforcing mode and cannot execute load_policy." # 63| warn "To disable selinux, add selinux=0 to the kernel command line." Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98syslog/module-setup.sh:30:31: warning[SC2154]: moddir is referenced but not assigned. # 28| if [ -n "$_installs" ]; then # 29| inst_multiple cat $_installs # 30|-> inst_hook cmdline 90 "$moddir/parse-syslog-opts.sh" # 31| inst_hook cleanup 99 "$moddir/syslog-cleanup.sh" # 32| inst_hook initqueue/online 70 "$moddir/rsyslogd-start.sh" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/98syslog/module-setup.sh:34:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 32| inst_hook initqueue/online 70 "$moddir/rsyslogd-start.sh" # 33| inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop # 34|-> mkdir -m 0755 -p "${initdir}"/etc/templates # 35| inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf # 36| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98syslog/module-setup.sh:34:27: warning[SC2154]: initdir is referenced but not assigned. # 32| inst_hook initqueue/online 70 "$moddir/rsyslogd-start.sh" # 33| inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop # 34|-> mkdir -m 0755 -p "${initdir}"/etc/templates # 35| inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf # 36| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98syslog/rsyslogd-start.sh:14:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 12| # 13| rsyslog_config() { # 14|-> local server=$1 # 15| shift # 16| local syslog_template=$1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98syslog/rsyslogd-start.sh:16:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| local server=$1 # 15| shift # 16|-> local syslog_template=$1 # 17| shift # 18| local filters=$* Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98syslog/rsyslogd-start.sh:18:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 16| local syslog_template=$1 # 17| shift # 18|-> local filters=$* # 19| local filter= # 20| Error: SHELLCHECK_WARNING (CWE-569): /usr/lib/dracut/modules.d/98syslog/rsyslogd-start.sh:18:19: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems. # 16| local syslog_template=$1 # 17| shift # 18|-> local filters=$* # 19| local filter= # 20| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98syslog/rsyslogd-start.sh:19:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 17| shift # 18| local filters=$* # 19|-> local filter= # 20| # 21| cat "$syslog_template" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98usrmount/module-setup.sh:17:33: warning[SC2154]: moddir is referenced but not assigned. # 15| install() { # 16| if ! dracut_module_included "systemd"; then # 17|-> inst_hook pre-pivot 50 "$moddir/mount-usr.sh" # 18| fi # 19| : Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| # 6| filtersubvol() { # 7|-> local _oldifs # 8| _oldifs="$IFS" # 9| local IFS="," Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:9:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 7| local _oldifs # 8| _oldifs="$IFS" # 9|-> local IFS="," # 10| # shellcheck disable=SC2086 # 11| set -- $1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:23:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 21| # 22| fsck_usr() { # 23|-> local _dev=$1 # 24| local _fs=$2 # 25| local _fsopts=$3 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:24:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 22| fsck_usr() { # 23| local _dev=$1 # 24|-> local _fs=$2 # 25| local _fsopts=$3 # 26| local _fsckoptions Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:25:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 23| local _dev=$1 # 24| local _fs=$2 # 25|-> local _fsopts=$3 # 26| local _fsckoptions # 27| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:26:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 24| local _fs=$2 # 25| local _fsopts=$3 # 26|-> local _fsckoptions # 27| # 28| if [ -f "$NEWROOT"/fsckoptions ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:53:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 51| # 52| mount_usr() { # 53|-> local _dev _mp _fs _opts _ _usr_found _ _freq _passno # 54| # check, if we have to mount the /usr filesystem # 55| while read -r _dev _mp _fs _opts _freq _passno || [ -n "$_dev" ]; do Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:66:23: warning[SC2154]: root is referenced but not assigned. # 64| # 65| if strstr "$_opts" "subvol=" \ # 66|-> && [ "${root#block:}" -ef "$_dev" ] \ # 67| && [ -n "$rflags" ]; then # 68| # for btrfs subvolumes we have to mount /usr with the same rflags Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/98usrmount/mount-usr.sh:66:39: warning[SC3013]: In POSIX sh, -ef is undefined. # 64| # 65| if strstr "$_opts" "subvol=" \ # 66|-> && [ "${root#block:}" -ef "$_dev" ] \ # 67| && [ -n "$rflags" ]; then # 68| # for btrfs subvolumes we have to mount /usr with the same rflags Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:10:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 8| # str_replace ' one two three ' ' ' '_' # 9| str_replace() { # 10|-> local in="$1" # 11| local s="$2" # 12| local r="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:11:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 9| str_replace() { # 10| local in="$1" # 11|-> local s="$2" # 12| local r="$3" # 13| local out='' Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:12:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 10| local in="$1" # 11| local s="$2" # 12|-> local r="$3" # 13| local out='' # 14| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:13:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 11| local s="$2" # 12| local r="$3" # 13|-> local out='' # 14| # 15| while [ "${in##*"$s"*}" != "$in" ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:26:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 24| # (mimicks unit_name_from_path_instance()) # 25| dev_unit_name() { # 26|-> local dev="$1" # 27| # 28| if command -v systemd-escape > /dev/null; then Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:33:23: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 31| fi # 32| # 33|-> if [ "$dev" = "/" -o -z "$dev" ]; then # 34| printf -- "-" # 35| return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:54:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 52| # Set 'rd.timeout' as the systemd timeout for <dev> # 53| set_systemd_timeout_for_dev() { # 54|-> local _name # 55| local _needreload # 56| local _noreload Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:55:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 53| set_systemd_timeout_for_dev() { # 54| local _name # 55|-> local _needreload # 56| local _noreload # 57| local _timeout Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:56:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 54| local _name # 55| local _needreload # 56|-> local _noreload # 57| local _timeout # 58| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:57:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 55| local _needreload # 56| local _noreload # 57|-> local _timeout # 58| # 59| [ -z "$DRACUT_SYSTEMD" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:104:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 102| # if the device <dev> is recognized by the system. # 103| wait_for_dev() { # 104|-> local _name # 105| local _noreload # 106| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:105:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 103| wait_for_dev() { # 104| local _name # 105|-> local _noreload # 106| # 107| if [ "$1" = "-n" ]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:114:59: warning[SC2154]: hookdir is referenced but not assigned. # 112| _name="$(str_replace "$1" '/' '\x2f')" # 113| # 114|-> type mark_hostonly > /dev/null 2>&1 && mark_hostonly "$hookdir/initqueue/finished/devexists-${_name}.sh" # 115| # 116| [ -e "${PREFIX}$hookdir/initqueue/finished/devexists-${_name}.sh" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:129:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 127| # 128| cancel_wait_for_dev() { # 129|-> local _name # 130| _name="$(str_replace "$1" '/' '\x2f')" # 131| rm -f -- "$hookdir/initqueue/finished/devexists-${_name}.sh" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:8:35: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 6| export NEWROOT # 7| if [ -n "$NEWROOT" ]; then # 8|-> [ -d "$NEWROOT" ] || mkdir -p -m 0755 "$NEWROOT" # 9| fi # 10| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:14:18: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 12| if [ -z "$PREFIX" ]; then # 13| if ! [ -d /run/initramfs ]; then # 14|-> mkdir -p -m 0755 /run/initramfs/log # 15| ln -sfn /run/initramfs/log /var/log # 16| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:18:34: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 16| fi # 17| # 18|-> [ -d /run/lock ] || mkdir -p -m 0755 /run/lock # 19| [ -d /run/log ] || mkdir -p -m 0755 /run/log # 20| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:19:33: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 17| # 18| [ -d /run/lock ] || mkdir -p -m 0755 /run/lock # 19|-> [ -d /run/log ] || mkdir -p -m 0755 /run/log # 20| fi # 21| Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:39:15: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 37| # matches; as it would match anything, it's not an interesting case. # 38| strglob() { # 39|-> [ -n "$1" -a -z "${1##$2}" ] # 40| } # 41| Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:46:15: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 44| # matches; as it would match anything, it's not an interesting case. # 45| strglobin() { # 46|-> [ -n "$1" -a -z "${1##*$2*}" ] # 47| } # 48| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:60:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 58| # 59| trim() { # 60|-> local var="$*" # 61| var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters # 62| var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:107:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 105| # 106| killall_proc_mountpoint() { # 107|-> local _pid # 108| local _killed=0 # 109| for _pid in /proc/*; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:108:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 106| killall_proc_mountpoint() { # 107| local _pid # 108|-> local _killed=0 # 109| for _pid in /proc/*; do # 110| _pid=${_pid##/proc/} Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:125:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 123| # 124| getcmdline() { # 125|-> local _line # 126| local _i # 127| local CMDLINE_ETC_D Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:126:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 124| getcmdline() { # 125| local _line # 126|-> local _i # 127| local CMDLINE_ETC_D # 128| local CMDLINE_ETC Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:127:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 125| local _line # 126| local _i # 127|-> local CMDLINE_ETC_D # 128| local CMDLINE_ETC # 129| local CMDLINE_PROC Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:128:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 126| local _i # 127| local CMDLINE_ETC_D # 128|-> local CMDLINE_ETC # 129| local CMDLINE_PROC # 130| unset _line Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:129:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 127| local CMDLINE_ETC_D # 128| local CMDLINE_ETC # 129|-> local CMDLINE_PROC # 130| unset _line # 131| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:154:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 152| getarg() { # 153| debug_off # 154|-> local _deprecated _newoption # 155| CMDLINE=$(getcmdline) # 156| export CMDLINE Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:227:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 225| # false: rd.info=0, rd.info=off, rd.info not present (default val is 0) # 226| getargbool() { # 227|-> local _b # 228| unset _b # 229| local _default Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:229:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 227| local _b # 228| unset _b # 229|-> local _default # 230| _default="$1" # 231| shift Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:255:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 253| # <defaultval> should be with [minval -maxval]. # 254| getargnum() { # 255|-> local _b # 256| unset _b # 257| local _default _min _max Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:257:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 255| local _b # 256| unset _b # 257|-> local _default _min _max # 258| _default="$1" # 259| shift Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:276:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 274| CMDLINE=$(getcmdline) # 275| export CMDLINE # 276|-> local _val _i _gfound _deprecated # 277| unset _val # 278| unset _gfound Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:320:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 318| # sha256 # 319| getoptcomma() { # 320|-> local line=",$1," # 321| local opt="$2" # 322| local tmp Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:321:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 319| getoptcomma() { # 320| local line=",$1," # 321|-> local opt="$2" # 322| local tmp # 323| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:322:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 320| local line=",$1," # 321| local opt="$2" # 322|-> local tmp # 323| # 324| case "${line}" in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:350:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 348| splitsep() { # 349| debug_off # 350|-> local sep="$1" # 351| local str="$2" # 352| shift 2 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:351:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 349| debug_off # 350| local sep="$1" # 351|-> local str="$2" # 352| shift 2 # 353| local tmp Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:353:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 351| local str="$2" # 352| shift 2 # 353|-> local tmp # 354| # 355| while [ -n "$str" -a "$#" -gt 1 ]; do Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:355:23: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 353| local tmp # 354| # 355|-> while [ -n "$str" -a "$#" -gt 1 ]; do # 356| tmp="${str%%$sep*}" # 357| eval "$1='${tmp}'" Error: SHELLCHECK_WARNING (CWE-477): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:362:17: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. # 360| shift # 361| done # 362|-> [ -n "$str" -a -n "$1" ] && eval "$1='$str'" # 363| debug_on # 364| return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:386:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 384| # 385| source_all() { # 386|-> local f # 387| local _dir # 388| _dir=$1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:387:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 385| source_all() { # 386| local f # 387|-> local _dir # 388| _dir=$1 # 389| shift Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:404:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 402| # 403| source_hook() { # 404|-> local _dir # 405| _dir=$1 # 406| shift Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:411:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 409| # 410| check_finished() { # 411|-> local f # 412| for f in "$hookdir"/initqueue/finished/*.sh; do # 413| [ "$f" = "$hookdir/initqueue/finished/*.sh" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:421:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 419| # 420| source_conf() { # 421|-> local f # 422| [ "$1" ] && [ -d "/$1" ] || return # 423| # shellcheck disable=SC1090 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:469:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 467| # Count the number of times the character $ch occurs in $str # 468| # Return 0 if the count matches the expected number, 1 otherwise # 469|-> local str="$1" # 470| local ch="$2" # 471| local expected="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:470:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 468| # Return 0 if the count matches the expected number, 1 otherwise # 469| local str="$1" # 470|-> local ch="$2" # 471| local expected="$3" # 472| local count=0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:471:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 469| local str="$1" # 470| local ch="$2" # 471|-> local expected="$3" # 472| local count=0 # 473| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:472:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 470| local ch="$2" # 471| local expected="$3" # 472|-> local count=0 # 473| # 474| while [ "${str#*$ch}" != "${str}" ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:484:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 482| incol2() { # 483| debug_off # 484|-> local check # 485| local file="$1" # 486| local str="$2" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:485:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 483| debug_off # 484| local check # 485|-> local file="$1" # 486| local str="$2" # 487| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:486:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 484| local check # 485| local file="$1" # 486|-> local str="$2" # 487| # 488| [ -z "$file" ] && return 1 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:503:61: warning[SC2154]: settle_exit_if_exists is referenced but not assigned. # 501| udevsettle() { # 502| # shellcheck disable=SC2086 # 503|-> udevadm settle --exit-if-exists=$hookdir/initqueue/work $settle_exit_if_exists # 504| } # 505| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:513:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 511| # 512| find_mount() { # 513|-> local dev wanted_dev # 514| wanted_dev="$(readlink -e -q "$1")" # 515| while read -r dev _ || [ -n "$dev" ]; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:567:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 565| # 566| label_uuid_to_dev() { # 567|-> local _dev # 568| _dev="${1#block:}" # 569| case "$_dev" in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:601:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 599| # /mnt/cdrom2 # 600| funiq() { # 601|-> local dir="$1" # 602| local prefix="$2" # 603| local i=0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:602:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 600| funiq() { # 601| local dir="$1" # 602|-> local prefix="$2" # 603| local i=0 # 604| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:603:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 601| local dir="$1" # 602| local prefix="$2" # 603|-> local i=0 # 604| # 605| [ -d "${dir}" ] || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:619:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 617| # mkuniqdir subdir new_dir_name # 618| mkuniqdir() { # 619|-> local dir="$1" # 620| local prefix="$2" # 621| local retdir Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:620:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 618| mkuniqdir() { # 619| local dir="$1" # 620|-> local prefix="$2" # 621| local retdir # 622| local retdir_new Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:621:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 619| local dir="$1" # 620| local prefix="$2" # 621|-> local retdir # 622| local retdir_new # 623| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:622:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 620| local prefix="$2" # 621| local retdir # 622|-> local retdir_new # 623| # 624| [ -d "${dir}" ] || mkdir -m 0755 -p "${dir}" || return 1 Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/dracut-lib.sh:624:30: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 622| local retdir_new # 623| # 624|-> [ -d "${dir}" ] || mkdir -m 0755 -p "${dir}" || return 1 # 625| # 626| retdir=$(funiq "${dir}" "${prefix}") || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:642:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 640| # copytree SRC DEST # 641| copytree() { # 642|-> local src="$1" dest="$2" # 643| [ -d "$src" ] || return 1 # 644| mkdir -p "$dest" || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:673:22: warning[SC3043]: In POSIX sh, 'local' is undefined. # 671| cd /dev/disk/by-uuid || return 1 # 672| # 673|-> [ "$1" = -p ] && local prefix="$2" && shift 2 # 674| local cmd="$1" # 675| shift Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:674:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 672| # 673| [ "$1" = -p ] && local prefix="$2" && shift 2 # 674|-> local cmd="$1" # 675| shift # 676| local uuids_list="$*" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:676:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 674| local cmd="$1" # 675| shift # 676|-> local uuids_list="$*" # 677| local uuid # 678| local full_uuid Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:677:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 675| shift # 676| local uuids_list="$*" # 677|-> local uuid # 678| local full_uuid # 679| local ___ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:678:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 676| local uuids_list="$*" # 677| local uuid # 678|-> local full_uuid # 679| local ___ # 680| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:679:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 677| local uuid # 678| local full_uuid # 679|-> local ___ # 680| # 681| [ -n "${cmd}" ] || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:710:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 708| # /dev/sdf3 # 709| devnames() { # 710|-> local dev="$1" # 711| local d # 712| local names Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:711:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 709| devnames() { # 710| local dev="$1" # 711|-> local d # 712| local names # 713| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:712:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 710| local dev="$1" # 711| local d # 712|-> local names # 713| # 714| case "$dev" in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:736:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 734| # 735| usable_root() { # 736|-> local _i # 737| # 738| [ -d "$1" ] || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:752:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 750| # 751| inst_hook() { # 752|-> local _hookname _unique _name _job _exe # 753| while [ $# -gt 0 ]; do # 754| case "$1" in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:803:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 801| # which executes <script> as soon as <mountpoint> is mounted. # 802| inst_mount_hook() { # 803|-> local _prio="$2" _jobname="$3" _script="$4" # 804| local _hookname # 805| _hookname="mount-$(str_replace "$1" '/' '\\x2f')" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:804:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 802| inst_mount_hook() { # 803| local _prio="$2" _jobname="$3" _script="$4" # 804|-> local _hookname # 805| _hookname="mount-$(str_replace "$1" '/' '\\x2f')" # 806| [ -d "$hookdir/${_hookname}" ] || mkdir -p "$hookdir/${_hookname}" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:816:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 814| # if <mountpoint> is mounted. # 815| wait_for_mount() { # 816|-> local _name # 817| _name="$(str_replace "$1" '/' '\\x2f')" # 818| printf '. /lib/dracut-lib.sh\nismounted "%s"\n' "$1" \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:828:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 826| killproc() { # 827| debug_off # 828|-> local _exe # 829| _exe="$(command -v "$1")" # 830| local _sig=$2 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:830:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 828| local _exe # 829| _exe="$(command -v "$1")" # 830|-> local _sig=$2 # 831| local _i # 832| [ -x "$_exe" ] || return 1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:831:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 829| _exe="$(command -v "$1")" # 830| local _sig=$2 # 831|-> local _i # 832| [ -x "$_exe" ] || return 1 # 833| for _i in /proc/[0-9]*; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:835:46: warning[SC3013]: In POSIX sh, -ef is undefined. # 833| for _i in /proc/[0-9]*; do # 834| [ "$_i" = "/proc/1" ] && continue # 835|-> if [ -e "$_i"/_exe ] && [ "$_i/_exe" -ef "$_exe" ]; then # 836| kill "$_sig" "${_i##*/}" # 837| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:877:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 875| pidof() { # 876| debug_off # 877|-> local _cmd # 878| local _exe # 879| local _rl Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:878:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 876| debug_off # 877| local _cmd # 878|-> local _exe # 879| local _rl # 880| local _ret=1 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:879:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 877| local _cmd # 878| local _exe # 879|-> local _rl # 880| local _ret=1 # 881| local i Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:880:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 878| local _exe # 879| local _rl # 880|-> local _ret=1 # 881| local i # 882| _cmd="$1" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:881:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 879| local _rl # 880| local _ret=1 # 881|-> local i # 882| _cmd="$1" # 883| if [ -z "$_cmd" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:891:24: warning[SC3013]: In POSIX sh, -ef is undefined. # 889| [ -e "$i" ] || continue # 890| if [ -n "$_exe" ]; then # 891|-> [ "$i" -ef "$_exe" ] || continue # 892| else # 893| _rl=$(readlink -f "$i") Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:906:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 904| # 905| _emergency_shell() { # 906|-> local _name="$1" # 907| if [ -n "$DRACUT_SYSTEMD" ]; then # 908| : > /.console_lock Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:947:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 945| # 946| emergency_shell() { # 947|-> local _ctty # 948| set +e # 949| local _rdshell_name="dracut" action="Boot" hook="emergency" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:949:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 947| local _ctty # 948| set +e # 949|-> local _rdshell_name="dracut" action="Boot" hook="emergency" # 950| local _emergency_action # 951| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:950:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 948| set +e # 949| local _rdshell_name="dracut" action="Boot" hook="emergency" # 950|-> local _emergency_action # 951| # 952| if [ "$1" = "-n" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:996:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 994| # This is a POSIX-compliant equivalent of bash's "export -n" # 995| export_n() { # 996|-> local var # 997| local val # 998| for var in "$@"; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:997:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 995| export_n() { # 996| local var # 997|-> local val # 998| for var in "$@"; do # 999| eval val=\$$var Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1013:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1011| # $4 = ignore values, separated by $1 # 1012| listlist() { # 1013|-> local _sep="$1" # 1014| local _list="${_sep}${2}${_sep}" # 1015| local _sublist="$3" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1014:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1012| listlist() { # 1013| local _sep="$1" # 1014|-> local _list="${_sep}${2}${_sep}" # 1015| local _sublist="$3" # 1016| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1015:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1013| local _sep="$1" # 1014| local _list="${_sep}${2}${_sep}" # 1015|-> local _sublist="$3" # 1016| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1017| local IFS="$_sep" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1016:20: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1014| local _list="${_sep}${2}${_sep}" # 1015| local _sublist="$3" # 1016|-> [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1017| local IFS="$_sep" # 1018| local _v Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1017:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1015| local _sublist="$3" # 1016| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1017|-> local IFS="$_sep" # 1018| local _v # 1019| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1018:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1016| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1017| local IFS="$_sep" # 1018|-> local _v # 1019| # 1020| [ "$_list" = "$_sublist" ] && return 0 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1053:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1051| # parameters: func log_level prefix msg [trace_level:trace]... # 1052| make_trace_mem() { # 1053|-> local log_level prefix msg msg_printed # 1054| local trace trace_level trace_in_higher_levels insert_trace # 1055| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1054:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1052| make_trace_mem() { # 1053| local log_level prefix msg msg_printed # 1054|-> local trace trace_level trace_in_higher_levels insert_trace # 1055| # 1056| msg=$1 Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:12:29: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 10| # 11| NEWROOT="/sysroot" # 12|-> [ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT # 13| # 14| OLDPATH=$PATH Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:54:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 52| # 53| if ! ismounted /dev/pts; then # 54|-> mkdir -m 0755 -p /dev/pts # 55| mount -t devpts -o gid=5,mode=620,noexec,nosuid devpts /dev/pts > /dev/null # 56| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:59:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 57| # 58| if ! ismounted /dev/shm; then # 59|-> mkdir -m 0755 -p /dev/shm # 60| mount -t tmpfs -o mode=1777,noexec,nosuid,nodev,strictatime tmpfs /dev/shm > /dev/null # 61| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:64:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 62| # 63| if ! ismounted /run; then # 64|-> mkdir -m 0755 -p /newrun # 65| if ! str_starts "$(readlink -f /bin/sh)" "/run/"; then # 66| mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun > /dev/null Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:82:27: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 80| case $type in # 81| d) # 82|-> mkdir -m "$mode" -p "$file" # 83| ;; # 84| c) Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:94:30: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 92| # 93| export UDEVRULESD=/run/udev/rules.d # 94|-> [ -d /run/udev ] || mkdir -p -m 0755 /run/udev # 95| [ -d "$UDEVRULESD" ] || mkdir -p -m 0755 "$UDEVRULESD" # 96| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:95:34: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 93| export UDEVRULESD=/run/udev/rules.d # 94| [ -d /run/udev ] || mkdir -p -m 0755 /run/udev # 95|-> [ -d "$UDEVRULESD" ] || mkdir -p -m 0755 "$UDEVRULESD" # 96| # 97| if [ "$RD_DEBUG" = "yes" ]; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99base/init.sh:112:19: warning[SC3045]: In POSIX sh, read -p is undefined. # 110| if getarg "rd.cmdline=ask"; then # 111| echo "Enter additional kernel command line parameter (end with ctrl-d or .)" # 112|-> while read -r -p "> " ${BASH:+-e} line || [ -n "$line" ]; do # 113| [ "$line" = "." ] && break # 114| echo "$line" >> /etc/cmdline.d/99-cmdline-ask.conf Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/init.sh:144:21: warning[SC2154]: systemdutildir is referenced but not assigned. # 142| # 143| # start up udev and trigger cold plugs # 144|-> UDEV_LOG=$UDEV_LOG "$systemdutildir"/systemd-udevd --daemon --resolve-names=never # 145| # 146| UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/init.sh:148:23: warning[SC2154]: hookdir is referenced but not assigned. # 146| UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" # 147| # 148|-> udevproperty "hookdir=$hookdir" # 149| # 150| make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/init.sh:355:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 353| if ! [ -d "$NEWROOT"/run ]; then # 354| NEWRUN=/dev/.initramfs # 355|-> mkdir -m 0755 -p "$NEWRUN" # 356| mount --rbind /run/initramfs "$NEWRUN" # 357| fi Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/initqueue.sh:70:28: warning[SC2154]: hookdir is referenced but not assigned. # 68| } > "/tmp/$$-${job}.sh" # 69| # 70|-> mv -f "/tmp/$$-${job}.sh" "$hookdir/initqueue${qname}/${job}.sh" # 71| [ -z "$qname" ] && : >> "$hookdir"/initqueue/work # 72| exit 0 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:22:18: warning[SC2154]: dracutbasedir is referenced but not assigned. # 20| inst_multiple -o findmnt less kmod # 21| # 22|-> inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 23| # 24| ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:24:24: warning[SC2154]: initdir is referenced but not assigned. # 22| inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 23| # 24|-> ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" # 25| ln -s dracut-util "${initdir}/usr/bin/dracut-getargs" # 26| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:36:22: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 34| [[ $hostonly ]] && pwshadow='x' # 35| grep '^root:' "$initdir/etc/passwd" > /dev/null 2>&1 || echo "root:$pwshadow:0:0::/root:/bin/sh" >> "$initdir/etc/passwd" # 36|-> grep '^nobody:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd" # 37| # 38| [[ $hostonly ]] && grep '^root:' "$dracutsysrootdir"/etc/shadow >> "$initdir/etc/shadow" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:41:18: warning[SC2154]: moddir is referenced but not assigned. # 39| # 40| # install our scripts and hooks # 41|-> inst_script "$moddir/init.sh" "/init" # 42| inst_script "$moddir/initqueue.sh" "/sbin/initqueue" # 43| inst_script "$moddir/loginit.sh" "/sbin/loginit" Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/module-setup.sh:46:38: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 44| inst_script "$moddir/rdsosreport.sh" "/sbin/rdsosreport" # 45| # 46|-> [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 47| mkdir -m 0755 -p "${initdir}"/lib/dracut # 48| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/module-setup.sh:47:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 45| # 46| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 47|-> mkdir -m 0755 -p "${initdir}"/lib/dracut # 48| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 49| Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/module-setup.sh:48:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 46| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 47| mkdir -m 0755 -p "${initdir}"/lib/dracut # 48|-> mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 49| # 50| mkdir -p "${initdir}"/tmp Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:68:11: warning[SC2154]: ro_mnt is referenced but not assigned. # 66| # 67| ln -fs /proc/self/mounts "$initdir/etc/mtab" # 68|-> if [[ $ro_mnt == yes ]]; then # 69| echo ro >> "${initdir}/etc/cmdline.d/base.conf" # 70| fi Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99base/module-setup.sh:72:42: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 70| fi # 71| # 72|-> [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p "${initdir}"/usr/lib # 73| # 74| local VERSION="" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:109:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 107| # 108| ## save host_devs which we need bring up # 109|-> if [[ $hostonly_cmdline == "yes" ]]; then # 110| if [[ -n ${host_devs[*]} ]]; then # 111| dracut_need_initqueue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:125:35: warning[SC2154]: root_devs is referenced but not assigned (did you mean 'host_devs'?). # 123| # 124| for _dev in "${host_devs[@]}"; do # 125|-> for _dev2 in "${root_devs[@]}"; do # 126| [[ $_dev == "$_dev2" ]] && continue 2 # 127| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99base/module-setup.sh:132:35: warning[SC2154]: swap_devs is referenced but not assigned. # 130| # for resume and udev rules generated when parsing resume= # 131| # argument take care of the waiting for us # 132|-> for _dev2 in "${swap_devs[@]}"; do # 133| [[ $_dev == "$_dev2" ]] && continue 2 # 134| done Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:100:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 98| # common code for checkers that follow usual subset of options and return codes # 99| fsck_drv_com() { # 100|-> local _drv="$1" # 101| local _ret # 102| local _out Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:101:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 99| fsck_drv_com() { # 100| local _drv="$1" # 101|-> local _ret # 102| local _out # 103| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:102:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 100| local _drv="$1" # 101| local _ret # 102|-> local _out # 103| # 104| if ! strglobin "$_fop" "-[ynap]"; then Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:119:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 117| # code for generic fsck, if the filesystem checked is "unknown" to us # 118| fsck_drv_std() { # 119|-> local _ret # 120| local _out # 121| unset _out Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:120:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 118| fsck_drv_std() { # 119| local _ret # 120|-> local _out # 121| unset _out # 122| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:142:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 140| # necessary tools or insufficient options) # 141| fsck_single() { # 142|-> local FSTAB_FILE=/etc/fstab.empty # 143| local _dev="$1" # 144| local _fs="${2:-auto}" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:143:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 141| fsck_single() { # 142| local FSTAB_FILE=/etc/fstab.empty # 143|-> local _dev="$1" # 144| local _fs="${2:-auto}" # 145| local _fop="$4" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:144:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 142| local FSTAB_FILE=/etc/fstab.empty # 143| local _dev="$1" # 144|-> local _fs="${2:-auto}" # 145| local _fop="$4" # 146| local _drv Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:145:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 143| local _dev="$1" # 144| local _fs="${2:-auto}" # 145|-> local _fop="$4" # 146| local _drv # 147| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:146:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 144| local _fs="${2:-auto}" # 145| local _fop="$4" # 146|-> local _drv # 147| # 148| [ $# -lt 2 ] && return 255 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:163:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 161| # checking based on fstab, so empty one is passed # 162| fsck_batch() { # 163|-> local FSTAB_FILE=/etc/fstab.empty # 164| local _drv=fsck # 165| local _dev Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:164:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 162| fsck_batch() { # 163| local FSTAB_FILE=/etc/fstab.empty # 164|-> local _drv=fsck # 165| local _dev # 166| local _ret Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:165:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 163| local FSTAB_FILE=/etc/fstab.empty # 164| local _drv=fsck # 165|-> local _dev # 166| local _ret # 167| local _out Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:166:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 164| local _drv=fsck # 165| local _dev # 166|-> local _ret # 167| local _out # 168| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:167:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 165| local _dev # 166| local _ret # 167|-> local _out # 168| # 169| [ $# -eq 0 ] || ! type fsck > /dev/null 2>&1 && return 255 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:189:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 187| # if we found the fs, assume we're right # 188| det_fs() { # 189|-> local _dev="$1" # 190| local _orig="${2:-auto}" # 191| local _fs Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:190:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 188| det_fs() { # 189| local _dev="$1" # 190|-> local _orig="${2:-auto}" # 191| local _fs # 192| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:191:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 189| local _dev="$1" # 190| local _orig="${2:-auto}" # 191|-> local _fs # 192| # 193| _fs=$(udevadm info --query=property --name="$_dev" \ Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:209:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 207| # 208| write_fs_tab() { # 209|-> local _o # 210| local _rw # 211| local _root Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:210:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 208| write_fs_tab() { # 209| local _o # 210|-> local _rw # 211| local _root # 212| local _rootfstype Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:211:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 209| local _o # 210| local _rw # 211|-> local _root # 212| local _rootfstype # 213| local _rootflags Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:212:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 210| local _rw # 211| local _root # 212|-> local _rootfstype # 213| local _rootflags # 214| local _fspassno Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:213:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 211| local _root # 212| local _rootfstype # 213|-> local _rootflags # 214| local _fspassno # 215| Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:214:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 212| local _rootfstype # 213| local _rootflags # 214|-> local _fspassno # 215| # 216| _fspassno="0" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99fs-lib/module-setup.sh:64:11: warning[SC2154]: moddir is referenced but not assigned. # 62| local _helpers # 63| # 64|-> inst "$moddir/fs-lib.sh" "/lib/fs-lib.sh" # 65| : > "${initdir}"/etc/fstab.empty # 66| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99fs-lib/module-setup.sh:65:10: warning[SC2154]: initdir is referenced but not assigned. # 63| # 64| inst "$moddir/fs-lib.sh" "/lib/fs-lib.sh" # 65|-> : > "${initdir}"/etc/fstab.empty # 66| # 67| [[ $nofscks == "yes" ]] && return Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99fs-lib/module-setup.sh:67:8: warning[SC2154]: nofscks is referenced but not assigned. # 65| : > "${initdir}"/etc/fstab.empty # 66| # 67|-> [[ $nofscks == "yes" ]] && return # 68| # 69| if [[ $fscks == "${fscks#*[^ ]*}" ]]; then Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99fs-lib/module-setup.sh:69:11: warning[SC2154]: fscks is referenced but not assigned. # 67| [[ $nofscks == "yes" ]] && return # 68| # 69|-> if [[ $fscks == "${fscks#*[^ ]*}" ]]; then # 70| _helpers=( # 71| /sbin/fsck* /usr/sbin/fsck* Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99fs-lib/module-setup.sh:84:50: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 82| _helpers+=(umount mount) # 83| # 84|-> if [[ ${_helpers[*]} == *e2fsck* ]] && [[ -e $dracutsysrootdir/etc/e2fsck.conf ]]; then # 85| inst_simple /etc/e2fsck.conf # 86| fi Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:10:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 8| det_archive() { # 9| # NOTE: internal echo -e works in ash and bash, but not dash # 10|-> local bz xz gz zs # 11| local headerblock # 12| bz="BZh" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:11:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 9| # NOTE: internal echo -e works in ash and bash, but not dash # 10| local bz xz gz zs # 11|-> local headerblock # 12| bz="BZh" # 13| # shellcheck disable=SC3037 Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:32:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| # determine filesystem type for a filesystem image # 31| det_fs_img() { # 32|-> local dev # 33| dev=$(losetup --find --show "$1") rv="" # 34| det_fs "$dev" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:43:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 41| # unpack a (possibly compressed) cpio/tar archive # 42| unpack_archive() { # 43|-> local img="$1" outdir="$2" archiver="" decompr="" # 44| local ft # 45| ft="$(det_archive "$img")" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:44:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 42| unpack_archive() { # 43| local img="$1" outdir="$2" archiver="" decompr="" # 44|-> local ft # 45| ft="$(det_archive "$img")" # 46| case "$ft" in Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:67:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 65| # unpack a filesystem image # 66| unpack_fs() { # 67|-> local img="$1" outdir="$2" # 68| local mnt # 69| mnt="$(mkuniqdir /tmp unpack_fs.)" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:68:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 66| unpack_fs() { # 67| local img="$1" outdir="$2" # 68|-> local mnt # 69| mnt="$(mkuniqdir /tmp unpack_fs.)" # 70| mount -o loop "$img" "$mnt" || { Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:87:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 85| # unpack_img IMAGEFILE OUTDIR # 86| unpack_img() { # 87|-> local img="$1" outdir="$2" # 88| [ -r "$img" ] || { # 89| warn "can't read img!" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99img-lib/module-setup.sh:20:18: warning[SC2154]: moddir is referenced but not assigned. # 18| # TODO: make this conditional on a cmdline flag / config option # 19| inst_multiple -o cpio xz bzip2 zstd # 20|-> inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh" # 21| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:22:11: warning[SC2154]: moddir is referenced but not assigned. # 20| inst "/bin/memstrack" "/bin/memstrack" # 21| # 22|-> inst "$moddir/memstrack-start.sh" "/bin/memstrack-start" # 23| inst_hook cleanup 99 "$moddir/memstrack-report.sh" # 24| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:25:39: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 23| inst_hook cleanup 99 "$moddir/memstrack-report.sh" # 24| # 25|-> inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service" # 26| # 27| $SYSTEMCTL -q --root "$initdir" add-wants initrd.target memstrack.service Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:27:27: warning[SC2154]: initdir is referenced but not assigned. # 25| inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service" # 26| # 27|-> $SYSTEMCTL -q --root "$initdir" add-wants initrd.target memstrack.service # 28| } Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:19:11: warning[SC2154]: moddir is referenced but not assigned. # 17| inst_multiple umount poweroff reboot halt losetup stat sleep timeout # 18| inst_multiple -o kexec # 19|-> inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:19:33: warning[SC2154]: prefix is referenced but not assigned. # 17| inst_multiple umount poweroff reboot halt losetup stat sleep timeout # 18| inst_multiple -o kexec # 19|-> inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:20:11: warning[SC2154]: initdir is referenced but not assigned. # 18| inst_multiple -o kexec # 19| inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20|-> [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut # 22| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:20:38: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 18| inst_multiple -o kexec # 19| inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20|-> [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut # 22| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:21:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 19| inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21|-> mkdir -m 0755 -p "${initdir}"/lib/dracut # 22| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 23| for _d in $hookdirs shutdown shutdown-emergency; do Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:22:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 20| [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut # 22|-> mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 23| for _d in $hookdirs shutdown shutdown-emergency; do # 24| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d" Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:23:15: warning[SC2154]: hookdirs is referenced but not assigned. # 21| mkdir -m 0755 -p "${initdir}"/lib/dracut # 22| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 23|-> for _d in $hookdirs shutdown shutdown-emergency; do # 24| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d" # 25| done Error: SHELLCHECK_WARNING (CWE-277): /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:24:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 22| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks # 23| for _d in $hookdirs shutdown shutdown-emergency; do # 24|-> mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d" # 25| done # 26| } Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:56:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 54| # 55| umount_a() { # 56|-> local _verbose="n" # 57| if [ "$1" = "-v" ]; then # 58| _verbose="y" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:65:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 63| fi # 64| # 65|-> local _did_umount="n" # 66| while read -r _ mp _ || [ -n "$mp" ]; do # 67| strstr "$mp" oldroot || continue Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:78:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 76| timeout --signal=KILL "$_umount_timeout" umount "$mp" # 77| ) 2>&7 # 78|-> local ret=$? # 79| if [ $ret -eq 0 ]; then # 80| _did_umount="y" Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:131:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 129| # 130| _check_shutdown() { # 131|-> local __f # 132| local __s=0 # 133| for __f in "$hookdir"/shutdown/*.sh; do Error: SHELLCHECK_WARNING: /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:132:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 130| _check_shutdown() { # 131| local __f # 132|-> local __s=0 # 133| for __f in "$hookdir"/shutdown/*.sh; do # 134| [ -e "$__f" ] || continue Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99shutdown/shutdown.sh:133:17: warning[SC2154]: hookdir is referenced but not assigned. # 131| local __f # 132| local __s=0 # 133|-> for __f in "$hookdir"/shutdown/*.sh; do # 134| [ -e "$__f" ] || continue # 135| # shellcheck disable=SC1090 disable=SC2240 Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99squash/module-setup.sh:21:15: warning[SC2154]: initdir is referenced but not assigned. # 19| # Move everything under $initdir except $squash_dir # 20| # itself into squash image # 21|-> for i in "$initdir"/*; do # 22| [[ $squash_dir == "$i"/* ]] || mv "$i" "$squash_dir"/ # 23| done Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99squash/module-setup.sh:22:12: warning[SC2154]: squash_dir is referenced but not assigned. # 20| # itself into squash image # 21| for i in "$initdir"/*; do # 22|-> [[ $squash_dir == "$i"/* ]] || mv "$i" "$squash_dir"/ # 23| done # 24| Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99squash/module-setup.sh:58:18: warning[SC2154]: moddir is referenced but not assigned. # 56| ln_r /usr/bin /bin # 57| ln_r /usr/sbin /sbin # 58|-> inst_simple "$moddir"/init-squash.sh /init # 59| # 60| # make sure that library links are correct and up to date for squash loader Error: SHELLCHECK_WARNING (CWE-457): /usr/lib/dracut/modules.d/99uefi-lib/module-setup.sh:16:18: warning[SC2154]: moddir is referenced but not assigned. # 14| # called by dracut # 15| install() { # 16|-> inst_simple "$moddir/uefi-lib.sh" "/lib/uefi-lib.sh" # 17| } Error: SHELLCHECK_WARNING (CWE-156): /usr/lib/kernel/install.d/50-dracut.install:70:13: warning[SC2046]: Quote this to prevent word splitting. # 68| dracut -f \ # 69| ${noimageifnotneeded:+--noimageifnotneeded} \ # 70|-> $([[ "$KERNEL_INSTALL_VERBOSE" == 1 ]] && echo --verbose) \ # 71| "$BOOT_DIR_ABS/$INITRD" \ # 72| "$KERNEL_VERSION" Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:182:18: warning[unix.Malloc]: Potential leak of memory pointed to by 'from_dir_p' # 180| /* dir_len() skips double /'s e.g. //lib64, so we can't skip just one # 181| * character - need to skip all leading /'s */ # 182|-> for (i = dirlen + 1; from[i] == '/'; ++i) # 183| ; # 184| _asprintf(&realfrom, "%s/%s", buf, from + i); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:195:18: warning[unix.Malloc]: Potential leak of memory pointed to by 'target_dir_p' # 193| } # 194| # 195|-> for (i = dirlen + 1; target[i] == '/'; ++i) # 196| ; # 197| _asprintf(&realtarget, "%s/%s", buf, target + i); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:323:17: warning[deadcode.DeadStores]: Value stored to 'dest_desc' is never read # 321| } # 322| close(dest_desc); # 323|-> dest_desc = -1; # 324| /* clone did not work, remove the file */ # 325| unlink(dst); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:392:24: warning[unix.Malloc]: Potential leak of memory pointed to by 'p' # 390| pdir = dirname_malloc(p); # 391| if (!pdir) # 392|-> return ret; # 393| # 394| ppdir = dirname_malloc(pdir); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:507:33: warning[unix.Malloc]: Potential leak of memory pointed to by 'buf' # 505| fd = open(fullsrcpath, O_RDONLY | O_CLOEXEC); # 506| if (fd < 0) # 507|-> return -errno; # 508| # 509| ret = read(fd, buf, linesize - 1); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:638:25: warning[unix.Malloc]: Potential leak of memory pointed to by 'dstpath' # 636| # 637| if (!(srcpath && dstpath)) # 638|-> return -ENOMEM; # 639| # 640| size_t dlen = dir_len(src); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:638:25: warning[unix.Malloc]: Potential leak of memory pointed to by 'srcpath' # 636| # 637| if (!(srcpath && dstpath)) # 638|-> return -ENOMEM; # 639| # 640| size_t dlen = dir_len(src); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:740:16: warning[unix.Malloc]: Potential leak of memory pointed to by 'parent' # 738| } # 739| # 740|-> return 0; # 741| } # 742| Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:740:16: warning[unix.Malloc]: Potential leak of memory pointed to by 'path' # 738| } # 739| # 740|-> return 0; # 741| } # 742| Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:779:17: warning[unix.Malloc]: Potential leak of memory pointed to by 'fullsrcpath' # 777| # 778| if (check_hashmap(items_failed, src)) { # 779|-> log_debug("hash hit items_failed for '%s'", src); # 780| return 1; # 781| } Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:844:29: warning[unix.Malloc]: Potential leak of memory pointed to by 'dname' # 842| if (!dname) # 843| return 1; # 844|-> ret = dracut_install(dname, dname, true, false, true); # 845| # 846| if (ret != 0) { Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:852:21: warning[unix.Malloc]: Potential leak of memory pointed to by 'fulldstdir' # 850| } # 851| # 852|-> if (src_isdir) { # 853| if (dst_exists) { # 854| if (S_ISDIR(sb.st_mode)) { Error: GCC_ANALYZER_WARNING (CWE-688): dracut-059/src/install/dracut-install.c: scope_hint: In function ‘parse_argv’ dracut-059/src/install/dracut-install.c:1089:41: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘sysrootdir’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null # 1087| case 'r': # 1088| sysrootdir = strdup(optarg); # 1089|-> sysrootdirlen = strlen(sysrootdir); # 1090| break; # 1091| case 'p': Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:1340:37: warning[unix.Malloc]: Potential leak of memory pointed to by 'dest' # 1338| if (strchr(argv[i], '*') == NULL) { # 1339| _cleanup_free_ char *dest = strdup(argv[i]); # 1340|-> ret = dracut_install(argv[i], dest, arg_createdir, arg_resolvedeps, true); # 1341| } else { # 1342| _cleanup_free_ char *realsrc = NULL; Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:1416:17: warning[deadcode.DeadStores]: Value stored to 'ret' is never read # 1414| value = kmod_module_info_get_value(l); # 1415| log_debug("Firmware %s", value); # 1416|-> ret = -1; # 1417| STRV_FOREACH(q, firmwaredirs) { # 1418| _cleanup_free_ char *fwpath = NULL; Error: GCC_ANALYZER_WARNING (CWE-775): dracut-059/src/install/dracut-install.c: scope_hint: In function ‘modalias_list’ dracut-059/src/install/dracut-install.c:1648:27: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*ftsent.fts_accpath, "r")’ # 1646| if (strncmp("modalias", ftsent->fts_name, 8) != 0) # 1647| continue; # 1648|-> if (!(f = fopen(ftsent->fts_accpath, "r"))) # 1649| continue; # 1650| Error: GCC_ANALYZER_WARNING (CWE-401): dracut-059/src/install/dracut-install.c:1648:27: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*ftsent.fts_accpath, "r")’ # 1646| if (strncmp("modalias", ftsent->fts_name, 8) != 0) # 1647| continue; # 1648|-> if (!(f = fopen(ftsent->fts_accpath, "r"))) # 1649| continue; # 1650| Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:1799:49: warning[unix.Malloc]: Potential leak of memory pointed to by 'modname' # 1797| if (!arg_silent) # 1798| log_error("3 Failed to lookup alias '%s': %d", modname, r); # 1799|-> return -ENOENT; # 1800| } # 1801| log_info("3 Failed to lookup alias '%s': %d", modname, r); Error: GCC_ANALYZER_WARNING (CWE-688): dracut-059/src/install/dracut-install.c: scope_hint: In function ‘main’ dracut-059/src/install/dracut-install.c:2033:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘destrootdir’ where non-null expected dracut-059/src/install/dracut-install.c:47: included_from: Included from here. dracut-059/src/install/dracut-install.c:1996:9: note: in expansion of macro ‘log_debug’ dracut-059/src/install/dracut-install.c:36: included_from: Included from here. /usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null # 2031| } # 2032| # 2033|-> if (strcmp(destrootdir, "/") == 0) { # 2034| log_error("Environment DESTROOTDIR or argument -D is set to '/'!"); # 2035| usage(EXIT_FAILURE); Error: CLANG_WARNING: dracut-059/src/install/dracut-install.c:2067:9: warning[deadcode.DeadStores]: Value stored to 'r' is never read # 2065| } # 2066| # 2067|-> r = EXIT_SUCCESS; # 2068| # 2069| if (((optind + 1) < argc) && (strcmp(argv[optind + 1], destrootdir) == 0)) { Error: GCC_ANALYZER_WARNING (CWE-401): dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c:416:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ dracut-059/src/install/strv.c:26: included_from: Included from here. dracut-059/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-059/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-059/src/install/strv.c: scope_hint: In function ‘strv_push’ # 414| n = strv_length(*l); # 415| c = realloc(*l, sizeof(char *) * (n + 2)); # 416|-> if (!c) # 417| return -ENOMEM; # 418| Error: GCC_ANALYZER_WARNING (CWE-1341): dracut-059/src/install/util.c: scope_hint: In function ‘close_nointr’ dracut-059/src/install/util.c:75:21: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’ dracut-059/src/install/util.h:40: included_from: Included from here. dracut-059/src/install/util.c:30: included_from: Included from here. dracut-059/src/install/macro.h:136:22: note: in expansion of macro ‘assert_se’ dracut-059/src/install/util.c:70:9: note: in expansion of macro ‘assert’ dracut-059/src/install/util.c:24: included_from: Included from here. # 73| int r; # 74| # 75|-> r = close(fd); # 76| if (r >= 0) # 77| return r; Error: COMPILER_WARNING (CWE-457): dracut-059/src/install/util.h:535:9: warning[-Wmaybe-uninitialized]: ‘dst’ may be used uninitialized # 535 | free(*(void **)p); # | ^~~~~~~~~~~~~~~~~ dracut-059/src/install/dracut-install.c: scope_hint: In function ‘dracut_install’ dracut-059/src/install/dracut-install.c:756:30: note: ‘dst’ was declared here # 756 | _cleanup_free_ char *dst; # | ^~~ # 533| static inline void freep(void *p) # 534| { # 535|-> free(*(void **)p); # 536| } # 537| Error: GCC_ANALYZER_WARNING (CWE-476): dracut-059/src/util/util.c: scope_hint: In function ‘next_arg’ dracut-059/src/util/util.c:70:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘args’ # 68| char *next; # 69| # 70|-> if (*args == '"') { # 71| args++; # 72| in_quote = 1; Error: CLANG_WARNING: dracut-059/src/util/util.c:211:29: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmdline' # 209| cmdline = next_arg(cmdline, &key, &value); # 210| if (strcmp(key, search_key) == 0) { # 211|-> if (value) { # 212| end_value = value; # 213| bool_value = -1; Error: CLANG_WARNING: dracut-059/src/util/util.c:211:29: warning[unix.Malloc]: Potential leak of memory pointed to by 'key' # 209| cmdline = next_arg(cmdline, &key, &value); # 210| if (strcmp(key, search_key) == 0) { # 211|-> if (value) { # 212| end_value = value; # 213| bool_value = -1; Error: GCC_ANALYZER_WARNING (CWE-401): dracut-059/src/util/util.c: scope_hint: In function ‘getarg’ dracut-059/src/util/util.c:234:12: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdline’ dracut-059/src/util/util.c:54:16: note: in expansion of macro ‘kernel_isspace’ dracut-059/src/util/util.c: scope_hint: In function ‘getarg’ # 232| } # 233| # 234|-> if (bool_value) { # 235| return EXIT_SUCCESS; # 236| } Error: CLANG_WARNING: dracut-059/src/util/util.c:276:37: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 274| if (strcmp(key, search_key) == 0) { # 275| if (search_value) { # 276|-> if (strcmp(value, search_value) == 0) { # 277| printf("%s\n", value); # 278| found_value = true; Error: CLANG_WARNING: dracut-059/src/util/util.c:289:18: warning[unix.Malloc]: Potential leak of memory pointed to by 'key' # 287| } # 288| } # 289|-> } while (cmdline[0]); # 290| return found_value ? EXIT_SUCCESS : EXIT_FAILURE; # 291| } Error: CLANG_WARNING: dracut-059/src/util/util.c:290:16: warning[unix.Malloc]: Potential leak of memory pointed to by 'cmdline' # 288| } # 289| } while (cmdline[0]); # 290|-> return found_value ? EXIT_SUCCESS : EXIT_FAILURE; # 291| } # 292|