From: Laszlo Gombos Date: Sun, 20 Nov 2022 23:58:31 +0000 (+0000) Subject: chore(shfmt): update to pass with shfmt v3.5.1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16931f5236b44078ab2bbc60d7b3bef2ba4507d7;p=thirdparty%2Fdracut.git chore(shfmt): update to pass with shfmt v3.5.1 --- diff --git a/dracut-init.sh b/dracut-init.sh index aef2f07a4..3d9afad7d 100755 --- a/dracut-init.sh +++ b/dracut-init.sh @@ -1070,8 +1070,7 @@ for_each_module_dir() { _func=$1 for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do [[ -d $_moddir ]] || continue - [[ -e $_moddir/install || -e $_moddir/installkernel || -e \ - $_moddir/module-setup.sh ]] || continue + [[ -e $_moddir/install || -e $_moddir/installkernel || -e $_moddir/module-setup.sh ]] || continue _mod=${_moddir##*/} _mod=${_mod#[0-9][0-9]} $_func "$_mod" 1 "$_moddir" diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh index 2648ec4f0..9ef2b7c2a 100755 --- a/modules.d/00systemd/module-setup.sh +++ b/modules.d/00systemd/module-setup.sh @@ -47,7 +47,6 @@ install() { "$systemdutildir"/system-generators/systemd-debug-generator \ "$systemdutildir"/system-generators/systemd-fstab-generator \ "$systemdutildir"/system-generators/systemd-gpt-auto-generator \ - \ "$systemdsystemunitdir"/debug-shell.service \ "$systemdsystemunitdir"/cryptsetup.target \ "$systemdsystemunitdir"/cryptsetup-pre.target \ @@ -79,9 +78,7 @@ install() { "$systemdsystemunitdir"/timers.target \ "$systemdsystemunitdir"/paths.target \ "$systemdsystemunitdir"/umount.target \ - \ "$systemdsystemunitdir"/sys-kernel-config.mount \ - \ "$systemdsystemunitdir"/modprobe@.service \ "$systemdsystemunitdir"/kmod-static-nodes.service \ "$systemdsystemunitdir"/systemd-tmpfiles-setup.service \ @@ -109,7 +106,6 @@ install() { "$systemdsystemunitdir"/systemd-random-seed-load.service \ "$systemdsystemunitdir"/systemd-random-seed.service \ "$systemdsystemunitdir"/systemd-sysctl.service \ - \ "$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service \ "$systemdsystemunitdir"/sysinit.target.wants/systemd-ask-password-console.path \ "$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \ @@ -124,18 +120,14 @@ install() { "$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup.service \ "$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \ "$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \ - \ "$systemdsystemunitdir"/ctrl-alt-del.target \ "$systemdsystemunitdir"/reboot.target \ "$systemdsystemunitdir"/systemd-reboot.service \ "$systemdsystemunitdir"/syslog.socket \ - \ "$systemdsystemunitdir"/slices.target \ "$systemdsystemunitdir"/system.slice \ "$systemdsystemunitdir"/-.slice \ - \ "$tmpfilesdir"/systemd.conf \ - \ journalctl systemctl \ echo swapoff \ kmod insmod rmmod modprobe modinfo depmod lsmod \ diff --git a/modules.d/90kernel-modules-extra/module-setup.sh b/modules.d/90kernel-modules-extra/module-setup.sh index 6d0d05210..85e2e0ad4 100755 --- a/modules.d/90kernel-modules-extra/module-setup.sh +++ b/modules.d/90kernel-modules-extra/module-setup.sh @@ -120,8 +120,8 @@ installkernel() { continue fi - if [[ '*' == "$kverpat" || \ - $kernel =~ $kverpat ]]; then + if [[ '*' == "$kverpat" ]] \ + || [[ $kernel =~ $kverpat ]]; then external_dirs+=("$path") prdebug "$cfg: added external" \ diff --git a/modules.d/90livenet/parse-livenet.sh b/modules.d/90livenet/parse-livenet.sh index e59fa51a1..a1d14a8fc 100755 --- a/modules.d/90livenet/parse-livenet.sh +++ b/modules.d/90livenet/parse-livenet.sh @@ -13,8 +13,7 @@ if [ -n "$updates" ]; then echo > /tmp/net.ifaces fi echo "$updates" > /tmp/liveupdates.info - echo '[ -e /tmp/liveupdates.done ]' > \ - "$hookdir"/initqueue/finished/liveupdates.sh + echo '[ -e /tmp/liveupdates.done ]' > "$hookdir"/initqueue/finished/liveupdates.sh fi str_starts "$root" "live:" && liveurl="$root" diff --git a/modules.d/95zfcp_rules/parse-zfcp.sh b/modules.d/95zfcp_rules/parse-zfcp.sh index 669eaf291..5e7d90951 100755 --- a/modules.d/95zfcp_rules/parse-zfcp.sh +++ b/modules.d/95zfcp_rules/parse-zfcp.sh @@ -31,8 +31,8 @@ EOF fi } -if [[ -f /sys/firmware/ipl/ipl_type && \ - $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then +if [[ -f /sys/firmware/ipl/ipl_type ]] \ + && [[ $(< /sys/firmware/ipl/ipl_type) == "fcp" ]]; then ( read -r _wwpn < /sys/firmware/ipl/wwpn read -r _lun < /sys/firmware/ipl/lun