Whamcloud - gitweb
LU-15626 lnet: fix shellcheck warning for lnet utils 44/50244/4
authorTimothy Day <timday@amazon.com>
Thu, 9 Mar 2023 19:09:27 +0000 (19:09 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 Mar 2023 23:17:16 +0000 (23:17 +0000)
Fix two small shellcheck warnings for
lnetunload.

Update the file headers to have the
SPDX license and use the standard
format.

Move spaces to tabs.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ic21d917b5b4d6ba6b679453bd50a7699f9908267
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50244
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/utils/lbstats
lnet/utils/lnetunload

index 6cf4a52..039d45b 100755 (executable)
@@ -1,4 +1,14 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+
+#
+# This file is part of Lustre, http://www.lustre.org/
+#
+# lnet/utils/lbstats
+#
+# Cleanly print out info about lnet router buffers,
+# network interfaces, and peers
+#
 
 echo "=== Router Buffers ======="
 lctl get_param -n buffers 2> /dev/null
index b61f938..cc81229 100755 (executable)
@@ -1,19 +1,28 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+
+#
+# This file is part of Lustre, http://www.lustre.org/
+#
+# lnet/utils/lnetunload
+#
+# Unload lnet related kernel modules
+#
 
 lnds=$(echo k{sock,qsw,{open,i,v,o2,c}ib,ra,ptl,mx}lnd)
 
 do_rmmod() {
-    mod=$1
-    if grep "^$mod" /proc/modules >/dev/null 2>&1; then
-       rmmod $mod
-    fi
+       mod=$1
+       if grep "^$mod" /proc/modules >/dev/null 2>&1; then
+               rmmod "$mod"
+       fi
 }
 
 do_rmmod lnet_selftest
 
 if lctl network down > /dev/null 2>&1; then
-    for mod in $lnds; do do_rmmod $mod; done
+       for mod in $lnds; do do_rmmod "$mod"; done
 
-    rmmod lnet 
-    rmmod libcfs
+       rmmod lnet
+       rmmod libcfs
 fi