aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-27 11:53:28 +0100
committerSam James <sam@gentoo.org>2023-07-27 11:53:28 +0100
commit04225e090e9936df6c5a9ddd5a3926d13e0001df (patch)
tree0399876bf5edce5ed16e92675edfac6b2d30ec45 /netboot/linuxrc.x
parentdefaults/software.sh: use dist tarball for libxcrypt (diff)
downloadgenkernel-04225e090e9936df6c5a9ddd5a3926d13e0001df.tar.gz
genkernel-04225e090e9936df6c5a9ddd5a3926d13e0001df.tar.bz2
genkernel-04225e090e9936df6c5a9ddd5a3926d13e0001df.zip
Replace use of `which`
We're trying to phase it out as it's non-portable. Use bash's `type -P` where available (preferable as it avoids user functions) or `command -v` if POSIX. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'netboot/linuxrc.x')
-rw-r--r--netboot/linuxrc.x2
1 files changed, 1 insertions, 1 deletions
diff --git a/netboot/linuxrc.x b/netboot/linuxrc.x
index 88a2aa77..e607141e 100644
--- a/netboot/linuxrc.x
+++ b/netboot/linuxrc.x
@@ -97,7 +97,7 @@ StartUp() {
#// Hostname
hostname netboot
- if [ -n "$(which dropbear 2>/dev/null)" ]
+ if [ -n "$(command -v dropbear 2>/dev/null)" ]
then
# Setup dropbear (sshd)
echo