]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
style: make indent and let shfmt fail again
authorHarald Hoyer <harald@redhat.com>
Tue, 4 May 2021 11:02:09 +0000 (13:02 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 4 May 2021 13:39:55 +0000 (15:39 +0200)
The bump of removed the `-d` option for `shfmt`. Readd it until upstream
is fixed.

See also:
https://github.com/luizm/action-sh-checker/issues/44

.github/workflows/lint.yml
dracut.sh
modules.d/35network-manager/module-setup.sh
modules.d/98integrity/evm-enable.sh

index 6f19170135da8d0ce01d240320c48b7fb593c3c2..3328d861fa26cdef1822068bf40da560a5ac8aaf 100644 (file)
@@ -32,7 +32,7 @@ jobs:
         uses: luizm/action-sh-checker@v0.2.0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          SHFMT_OPTS: -s # arguments to shfmt.
+          SHFMT_OPTS: -d -s # arguments to shfmt.
         with:
           sh_checker_shellcheck_disable: false
           sh_checker_comment: true
index cb1388914a2c3db54ddb7629759453a3bdf4f8e6..580b082665952dfe48ecd8226f049e4973fbfe71 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1770,7 +1770,6 @@ fi
 
 [[ -d $dracutsysrootdir$depmodconfdir ]] || depmodconfdir=/etc/depmod.d
 
-
 export initdir dracutbasedir \
     dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
     mods_to_load \
index 9a89b9fd6d14279b7962746910d011089dcb5e34..92da876abb372b05e21ffc5becaed73d0d6df297 100755 (executable)
@@ -46,8 +46,8 @@ install() {
         inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
 
         # Adding default link
-         inst_multiple -o "${systemdutildir}/network/99-default.link"
-         [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
+        inst_multiple -o "${systemdutildir}/network/99-default.link"
+        [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
 
         $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
     fi
index 9ab67b680613194911bf122baa58ac4d14f55414..73d8720d75d37659712d00f2d3e37ffae762df89 100755 (executable)
@@ -147,17 +147,17 @@ enable_evm() {
     # initialize EVM
     info "Enabling EVM"
     if [ "$((evm_configured & EVM_INIT_X509))" -ne 0 ]; then
-      # Older kernels did not support EVM_ALLOW_METADATA_WRITES, try for
-      # newer ones first that need it when an x509 is used
-      echo $((evm_configured | EVM_ALLOW_METADATA_WRITES | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}" ||
-        echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
+        # Older kernels did not support EVM_ALLOW_METADATA_WRITES, try for
+        # newer ones first that need it when an x509 is used
+        echo $((evm_configured | EVM_ALLOW_METADATA_WRITES | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}" \
+            || echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
     else
-      echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
+        echo $((evm_configured | EVM_ACTIVATION_BITS)) > "${EVMSECFILE}"
     fi
 
     if [ "$((evm_configured & EVM_INIT_HMAC))" -ne 0 ]; then
-      # unload the EVM encrypted key
-      unload_evm_key || return 1
+        # unload the EVM encrypted key
+        unload_evm_key || return 1
     fi
 
     return 0