Error: SHELLCHECK_WARNING (CWE-457): [#def1] /usr/bin/dracut:1265:42: warning[SC2154]: acpi_override is referenced but not assigned. # 1263| mkdir -p "$initdir" # 1264| # 1265|-> if [[ $early_microcode == yes ]] || { [[ $acpi_override == yes ]] && [[ -d $acpi_table_dir ]]; }; then # 1266| readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" # 1267| mkdir "$early_cpio_dir" Error: SHELLCHECK_WARNING (CWE-457): [#def2] /usr/bin/dracut:1265:76: warning[SC2154]: acpi_table_dir is referenced but not assigned. # 1263| mkdir -p "$initdir" # 1264| # 1265|-> if [[ $early_microcode == yes ]] || { [[ $acpi_override == yes ]] && [[ -d $acpi_table_dir ]]; }; then # 1266| readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" # 1267| mkdir "$early_cpio_dir" Error: SHELLCHECK_WARNING (CWE-457): [#def3] /usr/bin/dracut:1321:39: warning[SC2154]: srcmods is referenced but not assigned. # 1319| fi # 1320| # 1321|-> if [[ $no_kernel != yes ]] && ! [[ -d $srcmods ]]; then # 1322| dfatal "Cannot find module directory $srcmods" # 1323| dfatal "and --no-kernel was not specified" Error: SHELLCHECK_WARNING (CWE-457): [#def4] /usr/bin/dracut:1412:41: warning[SC2154]: dbus is referenced but not assigned. # 1410| set_global_var "dbus" "dbus" "/usr/share/dbus-1" # 1411| set_global_var "dbus" "dbusconfdir" "/etc/dbus-1" # 1412|-> set_global_var "dbus" "dbusinterfaces" "${dbus}/interfaces" # 1413| set_global_var "dbus" "dbusinterfacesconfdir" "${dbusconfdir}/interfaces" # 1414| set_global_var "dbus" "dbusservices" "${dbus}/services" Error: SHELLCHECK_WARNING (CWE-457): [#def5] /usr/bin/dracut:1413:48: warning[SC2154]: dbusconfdir is referenced but not assigned. # 1411| set_global_var "dbus" "dbusconfdir" "/etc/dbus-1" # 1412| set_global_var "dbus" "dbusinterfaces" "${dbus}/interfaces" # 1413|-> set_global_var "dbus" "dbusinterfacesconfdir" "${dbusconfdir}/interfaces" # 1414| set_global_var "dbus" "dbusservices" "${dbus}/services" # 1415| set_global_var "dbus" "dbusservicesconfdir" "${dbusconfdir}/services" Error: SHELLCHECK_WARNING (CWE-457): [#def6] /usr/bin/dracut:1426:39: warning[SC2154]: udevdir is referenced but not assigned. # 1424| set_global_var "udev" "udevdir" "/lib/udev:/lib/udev/ata_id" "/usr/lib/udev:/usr/lib/udev/ata_id" # 1425| set_global_var "udev" "udevconfdir" "/etc/udev" # 1426|-> set_global_var "udev" "udevrulesdir" "${udevdir}/rules.d" # 1427| set_global_var "udev" "udevrulesconfdir" "${udevconfdir}/rules.d" # 1428| Error: SHELLCHECK_WARNING (CWE-457): [#def7] /usr/bin/dracut:1427:43: warning[SC2154]: udevconfdir is referenced but not assigned. # 1425| set_global_var "udev" "udevconfdir" "/etc/udev" # 1426| set_global_var "udev" "udevrulesdir" "${udevdir}/rules.d" # 1427|-> set_global_var "udev" "udevrulesconfdir" "${udevconfdir}/rules.d" # 1428| # 1429| # systemd global variables Error: SHELLCHECK_WARNING (CWE-457): [#def8] /usr/bin/dracut:1441:51: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 1439| set_global_var "systemd" "systemdcatalog" "${systemdutildir}/catalog" # 1440| set_global_var "systemd" "systemdnetwork" "${systemdutildir}/network" # 1441|-> set_global_var "systemd" "systemdnetworkconfdir" "${systemdutilconfdir}/network" # 1442| set_global_var "systemd" "systemdntpunits" "${systemdutildir}/ntp-units.d" # 1443| set_global_var "systemd" "systemdntpunitsconfdir" "${systemdutilconfdir}/ntp-units.d" Error: SHELLCHECK_WARNING (CWE-457): [#def9] /usr/bin/dracut:1524:41: warning[SC2154]: systemdprefix is referenced but not assigned. # 1522| # 1523| if ! [[ -s $uefi_stub ]]; then # 1524|-> uefi_stub="$dracutsysrootdir${systemdprefix}/lib/systemd/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" # 1525| fi # 1526| Error: SHELLCHECK_WARNING (CWE-277): [#def10] /usr/bin/dracut:1877:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 1875| if [[ $kernel_only != yes ]]; then # 1876| mkdir -p "${initdir}/etc/cmdline.d" # 1877|-> mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # 1878| # 1879| # symlink to old hooks location for compatibility Error: SHELLCHECK_WARNING (CWE-457): [#def11] /usr/bin/dracut:1882:15: warning[SC2154]: hookdirs is referenced but not assigned. # 1880| ln_r /var/lib/dracut/hooks /lib/dracut/hooks # 1881| # 1882|-> for _d in $hookdirs; do # 1883| # shellcheck disable=SC2174 # 1884| mkdir -m 0755 -p "${initdir}/lib/dracut/hooks/$_d" Error: SHELLCHECK_WARNING (CWE-457): [#def12] /usr/bin/dracut:2026:55: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 2024| { # 2025| printf "%s\n" "systemdutildir=\"$systemdutildir\"" # 2026|-> printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\"" # 2027| printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\"" # 2028| printf "%s\n" "systemdnetworkconfdir=\"$systemdnetworkconfdir\"" Error: SHELLCHECK_WARNING (CWE-457): [#def13] /usr/bin/dracut:2027:55: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 2025| printf "%s\n" "systemdutildir=\"$systemdutildir\"" # 2026| printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\"" # 2027|-> printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\"" # 2028| printf "%s\n" "systemdnetworkconfdir=\"$systemdnetworkconfdir\"" # 2029| } > "${initdir}"/etc/conf.d/systemd.conf Error: SHELLCHECK_WARNING (CWE-457): [#def14] /usr/bin/dracut:2028:56: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned. # 2026| printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\"" # 2027| printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\"" # 2028|-> printf "%s\n" "systemdnetworkconfdir=\"$systemdnetworkconfdir\"" # 2029| } > "${initdir}"/etc/conf.d/systemd.conf # 2030| fi Error: SHELLCHECK_WARNING (CWE-457): [#def15] /usr/bin/dracut:2458:6: warning[SC2154]: maxloglvl is referenced but not assigned. # 2456| fi # 2457| # 2458|-> if ((maxloglvl >= 5)) && ((verbosity_mod_l >= 0)); then # 2459| if [[ $allowlocal ]]; then # 2460| "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img" | ddebug Error: SHELLCHECK_WARNING (CWE-457): [#def16] /usr/lib/dracut/dracut-functions.sh:57:18: warning[SC2154]: libdirs is referenced but not assigned. # 55| # 56| if [[ $1 == *.so* ]]; then # 57|-> for l in $libdirs; do # 58| _path="${l}${_delim}${1}" # 59| if { $DRACUT_LDD "${dracutsysrootdir}${_path}" &> /dev/null; }; then Error: SHELLCHECK_WARNING (CWE-457): [#def17] /usr/lib/dracut/dracut-functions.sh:368:11: warning[SC2154]: use_fstab is referenced but not assigned. # 366| _find_mpt="$1" # 367| # 368|-> if [[ $use_fstab != yes ]]; then # 369| [[ -d $_find_mpt/. ]] # 370| findmnt -e -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { Error: SHELLCHECK_WARNING (CWE-457): [#def18] /usr/lib/dracut/dracut-functions.sh:735:41: warning[SC2154]: kernel is referenced but not assigned. # 733| local _config_opt="$1" # 734| local _config_file # 735|-> [[ -f $dracutsysrootdir/boot/config-$kernel ]] \ # 736| && _config_file="/boot/config-$kernel" # 737| [[ -f $dracutsysrootdir/lib/modules/$kernel/config ]] \ Error: SHELLCHECK_WARNING (CWE-457): [#def19] /usr/lib/dracut/dracut-init.sh:61:10: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 59| fi # 60| # 61|-> srcmods="$dracutsysrootdir/lib/modules/$kernel/" # 62| # 63| [[ $drivers_dir ]] && { Error: SHELLCHECK_WARNING (CWE-457): [#def20] /usr/lib/dracut/dracut-init.sh:108:25: warning[SC2154]: moddir is referenced but not assigned (did you mean '_moddir'?). # 106| # issues a standardized warning message # 107| require_binaries() { # 108|-> local _module_name="${moddir##*/}" # 109| local _ret=0 # 110| Error: SHELLCHECK_WARNING (CWE-457): [#def21] /usr/lib/dracut/dracut-init.sh:157:8: warning[SC2154]: no_kernel is referenced but not assigned. # 155| # 156| # Ignore kernel module requirement for no-kernel build # 157|-> [[ $no_kernel == yes ]] && return 0 # 158| # 159| if [[ $1 == "-m" ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def22] /usr/lib/dracut/dracut-init.sh:178:24: warning[SC2154]: modules_loaded is referenced but not assigned. # 176| # 177| dracut_module_included() { # 178|-> [[ " $mods_to_load $modules_loaded " == *\ $*\ * ]] # 179| } # 180| Error: SHELLCHECK_WARNING (CWE-457): [#def23] /usr/lib/dracut/dracut-init.sh:390:11: warning[SC2154]: hostonly_mode is referenced but not assigned. # 388| # given modules. # 389| optional_hostonly() { # 390|-> if [[ $hostonly_mode == "strict" ]]; then # 391| printf -- "%s" "$hostonly" # 392| else Error: SHELLCHECK_WARNING (CWE-457): [#def24] /usr/lib/dracut/dracut-init.sh:441:18: warning[SC2154]: udevdir is referenced but not assigned. # 439| for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do # 440| _bin="" # 441|-> if [[ -x ${udevdir}/$_prog ]]; then # 442| _bin="${udevdir}"/$_prog # 443| elif [[ ${_prog/\$env\{/} == "$_prog" ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def25] /usr/lib/dracut/dracut-init.sh:714:23: warning[SC2154]: sysusers is referenced but not assigned. # 712| # install sysusers files # 713| inst_sysusers() { # 714|-> inst_multiple -o "$sysusers/$*" # 715| # 716| if [[ $hostonly ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def26] /usr/lib/dracut/dracut-init.sh:717:30: warning[SC2154]: sysusersconfdir is referenced but not assigned. # 715| # 716| if [[ $hostonly ]]; then # 717|-> inst_multiple -H -o "$sysusersconfdir/$*" # 718| fi # 719| } Error: SHELLCHECK_WARNING (CWE-457): [#def27] /usr/lib/dracut/dracut-init.sh:890:8: warning[SC2154]: host_fs_types is referenced but not assigned. # 888| # 889| [[ -z $_moddir ]] && _moddir=$(dracut_module_path "$1") # 890|-> [ "${#host_fs_types[@]}" -le 0 ] && return 1 # 891| # 892| # If we are already scheduled to be loaded, no need to check again. Error: SHELLCHECK_WARNING (CWE-457): [#def28] /usr/lib/dracut/dracut-init.sh:901:13: warning[SC2154]: omit_dracutmodules is referenced but not assigned. # 899| [[ $2 ]] || mods_checked_as_dep+=" $_mod " # 900| # 901|-> if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then # 902| return 1 # 903| fi Error: SHELLCHECK_WARNING (CWE-758): [#def29] /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=103-1.fc42 Error: SHELLCHECK_WARNING (CWE-563): [#def30] /usr/lib/dracut/dracut-version.sh:1:1: warning[SC2034]: DRACUT_VERSION appears unused. Verify use (or export if used externally). # 1|-> DRACUT_VERSION=103-1.fc42 Error: SHELLCHECK_WARNING (CWE-457): [#def31] /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): [#def32] /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): [#def33] /usr/lib/dracut/modules.d/00systemd/module-setup.sh:26:11: warning[SC2154]: prefix is referenced but not assigned. # 24| # called by dracut # 25| install() { # 26|-> if [[ $prefix == /run/* ]]; then # 27| dfatal 'systemd does not work with a prefix, which contains "/run"!!' # 28| exit 1 Error: SHELLCHECK_WARNING (CWE-457): [#def34] /usr/lib/dracut/modules.d/00systemd/module-setup.sh:45:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 43| "$systemdutildir"/system-generators/systemd-fstab-generator \ # 44| "$systemdutildir"/system-generators/systemd-gpt-auto-generator \ # 45|-> "$systemdsystemunitdir"/debug-shell.service \ # 46| "$systemdsystemunitdir"/cryptsetup.target \ # 47| "$systemdsystemunitdir"/cryptsetup-pre.target \ Error: SHELLCHECK_WARNING (CWE-457): [#def35] /usr/lib/dracut/modules.d/00systemd/module-setup.sh:108:17: warning[SC2154]: initdir is referenced but not assigned. # 106| fi # 107| # 108|-> if ! [[ -e "$initdir/etc/machine-id" ]]; then # 109| : > "$initdir/etc/machine-id" # 110| chmod 444 "$initdir/etc/machine-id" Error: SHELLCHECK_WARNING (CWE-457): [#def36] /usr/lib/dracut/modules.d/00systemd/module-setup.sh:115:23: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 113| inst_multiple nologin # 114| { # 115|-> grep '^adm:' "$dracutsysrootdir"/etc/passwd 2> /dev/null # 116| # we don't use systemd-networkd, but the user is in systemd.conf tmpfiles snippet # 117| grep '^systemd-network:' "$dracutsysrootdir"/etc/passwd 2> /dev/null Error: SHELLCHECK_WARNING (CWE-457): [#def37] /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 (CWE-457): [#def38] /usr/lib/dracut/modules.d/01fips-crypto-policies/module-setup.sh:6:11: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 4| check() { # 5| # only enable on systems that use crypto-policies # 6|-> [ -d "$dracutsysrootdir/etc/crypto-policies" ] && return 0 # 7| # 8| # include when something else depends on it or it is explicitly requested Error: SHELLCHECK_WARNING (CWE-457): [#def39] /usr/lib/dracut/modules.d/01fips-crypto-policies/module-setup.sh:25:29: warning[SC2154]: moddir is referenced but not assigned. # 23| # called by dracut # 24| install() { # 25|-> inst_hook pre-pivot 01 "$moddir/fips-crypto-policies.sh" # 26| # 27| inst_multiple mount Error: SHELLCHECK_WARNING: [#def40] /usr/lib/dracut/modules.d/01fips/fips.sh:92:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 90| # 91| fips_load_crypto() { # 92|-> local _k # 93| local _v # 94| local _module Error: SHELLCHECK_WARNING: [#def41] /usr/lib/dracut/modules.d/01fips/fips.sh:93:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 91| fips_load_crypto() { # 92| local _k # 93|-> local _v # 94| local _module # 95| local _found Error: SHELLCHECK_WARNING: [#def42] /usr/lib/dracut/modules.d/01fips/fips.sh:94:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 92| local _k # 93| local _v # 94|-> local _module # 95| local _found # 96| Error: SHELLCHECK_WARNING: [#def43] /usr/lib/dracut/modules.d/01fips/fips.sh:95:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 93| local _v # 94| local _module # 95|-> local _found # 96| # 97| fips_info "Loading and integrity checking all crypto modules" Error: SHELLCHECK_WARNING (CWE-457): [#def44] /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): [#def45] /usr/lib/dracut/modules.d/01fips/module-setup.sh:44:30: warning[SC2154]: initdir is referenced but not assigned. # 42| for _mod in $_fipsmodules; do # 43| if hostonly='' instmods -c -s "$_mod"; then # 44|-> echo "$_mod" >> "${initdir}/etc/fipsmodules" # 45| echo "blacklist $_mod" >> "${initdir}/etc/fips.conf" # 46| fi Error: SHELLCHECK_WARNING (CWE-457): [#def46] /usr/lib/dracut/modules.d/01fips/module-setup.sh:50:30: warning[SC2154]: hostonly_default_device is referenced but not assigned. # 48| # 49| # with hostonly_default_device fs module for /boot is not installed by default # 50|-> if [[ $hostonly ]] && [[ $hostonly_default_device == "no" ]]; then # 51| _bootfstype=$(find_mp_fstype /boot) # 52| if [[ -n $_bootfstype ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def47] /usr/lib/dracut/modules.d/01fips/module-setup.sh:62:29: warning[SC2154]: moddir is referenced but not assigned. # 60| # called by dracut # 61| install() { # 62|-> inst_hook pre-pivot 00 "$moddir/fips-boot.sh" # 63| inst_hook pre-pivot 01 "$moddir/fips-noboot.sh" # 64| inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh" Error: SHELLCHECK_WARNING (CWE-457): [#def48] /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 systemd-ac-power # 26| inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target" Error: SHELLCHECK_WARNING (CWE-457): [#def49] /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 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): [#def50] /usr/lib/dracut/modules.d/01systemd-ask-password/module-setup.sh:44:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 42| # 43| inst_multiple -o \ # 44|-> "$systemdsystemunitdir"/systemd-ask-password-console.path \ # 45| "$systemdsystemunitdir"/systemd-ask-password-console.service \ # 46| "$systemdsystemunitdir"/multi-user.target.wants/systemd-ask-password-wall.path \ Error: SHELLCHECK_WARNING (CWE-457): [#def51] /usr/lib/dracut/modules.d/01systemd-ask-password/module-setup.sh:52:31: warning[SC2154]: initdir is referenced but not assigned. # 50| # 51| if [ -e "$systemdsystemunitdir"/systemd-vconsole-setup.service ]; then # 52|-> $SYSTEMCTL -q --root "$initdir" add-wants systemd-ask-password-console.service systemd-vconsole-setup.service # 53| fi # 54| Error: SHELLCHECK_WARNING (CWE-457): [#def52] /usr/lib/dracut/modules.d/01systemd-bsod/module-setup.sh:8:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 6| check() { # 7| # If the binary(s) requirements are not fulfilled the module can't be installed # 8|-> require_binaries "$systemdutildir"/systemd-bsod || return 1 # 9| # 10| # Return 255 to only include the module, if another module requires it. Error: SHELLCHECK_WARNING (CWE-457): [#def53] /usr/lib/dracut/modules.d/01systemd-bsod/module-setup.sh:25:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 23| install() { # 24| inst_multiple \ # 25|-> "$systemdsystemunitdir"/systemd-bsod.service \ # 26| "$systemdsystemunitdir"/initrd.target.wants/systemd-bsod.service \ # 27| "$systemdutildir"/systemd-bsod Error: SHELLCHECK_WARNING (CWE-457): [#def54] /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): [#def55] /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:36:10: warning[SC2154]: sysctld is referenced but not assigned. # 34| # 35| inst_multiple -o \ # 36|-> "$sysctld"/50-coredump.conf \ # 37| "$systemdutildir"/coredump.conf \ # 38| "$systemdutildir"/systemd-coredump \ Error: SHELLCHECK_WARNING (CWE-457): [#def56] /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:39:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 37| "$systemdutildir"/coredump.conf \ # 38| "$systemdutildir"/systemd-coredump \ # 39|-> "$systemdsystemunitdir"/systemd-coredump.socket \ # 40| "$systemdsystemunitdir"/systemd-coredump@.service \ # 41| "$systemdsystemunitdir"/sockets.target.wants/systemd-coredump.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def57] /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:54:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 52| if [[ $hostonly ]]; then # 53| inst_multiple -H -o \ # 54|-> "$systemdutilconfdir"/coredump.conf \ # 55| "$systemdsystemconfdir/coredump.conf.d/*.conf" \ # 56| "$systemdsystemconfdir"/systemd-coredump.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def58] /usr/lib/dracut/modules.d/01systemd-coredump/module-setup.sh:55:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 53| inst_multiple -H -o \ # 54| "$systemdutilconfdir"/coredump.conf \ # 55|-> "$systemdsystemconfdir/coredump.conf.d/*.conf" \ # 56| "$systemdsystemconfdir"/systemd-coredump.socket \ # 57| "$systemdsystemconfdir/systemd-coredump.socket.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): [#def59] /usr/lib/dracut/modules.d/01systemd-creds/module-setup.sh:36:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 34| "/usr/lib/credstore/*" \ # 35| "/usr/lib/credstore.encrypted/*" \ # 36|-> "$tmpfilesdir/credstore.conf" \ # 37| systemd-creds # 38| Error: SHELLCHECK_WARNING (CWE-457): [#def60] /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): [#def61] /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): [#def62] /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): [#def63] /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): [#def64] /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): [#def65] /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): [#def66] /usr/lib/dracut/modules.d/01systemd-hostnamed/module-setup.sh:52:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 50| inst_multiple -H -o \ # 51| /etc/hostname \ # 52|-> "$systemdsystemconfdir"/systemd-hostnamed.service \ # 53| "$systemdsystemconfdir/systemd-hostnamed.service.d/*.conf" \ # 54| "$systemdsystemconfdir"/systemd-hostnamed.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def67] /usr/lib/dracut/modules.d/01systemd-initrd/module-setup.sh:23:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 21| install() { # 22| inst_multiple -o \ # 23|-> "$systemdsystemunitdir"/initrd.target \ # 24| "$systemdsystemunitdir"/initrd-fs.target \ # 25| "$systemdsystemunitdir"/initrd-root-device.target \ Error: SHELLCHECK_WARNING (CWE-457): [#def68] /usr/lib/dracut/modules.d/01systemd-initrd/module-setup.sh:34:27: warning[SC2154]: initdir is referenced but not assigned. # 32| "$systemdsystemunitdir"/initrd-parse-etc.service # 33| # 34|-> $SYSTEMCTL -q --root "$initdir" set-default initrd.target # 35| } Error: SHELLCHECK_WARNING (CWE-457): [#def69] /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): [#def70] /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): [#def71] /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): [#def72] /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): [#def73] /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:32:18: warning[SC2154]: moddir is referenced but not assigned. # 30| install() { # 31| # 32|-> inst_simple "$moddir/initrd.conf" "$systemdutildir/journald.conf.d/initrd.conf" # 33| # 34| inst_sysusers systemd-journal.conf Error: SHELLCHECK_WARNING (CWE-457): [#def74] /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:40:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 38| "$systemdutildir/journald.conf.d/*.conf" \ # 39| "$systemdutildir"/systemd-journald \ # 40|-> "$systemdsystemunitdir"/systemd-journald.service \ # 41| "$systemdsystemunitdir"/systemd-journald.socket \ # 42| "$systemdsystemunitdir"/systemd-journald@.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def75] /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:65:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 63| if [[ $hostonly ]]; then # 64| inst_multiple -H -o \ # 65|-> "$systemdutilconfdir"/journald.conf \ # 66| "$systemdutilconfdir/journald.conf.d/*.conf" \ # 67| "$systemdsystemconfdir"/systemd-journald.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def76] /usr/lib/dracut/modules.d/01systemd-journald/module-setup.sh:67:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 65| "$systemdutilconfdir"/journald.conf \ # 66| "$systemdutilconfdir/journald.conf.d/*.conf" \ # 67|-> "$systemdsystemconfdir"/systemd-journald.service \ # 68| "$systemdsystemconfdir/systemd-journald.service.d/*.conf" \ # 69| "$systemdsystemconfdir"/systemd-journal-catalog-update.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def77] /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): [#def78] /usr/lib/dracut/modules.d/01systemd-ldconfig/module-setup.sh:46:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 44| if [[ $hostonly ]]; then # 45| inst_multiple -H -o \ # 46|-> "$systemdsystemconfdir"/ldconfig.service \ # 47| "$systemdsystemconfdir/ldconfig.service.d/*.conf" # 48| fi Error: SHELLCHECK_WARNING (CWE-457): [#def79] /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): [#def80] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:30:20: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 28| modules_load_get() { # 29| local _line _i # 30|-> for _i in "$dracutsysrootdir$1"/*.conf; do # 31| [[ -f $_i ]] || continue # 32| while read -r _line || [ -n "$_line" ]; do Error: SHELLCHECK_WARNING (CWE-457): [#def81] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:46:44: warning[SC2154]: modulesload is referenced but not assigned. # 44| } # 45| # 46|-> mapfile -t _mods < <(modules_load_get "$modulesload") # 47| if [[ ${#_mods[@]} -gt 0 ]]; then # 48| hostonly='' instmods "${_mods[@]}" Error: SHELLCHECK_WARNING (CWE-457): [#def82] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:52:48: warning[SC2154]: modulesloadconfdir is referenced but not assigned. # 50| # 51| if [[ $hostonly ]]; then # 52|-> mapfile -t _mods < <(modules_load_get "$modulesloadconfdir") # 53| if [[ ${#_mods[@]} -gt 0 ]]; then # 54| hostonly='' instmods "${_mods[@]}" Error: SHELLCHECK_WARNING (CWE-457): [#def83] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:68:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 66| "$modulesload/*.conf" \ # 67| "$systemdutildir"/systemd-modules-load \ # 68|-> "$systemdsystemunitdir"/systemd-modules-load.service \ # 69| "$systemdsystemunitdir"/modprobe@.service \ # 70| "$systemdsystemunitdir"/kmod-static-nodes.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def84] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:76:27: warning[SC2154]: initdir is referenced but not assigned. # 74| # 75| # Enable systemd type unit(s) # 76|-> $SYSTEMCTL -q --root "$initdir" enable systemd-modules-load.service # 77| # 78| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): [#def85] /usr/lib/dracut/modules.d/01systemd-modules-load/module-setup.sh:83:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 81| /etc/modules-load.d/*.conf \ # 82| "$modulesloadconfdir/*.conf" \ # 83|-> "$systemdsystemconfdir"/modprobe@.service \ # 84| "$systemdsystemconfdir/modprobe@.service.d/*.conf" \ # 85| "$systemdsystemconfdir"/systemd-modules-load.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def86] /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 \ # 11|-> "$systemdutildir"/systemd-networkd \ # 12| "$systemdutildir"/systemd-network-generator \ # 13| "$systemdutildir"/systemd-networkd-wait-online \ Error: SHELLCHECK_WARNING (CWE-457): [#def87] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:37:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 35| # 36| inst_multiple -o \ # 37|-> "$tmpfilesdir"/systemd-network.conf \ # 38| "$dbussystem"/org.freedesktop.network1.conf \ # 39| "$dbussystemservices"/org.freedesktop.network1.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def88] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:38:10: warning[SC2154]: dbussystem is referenced but not assigned. # 36| inst_multiple -o \ # 37| "$tmpfilesdir"/systemd-network.conf \ # 38|-> "$dbussystem"/org.freedesktop.network1.conf \ # 39| "$dbussystemservices"/org.freedesktop.network1.service \ # 40| "$systemdutildir"/networkd.conf \ Error: SHELLCHECK_WARNING (CWE-457): [#def89] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:39:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 37| "$tmpfilesdir"/systemd-network.conf \ # 38| "$dbussystem"/org.freedesktop.network1.conf \ # 39|-> "$dbussystemservices"/org.freedesktop.network1.service \ # 40| "$systemdutildir"/networkd.conf \ # 41| "$systemdutildir/networkd.conf.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): [#def90] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:45:10: warning[SC2154]: systemdnetwork is referenced but not assigned. # 43| "$systemdutildir"/systemd-network-generator \ # 44| "$systemdutildir"/systemd-networkd-wait-online \ # 45|-> "$systemdnetwork"/80-6rd-tunnel.network \ # 46| "$systemdnetwork"/80-container-host0.network \ # 47| "$systemdnetwork"/80-container-vb.network \ Error: SHELLCHECK_WARNING (CWE-457): [#def91] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:54:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 52| "$systemdnetwork"/98-default-mac-none.link \ # 53| "$systemdnetwork"/99-default.link \ # 54|-> "$systemdsystemunitdir"/systemd-networkd.service \ # 55| "$systemdsystemunitdir"/systemd-networkd.socket \ # 56| "$systemdsystemunitdir"/systemd-network-generator.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def92] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:62:18: warning[SC2154]: moddir is referenced but not assigned. # 60| ip sed grep # 61| # 62|-> inst_simple "$moddir"/99-wait-online-dracut.conf \ # 63| "$systemdsystemunitdir"/systemd-networkd-wait-online.service.d/99-dracut.conf # 64| Error: SHELLCHECK_WARNING (CWE-457): [#def93] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:66:10: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned. # 64| # 65| inst_simple "$moddir"/99-default.network \ # 66|-> "$systemdnetworkconfdir"/99-dracut-default.network # 67| # 68| inst_hook cmdline 99 "$moddir"/networkd-config.sh Error: SHELLCHECK_WARNING (CWE-457): [#def94] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:77:31: warning[SC2154]: initdir is referenced but not assigned. # 75| systemd-network-generator.service \ # 76| systemd-networkd-wait-online.service; do # 77|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 78| done # 79| Error: SHELLCHECK_WARNING (CWE-457): [#def95] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:83:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 81| if [[ $hostonly ]]; then # 82| inst_multiple -H -o \ # 83|-> "$systemdutilconfdir"/networkd.conf \ # 84| "$systemdutilconfdir/networkd.conf.d/*.conf" \ # 85| "$systemdnetworkconfdir/*" \ Error: SHELLCHECK_WARNING (CWE-457): [#def96] /usr/lib/dracut/modules.d/01systemd-networkd/module-setup.sh:86:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 84| "$systemdutilconfdir/networkd.conf.d/*.conf" \ # 85| "$systemdnetworkconfdir/*" \ # 86|-> "$systemdsystemconfdir"/systemd-networkd.service \ # 87| "$systemdsystemconfdir/systemd-networkd.service.d/*.conf" \ # 88| "$systemdsystemconfdir"/systemd-networkd.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def97] /usr/lib/dracut/modules.d/01systemd-networkd/networkd-config.sh:23:12: warning[SC2154]: systemdnetworkconfdir is referenced but not assigned. # 21| # 22| # Remove the default network if at least one was generated # 23|-> rm -f "$systemdnetworkconfdir"/99-dracut-default.network # 24| done # 25| Error: SHELLCHECK_WARNING (CWE-457): [#def98] /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:9:28: warning[SC2154]: systemdutildir is referenced but not assigned. # 7| # If the binary(s) requirements are not fulfilled the module can't be installed. # 8| # systemd-255 renamed the binary, check for old and new location. # 9|-> if ! require_binaries "$systemdutildir"/systemd-pcrphase \ # 10| && ! require_binaries "$systemdutildir"/systemd-pcrextend; then # 11| return 1 Error: SHELLCHECK_WARNING (CWE-457): [#def99] /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:45:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 43| "$systemdutildir"/systemd-pcrphase \ # 44| "$systemdutildir"/systemd-pcrextend \ # 45|-> "$systemdsystemunitdir"/systemd-pcrphase-initrd.service \ # 46| "$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \ # 47| "$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service Error: SHELLCHECK_WARNING (CWE-457): [#def100] /usr/lib/dracut/modules.d/01systemd-pcrphase/module-setup.sh:52:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 50| if [[ $hostonly ]]; then # 51| inst_multiple -H -o \ # 52|-> "$systemdsystemconfdir"/systemd-pcrphase-initrd.service \ # 53| "$systemdsystemconfdir/systemd-pcrphase-initrd.service.d/*.conf" \ # 54| "$systemdsystemconfdir"/initrd.target.wants/systemd-pcrphase-initrd.service Error: SHELLCHECK_WARNING (CWE-457): [#def101] /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): [#def102] /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): [#def103] /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): [#def104] /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): [#def105] /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): [#def106] /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): [#def107] /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): [#def108] /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): [#def109] /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): [#def110] /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): [#def111] /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): [#def112] /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): [#def113] /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): [#def114] /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): [#def115] /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| "/usr/lib/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): [#def116] /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): [#def117] /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): [#def118] /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_sysusers systemd-resolve.conf Error: SHELLCHECK_WARNING (CWE-457): [#def119] /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_sysusers systemd-resolve.conf Error: SHELLCHECK_WARNING (CWE-457): [#def120] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:37:10: warning[SC2154]: dbussystem is referenced but not assigned. # 35| # 36| inst_multiple -o \ # 37|-> "$dbussystem"/org.freedesktop.resolve1.conf \ # 38| "$dbussystemservices"/org.freedesktop.resolve1.service \ # 39| "$systemdutildir"/resolv.conf \ Error: SHELLCHECK_WARNING (CWE-457): [#def121] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:38:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 36| inst_multiple -o \ # 37| "$dbussystem"/org.freedesktop.resolve1.conf \ # 38|-> "$dbussystemservices"/org.freedesktop.resolve1.service \ # 39| "$systemdutildir"/resolv.conf \ # 40| "$systemdutildir"/resolved.conf \ Error: SHELLCHECK_WARNING (CWE-457): [#def122] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:43:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 41| "$systemdutildir/resolved.conf.d/*.conf" \ # 42| "$systemdutildir"/systemd-resolved \ # 43|-> "$systemdsystemunitdir"/systemd-resolved.service \ # 44| "$systemdsystemunitdir/systemd-resolved.service.d/*.conf" \ # 45| resolvectl Error: SHELLCHECK_WARNING (CWE-457): [#def123] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:48:27: warning[SC2154]: initdir is referenced but not assigned. # 46| # 47| # Enable systemd type unit(s) # 48|-> $SYSTEMCTL -q --root "$initdir" enable systemd-resolved.service # 49| # 50| # Install the hosts local user configurations if enabled. Error: SHELLCHECK_WARNING (CWE-457): [#def124] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:53:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 51| if [[ $hostonly ]]; then # 52| inst_multiple -H -o \ # 53|-> "$systemdutilconfdir"/resolved.conf \ # 54| "$systemdutilconfdir/resolved.conf.d/*.conf" \ # 55| "$systemdsystemconfdir"/systemd-resolved.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def125] /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh:55:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 53| "$systemdutilconfdir"/resolved.conf \ # 54| "$systemdutilconfdir/resolved.conf.d/*.conf" \ # 55|-> "$systemdsystemconfdir"/systemd-resolved.service \ # 56| "$systemdsystemconfdir/systemd-resolved.service.d/*.conf" # 57| fi Error: SHELLCHECK_WARNING (CWE-457): [#def126] /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): [#def127] /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:29:10: warning[SC2154]: sysctld is referenced but not assigned. # 27| inst_multiple -o \ # 28| /usr/lib/sysctl.d/*.conf \ # 29|-> "$sysctld/*.conf" \ # 30| "$systemdsystemunitdir"/systemd-sysctl.service \ # 31| "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def128] /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:30:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 28| /usr/lib/sysctl.d/*.conf \ # 29| "$sysctld/*.conf" \ # 30|-> "$systemdsystemunitdir"/systemd-sysctl.service \ # 31| "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \ # 32| "$systemdutildir"/systemd-sysctl Error: SHELLCHECK_WARNING (CWE-457): [#def129] /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:39:14: warning[SC2154]: sysctlconfdir is referenced but not assigned. # 37| /etc/sysctl.conf \ # 38| /etc/sysctl.d/*.conf \ # 39|-> "$sysctlconfdir/*.conf" \ # 40| "$systemdsystemconfdir"/systemd-sysctl.service \ # 41| "$systemdsystemconfdir/systemd-sysctl.service.d/*.conf" Error: SHELLCHECK_WARNING (CWE-457): [#def130] /usr/lib/dracut/modules.d/01systemd-sysctl/module-setup.sh:40:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 38| /etc/sysctl.d/*.conf \ # 39| "$sysctlconfdir/*.conf" \ # 40|-> "$systemdsystemconfdir"/systemd-sysctl.service \ # 41| "$systemdsystemconfdir/systemd-sysctl.service.d/*.conf" # 42| fi Error: SHELLCHECK_WARNING (CWE-457): [#def131] /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| } Error: SHELLCHECK_WARNING (CWE-457): [#def132] /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:38:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 36| "/etc/extension-release.d/extension-release.*" \ # 37| "/usr/lib/extension-release.d/extension-release.*" \ # 38|-> "$systemdsystemunitdir"/systemd-confext.service \ # 39| "$systemdsystemunitdir/systemd-confext.service.d/*.conf" \ # 40| "$systemdsystemunitdir"/systemd-sysext.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def133] /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:48:31: warning[SC2154]: initdir is referenced but not assigned. # 46| systemd-confext.service \ # 47| systemd-sysext.service; do # 48|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 49| done # 50| Error: SHELLCHECK_WARNING (CWE-457): [#def134] /usr/lib/dracut/modules.d/01systemd-sysext/module-setup.sh:55:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 53| inst_multiple -H -o \ # 54| "/etc/extensions/*.raw" \ # 55|-> "$systemdsystemconfdir"/systemd-confext.service \ # 56| "$systemdsystemconfdir/systemd-confext.service.d/*.conf" \ # 57| "$systemdsystemconfdir"/systemd-sysext.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def135] /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_sysusers basic.conf Error: SHELLCHECK_WARNING (CWE-457): [#def136] /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_sysusers basic.conf Error: SHELLCHECK_WARNING (CWE-457): [#def137] /usr/lib/dracut/modules.d/01systemd-sysusers/module-setup.sh:40:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 38| if [[ $hostonly ]]; then # 39| inst_multiple -H -o \ # 40|-> "$systemdsystemconfdir"/systemd-sysusers.service \ # 41| "$systemdsystemconfdir/systemd-sysusers.service.d/*.conf" # 42| fi Error: SHELLCHECK_WARNING (CWE-457): [#def138] /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): [#def139] /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): [#def140] /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): [#def141] /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): [#def142] /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.d/*.conf" # 45| fi Error: SHELLCHECK_WARNING (CWE-457): [#def143] /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): [#def144] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:38:10: warning[SC2154]: dbussystem is referenced but not assigned. # 36| # 37| inst_multiple -o \ # 38|-> "$dbussystem"/org.freedesktop.timesync1.conf \ # 39| "$dbussystemservices"/org.freedesktop.timesync1.service \ # 40| "$systemdntpunits/*.list" \ Error: SHELLCHECK_WARNING (CWE-457): [#def145] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:39:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 37| inst_multiple -o \ # 38| "$dbussystem"/org.freedesktop.timesync1.conf \ # 39|-> "$dbussystemservices"/org.freedesktop.timesync1.service \ # 40| "$systemdntpunits/*.list" \ # 41| "$systemdutildir"/systemd-timesyncd \ Error: SHELLCHECK_WARNING (CWE-457): [#def146] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:40:10: warning[SC2154]: systemdntpunits is referenced but not assigned. # 38| "$dbussystem"/org.freedesktop.timesync1.conf \ # 39| "$dbussystemservices"/org.freedesktop.timesync1.service \ # 40|-> "$systemdntpunits/*.list" \ # 41| "$systemdutildir"/systemd-timesyncd \ # 42| "$systemdutildir"/systemd-time-wait-sync \ Error: SHELLCHECK_WARNING (CWE-457): [#def147] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:44:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 42| "$systemdutildir"/systemd-time-wait-sync \ # 43| "$systemdutildir/timesyncd.conf.d/*.conf" \ # 44|-> "$systemdsystemunitdir"/systemd-timesyncd.service \ # 45| "$systemdsystemunitdir/systemd-timesyncd.service.d/*.conf" \ # 46| "$systemdsystemunitdir"/systemd-time-wait-sync.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def148] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:53:31: warning[SC2154]: initdir is referenced but not assigned. # 51| systemd-timesyncd.service \ # 52| systemd-time-wait-sync.service; do # 53|-> $SYSTEMCTL -q --root "$initdir" enable "$i" # 54| done # 55| Error: SHELLCHECK_WARNING (CWE-457): [#def149] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:59:14: warning[SC2154]: systemdntpunitsconfdir is referenced but not assigned. # 57| if [[ $hostonly ]]; then # 58| inst_multiple -H -o \ # 59|-> "$systemdntpunitsconfdir/*.list" \ # 60| "$systemdutilconfdir"/timesyncd.conf \ # 61| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): [#def150] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:60:14: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 58| inst_multiple -H -o \ # 59| "$systemdntpunitsconfdir/*.list" \ # 60|-> "$systemdutilconfdir"/timesyncd.conf \ # 61| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ # 62| "$systemdsystemconfdir"/systemd-timesyncd.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def151] /usr/lib/dracut/modules.d/01systemd-timesyncd/module-setup.sh:62:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 60| "$systemdutilconfdir"/timesyncd.conf \ # 61| "$systemdutilconfdir/timesyncd.conf.d/*.conf" \ # 62|-> "$systemdsystemconfdir"/systemd-timesyncd.service \ # 63| "$systemdsystemconfdir/systemd-timesyncd.service.d/*.conf" \ # 64| "$systemdsystemconfdir"/systemd-time-wait-sync.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def152] /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): [#def153] /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): [#def154] /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:60:14: warning[SC2154]: tmpfilesconfdir is referenced but not assigned. # 58| /etc/group \ # 59| /etc/passwd \ # 60|-> "$tmpfilesconfdir/*.conf" \ # 61| "$systemdsystemconfdir"/systemd-tmpfiles-clean.service \ # 62| "$systemdsystemconfdir/systemd-tmpfiles-clean.service.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): [#def155] /usr/lib/dracut/modules.d/01systemd-tmpfiles/module-setup.sh:61:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 59| /etc/passwd \ # 60| "$tmpfilesconfdir/*.conf" \ # 61|-> "$systemdsystemconfdir"/systemd-tmpfiles-clean.service \ # 62| "$systemdsystemconfdir/systemd-tmpfiles-clean.service.d/*.conf" \ # 63| "$systemdsystemconfdir"/systemd-tmpfiles-setup.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def156] /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): [#def157] /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:33:10: warning[SC2154]: udevrulesdir is referenced but not assigned. # 31| # 32| inst_multiple -o \ # 33|-> "$udevrulesdir"/99-systemd.rules \ # 34| "$systemdutildir"/systemd-udevd \ # 35| "$systemdsystemunitdir"/systemd-udevd.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def158] /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:35:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 33| "$udevrulesdir"/99-systemd.rules \ # 34| "$systemdutildir"/systemd-udevd \ # 35|-> "$systemdsystemunitdir"/systemd-udevd.service \ # 36| "$systemdsystemunitdir/systemd-udevd.service.d/*.conf" \ # 37| "$systemdsystemunitdir"/systemd-udev-trigger.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def159] /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:51:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 49| if [[ $hostonly ]]; then # 50| inst_multiple -H -o \ # 51|-> "$systemdsystemconfdir"/systemd-udevd.service \ # 52| "$systemdsystemconfdir/systemd-udevd.service.d/*.conf" \ # 53| "$systemdsystemconfdir"/systemd-udev-trigger.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def160] /usr/lib/dracut/modules.d/01systemd-udevd/module-setup.sh:68:18: warning[SC2154]: systemdutilconfdir is referenced but not assigned. # 66| if dracut_module_included "hwdb"; then # 67| inst_multiple -H -o \ # 68|-> "$systemdutilconfdir"/hwdb/hwdb.bin # 69| fi # 70| fi Error: SHELLCHECK_WARNING (CWE-457): [#def161] /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): [#def162] /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): [#def163] /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-457): [#def164] /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): [#def165] /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): [#def166] /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): [#def167] /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): [#def168] /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): [#def169] /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): [#def170] /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): [#def171] /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): [#def172] /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): [#def173] /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): [#def174] /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): [#def175] /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): [#def176] /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): [#def177] /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): [#def178] /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): [#def179] /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): [#def180] /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_sysusers dbus.conf Error: SHELLCHECK_WARNING (CWE-457): [#def181] /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:52:10: warning[SC2154]: systemdcatalog is referenced but not assigned. # 50| "$dbusservicesconfdir"/org.freedesktop.systemd1.service \ # 51| "$dbussystemservices"/org.freedesktop.systemd1.service \ # 52|-> "$systemdcatalog"/dbus-broker.catalog \ # 53| "$systemdcatalog"/dbus-broker-launch.catalog \ # 54| "$systemdsystemunitdir"/dbus-broker.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def182] /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:54:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 52| "$systemdcatalog"/dbus-broker.catalog \ # 53| "$systemdcatalog"/dbus-broker-launch.catalog \ # 54|-> "$systemdsystemunitdir"/dbus-broker.service \ # 55| "$systemduser"/dbus-broker.service \ # 56| "$systemdsystemunitdir"/dbus.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def183] /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:55:10: warning[SC2154]: systemduser is referenced but not assigned. # 53| "$systemdcatalog"/dbus-broker-launch.catalog \ # 54| "$systemdsystemunitdir"/dbus-broker.service \ # 55|-> "$systemduser"/dbus-broker.service \ # 56| "$systemdsystemunitdir"/dbus.socket \ # 57| "$systemduser"/dbus.socket \ Error: SHELLCHECK_WARNING (CWE-457): [#def184] /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:70:10: warning[SC2154]: initdir is referenced but not assigned. # 68| Before=shutdown.target # 69| /^\[Socket\]/aRemoveOnStop=yes' \ # 70|-> "$initdir$systemdsystemunitdir/dbus.socket" # 71| # 72| $SYSTEMCTL -q --root "$initdir" enable dbus-broker.service Error: SHELLCHECK_WARNING (CWE-457): [#def185] /usr/lib/dracut/modules.d/06dbus-broker/module-setup.sh:79:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 77| "$dbusconfdir"/session.conf \ # 78| "$dbusconfdir"/system.conf \ # 79|-> "$systemdsystemconfdir"/dbus.socket \ # 80| "$systemdsystemconfdir"/dbus.socket.d/*.conf \ # 81| "$systemdsystemconfdir"/dbus-broker.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def186] /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): [#def187] /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): [#def188] /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): [#def189] /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): [#def190] /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): [#def191] /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): [#def192] /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): [#def193] /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): [#def194] /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): [#def195] /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): [#def196] /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): [#def197] /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): [#def198] /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): [#def199] /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:66:10: warning[SC2154]: initdir is referenced but not assigned. # 64| Conflicts=shutdown.target\ # 65| Before=shutdown.target' \ # 66|-> "$initdir$systemdsystemunitdir/dbus.service" # 67| # 68| # Adjusting dependencies for initramfs in the dbus socket unit. Error: SHELLCHECK_WARNING (CWE-457): [#def200] /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:78:33: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 76| # 77| # Adding the user and group for dbus # 78|-> grep '^\(d\|message\)bus:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd" # 79| grep '^\(d\|message\)bus:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group" # 80| Error: SHELLCHECK_WARNING (CWE-457): [#def201] /usr/lib/dracut/modules.d/06dbus-daemon/module-setup.sh:85:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 83| inst_multiple -H -o \ # 84| "$dbusconfdir"/system.conf \ # 85|-> "$systemdsystemconfdir"/dbus.socket \ # 86| "$systemdsystemconfdir"/dbus.socket.d/*.conf \ # 87| "$systemdsystemconfdir"/dbus.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def202] /usr/lib/dracut/modules.d/06rngd/module-setup.sh:35:18: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 33| install() { # 34| inst rngd # 35|-> inst_simple "${systemdsystemunitdir}/rngd.service" # 36| # 37| if [ -r /etc/sysconfig/rngd ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def203] /usr/lib/dracut/modules.d/06rngd/module-setup.sh:38:22: warning[SC2154]: moddir is referenced but not assigned. # 36| # 37| if [ -r /etc/sysconfig/rngd ]; then # 38|-> inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd" # 39| fi # 40| Error: SHELLCHECK_WARNING (CWE-457): [#def204] /usr/lib/dracut/modules.d/06rngd/module-setup.sh:44:27: warning[SC2154]: initdir is referenced but not assigned. # 42| inst_libdir_file opensc-pkcs11.so # 43| # 44|-> $SYSTEMCTL -q --root "$initdir" add-wants sysinit.target rngd.service # 45| } Error: SHELLCHECK_WARNING (CWE-457): [#def205] /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: [#def206] /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: [#def207] /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: [#def208] /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: [#def209] /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): [#def210] /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): [#def211] /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): [#def212] /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): [#def213] /usr/lib/dracut/modules.d/10i18n/module-setup.sh:304:38: warning[SC2154]: i18n_install_all is referenced but not assigned. # 302| fi # 303| # 304|-> if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then # 305| install_local_i18n || install_all_kbd # 306| else Error: SHELLCHECK_WARNING: [#def214] /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: [#def215] /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: [#def216] /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-457): [#def217] /usr/lib/dracut/modules.d/30convertfs/convertfs.sh:91:6: warning[SC2154]: ret is referenced but not assigned. # 89| } # 90| # 91|-> trap 'ret=$?; [[ $ret -ne 0 ]] && cleanup;exit $ret;' EXIT # 92| trap 'exit 1;' SIGINT # 93| Error: SHELLCHECK_WARNING (CWE-457): [#def218] /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): [#def219] /usr/lib/dracut/modules.d/35connman/cm-lib.sh:7:39: warning[SC2154]: hookdir is referenced but not assigned. # 5| cm_generate_connections() { # 6| if getargbool 0 rd.neednet; then # 7|-> echo '[ -f /tmp/cm.done ]' > "$hookdir"/initqueue/finished/cm.sh # 8| mkdir -p /run/connman/initrd # 9| : > /run/connman/initrd/neednet # activate ConnMan services Error: SHELLCHECK_WARNING (CWE-457): [#def220] /usr/lib/dracut/modules.d/35connman/module-setup.sh:31:11: warning[SC2154]: dbussystem is referenced but not assigned. # 29| inst connmanctl # 30| inst connmand-wait-online # 31|-> inst "$dbussystem"/connman.conf # 32| [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf # 33| inst_dir /usr/lib/connman/plugins Error: SHELLCHECK_WARNING (CWE-457): [#def221] /usr/lib/dracut/modules.d/35connman/module-setup.sh:32:30: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 30| inst connmand-wait-online # 31| inst "$dbussystem"/connman.conf # 32|-> [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf # 33| inst_dir /usr/lib/connman/plugins # 34| inst_dir /var/lib/connman Error: SHELLCHECK_WARNING (CWE-457): [#def222] /usr/lib/dracut/modules.d/35connman/module-setup.sh:36:27: warning[SC2154]: moddir is referenced but not assigned. # 34| inst_dir /var/lib/connman # 35| # 36|-> inst_hook cmdline 99 "$moddir/cm-config.sh" # 37| # 38| inst_simple "$moddir"/cm-initrd.service "$systemdsystemunitdir"/cm-initrd.service Error: SHELLCHECK_WARNING (CWE-457): [#def223] /usr/lib/dracut/modules.d/35connman/module-setup.sh:38:46: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 36| inst_hook cmdline 99 "$moddir/cm-config.sh" # 37| # 38|-> inst_simple "$moddir"/cm-initrd.service "$systemdsystemunitdir"/cm-initrd.service # 39| inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service # 40| Error: SHELLCHECK_WARNING (CWE-457): [#def224] /usr/lib/dracut/modules.d/35connman/module-setup.sh:41:27: warning[SC2154]: initdir is referenced but not assigned. # 39| inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service # 40| # 41|-> $SYSTEMCTL -q --root "$initdir" enable cm-initrd.service # 42| # 43| inst_hook initqueue/settled 99 "$moddir/cm-run.sh" Error: SHELLCHECK_WARNING (CWE-457): [#def225] /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): [#def226] /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): [#def227] /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): [#def228] /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): [#def229] /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): [#def230] /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): [#def231] /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): [#def232] /usr/lib/dracut/modules.d/35network-manager/nm-lib.sh:23:43: warning[SC2154]: hookdir is referenced but not assigned. # 21| /etc/sysconfig/network-scripts/ifcfg-*; do # 22| [ -f "$i" ] || continue # 23|-> echo '[ -f /tmp/nm.done ]' > "$hookdir"/initqueue/finished/nm.sh # 24| mkdir -p /run/NetworkManager/initrd # 25| : > /run/NetworkManager/initrd/neednet # activate NM services Error: SHELLCHECK_WARNING (CWE-457): [#def233] /usr/lib/dracut/modules.d/45ifcfg/module-setup.sh:21:29: warning[SC2154]: moddir is referenced but not assigned. # 19| install() { # 20| inst_binary awk # 21|-> inst_hook pre-pivot 85 "$moddir/write-ifcfg.sh" # 22| } Error: SHELLCHECK_WARNING: [#def234] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:14:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 12| # 13| print_s390() { # 14|-> local _netif # 15| local SUBCHANNELS # 16| local i Error: SHELLCHECK_WARNING: [#def235] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:15:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 13| print_s390() { # 14| local _netif # 15|-> local SUBCHANNELS # 16| local i # 17| Error: SHELLCHECK_WARNING: [#def236] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:16:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 14| local _netif # 15| local SUBCHANNELS # 16|-> local i # 17| # 18| _netif="$1" Error: SHELLCHECK_WARNING: [#def237] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:32:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 30| # 31| hw_bind() { # 32|-> local _netif="$1" # 33| local _macaddr="$2" # 34| Error: SHELLCHECK_WARNING: [#def238] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:33:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 31| hw_bind() { # 32| local _netif="$1" # 33|-> local _macaddr="$2" # 34| # 35| [ -n "$_macaddr" ] \ Error: SHELLCHECK_WARNING: [#def239] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:56:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 54| # 55| interface_bind() { # 56|-> local _netif="$1" # 57| local _macaddr="$2" # 58| Error: SHELLCHECK_WARNING: [#def240] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:57:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 55| interface_bind() { # 56| local _netif="$1" # 57|-> local _macaddr="$2" # 58| # 59| if [ ! -e "/sys/class/net/$_netif" ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def241] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:108:22: warning[SC2154]: bridgename is referenced but not assigned. # 106| # 107| read -r uuid < /proc/sys/kernel/random/uuid # 108|-> if [ "$netif" = "$bridgename" ]; then # 109| bridge=yes # 110| elif [ "$netif" = "$teammaster" ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def242] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:110:24: warning[SC2154]: teammaster is referenced but not assigned. # 108| if [ "$netif" = "$bridgename" ]; then # 109| bridge=yes # 110|-> elif [ "$netif" = "$teammaster" ]; then # 111| team=yes # 112| elif [ "$netif" = "$bondname" ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def243] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:112:24: warning[SC2154]: bondname is referenced but not assigned. # 110| elif [ "$netif" = "$teammaster" ]; then # 111| team=yes # 112|-> elif [ "$netif" = "$bondname" ]; then # 113| # $netif can't be bridge and bond at the same time # 114| bond=yes Error: SHELLCHECK_WARNING (CWE-457): [#def244] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:131:52: warning[SC2154]: macaddr is referenced but not assigned (did you mean '_macaddr'?). # 129| echo "# Generated by dracut initrd" # 130| echo "NAME=\"$netif\"" # 131|-> [ -z "$vlan" ] && interface_bind "$netif" "$macaddr" # 132| echo "ONBOOT=yes" # 133| echo "NETBOOT=yes" Error: SHELLCHECK_WARNING (CWE-457): [#def245] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:149:27: warning[SC2154]: ip is referenced but not assigned. # 147| # shellcheck disable=SC1090 # 148| [ -e /tmp/net."$netif".override ] && . /tmp/net."$netif".override # 149|-> if strglobin "$ip" '*:*:*'; then # 150| echo "IPV6INIT=yes" # 151| echo "IPV6_AUTOCONF=no" Error: SHELLCHECK_WARNING (CWE-457): [#def246] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:152:38: warning[SC2154]: mask is referenced but not assigned. # 150| echo "IPV6INIT=yes" # 151| echo "IPV6_AUTOCONF=no" # 152|-> echo "IPV6ADDR=\"$ip/$mask\"" # 153| else # 154| if [ -f /tmp/net."$netif".has_ibft_config ]; then Error: SHELLCHECK_WARNING (CWE-457): [#def247] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:186:29: warning[SC2154]: phydevice is referenced but not assigned. # 184| echo "DEVICE=\"$netif\"" # 185| echo "VLAN=yes" # 186|-> echo "PHYSDEV=\"$phydevice\"" # 187| } >> /tmp/ifcfg/ifcfg-"$netif" # 188| fi Error: SHELLCHECK_WARNING (CWE-457): [#def248] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:194:34: warning[SC2154]: bondoptions is referenced but not assigned. # 192| { # 193| # This variable is an indicator of a bond interface for initscripts # 194|-> echo "BONDING_OPTS=\"$bondoptions\"" # 195| echo "NAME=\"$netif\"" # 196| echo "TYPE=Bond" Error: SHELLCHECK_WARNING (CWE-457): [#def249] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:199:22: warning[SC2154]: bondslaves is referenced but not assigned. # 197| } >> /tmp/ifcfg/ifcfg-"$netif" # 198| # 199|-> for slave in $bondslaves; do # 200| # write separate ifcfg file for the raw eth interface # 201| ( Error: SHELLCHECK_WARNING (CWE-457): [#def250] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:224:22: warning[SC2154]: bridgeslaves is referenced but not assigned. # 222| echo "NAME=\"$netif\"" # 223| } >> /tmp/ifcfg/ifcfg-"$netif" # 224|-> for slave in $bridgeslaves; do # 225| # write separate ifcfg file for the raw eth interface # 226| ( Error: SHELLCHECK_WARNING (CWE-457): [#def251] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:242:37: warning[SC2154]: dns1 is referenced but not assigned. # 240| fi # 241| i=1 # 242|-> for ns in $(getargs nameserver) $dns1 $dns2; do # 243| echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-"$netif" # 244| i=$((i + 1)) Error: SHELLCHECK_WARNING (CWE-457): [#def252] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:242:43: warning[SC2154]: dns2 is referenced but not assigned. # 240| fi # 241| i=1 # 242|-> for ns in $(getargs nameserver) $dns1 $dns2; do # 243| echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-"$netif" # 244| i=$((i + 1)) Error: SHELLCHECK_WARNING (CWE-277): [#def253] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:252:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 250| # 251| # Pass network opts # 252|-> mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts # 253| mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient # 254| echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab Error: SHELLCHECK_WARNING (CWE-277): [#def254] /usr/lib/dracut/modules.d/45ifcfg/write-ifcfg.sh:253:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 251| # Pass network opts # 252| mkdir -m 0755 -p /run/initramfs/state/etc/sysconfig/network-scripts # 253|-> mkdir -m 0755 -p /run/initramfs/state/var/lib/dhclient # 254| echo "files /etc/sysconfig/network-scripts" >> /run/initramfs/rwtab # 255| echo "files /var/lib/dhclient" >> /run/initramfs/rwtab Error: SHELLCHECK_WARNING (CWE-457): [#def255] /usr/lib/dracut/modules.d/45net-lib/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): [#def256] /usr/lib/dracut/modules.d/45net-lib/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): [#def257] /usr/lib/dracut/modules.d/45net-lib/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-457): [#def258] /usr/lib/dracut/modules.d/45net-lib/module-setup.sh:14:18: warning[SC2154]: moddir is referenced but not assigned. # 12| # 13| install() { # 14|-> inst_script "$moddir/netroot.sh" "/sbin/netroot" # 15| inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh" # 16| inst_hook pre-udev 50 "$moddir/ifname-genrules.sh" Error: SHELLCHECK_WARNING: [#def259] /usr/lib/dracut/modules.d/45net-lib/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: [#def260] /usr/lib/dracut/modules.d/45net-lib/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: [#def261] /usr/lib/dracut/modules.d/45net-lib/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: [#def262] /usr/lib/dracut/modules.d/45net-lib/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: [#def263] /usr/lib/dracut/modules.d/45net-lib/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: [#def264] /usr/lib/dracut/modules.d/45net-lib/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: [#def265] /usr/lib/dracut/modules.d/45net-lib/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: [#def266] /usr/lib/dracut/modules.d/45net-lib/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: [#def267] /usr/lib/dracut/modules.d/45net-lib/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: [#def268] /usr/lib/dracut/modules.d/45net-lib/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): [#def269] /usr/lib/dracut/modules.d/45net-lib/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: [#def270] /usr/lib/dracut/modules.d/45net-lib/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: [#def271] /usr/lib/dracut/modules.d/45net-lib/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: [#def272] /usr/lib/dracut/modules.d/45net-lib/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: [#def273] /usr/lib/dracut/modules.d/45net-lib/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: [#def274] /usr/lib/dracut/modules.d/45net-lib/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: [#def275] /usr/lib/dracut/modules.d/45net-lib/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: [#def276] /usr/lib/dracut/modules.d/45net-lib/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: [#def277] /usr/lib/dracut/modules.d/45net-lib/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: [#def278] /usr/lib/dracut/modules.d/45net-lib/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: [#def279] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:469:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 467| # 468| ip_to_var() { # 469|-> local v="${1}": # 470| local i # 471| set -- Error: SHELLCHECK_WARNING: [#def280] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:470:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 468| ip_to_var() { # 469| local v="${1}": # 470|-> local i # 471| set -- # 472| while [ -n "$v" ]; do Error: SHELLCHECK_WARNING: [#def281] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:567:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 565| # 566| route_to_var() { # 567|-> local v="${1}": # 568| local i # 569| set -- Error: SHELLCHECK_WARNING: [#def282] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:568:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 566| route_to_var() { # 567| local v="${1}": # 568|-> local i # 569| set -- # 570| while [ -n "$v" ]; do Error: SHELLCHECK_WARNING: [#def283] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:601:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 599| # 600| parse_ifname_opts() { # 601|-> local IFS=: # 602| # shellcheck disable=SC2086 # 603| set -- $1 Error: SHELLCHECK_WARNING: [#def284] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:634:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 632| # some network driver need long time to initialize, wait before it's ready. # 633| wait_for_if_link() { # 634|-> local cnt=0 # 635| local li # 636| local timeout Error: SHELLCHECK_WARNING: [#def285] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:635:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 633| wait_for_if_link() { # 634| local cnt=0 # 635|-> local li # 636| local timeout # 637| timeout=$(getargs rd.net.timeout.iflink=) Error: SHELLCHECK_WARNING: [#def286] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:636:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 634| local cnt=0 # 635| local li # 636|-> local timeout # 637| timeout=$(getargs rd.net.timeout.iflink=) # 638| timeout=${timeout:-60} Error: SHELLCHECK_WARNING: [#def287] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:651:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 649| # 650| wait_for_if_up() { # 651|-> local cnt=0 # 652| local li # 653| local timeout Error: SHELLCHECK_WARNING: [#def288] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:652:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 650| wait_for_if_up() { # 651| local cnt=0 # 652|-> local li # 653| local timeout # 654| timeout=$(getargs rd.net.timeout.ifup=) Error: SHELLCHECK_WARNING: [#def289] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:653:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 651| local cnt=0 # 652| local li # 653|-> local timeout # 654| timeout=$(getargs rd.net.timeout.ifup=) # 655| timeout=${timeout:-20} Error: SHELLCHECK_WARNING: [#def290] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:685:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 683| # 684| wait_for_route_ok() { # 685|-> local cnt=0 # 686| local timeout # 687| timeout=$(getargs rd.net.timeout.route=) Error: SHELLCHECK_WARNING: [#def291] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:686:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 684| wait_for_route_ok() { # 685| local cnt=0 # 686|-> local timeout # 687| timeout=$(getargs rd.net.timeout.route=) # 688| timeout=${timeout:-20} Error: SHELLCHECK_WARNING: [#def292] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:701:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 699| # 700| wait_for_ipv6_dad_link() { # 701|-> local cnt=0 # 702| local timeout # 703| timeout=$(getargs rd.net.timeout.ipv6dad=) Error: SHELLCHECK_WARNING: [#def293] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:702:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 700| wait_for_ipv6_dad_link() { # 701| local cnt=0 # 702|-> local timeout # 703| timeout=$(getargs rd.net.timeout.ipv6dad=) # 704| timeout=${timeout:-50} Error: SHELLCHECK_WARNING: [#def294] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:720:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 718| # 719| wait_for_ipv6_dad() { # 720|-> local cnt=0 # 721| local timeout # 722| timeout=$(getargs rd.net.timeout.ipv6dad=) Error: SHELLCHECK_WARNING: [#def295] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:721:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 719| wait_for_ipv6_dad() { # 720| local cnt=0 # 721|-> local timeout # 722| timeout=$(getargs rd.net.timeout.ipv6dad=) # 723| timeout=${timeout:-50} Error: SHELLCHECK_WARNING: [#def296] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:739:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 737| # 738| wait_for_ipv6_auto() { # 739|-> local cnt=0 # 740| local timeout # 741| timeout=$(getargs rd.net.timeout.ipv6auto=) Error: SHELLCHECK_WARNING: [#def297] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:740:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 738| wait_for_ipv6_auto() { # 739| local cnt=0 # 740|-> local timeout # 741| timeout=$(getargs rd.net.timeout.ipv6auto=) # 742| timeout=${timeout:-40} Error: SHELLCHECK_WARNING: [#def298] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:765:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 763| # 764| iface_has_carrier() { # 765|-> local cnt=0 # 766| local iface="$1" flags="" # 767| local timeout Error: SHELLCHECK_WARNING: [#def299] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:766:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 764| iface_has_carrier() { # 765| local cnt=0 # 766|-> local iface="$1" flags="" # 767| local timeout # 768| local iface_sys_path Error: SHELLCHECK_WARNING: [#def300] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:767:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 765| local cnt=0 # 766| local iface="$1" flags="" # 767|-> local timeout # 768| local iface_sys_path # 769| [ -n "$iface" ] || return 2 Error: SHELLCHECK_WARNING: [#def301] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:768:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 766| local iface="$1" flags="" # 767| local timeout # 768|-> local iface_sys_path # 769| [ -n "$iface" ] || return 2 # 770| iface_sys_path="/sys/class/net/$iface" Error: SHELLCHECK_WARNING: [#def302] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:803:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 801| # 802| iface_is_enslaved() { # 803|-> local _li # 804| _li=$(ip link show dev "$@") # 805| strstr "$_li" " master " || return 1 Error: SHELLCHECK_WARNING: [#def303] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:810:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 808| # 809| find_iface_with_link() { # 810|-> local iface_path="" iface="" # 811| for iface_path in /sys/class/net/*; do # 812| iface=${iface_path##*/} Error: SHELLCHECK_WARNING: [#def304] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:823:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 821| # 822| is_persistent_ethernet_name() { # 823|-> local _netif="$1" # 824| local _name_assign_type="0" # 825| Error: SHELLCHECK_WARNING: [#def305] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:824:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 822| is_persistent_ethernet_name() { # 823| local _netif="$1" # 824|-> local _name_assign_type="0" # 825| # 826| [ -f "/sys/class/net/$_netif/name_assign_type" ] \ Error: SHELLCHECK_WARNING: [#def306] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:858:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 856| # 857| is_kernel_ethernet_name() { # 858|-> local _netif="$1" # 859| local _name_assign_type="1" # 860| Error: SHELLCHECK_WARNING: [#def307] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:859:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 857| is_kernel_ethernet_name() { # 858| local _netif="$1" # 859|-> local _name_assign_type="1" # 860| # 861| if [ -e "/sys/class/net/$_netif/name_assign_type" ]; then Error: SHELLCHECK_WARNING: [#def308] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:891:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 889| # 890| iface_get_subchannels() { # 891|-> local _netif # 892| local _subchannels # 893| Error: SHELLCHECK_WARNING: [#def309] /usr/lib/dracut/modules.d/45net-lib/net-lib.sh:892:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 890| iface_get_subchannels() { # 891| local _netif # 892|-> local _subchannels # 893| # 894| _netif="$1" Error: SHELLCHECK_WARNING (CWE-457): [#def310] /usr/lib/dracut/modules.d/45net-lib/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): [#def311] /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): [#def312] /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): [#def313] /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): [#def314] /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: [#def315] /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: [#def316] /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: [#def317] /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: [#def318] /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: [#def319] /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: [#def320] /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: [#def321] /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: [#def322] /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: [#def323] /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: [#def324] /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: [#def325] /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:152:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 150| # 151| nfs_fetch_url() { # 152|-> local url="$1" outloc="$2" nfs="" server="" path="" options="" # 153| nfs_to_var "$url" || return 255 # 154| local filepath="${path%/*}" filename="${path##*/}" mntdir="" Error: SHELLCHECK_WARNING: [#def326] /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:154:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 152| local url="$1" outloc="$2" nfs="" server="" path="" options="" # 153| nfs_to_var "$url" || return 255 # 154|-> local filepath="${path%/*}" filename="${path##*/}" mntdir="" # 155| # 156| # skip mount if server:/filepath is already mounted Error: SHELLCHECK_WARNING: [#def327] /usr/lib/dracut/modules.d/45url-lib/url-lib.sh:159:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 157| mntdir=$(nfs_already_mounted "$server" "$filepath") # 158| if [ -z "$mntdir" ]; then # 159|-> local mntdir # 160| mntdir="$(mkuniqdir /run nfs_mnt)" # 161| mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir" Error: SHELLCHECK_WARNING (CWE-457): [#def328] /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): [#def329] /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:39:12: warning[SC2154]: moddir is referenced but not assigned. # 37| || [ ! -x "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd ]; then # 38| # shellcheck disable=SC1090 # 39|-> . "$moddir"/plymouth-populate-initrd.sh # 40| else # 41| PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ Error: SHELLCHECK_WARNING (CWE-457): [#def330] /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:41:45: warning[SC2154]: dracutfunctions is referenced but not assigned. # 39| . "$moddir"/plymouth-populate-initrd.sh # 40| else # 41|-> PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ # 42| "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir" # 43| fi Error: SHELLCHECK_WARNING (CWE-457): [#def331] /usr/lib/dracut/modules.d/50plymouth/module-setup.sh:42:76: warning[SC2154]: initdir is referenced but not assigned. # 40| else # 41| PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$dracutfunctions" \ # 42|-> "$dracutsysrootdir""${PKGLIBDIR}"/plymouth-populate-initrd -t "$initdir" # 43| fi # 44| Error: SHELLCHECK_WARNING (CWE-457): [#def332] /usr/lib/dracut/modules.d/50plymouth/plymouth-populate-initrd.sh:11:19: warning[SC2154]: initdir is referenced but not assigned. # 9| # 10| # shellcheck disable=SC2174 # 11|-> mkdir -m 0755 -p "${initdir}/usr/share/plymouth" # 12| # 13| inst_libdir_file "plymouth/text.so" "plymouth/details.so" Error: SHELLCHECK_WARNING (CWE-457): [#def333] /usr/lib/dracut/modules.d/50plymouth/plymouth-populate-initrd.sh:20:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 18| "/usr/share/plymouth/themes/text/text.plymouth" # 19| # 20|-> if [[ -d $dracutsysrootdir/usr/share/plymouth/themes/${PLYMOUTH_THEME} ]]; then # 21| for x in "/usr/share/plymouth/themes/${PLYMOUTH_THEME}"/*; do # 22| [[ -f "$dracutsysrootdir$x" ]] || break Error: SHELLCHECK_WARNING (CWE-457): [#def334] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:61:10: warning[SC2154]: dbussystem is referenced but not assigned. # 59| # 60| inst_multiple -o \ # 61|-> "$dbussystem"/bluetooth.conf \ # 62| "$dbussystemservices"/org.bluez.service \ # 63| "${systemdsystemunitdir}/bluetooth.target" \ Error: SHELLCHECK_WARNING (CWE-457): [#def335] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:62:10: warning[SC2154]: dbussystemservices is referenced but not assigned. # 60| inst_multiple -o \ # 61| "$dbussystem"/bluetooth.conf \ # 62|-> "$dbussystemservices"/org.bluez.service \ # 63| "${systemdsystemunitdir}/bluetooth.target" \ # 64| "${systemdsystemunitdir}/bluetooth.service" \ Error: SHELLCHECK_WARNING (CWE-457): [#def336] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:63:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 61| "$dbussystem"/bluetooth.conf \ # 62| "$dbussystemservices"/org.bluez.service \ # 63|-> "${systemdsystemunitdir}/bluetooth.target" \ # 64| "${systemdsystemunitdir}/bluetooth.service" \ # 65| bluetoothctl Error: SHELLCHECK_WARNING (CWE-457): [#def337] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:76:14: warning[SC2154]: dbussystemconfdir is referenced but not assigned. # 74| inst_multiple -o \ # 75| /etc/bluetooth/main.conf \ # 76|-> "$dbussystemconfdir"/bluetooth.conf \ # 77| "$systemdsystemconfdir"/bluetooth.service \ # 78| "$systemdsystemconfdir/bluetooth.service.d/*.conf" \ Error: SHELLCHECK_WARNING (CWE-457): [#def338] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:77:14: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 75| /etc/bluetooth/main.conf \ # 76| "$dbussystemconfdir"/bluetooth.conf \ # 77|-> "$systemdsystemconfdir"/bluetooth.service \ # 78| "$systemdsystemconfdir/bluetooth.service.d/*.conf" \ # 79| "${var_lib_files[@]#"$dracutsysrootdir"}" Error: SHELLCHECK_WARNING (CWE-457): [#def339] /usr/lib/dracut/modules.d/62bluetooth/module-setup.sh:90:10: warning[SC2154]: initdir is referenced but not assigned. # 88| Before=shutdown.target\ # 89| After=dbus.service' \ # 90|-> "${initdir}/${systemdsystemunitdir}/bluetooth.service" # 91| # 92| $SYSTEMCTL -q --root "$initdir" enable bluetooth.service Error: SHELLCHECK_WARNING (CWE-457): [#def340] /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): [#def341] /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): [#def342] /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): [#def343] /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 (CWE-457): [#def344] /usr/lib/dracut/modules.d/80test-makeroot/module-setup.sh:25:38: warning[SC2154]: moddir is referenced but not assigned. # 23| # 24| inst_multiple poweroff cp umount sync dd mkfs.ext4 # 25|-> inst_hook initqueue/finished 01 "$moddir/finished-false.sh" # 26| } Error: SHELLCHECK_WARNING (CWE-457): [#def345] /usr/lib/dracut/modules.d/80test-root/module-setup.sh:29:18: warning[SC2154]: dracutbasedir is referenced but not assigned. # 27| inst_multiple -o "${_terminfodir}/l/linux" # 28| # 29|-> inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 30| ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" # 31| ln -s dracut-util "${initdir}/usr/bin/dracut-getargs" Error: SHELLCHECK_WARNING (CWE-457): [#def346] /usr/lib/dracut/modules.d/80test-root/module-setup.sh:30:24: warning[SC2154]: initdir is referenced but not assigned. # 28| # 29| inst_binary "${dracutbasedir}/dracut-util" "/usr/bin/dracut-util" # 30|-> ln -s dracut-util "${initdir}/usr/bin/dracut-getarg" # 31| ln -s dracut-util "${initdir}/usr/bin/dracut-getargs" # 32| Error: SHELLCHECK_WARNING (CWE-457): [#def347] /usr/lib/dracut/modules.d/80test-root/module-setup.sh:36:18: warning[SC2154]: moddir is referenced but not assigned. # 34| inst_script "${dracutbasedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh" # 35| # 36|-> inst_script "$moddir/test-init.sh" "/sbin/init" # 37| # 38| inst_multiple -o plymouth Error: SHELLCHECK_WARNING (CWE-457): [#def348] /usr/lib/dracut/modules.d/80test/module-setup.sh:33:39: warning[SC2154]: moddir is referenced but not assigned. # 31| # 32| inst poweroff # 33|-> inst_hook shutdown-emergency 000 "$moddir/hard-off.sh" # 34| inst_hook emergency 000 "$moddir/hard-off.sh" # 35| } Error: SHELLCHECK_WARNING: [#def349] /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: [#def350] /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): [#def351] /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): [#def352] /usr/lib/dracut/modules.d/90btrfs/module-setup.sh:35:35: warning[SC2154]: initdir is referenced but not assigned. # 33| installkernel() { # 34| instmods btrfs # 35|-> printf "%s\n" "$(cmdline)" > "${initdir}/etc/cmdline.d/00-btrfs.conf" # 36| } # 37| Error: SHELLCHECK_WARNING (CWE-457): [#def353] /usr/lib/dracut/modules.d/90btrfs/module-setup.sh:41:21: warning[SC2154]: moddir is referenced but not assigned. # 39| install() { # 40| if ! inst_rules 64-btrfs.rules; then # 41|-> inst_rules "$moddir/80-btrfs.rules" # 42| case "$(btrfs --help)" in # 43| *device\ ready*) Error: SHELLCHECK_WARNING: [#def354] /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: [#def355] /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: [#def356] /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: [#def357] /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: [#def358] /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: [#def359] /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: [#def360] /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: [#def361] /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: [#def362] /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: [#def363] /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: [#def364] /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: [#def365] /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: [#def366] /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: [#def367] /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: [#def368] /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: [#def369] /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: [#def370] /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: [#def371] /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: [#def372] /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" ] || [ "$1" = '*' ] && return 0 # 179|-> local devlist # 180| local dev # 181| Error: SHELLCHECK_WARNING: [#def373] /usr/lib/dracut/modules.d/90crypt/crypt-lib.sh:180:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 178| [ -z "$1" ] || [ "$1" = '*' ] && return 0 # 179| local devlist # 180|-> local dev # 181| # 182| devlist="$(devnames "$1")" || return 255 Error: SHELLCHECK_WARNING: [#def374] /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: [#def375] /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: [#def376] /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: [#def377] /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: [#def378] /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" ] || [ -z "$for_dev" ] && die 'getkey: wrong usage!' Error: SHELLCHECK_WARNING: [#def379] /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: [#def380] /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: [#def381] /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: [#def382] /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: [#def383] /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): [#def384] /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): [#def385] /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-457): [#def386] /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-457): [#def387] /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): [#def388] /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): [#def389] /usr/lib/dracut/modules.d/90crypt/module-setup.sh:78:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 76| install() { # 77| # 78|-> if [[ $hostonly_cmdline == "yes" ]]; then # 79| local _cryptconf # 80| _cryptconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): [#def390] /usr/lib/dracut/modules.d/90crypt/module-setup.sh:81:62: warning[SC2154]: initdir is referenced but not assigned. # 79| local _cryptconf # 80| _cryptconf=$(cmdline) # 81|-> [[ $_cryptconf ]] && printf "%s\n" "$_cryptconf" >> "${initdir}/etc/cmdline.d/90crypt.conf" # 82| fi # 83| Error: SHELLCHECK_WARNING (CWE-457): [#def391] /usr/lib/dracut/modules.d/90crypt/module-setup.sh:84:27: warning[SC2154]: moddir is referenced but not assigned. # 82| fi # 83| # 84|-> inst_hook cmdline 30 "$moddir/parse-crypt.sh" # 85| if ! dracut_module_included "systemd"; then # 86| inst_multiple cryptsetup rmdir readlink umount Error: SHELLCHECK_WARNING (CWE-457): [#def392] /usr/lib/dracut/modules.d/90crypt/module-setup.sh:93:33: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 91| fi # 92| # 93|-> if [[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/crypttab ]]; then # 94| # filter /etc/crypttab for the devices we need # 95| while read -r _mapper _dev _luksfile _luksoptions || [ -n "$_mapper" ]; do Error: SHELLCHECK_WARNING: [#def393] /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): [#def394] /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: [#def395] /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 final="$2" # 6| local s Error: SHELLCHECK_WARNING: [#def396] /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 final="$2" # 6| local s # 7| local devname Error: SHELLCHECK_WARNING: [#def397] /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 final="$2" # 6|-> local s # 7| local devname # 8| Error: SHELLCHECK_WARNING: [#def398] /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:7:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 5| local final="$2" # 6| local s # 7|-> local devname # 8| # 9| for s in /sys/block/"${dev}"/holders/dm-*; do Error: SHELLCHECK_WARNING: [#def399] /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:42:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 40| # 41| _do_dm_shutdown() { # 42|-> local ret=0 # 43| local final="$1" # 44| local dev Error: SHELLCHECK_WARNING: [#def400] /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:43:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 41| _do_dm_shutdown() { # 42| local ret=0 # 43|-> local final="$1" # 44| local dev # 45| Error: SHELLCHECK_WARNING: [#def401] /usr/lib/dracut/modules.d/90dm/dm-shutdown.sh:44:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 42| local ret=0 # 43| local final="$1" # 44|-> local dev # 45| # 46| info "Disassembling device-mapper devices" Error: SHELLCHECK_WARNING (CWE-457): [#def402] /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): [#def403] /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-457): [#def404] /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): [#def405] /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): [#def406] /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): [#def407] /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): [#def408] /usr/lib/dracut/modules.d/90dmsquash-live-autooverlay/create-overlay-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| printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/create-overlay %s"\n' \ Error: SHELLCHECK_WARNING (CWE-457): [#def409] /usr/lib/dracut/modules.d/90dmsquash-live-autooverlay/module-setup.sh:21:28: warning[SC2154]: moddir is referenced but not assigned. # 19| inst_multiple awk blkid cat grep mkdir mount parted readlink rmdir tr umount # 20| inst_multiple -o mkfs.btrfs mkfs.ext4 mkfs.xfs # 21|-> inst_hook pre-udev 25 "$moddir/create-overlay-genrules.sh" # 22| inst_script "$moddir/create-overlay.sh" "/sbin/create-overlay" # 23| dracut_need_initqueue Error: SHELLCHECK_WARNING (CWE-457): [#def410] /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-457): [#def411] /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: [#def412] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:40:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 38| # Otherwise returns the original path # 39| get_check_dev() { # 40|-> local _udevinfo # 41| dev_path="$(udevadm info -q path --name "$1")" # 42| _udevinfo="$(udevadm info -q property --path "${dev_path}")" Error: SHELLCHECK_WARNING (CWE-277): [#def413] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:108:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 106| # 107| # mount the backing of the live image first # 108|-> mkdir -m 0755 -p /run/initramfs/live # 109| if [ -f "$livedev" ]; then # 110| # no mount needed - we've already got the LiveOS image in initramfs Error: SHELLCHECK_WARNING (CWE-277): [#def414] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:160:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 158| # need to know where to look for the overlay # 159| if [ -z "$setup" ] && [ -n "$devspec" ] && [ -n "$pathspec" ] && [ -n "$overlay" ]; then # 160|-> mkdir -m 0755 -p /run/initramfs/overlayfs # 161| if ismounted "$devspec"; then # 162| devmnt=$(findmnt -e -v -n -o 'TARGET' --source "$devspec") Error: SHELLCHECK_WARNING (CWE-277): [#def415] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:290:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 288| if [ -n "$thin_snapshot" ]; then # 289| modprobe dm_thin_pool # 290|-> mkdir -m 0755 -p /run/initramfs/thin-overlay # 291| # 292| # In block units (512b) Error: SHELLCHECK_WARNING (CWE-277): [#def416] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:338:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 336| SQUASHED_LOOPDEV=$(losetup -f) # 337| losetup -r "$SQUASHED_LOOPDEV" "$SQUASHED" # 338|-> mkdir -m 0755 -p /run/initramfs/squashfs # 339| mount -n -o ro "$SQUASHED_LOOPDEV" /run/initramfs/squashfs # 340| Error: SHELLCHECK_WARNING (CWE-277): [#def417] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:377:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 375| # mount the provided filesystem read/write # 376| echo "Unpacking live filesystem (may take some time)" > /dev/kmsg # 377|-> mkdir -m 0755 -p /run/initramfs/fsimg/ # 378| if [ -n "$SQUASHED" ]; then # 379| cp -v "$FSIMG" /run/initramfs/fsimg/rootfs.img Error: SHELLCHECK_WARNING (CWE-277): [#def418] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:424:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 422| if [ -n "$overlayfs" ]; then # 423| if [ -n "$FSIMG" ]; then # 424|-> mkdir -m 0755 -p /run/rootfsbase # 425| mount -r "$FSIMG" /run/rootfsbase # 426| else Error: SHELLCHECK_WARNING (CWE-457): [#def419] /usr/lib/dracut/modules.d/90dmsquash-live/dmsquash-live-root.sh:432:79: warning[SC2154]: hookdir is referenced but not assigned. # 430| if [ -z "$DRACUT_SYSTEMD" ]; then # 431| [ -n "$ROOTFLAGS" ] && ROOTFLAGS="-o $ROOTFLAGS" # 432|-> printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > "$hookdir"/mount/01-$$-live.sh # 433| fi # 434| fi Error: SHELLCHECK_WARNING (CWE-457): [#def420] /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: [#def421] /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: [#def422] /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): [#def423] /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): [#def424] /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): [#def425] /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): [#def426] /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): [#def427] /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:105:37: warning[SC2154]: srcmods is referenced but not assigned. # 103| fi # 104| # 105|-> awk -F: '/^\// {print $1}' "$srcmods/modules.dep" 2> /dev/null | instmods # 106| # 107| # if not on hostonly mode, or there are hostonly block device Error: SHELLCHECK_WARNING (CWE-457): [#def428] /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:113:19: warning[SC2154]: hostonly_mode is referenced but not assigned. # 111| hostonly='' instmods sg sr_mod sd_mod scsi_dh ata_piix # 112| # 113|-> if [[ $hostonly_mode == "strict" ]]; then # 114| install_block_modules_strict # 115| else Error: SHELLCHECK_WARNING (CWE-457): [#def429] /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:141:23: warning[SC2154]: depmodd is referenced but not assigned. # 139| fi # 140| # 141|-> inst_multiple -o "$depmodd/*.conf" # 142| if [[ $hostonly ]]; then # 143| inst_multiple -H -o "$depmodconfdir/*.conf" Error: SHELLCHECK_WARNING (CWE-457): [#def430] /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:143:30: warning[SC2154]: depmodconfdir is referenced but not assigned. # 141| inst_multiple -o "$depmodd/*.conf" # 142| if [[ $hostonly ]]; then # 143|-> inst_multiple -H -o "$depmodconfdir/*.conf" # 144| fi # 145| : Error: SHELLCHECK_WARNING (CWE-457): [#def431] /usr/lib/dracut/modules.d/90kernel-modules/module-setup.sh:154:31: warning[SC2154]: moddir is referenced but not assigned. # 152| [[ $hostonly ]] && inst_multiple -H -o /etc/modprobe.d/*.conf /etc/modprobe.conf # 153| if ! dracut_module_included "systemd"; then # 154|-> inst_hook cmdline 01 "$moddir/parse-kernel.sh" # 155| fi # 156| inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh Error: SHELLCHECK_WARNING (CWE-457): [#def432] /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 (CWE-457): [#def433] /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): [#def434] /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): [#def435] /usr/lib/dracut/modules.d/90livenet/parse-livenet.sh:16:44: warning[SC2154]: hookdir is referenced but not assigned. # 14| fi # 15| echo "$updates" > /tmp/liveupdates.info # 16|-> echo '[ -e /tmp/liveupdates.done ]' > "$hookdir"/initqueue/finished/liveupdates.sh # 17| fi # 18| Error: SHELLCHECK_WARNING (CWE-277): [#def436] /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): [#def437] /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): [#def438] /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): [#def439] /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): [#def440] /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): [#def441] /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): [#def442] /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): [#def443] /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): [#def444] /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: [#def445] /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: [#def446] /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: [#def447] /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): [#def448] /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: [#def449] /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: [#def450] /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: [#def451] /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: [#def452] /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): [#def453] /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: [#def454] /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: [#def455] /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| local _LEFT_UUID Error: SHELLCHECK_WARNING: [#def456] /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| local _LEFT_UUID # 36| local _uuid Error: SHELLCHECK_WARNING: [#def457] /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:35:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 33| local _UUID # 34| local _MD_UUID # 35|-> local _LEFT_UUID # 36| local _uuid # 37| Error: SHELLCHECK_WARNING: [#def458] /usr/lib/dracut/modules.d/90mdraid/mdraid_start.sh:36:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 34| local _MD_UUID # 35| local _LEFT_UUID # 36|-> local _uuid # 37| # 38| _MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=) Error: SHELLCHECK_WARNING (CWE-457): [#def459] /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): [#def460] /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): [#def461] /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): [#def462] /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): [#def463] /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): [#def464] /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:100:30: warning[SC2154]: mdadmconf is referenced but not assigned. # 98| inst_rules "$moddir/59-persistent-storage-md.rules" # 99| # 100|-> if [[ $hostonly ]] || [[ $mdadmconf == "yes" ]]; then # 101| if [[ -f $dracutsysrootdir/etc/mdadm.conf ]]; then # 102| inst -H /etc/mdadm.conf Error: SHELLCHECK_WARNING (CWE-457): [#def465] /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:101:18: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 99| # 100| if [[ $hostonly ]] || [[ $mdadmconf == "yes" ]]; then # 101|-> if [[ -f $dracutsysrootdir/etc/mdadm.conf ]]; then # 102| inst -H /etc/mdadm.conf # 103| else Error: SHELLCHECK_WARNING (CWE-457): [#def466] /usr/lib/dracut/modules.d/90mdraid/module-setup.sh:124:35: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 122| inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start # 123| if dracut_module_included "systemd"; then # 124|-> if [[ -e $dracutsysrootdir$systemdsystemunitdir/mdmon@.service ]]; then # 125| inst_simple "$systemdsystemunitdir"/mdmon@.service # 126| fi Error: SHELLCHECK_WARNING (CWE-457): [#def467] /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-457): [#def468] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:119:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 117| /etc/multipath/* \ # 118| "$config_dir"/* \ # 119|-> "$tmpfilesdir/multipath.conf" # 120| # 121| mpathconf_installed \ Error: SHELLCHECK_WARNING (CWE-457): [#def469] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:122:34: warning[SC2154]: hostonly_mode is referenced but not assigned. # 120| # 121| mpathconf_installed \ # 122|-> && [[ $hostonly ]] && [[ $hostonly_mode == "strict" ]] && { # 123| for_each_host_dev_and_slaves_all add_hostonly_mpath_conf # 124| if ((${#_allow[@]} > 0)); then Error: SHELLCHECK_WARNING (CWE-457): [#def470] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:130:48: warning[SC2154]: initdir is referenced but not assigned. # 128| _args+=("--allow" "$_dev") # 129| done # 130|-> mpathconf "${_args[@]}" --outfile "${initdir}"/etc/multipath.conf # 131| fi # 132| } Error: SHELLCHECK_WARNING (CWE-457): [#def471] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:139:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 137| inst_libdir_file 'libgcc_s.so*' # 138| # 139|-> if [[ $hostonly_cmdline == "yes" ]]; then # 140| local _conf # 141| _conf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): [#def472] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:147:26: warning[SC2154]: moddir is referenced but not assigned. # 145| if dracut_module_included "systemd"; then # 146| if mpathconf_installed; then # 147|-> inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" # 148| $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service # 149| fi Error: SHELLCHECK_WARNING (CWE-457): [#def473] /usr/lib/dracut/modules.d/90multipath/module-setup.sh:147:67: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 145| if dracut_module_included "systemd"; then # 146| if mpathconf_installed; then # 147|-> inst_simple "${moddir}/multipathd-configure.service" "${systemdsystemunitdir}/multipathd-configure.service" # 148| $SYSTEMCTL -q --root "$initdir" enable multipathd-configure.service # 149| fi Error: SHELLCHECK_WARNING (CWE-457): [#def474] /usr/lib/dracut/modules.d/90numlock/module-setup.sh:28:37: warning[SC2154]: moddir is referenced but not assigned. # 26| setleds # 27| # 28|-> inst_hook initqueue/settled 90 "$moddir/numlock.sh" # 29| } Error: SHELLCHECK_WARNING (CWE-457): [#def475] /usr/lib/dracut/modules.d/90overlayfs/module-setup.sh:17:29: warning[SC2154]: moddir is referenced but not assigned. # 15| # 16| install() { # 17|-> inst_hook pre-mount 01 "$moddir/prepare-overlayfs.sh" # 18| inst_hook mount 01 "$moddir/mount-overlayfs.sh" # overlay on top of block device # 19| inst_hook pre-pivot 10 "$moddir/mount-overlayfs.sh" # overlay on top of network device (e.g. nfs) Error: SHELLCHECK_WARNING (CWE-277): [#def476] /usr/lib/dracut/modules.d/90overlayfs/prepare-overlayfs.sh:10:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 8| if [ -n "$overlayfs" ]; then # 9| if ! [ -e /run/rootfsbase ]; then # 10|-> mkdir -m 0755 -p /run/rootfsbase # 11| mount --bind "$NEWROOT" /run/rootfsbase # 12| fi Error: SHELLCHECK_WARNING (CWE-277): [#def477] /usr/lib/dracut/modules.d/90overlayfs/prepare-overlayfs.sh:14:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 12| fi # 13| # 14|-> mkdir -m 0755 -p /run/overlayfs # 15| mkdir -m 0755 -p /run/ovlwork # 16| if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then Error: SHELLCHECK_WARNING (CWE-277): [#def478] /usr/lib/dracut/modules.d/90overlayfs/prepare-overlayfs.sh:15:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 13| # 14| mkdir -m 0755 -p /run/overlayfs # 15|-> mkdir -m 0755 -p /run/ovlwork # 16| if [ -n "$reset_overlay" ] && [ -h /run/overlayfs ]; then # 17| ovlfsdir=$(readlink /run/overlayfs) Error: SHELLCHECK_WARNING (CWE-457): [#def479] /usr/lib/dracut/modules.d/90pcmcia/module-setup.sh:25:10: warning[SC2154]: udevdir is referenced but not assigned. # 23| # 24| inst_multiple -o \ # 25|-> "${udevdir}"/pcmcia-socket-startup \ # 26| "${udevdir}"/pcmcia-check-broken-cis # 27| Error: SHELLCHECK_WARNING: [#def480] /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): [#def481] /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 (CWE-457): [#def482] /usr/lib/dracut/modules.d/90systemd-cryptsetup/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 || return 1 # 8| # 9| [[ $hostonly ]] || [[ $mount_needs ]] && { Error: SHELLCHECK_WARNING (CWE-457): [#def483] /usr/lib/dracut/modules.d/90systemd-cryptsetup/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 == "crypto_LUKS" ]] && return 0 # 12| done Error: SHELLCHECK_WARNING (CWE-457): [#def484] /usr/lib/dracut/modules.d/90systemd-cryptsetup/module-setup.sh:23:28: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 21| local deps # 22| deps="dm rootfs-block crypt systemd-ask-password" # 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): [#def485] /usr/lib/dracut/modules.d/90systemd-cryptsetup/module-setup.sh:50:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 48| # the enablement symlinks # 49| inst_multiple -o \ # 50|-> "$tmpfilesdir"/cryptsetup.conf \ # 51| "$systemdutildir"/system-generators/systemd-cryptsetup-generator \ # 52| "$systemdutildir"/systemd-cryptsetup \ Error: SHELLCHECK_WARNING (CWE-457): [#def486] /usr/lib/dracut/modules.d/90systemd-cryptsetup/module-setup.sh:53:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 51| "$systemdutildir"/system-generators/systemd-cryptsetup-generator \ # 52| "$systemdutildir"/systemd-cryptsetup \ # 53|-> "$systemdsystemunitdir"/cryptsetup.target \ # 54| "$systemdsystemunitdir"/sysinit.target.wants/cryptsetup.target \ # 55| "$systemdsystemunitdir"/remote-cryptsetup.target \ Error: SHELLCHECK_WARNING (CWE-457): [#def487] /usr/lib/dracut/modules.d/90systemd-cryptsetup/module-setup.sh:58:33: warning[SC2154]: initdir is referenced but not assigned. # 56| "$systemdsystemunitdir"/initrd-root-device.target.wants/remote-cryptsetup.target # 57| # 58|-> if [[ $hostonly ]] && [[ -f $initdir/etc/crypttab ]]; then # 59| # for each entry in /etc/crypttab check if the key file is backed by a socket unit and if so, # 60| # include it along with its corresponding service unit. Error: SHELLCHECK_WARNING (CWE-457): [#def488] /usr/lib/dracut/modules.d/90systemd-cryptsetup/module-setup.sh:72:43: warning[SC2154]: systemdsystemconfdir is referenced but not assigned. # 70| fi # 71| # 72|-> find "$systemdsystemunitdir" "$systemdsystemconfdir" -type f -name "*.socket" | while read -r socket_unit; do # 73| # systemd-cryptsetup utility only supports SOCK_STREAM (ListenStream) sockets, so we ignore # 74| # other types like SOCK_DGRAM (ListenDatagram), SOCK_SEQPACKET (ListenSequentialPacket), etc. Error: SHELLCHECK_WARNING: [#def489] /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: [#def490] /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: [#def491] /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: [#def492] /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: [#def493] /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: [#def494] /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): [#def495] /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: [#def496] /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: [#def497] /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| local cmd Error: SHELLCHECK_WARNING: [#def498] /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| local cmd # 35| gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" Error: SHELLCHECK_WARNING: [#def499] /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:34:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 32| local gpgMajorVersion # 33| local gpgMinorVersion # 34|-> local cmd # 35| gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" # 36| gpgMinorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" Error: SHELLCHECK_WARNING: [#def500] /usr/lib/dracut/modules.d/91crypt-gpg/crypt-gpg-lib.sh:45:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 43| GNUPGHOME="$gpghome" gpg --quiet --no-tty --import < /root/crypt-public-key.gpg # 44| GNUPGHOME="$gpghome" gpg-connect-agent 1> /dev/null learn /bye # 45|-> local smartcardSerialNumber # 46| smartcardSerialNumber="$(GNUPGHOME=$gpghome gpg --no-tty --card-status \ # 47| | sed -n -r -e 's|Serial number.*: ([0-9]*)|\1|p' | tr -d '\n')" Error: SHELLCHECK_WARNING (CWE-457): [#def501] /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 stty # 27|-> inst "$moddir/crypt-gpg-lib.sh" "/lib/dracut-crypt-gpg-lib.sh" # 28| # 29| if sc_requested; then Error: SHELLCHECK_WARNING (CWE-457): [#def502] /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): [#def503] /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: [#def504] /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: [#def505] /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: [#def506] /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: [#def507] /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: [#def508] /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: [#def509] /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: [#def510] /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): [#def511] /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): [#def512] /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): [#def513] /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): [#def514] /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): [#def515] /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): [#def516] /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:36:10: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 34| # 35| inst_multiple -o \ # 36|-> "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37| "$udevrulesdir"/60-tpm-udev.rules \ # 38| "$systemdutildir"/system-generators/systemd-tpm2-generator \ Error: SHELLCHECK_WARNING (CWE-457): [#def517] /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:37:10: warning[SC2154]: udevrulesdir is referenced but not assigned. # 35| inst_multiple -o \ # 36| "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37|-> "$udevrulesdir"/60-tpm-udev.rules \ # 38| "$systemdutildir"/system-generators/systemd-tpm2-generator \ # 39| "$systemdsystemunitdir/tpm2.target" \ Error: SHELLCHECK_WARNING (CWE-457): [#def518] /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:38:10: warning[SC2154]: systemdutildir is referenced but not assigned. # 36| "$tmpfilesdir"/tpm2-tss-fapi.conf \ # 37| "$udevrulesdir"/60-tpm-udev.rules \ # 38|-> "$systemdutildir"/system-generators/systemd-tpm2-generator \ # 39| "$systemdsystemunitdir/tpm2.target" \ # 40| tpm2_pcrread tpm2_pcrextend tpm2_createprimary tpm2_createpolicy \ Error: SHELLCHECK_WARNING (CWE-457): [#def519] /usr/lib/dracut/modules.d/91tpm2-tss/module-setup.sh:39:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 37| "$udevrulesdir"/60-tpm-udev.rules \ # 38| "$systemdutildir"/system-generators/systemd-tpm2-generator \ # 39|-> "$systemdsystemunitdir/tpm2.target" \ # 40| tpm2_pcrread tpm2_pcrextend tpm2_createprimary tpm2_createpolicy \ # 41| tpm2_create tpm2_load tpm2_unseal tpm2 Error: SHELLCHECK_WARNING: [#def520] /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: [#def521] /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-457): [#def522] /usr/lib/dracut/modules.d/95cifs/cifsroot.sh:16:15: warning[SC2154]: server is referenced but not assigned. # 14| cifs_to_var "$root" # 15| # 16|-> mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root; } # 17| # 18| # inject new exit_if_exists Error: SHELLCHECK_WARNING (CWE-457): [#def523] /usr/lib/dracut/modules.d/95cifs/cifsroot.sh:16:23: warning[SC2154]: path is referenced but not assigned. # 14| cifs_to_var "$root" # 15| # 16|-> mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root; } # 17| # 18| # inject new exit_if_exists Error: SHELLCHECK_WARNING (CWE-457): [#def524] /usr/lib/dracut/modules.d/95cifs/cifsroot.sh:16:45: warning[SC2154]: options is referenced but not assigned. # 14| cifs_to_var "$root" # 15| # 16|-> mount.cifs "//$server/$path" "$NEWROOT" -o "$options" && { [ -e /dev/root ] || ln -s null /dev/root; } # 17| # 18| # inject new exit_if_exists Error: SHELLCHECK_WARNING (CWE-457): [#def525] /usr/lib/dracut/modules.d/95cifs/cifsroot.sh:20:79: warning[SC2154]: hookdir is referenced but not assigned. # 18| # inject new exit_if_exists # 19| # shellcheck disable=SC2016 # 20|-> echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm -f -- "$job"' > "$hookdir"/initqueue/cifs.sh # 21| # force udevsettle to break # 22| : > "$hookdir"/initqueue/work Error: SHELLCHECK_WARNING (CWE-457): [#def526] /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): [#def527] /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): [#def528] /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): [#def529] /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): [#def530] /usr/lib/dracut/modules.d/95debug/module-setup.sh:55:23: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 53| vi # 54| # 55|-> grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" # 56| } Error: SHELLCHECK_WARNING (CWE-457): [#def531] /usr/lib/dracut/modules.d/95debug/module-setup.sh:55:70: warning[SC2154]: initdir is referenced but not assigned. # 53| vi # 54| # 55|-> grep '^tcpdump:' "$dracutsysrootdir"/etc/passwd 2> /dev/null >> "$initdir/etc/passwd" # 56| } Error: SHELLCHECK_WARNING (CWE-457): [#def532] /usr/lib/dracut/modules.d/95fcoe-uefi/module-setup.sh:27:27: warning[SC2154]: moddir is referenced but not assigned. # 25| # called by dracut # 26| install() { # 27|-> inst_hook cmdline 20 "$moddir/parse-uefifcoe.sh" # 28| } Error: SHELLCHECK_WARNING: [#def533] /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-457): [#def534] /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:101:14: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 99| install() { # 100| inst_multiple ip dcbtool fipvlan lldpad readlink lldptool fcoemon fcoeadm tr # 101|-> if [[ -e $dracutsysrootdir/etc/hba.conf ]]; then # 102| inst_libdir_file 'libhbalinux.so*' # 103| inst_simple "/etc/hba.conf" Error: SHELLCHECK_WARNING (CWE-277): [#def535] /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| fi # 105| # 106|-> mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 107| mkdir -m 0755 -p "$initdir/etc/fcoe" # 108| Error: SHELLCHECK_WARNING (CWE-457): [#def536] /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:106:23: warning[SC2154]: initdir is referenced but not assigned. # 104| fi # 105| # 106|-> mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 107| mkdir -m 0755 -p "$initdir/etc/fcoe" # 108| Error: SHELLCHECK_WARNING (CWE-277): [#def537] /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:107:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 105| # 106| mkdir -m 0755 -p "$initdir/var/lib/lldpad" # 107|-> mkdir -m 0755 -p "$initdir/etc/fcoe" # 108| # 109| if [[ $hostonly_cmdline == "yes" ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def538] /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:109:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 107| mkdir -m 0755 -p "$initdir/etc/fcoe" # 108| # 109|-> if [[ $hostonly_cmdline == "yes" ]]; then # 110| local _fcoeconf # 111| _fcoeconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): [#def539] /usr/lib/dracut/modules.d/95fcoe/module-setup.sh:116:11: warning[SC2154]: moddir is referenced but not assigned. # 114| inst_multiple "/etc/fcoe/cfg-*" # 115| # 116|-> inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" # 117| inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" # 118| inst_hook pre-trigger 03 "$moddir/lldpad.sh" Error: SHELLCHECK_WARNING: [#def540] /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: [#def541] /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: [#def542] /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: [#def543] /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: [#def544] /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: [#def545] /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-457): [#def546] /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): [#def547] /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: [#def548] /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 (CWE-457): [#def549] /usr/lib/dracut/modules.d/95hwdb/module-setup.sh:13:20: warning[SC2154]: udevconfdir is referenced but not assigned. # 11| # Follow the same priority as `systemd-hwdb`; `/etc` is the default # 12| # and `/usr/lib` an alternative location. # 13|-> inst_multiple "${udevconfdir}"/hwdb.bin # 14| # 15| if [[ $hostonly ]]; then Error: SHELLCHECK_WARNING (CWE-457): [#def550] /usr/lib/dracut/modules.d/95hwdb/module-setup.sh:16:30: warning[SC2154]: udevdir is referenced but not assigned. # 14| # 15| if [[ $hostonly ]]; then # 16|-> inst_multiple -H -o "${udevdir}"/hwdb.bin # 17| fi # 18| } Error: SHELLCHECK_WARNING: [#def551] /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: [#def552] /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: [#def553] /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: [#def554] /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: [#def555] /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: [#def556] /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: [#def557] /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: [#def558] /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: [#def559] /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): [#def560] /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): [#def561] /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): [#def562] /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): [#def563] /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 (CWE-457): [#def564] /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:195:10: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 193| # 194| inst_multiple -o \ # 195|-> "$systemdsystemunitdir"/iscsid.socket \ # 196| "$systemdsystemunitdir"/iscsid.service \ # 197| "$systemdsystemunitdir"/iscsiuio.service \ Error: SHELLCHECK_WARNING (CWE-457): [#def565] /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:208:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 206| # 207| # Detect iBFT and perform mandatory steps # 208|-> if [[ $hostonly_cmdline == "yes" ]]; then # 209| local _iscsiconf # 210| _iscsiconf=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): [#def566] /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:211:62: warning[SC2154]: initdir is referenced but not assigned. # 209| local _iscsiconf # 210| _iscsiconf=$(cmdline) # 211|-> [[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf" # 212| fi # 213| Error: SHELLCHECK_WARNING (CWE-457): [#def567] /usr/lib/dracut/modules.d/95iscsi/module-setup.sh:214:27: warning[SC2154]: moddir is referenced but not assigned. # 212| fi # 213| # 214|-> inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh" # 215| inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh" # 216| inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot" Error: SHELLCHECK_WARNING (CWE-457): [#def568] /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): [#def569] /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): [#def570] /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:64:18: warning[SC2154]: moddir is referenced but not assigned. # 62| # called by dracut # 63| install() { # 64|-> inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh # 65| inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh # 66| inst_hook cmdline 30 "$moddir/parse-lunmask.sh" Error: SHELLCHECK_WARNING (CWE-457): [#def571] /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:67:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 65| inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh # 66| inst_hook cmdline 30 "$moddir/parse-lunmask.sh" # 67|-> if [[ $hostonly_cmdline == "yes" ]]; then # 68| local _lunmask # 69| Error: SHELLCHECK_WARNING (CWE-457): [#def572] /usr/lib/dracut/modules.d/95lunmask/module-setup.sh:71:43: warning[SC2154]: initdir is referenced but not assigned. # 69| # 70| for _lunmask in $(cmdline); do # 71|-> printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf" # 72| done # 73| fi Error: SHELLCHECK_WARNING: [#def573] /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: [#def574] /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: [#def575] /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: [#def576] /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: [#def577] /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: [#def578] /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): [#def579] /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): [#def580] /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-457): [#def581] /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" ] || [ "$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): [#def582] /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): [#def583] /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): [#def584] /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): [#def585] /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): [#def586] /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): [#def587] /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): [#def588] /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): [#def589] /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): [#def590] /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): [#def591] /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): [#def592] /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): [#def593] /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): [#def594] /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): [#def595] /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: [#def596] /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: [#def597] /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: [#def598] /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: [#def599] /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): [#def600] /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): [#def601] /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): [#def602] /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: [#def603] /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: [#def604] /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: [#def605] /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): [#def606] /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): [#def607] /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): [#def608] /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): [#def609] /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 ugliness later on again Error: SHELLCHECK_WARNING (CWE-457): [#def610] /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 ugliness 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): [#def611] /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| # rpc user needs to be able to write to this directory to save the warmstart Error: SHELLCHECK_WARNING (CWE-457): [#def612] /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:130:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 128| # called by dracut # 129| install() { # 130|-> if [[ $hostonly_cmdline == "yes" ]]; then # 131| local _nvmf_args # 132| _nvmf_args=$(cmdline) Error: SHELLCHECK_WARNING (CWE-457): [#def613] /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:133:62: warning[SC2154]: initdir is referenced but not assigned. # 131| local _nvmf_args # 132| _nvmf_args=$(cmdline) # 133|-> [[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/95nvmf-args.conf" # 134| fi # 135| inst_simple -H "/etc/nvme/hostnqn" Error: SHELLCHECK_WARNING (CWE-457): [#def614] /usr/lib/dracut/modules.d/95nvmf/module-setup.sh:140:18: warning[SC2154]: moddir is referenced but not assigned. # 138| inst_multiple ip sed # 139| # 140|-> inst_script "${moddir}/nvmf-autoconnect.sh" /sbin/nvmf-autoconnect.sh # 141| inst_script "${moddir}/nbftroot.sh" /sbin/nbftroot # 142| Error: SHELLCHECK_WARNING: [#def615] /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: [#def616] /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: [#def617] /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: [#def618] /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: [#def619] /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: [#def620] /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): [#def621] /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): [#def622] /usr/lib/dracut/modules.d/95resume/module-setup.sh:44:17: warning[SC2154]: host_fs_types is referenced but not assigned. # 42| local _resume # 43| # 44|-> for dev in "${!host_fs_types[@]}"; do # 45| [[ ${host_fs_types[$dev]} =~ ^(swap|swsuspend|swsupend)$ ]] || continue # 46| _resume=$(shorten_persistent_dev "$(get_persistent_dev "$dev")") Error: SHELLCHECK_WARNING (CWE-457): [#def623] /usr/lib/dracut/modules.d/95resume/module-setup.sh:56:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 54| local _resumeconf # 55| # 56|-> if [[ $hostonly_cmdline == "yes" ]]; then # 57| _resumeconf=$(cmdline) # 58| [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" Error: SHELLCHECK_WARNING (CWE-457): [#def624] /usr/lib/dracut/modules.d/95resume/module-setup.sh:58:64: warning[SC2154]: initdir is referenced but not assigned. # 56| if [[ $hostonly_cmdline == "yes" ]]; then # 57| _resumeconf=$(cmdline) # 58|-> [[ $_resumeconf ]] && printf "%s\n" "$_resumeconf" >> "${initdir}/etc/cmdline.d/95resume.conf" # 59| fi # 60| Error: SHELLCHECK_WARNING (CWE-457): [#def625] /usr/lib/dracut/modules.d/95resume/module-setup.sh:62:50: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 60| # 61| # if systemd is included and has the hibernate-resume tool, use it and nothing else # 62|-> if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then # 63| inst_multiple -o \ # 64| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ Error: SHELLCHECK_WARNING (CWE-457): [#def626] /usr/lib/dracut/modules.d/95resume/module-setup.sh:62:67: warning[SC2154]: systemdutildir is referenced but not assigned. # 60| # 61| # if systemd is included and has the hibernate-resume tool, use it and nothing else # 62|-> if dracut_module_included "systemd" && [[ -x $dracutsysrootdir$systemdutildir/systemd-hibernate-resume ]]; then # 63| inst_multiple -o \ # 64| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ Error: SHELLCHECK_WARNING (CWE-457): [#def627] /usr/lib/dracut/modules.d/95resume/module-setup.sh:65:14: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 63| inst_multiple -o \ # 64| "$systemdutildir"/system-generators/systemd-hibernate-resume-generator \ # 65|-> "$systemdsystemunitdir"/systemd-hibernate-resume.service \ # 66| "$systemdsystemunitdir"/systemd-hibernate-resume@.service \ # 67| "$systemdutildir"/systemd-hibernate-resume Error: SHELLCHECK_WARNING (CWE-457): [#def628] /usr/lib/dracut/modules.d/95resume/module-setup.sh:81:31: warning[SC2154]: moddir is referenced but not assigned. # 79| # 80| if ! dracut_module_included "systemd"; then # 81|-> inst_hook cmdline 10 "$moddir/parse-resume.sh" # 82| else # 83| inst_script "$moddir/parse-resume.sh" /lib/dracut/parse-resume.sh Error: SHELLCHECK_WARNING (CWE-457): [#def629] /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-457): [#def630] /usr/lib/dracut/modules.d/95resume/resume.sh:5:26: warning[SC2154]: resume is referenced but not assigned. # 3| PATH=/usr/sbin:/usr/bin:/sbin:/bin # 4| # 5|-> [ -s /.resume ] && [ -b "$resume" ] && { # 6| # First try user level resume; it offers splash etc # 7| case "$splash" in Error: SHELLCHECK_WARNING (CWE-457): [#def631] /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 ] && [ -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): [#def632] /usr/lib/dracut/modules.d/95rootfs-block/block-genrules.sh:3:7: warning[SC2154]: root is referenced but not assigned. # 1| #!/usr/bin/sh # 2| # 3|-> if [ "${root%%:*}" = "block" ]; then # 4| { # 5| printf 'KERNEL=="%s", SYMLINK+="root"\n' \ Error: SHELLCHECK_WARNING (CWE-457): [#def633] /usr/lib/dracut/modules.d/95rootfs-block/block-genrules.sh:13:46: warning[SC2154]: hookdir is referenced but not assigned. # 11| # shellcheck disable=SC2016 # 12| printf '[ -e "%s" ] && { ln -s "%s" /dev/root 2>/dev/null; rm "$job"; }\n' \ # 13|-> "${root#block:}" "${root#block:}" > "$hookdir"/initqueue/settled/blocksymlink.sh # 14| # 15| wait_for_dev "${root#block:}" Error: SHELLCHECK_WARNING (CWE-457): [#def634] /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): [#def635] /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-457): [#def636] /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): [#def637] /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): [#def638] /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): [#def639] /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: [#def640] /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): [#def641] /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-457): [#def642] /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): [#def643] /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): [#def644] /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): [#def645] /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): [#def646] /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): [#def647] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:12:11: warning[SC2154]: initdir is referenced but not assigned. # 10| inst_multiple udevadm cat uname blkid # 11| # 12|-> [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 13| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 14| [[ -x $dracutsysrootdir$_i ]] || continue Error: SHELLCHECK_WARNING (CWE-457): [#def648] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:12:22: warning[SC2154]: systemdutildir is referenced but not assigned. # 10| inst_multiple udevadm cat uname blkid # 11| # 12|-> [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 13| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 14| [[ -x $dracutsysrootdir$_i ]] || continue Error: SHELLCHECK_WARNING (CWE-457): [#def649] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:13:50: warning[SC2154]: udevdir is referenced but not assigned. # 11| # 12| [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 13|-> for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 14| [[ -x $dracutsysrootdir$_i ]] || continue # 15| inst "$_i" Error: SHELLCHECK_WARNING (CWE-457): [#def650] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:14:15: warning[SC2154]: dracutsysrootdir is referenced but not assigned. # 12| [[ -d ${initdir}/$systemdutildir ]] || mkdir -p "${initdir}/$systemdutildir" # 13| for _i in "${systemdutildir}"/systemd-udevd "${udevdir}"/udevd /sbin/udevd; do # 14|-> [[ -x $dracutsysrootdir$_i ]] || continue # 15| inst "$_i" # 16| Error: SHELLCHECK_WARNING (CWE-457): [#def651] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:62:10: warning[SC2154]: moddir is referenced but not assigned. # 60| 81-net-dhcp.rules \ # 61| 95-udev-late.rules \ # 62|-> "$moddir/59-persistent-storage.rules" \ # 63| "$moddir/61-persistent-storage.rules" # 64| Error: SHELLCHECK_WARNING (CWE-457): [#def652] /usr/lib/dracut/modules.d/95udev-rules/module-setup.sh:103:14: warning[SC2154]: udevrulesconfdir is referenced but not assigned. # 101| inst_multiple -H -o \ # 102| /etc/udev/udev.conf \ # 103|-> "$udevrulesconfdir/*.rules" # 104| fi # 105| } Error: SHELLCHECK_WARNING (CWE-457): [#def653] /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): [#def654] /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: [#def655] /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: [#def656] /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-457): [#def657] /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): [#def658] /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): [#def659] /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): [#def660] /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" ] || [ "${root%%:*}" = "virtiofs" ]; then # 6| if ! load_fstype virtiofs; then # 7| die "virtiofs is required but not available." Error: SHELLCHECK_WARNING (CWE-457): [#def661] /usr/lib/dracut/modules.d/95virtiofs/mount-virtiofs.sh:5:39: warning[SC2154]: root is referenced but not assigned. # 3| type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh # 4| # 5|-> if [ "${fstype}" = "virtiofs" ] || [ "${root%%:*}" = "virtiofs" ]; then # 6| if ! load_fstype virtiofs; then # 7| die "virtiofs is required but not available." Error: SHELLCHECK_WARNING (CWE-457): [#def662] /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): [#def663] /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" ] || [ "${root%%:*}" = "virtiofs" ]; then # 7| # shellcheck disable=SC2034 # 8| rootok=1 Error: SHELLCHECK_WARNING (CWE-457): [#def664] /usr/lib/dracut/modules.d/95virtiofs/parse-virtiofs.sh:6:39: warning[SC2154]: root is referenced but not assigned. # 4| # root=virtiofs:<tag> # 5| # 6|-> if [ "${fstype}" = "virtiofs" ] || [ "${root%%:*}" = "virtiofs" ]; then # 7| # shellcheck disable=SC2034 # 8| rootok=1 Error: SHELLCHECK_WARNING (CWE-457): [#def665] /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): [#def666] /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 (CWE-457): [#def667] /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): [#def668] /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): [#def669] /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): [#def670] /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): [#def671] /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:8:23: warning[SC2154]: systemdutildir is referenced but not assigned. # 6| # 7| # If the binary(s) requirements are not fulfilled the module can't be installed # 8|-> require_binaries "$systemdutildir"/systemd || return 1 # 9| # 10| return 0 Error: SHELLCHECK_WARNING (CWE-457): [#def672] /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:25:18: warning[SC2154]: moddir is referenced but not assigned. # 23| # called by dracut # 24| install() { # 25|-> inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency # 26| inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/emergency.service # 27| inst_simple "$moddir/dracut-emergency.service" "${systemdsystemunitdir}"/dracut-emergency.service Error: SHELLCHECK_WARNING (CWE-457): [#def673] /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:26:46: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 24| install() { # 25| inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency # 26|-> inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/emergency.service # 27| inst_simple "$moddir/dracut-emergency.service" "${systemdsystemunitdir}"/dracut-emergency.service # 28| inst_simple "$moddir/emergency.service" "${systemdsystemunitdir}"/rescue.service Error: SHELLCHECK_WARNING (CWE-457): [#def674] /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:55:31: warning[SC2154]: initdir is referenced but not assigned. # 53| dracut-pre-udev.service; do # 54| inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}" # 55|-> $SYSTEMCTL -q --root "$initdir" add-wants initrd.target "$i" # 56| done # 57| Error: SHELLCHECK_WARNING (CWE-457): [#def675] /usr/lib/dracut/modules.d/98dracut-systemd/module-setup.sh:58:49: warning[SC2154]: tmpfilesdir is referenced but not assigned. # 56| done # 57| # 58|-> inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf" # 59| # 60| inst_multiple sulogin Error: SHELLCHECK_WARNING (CWE-457): [#def676] /usr/lib/dracut/modules.d/98dracut-systemd/parse-root.sh:22:16: warning[SC2154]: hookdir is referenced but not assigned. # 20| root_dev="${root#block:}" # 21| root_name="$(str_replace "$root_dev" '/' '\x2f')" # 22|-> if ! [ -e "$hookdir/initqueue/finished/devexists-${root_name}.sh" ]; then # 23| # 24| # If a LUKS device needs unlocking via systemd in the initrd, assume Error: SHELLCHECK_WARNING: [#def677] /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: [#def678] /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=$(dev_unit_name "$1") Error: SHELLCHECK_WARNING: [#def679] /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:29:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 27| # 28| generator_mount_rootfs() { # 29|-> local _type="$2" # 30| local _flags="$3" # 31| local _name Error: SHELLCHECK_WARNING: [#def680] /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:30:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 28| generator_mount_rootfs() { # 29| local _type="$2" # 30|-> local _flags="$3" # 31| local _name # 32| Error: SHELLCHECK_WARNING: [#def681] /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:31:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 29| local _type="$2" # 30| local _flags="$3" # 31|-> local _name # 32| # 33| [ -z "$1" ] && return 0 Error: SHELLCHECK_WARNING: [#def682] /usr/lib/dracut/modules.d/98dracut-systemd/rootfs-generator.sh:56:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 54| # 55| generator_fsck_after_pre_mount() { # 56|-> local _name # 57| # 58| [ -z "$1" ] && return 0 Error: SHELLCHECK_WARNING (CWE-457): [#def683] /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: [#def684] /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: [#def685] /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: [#def686] /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: [#def687] /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): [#def688] /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 # 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): [#def689] /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): [#def690] /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: [#def691] /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" ] || [ -x "$NEWROOT/sbin/load_policy" ]; then # 22|-> local ret=0 # 23| local out # 24| info "Loading SELinux policy" Error: SHELLCHECK_WARNING: [#def692] /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" ] || [ -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-457): [#def693] /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): [#def694] /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): [#def695] /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: [#def696] /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: [#def697] /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: [#def698] /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: [#def699] /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): [#def700] /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: [#def701] /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: [#def702] /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: [#def703] /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: [#def704] /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: [#def705] /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: [#def706] /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: [#def707] /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): [#def708] /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: [#def709] /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: [#def710] /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: [#def711] /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: [#def712] /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: [#def713] /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: [#def714] /usr/lib/dracut/modules.d/99base/dracut-dev-lib.sh:26:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 24| # (mimics 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: [#def715] /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: [#def716] /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: [#def717] /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: [#def718] /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: [#def719] /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: [#def720] /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): [#def721] /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: [#def722] /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): [#def723] /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): [#def724] /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): [#def725] /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): [#def726] /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: [#def727] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:62:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 60| # 61| trim() { # 62|-> local var="$*" # 63| var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters # 64| var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters Error: SHELLCHECK_WARNING: [#def728] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:109:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 107| # 108| killall_proc_mountpoint() { # 109|-> local _pid # 110| local _killed=0 # 111| for _pid in /proc/*; do Error: SHELLCHECK_WARNING: [#def729] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:110:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 108| killall_proc_mountpoint() { # 109| local _pid # 110|-> local _killed=0 # 111| for _pid in /proc/*; do # 112| _pid=${_pid##/proc/} Error: SHELLCHECK_WARNING: [#def730] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:127:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 125| # 126| getcmdline() { # 127|-> local _line # 128| local _i # 129| local CMDLINE_ETC_D Error: SHELLCHECK_WARNING: [#def731] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:128:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 126| getcmdline() { # 127| local _line # 128|-> local _i # 129| local CMDLINE_ETC_D # 130| local CMDLINE_ETC Error: SHELLCHECK_WARNING: [#def732] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:129:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 127| local _line # 128| local _i # 129|-> local CMDLINE_ETC_D # 130| local CMDLINE_ETC # 131| local CMDLINE_PROC Error: SHELLCHECK_WARNING: [#def733] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:130:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 128| local _i # 129| local CMDLINE_ETC_D # 130|-> local CMDLINE_ETC # 131| local CMDLINE_PROC # 132| unset _line Error: SHELLCHECK_WARNING: [#def734] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:131:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 129| local CMDLINE_ETC_D # 130| local CMDLINE_ETC # 131|-> local CMDLINE_PROC # 132| unset _line # 133| Error: SHELLCHECK_WARNING: [#def735] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:156:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 154| getarg() { # 155| debug_off # 156|-> local _deprecated _newoption # 157| CMDLINE=$(getcmdline) # 158| export CMDLINE Error: SHELLCHECK_WARNING: [#def736] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:229:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 227| # false: rd.info=0, rd.info=off, rd.info not present (default val is 0) # 228| getargbool() { # 229|-> local _b # 230| unset _b # 231| local _default Error: SHELLCHECK_WARNING: [#def737] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:231:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 229| local _b # 230| unset _b # 231|-> local _default # 232| _default="$1" # 233| shift Error: SHELLCHECK_WARNING: [#def738] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:257:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 255| # <defaultval> should be with [minval -maxval]. # 256| getargnum() { # 257|-> local _b # 258| unset _b # 259| local _default _min _max Error: SHELLCHECK_WARNING: [#def739] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:259:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 257| local _b # 258| unset _b # 259|-> local _default _min _max # 260| _default="$1" # 261| shift Error: SHELLCHECK_WARNING: [#def740] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:278:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 276| CMDLINE=$(getcmdline) # 277| export CMDLINE # 278|-> local _val _i _gfound _deprecated # 279| unset _val # 280| unset _gfound Error: SHELLCHECK_WARNING: [#def741] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:322:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 320| # sha256 # 321| getoptcomma() { # 322|-> local line=",$1," # 323| local opt="$2" # 324| local tmp Error: SHELLCHECK_WARNING: [#def742] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:323:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 321| getoptcomma() { # 322| local line=",$1," # 323|-> local opt="$2" # 324| local tmp # 325| Error: SHELLCHECK_WARNING: [#def743] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:324:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 322| local line=",$1," # 323| local opt="$2" # 324|-> local tmp # 325| # 326| case "${line}" in Error: SHELLCHECK_WARNING: [#def744] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:352:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 350| splitsep() { # 351| debug_off # 352|-> local sep="$1" # 353| local str="$2" # 354| shift 2 Error: SHELLCHECK_WARNING: [#def745] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:353:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 351| debug_off # 352| local sep="$1" # 353|-> local str="$2" # 354| shift 2 # 355| local tmp Error: SHELLCHECK_WARNING: [#def746] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:355:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 353| local str="$2" # 354| shift 2 # 355|-> local tmp # 356| # 357| while [ -n "$str" ] && [ "$#" -gt 1 ]; do Error: SHELLCHECK_WARNING: [#def747] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:388:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 386| # 387| source_all() { # 388|-> local f # 389| local _dir # 390| _dir=$1 Error: SHELLCHECK_WARNING: [#def748] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:389:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 387| source_all() { # 388| local f # 389|-> local _dir # 390| _dir=$1 # 391| shift Error: SHELLCHECK_WARNING: [#def749] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:406:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 404| # 405| source_hook() { # 406|-> local _dir # 407| _dir=$1 # 408| shift Error: SHELLCHECK_WARNING: [#def750] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:413:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 411| # 412| check_finished() { # 413|-> local f rc=0 # 414| for f in "$hookdir"/initqueue/finished/*.sh; do # 415| [ "$f" = "$hookdir/initqueue/finished/*.sh" ] && return 0 Error: SHELLCHECK_WARNING: [#def751] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:427:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 425| # 426| source_conf() { # 427|-> local f # 428| [ "$1" ] && [ -d "/$1" ] || return # 429| # shellcheck disable=SC1090 Error: SHELLCHECK_WARNING: [#def752] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:475:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 473| # Count the number of times the character $ch occurs in $str # 474| # Return 0 if the count matches the expected number, 1 otherwise # 475|-> local str="$1" # 476| local ch="$2" # 477| local expected="$3" Error: SHELLCHECK_WARNING: [#def753] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:476:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 474| # Return 0 if the count matches the expected number, 1 otherwise # 475| local str="$1" # 476|-> local ch="$2" # 477| local expected="$3" # 478| local count=0 Error: SHELLCHECK_WARNING: [#def754] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:477:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 475| local str="$1" # 476| local ch="$2" # 477|-> local expected="$3" # 478| local count=0 # 479| Error: SHELLCHECK_WARNING: [#def755] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:478:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 476| local ch="$2" # 477| local expected="$3" # 478|-> local count=0 # 479| # 480| while [ "${str#*"$ch"}" != "${str}" ]; do Error: SHELLCHECK_WARNING: [#def756] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:490:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 488| incol2() { # 489| debug_off # 490|-> local check # 491| local file="$1" # 492| local str="$2" Error: SHELLCHECK_WARNING: [#def757] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:491:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 489| debug_off # 490| local check # 491|-> local file="$1" # 492| local str="$2" # 493| Error: SHELLCHECK_WARNING: [#def758] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:492:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 490| local check # 491| local file="$1" # 492|-> local str="$2" # 493| # 494| [ -z "$file" ] && return 1 Error: SHELLCHECK_WARNING (CWE-457): [#def759] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:509:61: warning[SC2154]: settle_exit_if_exists is referenced but not assigned. # 507| udevsettle() { # 508| # shellcheck disable=SC2086 # 509|-> udevadm settle --exit-if-exists=$hookdir/initqueue/work $settle_exit_if_exists # 510| } # 511| Error: SHELLCHECK_WARNING: [#def760] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:519:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 517| # 518| find_mount() { # 519|-> local dev wanted_dev # 520| wanted_dev="$(readlink -e -q "$1")" # 521| while read -r dev _ || [ -n "$dev" ]; do Error: SHELLCHECK_WARNING: [#def761] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:573:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 571| # 572| label_uuid_to_dev() { # 573|-> local _dev # 574| _dev="${1#block:}" # 575| case "$_dev" in Error: SHELLCHECK_WARNING: [#def762] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:607:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 605| # /mnt/cdrom2 # 606| funiq() { # 607|-> local dir="$1" # 608| local prefix="$2" # 609| local i=0 Error: SHELLCHECK_WARNING: [#def763] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:608:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 606| funiq() { # 607| local dir="$1" # 608|-> local prefix="$2" # 609| local i=0 # 610| Error: SHELLCHECK_WARNING: [#def764] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:609:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 607| local dir="$1" # 608| local prefix="$2" # 609|-> local i=0 # 610| # 611| [ -d "${dir}" ] || return 1 Error: SHELLCHECK_WARNING: [#def765] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:625:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 623| # mkuniqdir subdir new_dir_name # 624| mkuniqdir() { # 625|-> local dir="$1" # 626| local prefix="$2" # 627| local retdir Error: SHELLCHECK_WARNING: [#def766] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:626:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 624| mkuniqdir() { # 625| local dir="$1" # 626|-> local prefix="$2" # 627| local retdir # 628| local retdir_new Error: SHELLCHECK_WARNING: [#def767] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:627:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 625| local dir="$1" # 626| local prefix="$2" # 627|-> local retdir # 628| local retdir_new # 629| Error: SHELLCHECK_WARNING: [#def768] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:628:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 626| local prefix="$2" # 627| local retdir # 628|-> local retdir_new # 629| # 630| [ -d "${dir}" ] || mkdir -m 0755 -p "${dir}" || return 1 Error: SHELLCHECK_WARNING (CWE-277): [#def769] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:630:30: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 628| local retdir_new # 629| # 630|-> [ -d "${dir}" ] || mkdir -m 0755 -p "${dir}" || return 1 # 631| # 632| retdir=$(funiq "${dir}" "${prefix}") || return 1 Error: SHELLCHECK_WARNING: [#def770] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:648:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 646| # copytree SRC DEST # 647| copytree() { # 648|-> local src="$1" dest="$2" # 649| [ -d "$src" ] || return 1 # 650| mkdir -p "$dest" || return 1 Error: SHELLCHECK_WARNING: [#def771] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:679:22: warning[SC3043]: In POSIX sh, 'local' is undefined. # 677| cd /dev/disk/by-uuid || return 1 # 678| # 679|-> [ "$1" = -p ] && local prefix="$2" && shift 2 # 680| local cmd="$1" # 681| shift Error: SHELLCHECK_WARNING: [#def772] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:680:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 678| # 679| [ "$1" = -p ] && local prefix="$2" && shift 2 # 680|-> local cmd="$1" # 681| shift # 682| local uuids_list="$*" Error: SHELLCHECK_WARNING: [#def773] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:682:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 680| local cmd="$1" # 681| shift # 682|-> local uuids_list="$*" # 683| local uuid # 684| local full_uuid Error: SHELLCHECK_WARNING: [#def774] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:683:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 681| shift # 682| local uuids_list="$*" # 683|-> local uuid # 684| local full_uuid # 685| local ___ Error: SHELLCHECK_WARNING: [#def775] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:684:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 682| local uuids_list="$*" # 683| local uuid # 684|-> local full_uuid # 685| local ___ # 686| Error: SHELLCHECK_WARNING: [#def776] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:685:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 683| local uuid # 684| local full_uuid # 685|-> local ___ # 686| # 687| [ -n "${cmd}" ] || return 1 Error: SHELLCHECK_WARNING: [#def777] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:716:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 714| # /dev/sdf3 # 715| devnames() { # 716|-> local dev="$1" # 717| local d # 718| local names Error: SHELLCHECK_WARNING: [#def778] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:717:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 715| devnames() { # 716| local dev="$1" # 717|-> local d # 718| local names # 719| Error: SHELLCHECK_WARNING: [#def779] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:718:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 716| local dev="$1" # 717| local d # 718|-> local names # 719| # 720| case "$dev" in Error: SHELLCHECK_WARNING: [#def780] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:742:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 740| # 741| usable_root() { # 742|-> local _i # 743| # 744| [ -d "$1" ] || return 1 Error: SHELLCHECK_WARNING: [#def781] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:758:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 756| # 757| inst_hook() { # 758|-> local _hookname _unique _name _job _exe # 759| while [ $# -gt 0 ]; do # 760| case "$1" in Error: SHELLCHECK_WARNING: [#def782] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:809:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 807| # which executes <script> as soon as <mountpoint> is mounted. # 808| inst_mount_hook() { # 809|-> local _prio="$2" _jobname="$3" _script="$4" # 810| local _hookname # 811| _hookname="mount-$(str_replace "$1" '/' '\\x2f')" Error: SHELLCHECK_WARNING: [#def783] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:810:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 808| inst_mount_hook() { # 809| local _prio="$2" _jobname="$3" _script="$4" # 810|-> local _hookname # 811| _hookname="mount-$(str_replace "$1" '/' '\\x2f')" # 812| [ -d "$hookdir/${_hookname}" ] || mkdir -p "$hookdir/${_hookname}" Error: SHELLCHECK_WARNING: [#def784] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:822:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 820| # if <mountpoint> is mounted. # 821| wait_for_mount() { # 822|-> local _name # 823| _name="$(str_replace "$1" '/' '\\x2f')" # 824| printf '. /lib/dracut-lib.sh\nismounted "%s"\n' "$1" \ Error: SHELLCHECK_WARNING: [#def785] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:834:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 832| killproc() { # 833| debug_off # 834|-> local _exe # 835| _exe="$(command -v "$1")" # 836| local _sig="$2" Error: SHELLCHECK_WARNING: [#def786] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:836:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 834| local _exe # 835| _exe="$(command -v "$1")" # 836|-> local _sig="$2" # 837| local _i # 838| [ -x "$_exe" ] || return 1 Error: SHELLCHECK_WARNING: [#def787] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:837:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 835| _exe="$(command -v "$1")" # 836| local _sig="$2" # 837|-> local _i # 838| [ -x "$_exe" ] || return 1 # 839| for _i in /proc/[0-9]*; do Error: SHELLCHECK_WARNING: [#def788] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:841:46: warning[SC3013]: In POSIX sh, -ef is undefined. # 839| for _i in /proc/[0-9]*; do # 840| [ "$_i" = "/proc/1" ] && continue # 841|-> if [ -e "$_i"/_exe ] && [ "$_i/_exe" -ef "$_exe" ]; then # 842| kill "$_sig" "${_i##*/}" # 843| fi Error: SHELLCHECK_WARNING: [#def789] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:883:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 881| pidof() { # 882| debug_off # 883|-> local _cmd # 884| local _exe # 885| local _rl Error: SHELLCHECK_WARNING: [#def790] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:884:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 882| debug_off # 883| local _cmd # 884|-> local _exe # 885| local _rl # 886| local _ret=1 Error: SHELLCHECK_WARNING: [#def791] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:885:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 883| local _cmd # 884| local _exe # 885|-> local _rl # 886| local _ret=1 # 887| local i Error: SHELLCHECK_WARNING: [#def792] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:886:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 884| local _exe # 885| local _rl # 886|-> local _ret=1 # 887| local i # 888| _cmd="$1" Error: SHELLCHECK_WARNING: [#def793] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:887:9: warning[SC3043]: In POSIX sh, 'local' is undefined. # 885| local _rl # 886| local _ret=1 # 887|-> local i # 888| _cmd="$1" # 889| if [ -z "$_cmd" ]; then Error: SHELLCHECK_WARNING: [#def794] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:897:24: warning[SC3013]: In POSIX sh, -ef is undefined. # 895| [ -e "$i" ] || continue # 896| if [ -n "$_exe" ]; then # 897|-> [ "$i" -ef "$_exe" ] || continue # 898| else # 899| _rl=$(readlink -f "$i") Error: SHELLCHECK_WARNING: [#def795] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:912:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 910| # 911| _emergency_shell() { # 912|-> local _name="$1" # 913| if [ -n "$DRACUT_SYSTEMD" ]; then # 914| : > /.console_lock Error: SHELLCHECK_WARNING: [#def796] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:953:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 951| # 952| emergency_shell() { # 953|-> local _ctty # 954| set +e # 955| local _rdshell_name="dracut" action="Boot" hook="emergency" Error: SHELLCHECK_WARNING: [#def797] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:955:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 953| local _ctty # 954| set +e # 955|-> local _rdshell_name="dracut" action="Boot" hook="emergency" # 956| local _emergency_action # 957| Error: SHELLCHECK_WARNING: [#def798] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:956:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 954| set +e # 955| local _rdshell_name="dracut" action="Boot" hook="emergency" # 956|-> local _emergency_action # 957| # 958| if [ "$1" = "-n" ]; then Error: SHELLCHECK_WARNING: [#def799] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1002:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1000| # This is a POSIX-compliant equivalent of bash's "export -n" # 1001| export_n() { # 1002|-> local var # 1003| local val # 1004| for var in "$@"; do Error: SHELLCHECK_WARNING: [#def800] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1003:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1001| export_n() { # 1002| local var # 1003|-> local val # 1004| for var in "$@"; do # 1005| eval "val=\$$var" Error: SHELLCHECK_WARNING: [#def801] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1019:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1017| # $4 = ignore values, separated by $1 # 1018| listlist() { # 1019|-> local _sep="$1" # 1020| local _list="${_sep}${2}${_sep}" # 1021| local _sublist="$3" Error: SHELLCHECK_WARNING: [#def802] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1020:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1018| listlist() { # 1019| local _sep="$1" # 1020|-> local _list="${_sep}${2}${_sep}" # 1021| local _sublist="$3" # 1022| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" Error: SHELLCHECK_WARNING: [#def803] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1021:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1019| local _sep="$1" # 1020| local _list="${_sep}${2}${_sep}" # 1021|-> local _sublist="$3" # 1022| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1023| local IFS="$_sep" Error: SHELLCHECK_WARNING: [#def804] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1022:20: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1020| local _list="${_sep}${2}${_sep}" # 1021| local _sublist="$3" # 1022|-> [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1023| local IFS="$_sep" # 1024| local _v Error: SHELLCHECK_WARNING: [#def805] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1023:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1021| local _sublist="$3" # 1022| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1023|-> local IFS="$_sep" # 1024| local _v # 1025| Error: SHELLCHECK_WARNING: [#def806] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1024:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1022| [ -n "$4" ] && local _iglist="${_sep}${4}${_sep}" # 1023| local IFS="$_sep" # 1024|-> local _v # 1025| # 1026| [ "$_list" = "$_sublist" ] && return 0 Error: SHELLCHECK_WARNING: [#def807] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1059:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1057| # parameters: func log_level prefix msg [trace_level:trace]... # 1058| make_trace_mem() { # 1059|-> local log_level prefix msg msg_printed # 1060| local trace trace_level trace_in_higher_levels insert_trace # 1061| Error: SHELLCHECK_WARNING: [#def808] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1060:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1058| make_trace_mem() { # 1059| local log_level prefix msg msg_printed # 1060|-> local trace trace_level trace_in_higher_levels insert_trace # 1061| # 1062| msg=$1 Error: SHELLCHECK_WARNING: [#def809] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1137:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1135| # echo the field value, if present. # 1136| check_meminfo() { # 1137|-> local - m sz # 1138| set +x # 1139| while read -r m sz _ || [ "$m" ]; do Error: SHELLCHECK_WARNING: [#def810] /usr/lib/dracut/modules.d/99base/dracut-lib.sh:1159:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 1157| # modprobe fails if /lib/modules is not available (--no-kernel use case) # 1158| load_fstype() { # 1159|-> local - fs _fs="${2:-$1}" # 1160| set +x # 1161| while read -r d fs || [ "$d" ]; do Error: SHELLCHECK_WARNING (CWE-277): [#def811] /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): [#def812] /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): [#def813] /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): [#def814] /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): [#def815] /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): [#def816] /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): [#def817] /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 (CWE-457): [#def818] /usr/lib/dracut/modules.d/99base/init.sh:148:21: warning[SC2154]: systemdutildir is referenced but not assigned. # 146| # 147| # start up udev and trigger cold plugs # 148|-> UDEV_LOG=$UDEV_LOG "$systemdutildir"/systemd-udevd --daemon --resolve-names=never # 149| # 150| UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" Error: SHELLCHECK_WARNING (CWE-457): [#def819] /usr/lib/dracut/modules.d/99base/init.sh:152:23: warning[SC2154]: hookdir is referenced but not assigned. # 150| UDEV_QUEUE_EMPTY="udevadm settle --timeout=0" # 151| # 152|-> udevproperty "hookdir=$hookdir" # 153| # 154| make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' Error: SHELLCHECK_WARNING (CWE-277): [#def820] /usr/lib/dracut/modules.d/99base/init.sh:364:11: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 362| if ! [ -d "$NEWROOT"/run ]; then # 363| NEWRUN=/dev/.initramfs # 364|-> mkdir -m 0755 -p "$NEWRUN" # 365| mount --rbind /run/initramfs "$NEWRUN" # 366| fi Error: SHELLCHECK_WARNING (CWE-457): [#def821] /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): [#def822] /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): [#def823] /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): [#def824] /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): [#def825] /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): [#def826] /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}"/var/lib/dracut/hooks Error: SHELLCHECK_WARNING (CWE-277): [#def827] /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}"/var/lib/dracut/hooks # 49| Error: SHELLCHECK_WARNING (CWE-277): [#def828] /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}"/var/lib/dracut/hooks # 49| # 50| # symlink to old hooks location for compatibility Error: SHELLCHECK_WARNING (CWE-457): [#def829] /usr/lib/dracut/modules.d/99base/module-setup.sh:71:11: warning[SC2154]: ro_mnt is referenced but not assigned. # 69| # 70| ln -fs /proc/self/mounts "$initdir/etc/mtab" # 71|-> if [[ $ro_mnt == yes ]]; then # 72| echo ro >> "${initdir}/etc/cmdline.d/base.conf" # 73| fi Error: SHELLCHECK_WARNING (CWE-277): [#def830] /usr/lib/dracut/modules.d/99base/module-setup.sh:75:42: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 73| fi # 74| # 75|-> [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p "${initdir}"/usr/lib # 76| # 77| local VERSION="" Error: SHELLCHECK_WARNING (CWE-457): [#def831] /usr/lib/dracut/modules.d/99base/module-setup.sh:112:11: warning[SC2154]: hostonly_cmdline is referenced but not assigned. # 110| # 111| ## save host_devs which we need bring up # 112|-> if [[ $hostonly_cmdline == "yes" ]]; then # 113| if [[ -n ${host_devs[*]} ]]; then # 114| dracut_need_initqueue Error: SHELLCHECK_WARNING (CWE-457): [#def832] /usr/lib/dracut/modules.d/99base/module-setup.sh:128:35: warning[SC2154]: root_devs is referenced but not assigned (did you mean 'host_devs'?). # 126| # 127| for _dev in "${host_devs[@]}"; do # 128|-> for _dev2 in "${root_devs[@]}"; do # 129| [[ $_dev == "$_dev2" ]] && continue 2 # 130| done Error: SHELLCHECK_WARNING (CWE-457): [#def833] /usr/lib/dracut/modules.d/99base/module-setup.sh:135:35: warning[SC2154]: swap_devs is referenced but not assigned. # 133| # for resume and udev rules generated when parsing resume= # 134| # argument take care of the waiting for us # 135|-> for _dev2 in "${swap_devs[@]}"; do # 136| [[ $_dev == "$_dev2" ]] && continue 2 # 137| done Error: SHELLCHECK_WARNING: [#def834] /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: [#def835] /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: [#def836] /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: [#def837] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:120:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 118| # code for generic fsck, if the filesystem checked is "unknown" to us # 119| fsck_drv_std() { # 120|-> local _ret # 121| local _out # 122| unset _out Error: SHELLCHECK_WARNING: [#def838] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:121:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 119| fsck_drv_std() { # 120| local _ret # 121|-> local _out # 122| unset _out # 123| Error: SHELLCHECK_WARNING: [#def839] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:143:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 141| # necessary tools or insufficient options) # 142| fsck_single() { # 143|-> local FSTAB_FILE=/etc/fstab.empty # 144| local _dev="$1" # 145| local _fs="${2:-auto}" Error: SHELLCHECK_WARNING: [#def840] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:144:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 142| fsck_single() { # 143| local FSTAB_FILE=/etc/fstab.empty # 144|-> local _dev="$1" # 145| local _fs="${2:-auto}" # 146| local _fop="$4" Error: SHELLCHECK_WARNING: [#def841] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:145:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 143| local FSTAB_FILE=/etc/fstab.empty # 144| local _dev="$1" # 145|-> local _fs="${2:-auto}" # 146| local _fop="$4" # 147| local _drv Error: SHELLCHECK_WARNING: [#def842] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:146:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 144| local _dev="$1" # 145| local _fs="${2:-auto}" # 146|-> local _fop="$4" # 147| local _drv # 148| Error: SHELLCHECK_WARNING: [#def843] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:147:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 145| local _fs="${2:-auto}" # 146| local _fop="$4" # 147|-> local _drv # 148| # 149| [ $# -lt 2 ] && return 255 Error: SHELLCHECK_WARNING: [#def844] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:164:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 162| # checking based on fstab, so empty one is passed # 163| fsck_batch() { # 164|-> local FSTAB_FILE=/etc/fstab.empty # 165| local _drv=fsck # 166| local _dev Error: SHELLCHECK_WARNING: [#def845] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:165:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 163| fsck_batch() { # 164| local FSTAB_FILE=/etc/fstab.empty # 165|-> local _drv=fsck # 166| local _dev # 167| local _ret Error: SHELLCHECK_WARNING: [#def846] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:166:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 164| local FSTAB_FILE=/etc/fstab.empty # 165| local _drv=fsck # 166|-> local _dev # 167| local _ret # 168| local _out Error: SHELLCHECK_WARNING: [#def847] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:167:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 165| local _drv=fsck # 166| local _dev # 167|-> local _ret # 168| local _out # 169| Error: SHELLCHECK_WARNING: [#def848] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:168:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 166| local _dev # 167| local _ret # 168|-> local _out # 169| # 170| [ $# -eq 0 ] || ! type fsck > /dev/null 2>&1 && return 255 Error: SHELLCHECK_WARNING: [#def849] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:190:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 188| # if we found the fs, assume we're right # 189| det_fs() { # 190|-> local _dev="$1" # 191| local _orig="${2:-auto}" # 192| local _fs Error: SHELLCHECK_WARNING: [#def850] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:191:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 189| det_fs() { # 190| local _dev="$1" # 191|-> local _orig="${2:-auto}" # 192| local _fs # 193| Error: SHELLCHECK_WARNING: [#def851] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:192:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 190| local _dev="$1" # 191| local _orig="${2:-auto}" # 192|-> local _fs # 193| # 194| _fs=$(udevadm info --query=property --name="$_dev" \ Error: SHELLCHECK_WARNING: [#def852] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:210:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 208| # 209| write_fs_tab() { # 210|-> local _o # 211| local _rw # 212| local _root Error: SHELLCHECK_WARNING: [#def853] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:211:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 209| write_fs_tab() { # 210| local _o # 211|-> local _rw # 212| local _root # 213| local _rootfstype Error: SHELLCHECK_WARNING: [#def854] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:212:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 210| local _o # 211| local _rw # 212|-> local _root # 213| local _rootfstype # 214| local _rootflags Error: SHELLCHECK_WARNING: [#def855] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:213:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 211| local _rw # 212| local _root # 213|-> local _rootfstype # 214| local _rootflags # 215| local _fspassno Error: SHELLCHECK_WARNING: [#def856] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:214:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 212| local _root # 213| local _rootfstype # 214|-> local _rootflags # 215| local _fspassno # 216| Error: SHELLCHECK_WARNING: [#def857] /usr/lib/dracut/modules.d/99fs-lib/fs-lib.sh:215:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 213| local _rootfstype # 214| local _rootflags # 215|-> local _fspassno # 216| # 217| _fspassno="0" Error: SHELLCHECK_WARNING (CWE-457): [#def858] /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): [#def859] /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): [#def860] /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): [#def861] /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): [#def862] /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: [#def863] /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: [#def864] /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: [#def865] /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: [#def866] /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: [#def867] /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: [#def868] /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: [#def869] /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: [#def870] /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: [#def871] /usr/lib/dracut/modules.d/99img-lib/img-lib.sh:114:5: warning[SC3043]: In POSIX sh, 'local' is undefined. # 112| # Increase /run tmpfs size, if needed. # 113| check_live_ram() { # 114|-> local minmem imgsize memsize runsize runavail # 115| minmem=$(getarg rd.minmem) # 116| imgsize=$1 Error: SHELLCHECK_WARNING (CWE-457): [#def872] /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): [#def873] /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:23:11: warning[SC2154]: moddir is referenced but not assigned. # 21| inst "/bin/memstrack" "/bin/memstrack" # 22| # 23|-> inst "$moddir/memstrack-start.sh" "/bin/memstrack-start" # 24| inst_hook cleanup 99 "$moddir/memstrack-report.sh" # 25| Error: SHELLCHECK_WARNING (CWE-457): [#def874] /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:26:39: warning[SC2154]: systemdsystemunitdir is referenced but not assigned. # 24| inst_hook cleanup 99 "$moddir/memstrack-report.sh" # 25| # 26|-> inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service" # 27| # 28| $SYSTEMCTL -q --root "$initdir" add-wants initrd.target memstrack.service Error: SHELLCHECK_WARNING (CWE-457): [#def875] /usr/lib/dracut/modules.d/99memstrack/module-setup.sh:28:27: warning[SC2154]: initdir is referenced but not assigned. # 26| inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service" # 27| # 28|-> $SYSTEMCTL -q --root "$initdir" add-wants initrd.target memstrack.service # 29| } Error: SHELLCHECK_WARNING (CWE-457): [#def876] /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| mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # 21| Error: SHELLCHECK_WARNING (CWE-457): [#def877] /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| mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # 21| Error: SHELLCHECK_WARNING (CWE-277): [#def878] /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:20:11: 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|-> mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # 21| # 22| # symlink to old hooks location for compatibility Error: SHELLCHECK_WARNING (CWE-457): [#def879] /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:20:23: warning[SC2154]: initdir is referenced but not assigned. # 18| inst_multiple -o kexec # 19| inst "$moddir/shutdown.sh" "$prefix/shutdown" # 20|-> mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks # 21| # 22| # symlink to old hooks location for compatibility Error: SHELLCHECK_WARNING (CWE-457): [#def880] /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:25:15: warning[SC2154]: hookdirs is referenced but not assigned. # 23| ln_r /var/lib/dracut/hooks /lib/dracut/hooks # 24| # 25|-> for _d in $hookdirs shutdown shutdown-emergency; do # 26| mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d" # 27| done Error: SHELLCHECK_WARNING (CWE-277): [#def881] /usr/lib/dracut/modules.d/99shutdown/module-setup.sh:26:15: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 24| # 25| for _d in $hookdirs shutdown shutdown-emergency; do # 26|-> mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d" # 27| done # 28| } Error: SHELLCHECK_WARNING: [#def882] /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: [#def883] /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: [#def884] /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: [#def885] /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: [#def886] /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): [#def887] /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): [#def888] /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): [#def889] /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): [#def890] /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): [#def891] /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-457): [#def892] /usr/lib/kernel/install.d/51-dracut-rescue.install:108:15: warning[SC2154]: dracut_rescue_image is referenced but not assigned. # 106| done # 107| # 108|-> if [[ $dracut_rescue_image != "yes" ]]; then # 109| [[ $KERNEL_INSTALL_VERBOSE == 1 ]] \ # 110| && echo "Skipping, 'dracut_rescue_image' not set to 'yes' in any dracut configuration file" Error: COMPILER_WARNING (CWE-457): [#def893] dracut-103-build/dracut-ng-103/src/install/dracut-install.c:150:12: warning[-Wmaybe-uninitialized]: ‘fts’ may be used uninitialized # 150 | if (*p) # | ^ dracut-103-build/dracut-ng-103/src/install/dracut-install.c: scope_hint: In function ‘install_modules’ dracut-103-build/dracut-ng-103/src/install/dracut-install.c:1677:34: note: ‘fts’ was declared here # 1677 | _cleanup_fts_close_ FTS *fts; # | ^~~ # 148| static inline void fts_closep(FTS **p) # 149| { # 150|-> if (*p) # 151| fts_close(*p); # 152| } Error: COMPILER_WARNING: [#def894] dracut-103-build/dracut-ng-103/src/install/dracut-install.c: scope_hint: In function ‘find_suppliers_for_sys_node’ dracut-103-build/dracut-ng-103/src/install/dracut-install.c:1671:17: warning[-Wstringop-overflow=]: ‘strncat’ specified bound 3 equals source length # 1669| closedir(d); # 1670| } # 1671|-> strncat(node_path, "/..", 3); // Also find suppliers of parents # 1672| } # 1673| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def895] dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/src/install/strv.c:416:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ dracut-103-build/dracut-ng-103/src/install/strv.c:26: included_from: Included from here. dracut-103-build/dracut-ng-103/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-103-build/dracut-ng-103/src/install/strv.c:562:9: note: in expansion of macro ‘NULSTR_FOREACH’ dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/src/install/strv.c: scope_hint: In function ‘strv_push’ dracut-103-build/dracut-ng-103/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): [#def896] dracut-103-build/dracut-ng-103/src/install/util.c: scope_hint: In function ‘close_nointr’ dracut-103-build/dracut-ng-103/src/install/util.c:75:21: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’ dracut-103-build/dracut-ng-103/src/install/util.h:40: included_from: Included from here. dracut-103-build/dracut-ng-103/src/install/util.c:30: included_from: Included from here. dracut-103-build/dracut-ng-103/src/install/macro.h:136:22: note: in expansion of macro ‘assert_se’ dracut-103-build/dracut-ng-103/src/install/util.c:70:9: note: in expansion of macro ‘assert’ dracut-103-build/dracut-ng-103/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: GCC_ANALYZER_WARNING (CWE-476): [#def897] dracut-103-build/dracut-ng-103/src/util/util.c: scope_hint: In function ‘next_arg’ dracut-103-build/dracut-ng-103/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: GCC_ANALYZER_WARNING (CWE-401): [#def898] dracut-103-build/dracut-ng-103/src/util/util.c: scope_hint: In function ‘getarg’ dracut-103-build/dracut-ng-103/src/util/util.c:234:12: warning[-Wanalyzer-malloc-leak]: leak of ‘cmdline’ dracut-103-build/dracut-ng-103/src/util/util.c:54:16: note: in expansion of macro ‘kernel_isspace’ dracut-103-build/dracut-ng-103/src/util/util.c: scope_hint: In function ‘getarg’ # 232| } # 233| # 234|-> if (bool_value) { # 235| return EXIT_SUCCESS; # 236| } Error: CLIPPY_WARNING: [#def899] dracut-103-build/src/main.rs:134:21: warning: redundant field names in struct initialization # | # 134 | dev: dev, # | ^^^^^^^^ help: replace it with: `dev` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names # = note: `#[warn(clippy::redundant_field_names)]` on by default Error: CLIPPY_WARNING: [#def900] dracut-103-build/src/main.rs:149:5: warning: this function has too many arguments (10/7) # | # 149 | / pub fn hardlink_seen<W: Write + Seek>( # 150 | | &mut self, # 151 | | props: &ArchiveProperties, # 152 | | mut writer: W, # ... | # 159 | | mapped_nlink: &mut Option<u32>, # 160 | | ) -> std::io::Result<bool> { # | |______________________________^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments # = note: `#[warn(clippy::too_many_arguments)]` on by default Error: CLIPPY_WARNING: [#def901] dracut-103-build/src/main.rs:188:12: warning: deref which would be done by auto-deref # | # 188 | if (*hl).names.iter().any(|n| n.infile == inpath) { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref # = note: `#[warn(clippy::explicit_auto_deref)]` on by default Error: CLIPPY_WARNING: [#def902] dracut-103-build/src/main.rs:200:9: warning: deref which would be done by auto-deref # | # 200 | (*hl).seen += 1; # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def903] dracut-103-build/src/main.rs:201:12: warning: deref which would be done by auto-deref # | # 201 | if (*hl).seen > (*hl).nlink { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def904] dracut-103-build/src/main.rs:201:25: warning: deref which would be done by auto-deref # | # 201 | if (*hl).seen > (*hl).nlink { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def905] dracut-103-build/src/main.rs:204:59: warning: deref which would be done by auto-deref # | # 204 | println!("hardlink seen {} exceeds nlink {}", (*hl).seen, (*hl).nlink); # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def906] dracut-103-build/src/main.rs:204:71: warning: deref which would be done by auto-deref # | # 204 | println!("hardlink seen {} exceeds nlink {}", (*hl).seen, (*hl).nlink); # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def907] dracut-103-build/src/main.rs:207:12: warning: deref which would be done by auto-deref # | # 207 | if (*hl).seen < (*hl).nlink { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def908] dracut-103-build/src/main.rs:207:25: warning: deref which would be done by auto-deref # | # 207 | if (*hl).seen < (*hl).nlink { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def909] dracut-103-build/src/main.rs:208:13: warning: deref which would be done by auto-deref # | # 208 | (*hl).names.push(HardlinkPath { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def910] dracut-103-build/src/main.rs:218:21: warning: deref which would be done by auto-deref # | # 218 | for path in (*hl).names.iter().rev() { # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def911] dracut-103-build/src/main.rs:227:23: warning: deref which would be done by auto-deref # | # 227 | ino = (*hl).mapped_ino, # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def912] dracut-103-build/src/main.rs:238:29: warning: deref which would be done by auto-deref # | # 238 | true => (*hl).nlink, # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def913] dracut-103-build/src/main.rs:264:28: warning: deref which would be done by auto-deref # | # 264 | *mapped_ino = Some((*hl).mapped_ino); # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def914] dracut-103-build/src/main.rs:268:34: warning: deref which would be done by auto-deref # | # 268 | *mapped_nlink = Some((*hl).nlink); # | ^^^^^ help: try: `hl` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref Error: CLIPPY_WARNING: [#def915] dracut-103-build/src/main.rs:278:9: warning: unneeded `return` statement # | # 278 | return Ok(false); # | ^^^^^^^^^^^^^^^^ # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return # = note: `#[warn(clippy::needless_return)]` on by default # help: remove `return` # | # 278 - return Ok(false); # 278 + Ok(false) # | Error: CLIPPY_WARNING: [#def916] dracut-103-build/src/main.rs:300:16: warning: length comparison to zero # | # 300 | if p.as_os_str().as_bytes().len() == 0 { # | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `p.as_os_str().as_bytes().is_empty()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero # = note: `#[warn(clippy::len_zero)]` on by default Error: CLIPPY_WARNING: [#def917] dracut-103-build/src/main.rs:387:17: warning: this expression creates a reference which is immediately dereferenced by the compiler # | # 387 | &props, # | ^^^^^^ help: change this to: `props` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow # = note: `#[warn(clippy::needless_borrow)]` on by default Error: CLIPPY_WARNING: [#def918] dracut-103-build/src/main.rs:392:17: warning: this expression creates a reference which is immediately dereferenced by the compiler # | # 392 | &inpath, # | ^^^^^^^ help: change this to: `inpath` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow Error: CLIPPY_WARNING: [#def919] dracut-103-build/src/main.rs:530:19: warning: length comparison to zero # | # 530 | while hl.names.len() > 0 { # | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!hl.names.is_empty()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero Error: CLIPPY_WARNING: [#def920] dracut-103-build/src/main.rs:541:8: warning: length comparison to zero # | # 541 | if deferred_inpaths.len() > 0 { # | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!deferred_inpaths.is_empty()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero Error: CLIPPY_WARNING: [#def921] dracut-103-build/src/main.rs:586:31: warning: casting to the same type is unnecessary (`u64` -> `u64`) # | # 586 | off += fname_len as u64 + padding_len as u64; # | ^^^^^^^^^^^^^^^^^^ help: try: `padding_len` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast # = note: `#[warn(clippy::unnecessary_cast)]` on by default Error: CLIPPY_WARNING: [#def922] dracut-103-build/src/main.rs:627:16: warning: length comparison to zero # | # 627 | if linebuf.len() == 0 { # | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `linebuf.is_empty()` # | # = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-189.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | dracut-103-1.fc42 |
store-results-to | /tmp/tmpvfbncm_2/dracut-103-1.fc42.tar.xz |
time-created | 2024-11-12 23:45:26 |
time-finished | 2024-11-12 23:47:23 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpvfbncm_2/dracut-103-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpvfbncm_2/dracut-103-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |