[lxc/lxc] 7a7671: Replace 'which' with 'command -v'

0 views
Skip to first unread message

Christian Brauner

unread,
Oct 28, 2021, 12:06:31 PM10/28/21
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/master
Home: https://github.com/lxc/lxc
Commit: 7a7671655aaa8d66730c218513680736b1437a10
https://github.com/lxc/lxc/commit/7a7671655aaa8d66730c218513680736b1437a10
Author: Diederik de Haas <didi....@cknow.org>
Date: 2021-10-28 (Thu, 28 Oct 2021)

Changed paths:
M config/init/common/lxc-net.in
M hooks/dhclient.in
M hooks/nvidia
M src/lxc/cmd/lxc-checkconfig.in
M templates/lxc-busybox.in
M templates/lxc-oci.in

Log Message:
-----------
Replace 'which' with 'command -v'

The 'which' command is deprecated on Debian Sid as it is not POSIX
compliant and it's behavior is therefor not consistent, so replace it
with 'command -v' which is POSIX compliant.
See https://stackoverflow.com/a/677212 for details.

Also replaced a use of backticks (`) as that is deprecated as well.
See https://github.com/koalaman/shellcheck/wiki/SC2006 for details.

Signed-off-by: Diederik de Haas <didi....@cknow.org>


Commit: 4449c5b25c39d992fecddc8a7f0729769ae58d3a
https://github.com/lxc/lxc/commit/4449c5b25c39d992fecddc8a7f0729769ae58d3a
Author: Christian Brauner <christia...@ubuntu.com>
Date: 2021-10-28 (Thu, 28 Oct 2021)

Changed paths:
M config/init/common/lxc-net.in
M hooks/dhclient.in
M hooks/nvidia
M src/lxc/cmd/lxc-checkconfig.in
M templates/lxc-busybox.in
M templates/lxc-oci.in

Log Message:
-----------
Merge pull request #4019 from diederikdehaas/replace-which-with-command-v

Replace 'which' with 'command -v'


Compare: https://github.com/lxc/lxc/compare/8dff29c6c788...4449c5b25c39
Reply all
Reply to author
Forward
0 new messages