diff --git a/scripts/merge_config.sh b/scripts/merge_config.sh index 8e65661c..03ddcf3f 100755 --- a/scripts/merge_config.sh +++ b/scripts/merge_config.sh @@ -7,9 +7,9 @@ if [ -n "$SYSREPOCFG_EXECUTABLE" ]; then SYSREPOCFG="$SYSREPOCFG_EXECUTABLE" # avoid problems with sudo PATH elif [ `id -u` -eq 0 ]; then - SYSREPOCFG=`su -c 'which sysrepocfg' -l $USER` + SYSREPOCFG=`su -c 'command -v sysrepocfg' -l $USER` else - SYSREPOCFG=`which sysrepocfg` + SYSREPOCFG=`command -v sysrepocfg` fi KS_KEY_NAME=genkey diff --git a/scripts/merge_hostkey.sh b/scripts/merge_hostkey.sh index efd74b31..5b1d33f4 100755 --- a/scripts/merge_hostkey.sh +++ b/scripts/merge_hostkey.sh @@ -7,17 +7,17 @@ if [ -n "$SYSREPOCFG_EXECUTABLE" ]; then SYSREPOCFG="$SYSREPOCFG_EXECUTABLE" # avoid problems with sudo PATH elif [ `id -u` -eq 0 ]; then - SYSREPOCFG=`su -c 'which sysrepocfg' -l $USER` + SYSREPOCFG=`su -c 'command -v sysrepocfg' -l $USER` else - SYSREPOCFG=`which sysrepocfg` + SYSREPOCFG=`command -v sysrepocfg` fi if [ -n "$OPENSSL_EXECUTABLE" ]; then OPENSSL="$OPENSSL_EXECUTABLE" elif [ `id -u` -eq 0 ]; then - OPENSSL=`su -c 'which openssl' -l $USER` + OPENSSL=`su -c 'command -v openssl' -l $USER` else - OPENSSL=`which openssl` + OPENSSL=`command -v openssl` fi # check that there is no SSH key with this name yet diff --git a/scripts/remove.sh b/scripts/remove.sh index ce736004..d229a353 100755 --- a/scripts/remove.sh +++ b/scripts/remove.sh @@ -6,9 +6,9 @@ if [ -n "$SYSREPOCTL_EXECUTABLE" ]; then SYSREPOCTL="$SYSREPOCTL_EXECUTABLE" # avoid problems with sudo PATH elif [ `id -u` -eq 0 ]; then - SYSREPOCTL=`su -c 'which sysrepoctl' -l $USER` + SYSREPOCTL=`su -c 'command -v sysrepoctl' -l $USER` else - SYSREPOCTL=`which sysrepoctl` + SYSREPOCTL=`command -v sysrepoctl` fi # array of modules to remove, exact same as setup.sh diff --git a/scripts/setup.sh b/scripts/setup.sh index 0468753d..68ea05a3 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -12,9 +12,9 @@ if [ -n "$SYSREPOCTL_EXECUTABLE" ]; then SYSREPOCTL="$SYSREPOCTL_EXECUTABLE" # avoid problems with sudo PATH elif [ `id -u` -eq 0 ]; then - SYSREPOCTL=`su -c 'which sysrepoctl' -l $USER` + SYSREPOCTL=`su -c 'command -v sysrepoctl' -l $USER` else - SYSREPOCTL=`which sysrepoctl` + SYSREPOCTL=`command -v sysrepoctl` fi MODDIR=${DESTDIR}${NP2_MODULE_DIR} PERMS=${NP2_MODULE_PERMS}