[OS-BUILD PATCH 3/3] mod-sign.sh: Fix syntax flagged by shellcheck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Crocker <bcrocker@xxxxxxxxxx>

SC2006: Use $(...) notation instead of legacy backticked `...`.
SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx>
---
 redhat/mod-sign.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/redhat/mod-sign.sh b/redhat/mod-sign.sh
index ed2bd62b605b..1afe136e2ae5 100755
--- a/redhat/mod-sign.sh
+++ b/redhat/mod-sign.sh
@@ -13,9 +13,9 @@ MODSECKEY=$1
 MODPUBKEY=$2
 moddir=$3
 
-modules=`find $moddir -type f -name '*.ko'`
+modules=$(find "$moddir" -type f -name '*.ko')
 
-NPROC=`nproc`
+NPROC=$(nproc)
 [ -z "$NPROC" ] && NPROC=1
 
 # NB: this loop runs 2000+ iterations. Try to be fast.
@@ -27,7 +27,7 @@ done
 " DUMMYARG0   # xargs appends ARG1 ARG2..., which go into $mod in for loop.
 
 RANDOMMOD=$(echo "$modules" | sort -R | head -n 1)
-if [ "~Module signature appended~" != "$(tail -c 28 $RANDOMMOD)" ]; then
+if [ "~Module signature appended~" != "$(tail -c 28 "$RANDOMMOD")" ]; then
     echo "*****************************"
     echo "*** Modules are unsigned! ***"
     echo "*****************************"
-- 
GitLab
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux