[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Use 'command -v' instead of 'which'

Wolfgang Schweer (@schweer-guest) gitlab at salsa.debian.org
Mon Aug 23 10:34:53 BST 2021



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
bc8a394a by Wolfgang Schweer at 2021-08-23T11:33:56+02:00
Use 'command -v' instead of 'which'

Adjust debian/debian-edu-config.prerm and testsuite/samba

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


3 changed files:

- debian/changelog
- debian/debian-edu-config.prerm
- testsuite/samba


Changes:

=====================================
debian/changelog
=====================================
@@ -14,6 +14,8 @@ debian-edu-config (2.12.1) UNRELEASED; urgency=medium
       in case the migration should be done earlier).
   * Adjust Makefile.
   * Adjust debian/debian-edu-config.lintian-overrides, thanks Lintian.
+  * Use 'command -v' instead of 'which' in debian/debian-edu-config.prerm and
+    testsuite/samba.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Mon, 16 Aug 2021 17:56:10 +0200
 


=====================================
debian/debian-edu-config.prerm
=====================================
@@ -6,7 +6,7 @@ case "$1" in
     remove)
         # Calling the init script during removal
 	if [ -x "/etc/init.d/enable-nat" ] ; then
-	    if [ -x "`which invoke-rc.d 2>/dev/null`" ] ; then
+	    if command -v invoke-rc.d >/dev/null ; then
 		invoke-rc.d enable-nat stop || exit $?
 	    else
 		/etc/init.d/enable-nat stop || exit $?


=====================================
testsuite/samba
=====================================
@@ -35,7 +35,7 @@ fi
 netstat_check netbios-ns udp "Netbios name"
 netstat_check netbios-ssn tcp "Netbios session"
 
-if which net >/dev/null 2>&1 ; then
+if command -v net >/dev/null ; then
     echo "success: $0: found net binary."
     if net time 2>&1 | grep -q $(date +%Y) ; then
 	echo "success: $0: command 'net time' is working."



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/bc8a394affa0f2f3d9ff127def6b2c65b0fa4f24

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/bc8a394affa0f2f3d9ff127def6b2c65b0fa4f24
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20210823/76484742/attachment-0001.htm>


More information about the debian-edu-commits mailing list