From 3c8651ca4430662dd32c09711cc69833cd367700 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 18 Apr 2023 18:08:07 -0400 Subject: [PATCH] tree: address latest ShellCheck errors We're now using ShellCheck from f38 which detected new issues. --- src/cmd-build | 1 - src/cmd-build-fast | 1 - src/cmd-buildextend-metal | 1 - src/cmd-fetch | 2 -- src/cmd-init | 2 -- src/cmd-offline-update | 1 - src/create_disk.sh | 6 +++--- 7 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/cmd-build b/src/cmd-build index bcd74bd326..873509c291 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -110,7 +110,6 @@ while true; do ;; -*) fatal "$0: unrecognized option: $1" - exit 1 ;; *) break diff --git a/src/cmd-build-fast b/src/cmd-build-fast index b7eea1b095..05f1595b3a 100755 --- a/src/cmd-build-fast +++ b/src/cmd-build-fast @@ -47,7 +47,6 @@ while true; do ;; -*) fatal "$0: unrecognized option: $1" - exit 1 ;; *) break diff --git a/src/cmd-buildextend-metal b/src/cmd-buildextend-metal index c376c07b5b..91cc2dfa64 100755 --- a/src/cmd-buildextend-metal +++ b/src/cmd-buildextend-metal @@ -73,7 +73,6 @@ while true; do ;; -*) fatal "$0: unrecognized option: $1" - exit 1 ;; *) break diff --git a/src/cmd-fetch b/src/cmd-fetch index f95ce1324e..f27f731d69 100755 --- a/src/cmd-fetch +++ b/src/cmd-fetch @@ -86,7 +86,6 @@ while true; do ;; *) fatal "$0: unrecognized option: $1" - exit 1 ;; esac shift @@ -95,7 +94,6 @@ done if [ $# -ne 0 ]; then print_help fatal "ERROR: Too many arguments" - exit 1 fi prepare_build diff --git a/src/cmd-init b/src/cmd-init index c43940385f..65fd590115 100755 --- a/src/cmd-init +++ b/src/cmd-init @@ -125,7 +125,6 @@ while true; do *) print_help fatal "init: unrecognized option: $1" - exit 1 ;; esac shift @@ -135,7 +134,6 @@ done if [ $# -ne 1 ]; then print_help fatal "ERROR: Missing GITCONFIG" - exit 1 fi # If the current working dir is not empty then error out diff --git a/src/cmd-offline-update b/src/cmd-offline-update index fc06faff49..f5d4754e9b 100755 --- a/src/cmd-offline-update +++ b/src/cmd-offline-update @@ -57,7 +57,6 @@ while true; do ;; -*) fatal "$0: unrecognized option: $1" - exit 1 ;; *) break diff --git a/src/create_disk.sh b/src/create_disk.sh index 090b5e7470..af160c7980 100755 --- a/src/create_disk.sh +++ b/src/create_disk.sh @@ -533,9 +533,9 @@ chattr +i $rootfs fstrim -a -v # Ensure the filesystem journals are flushed for fs in $rootfs/boot $rootfs; do - mount -o remount,ro $fs - xfs_freeze -f $fs - xfs_freeze -u $fs + mount -o remount,ro "$fs" + xfs_freeze -f "$fs" + xfs_freeze -u "$fs" done umount -R $rootfs