From de247618e77c8d902dfb9ba1889d30d8623b1e17 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 7 Feb 2012 18:42:04 +0100 Subject: [PATCH] init/shutdown: use "command -v" instead of "type" --- modules.d/99base/init | 2 +- modules.d/99shutdown/shutdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.d/99base/init b/modules.d/99base/init index bc4ad2c98..f8d52f70d 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -60,7 +60,7 @@ emergency_shell() export PS1="$_rdshell_name:\${PWD}# " [ -e /.profile ] || >/.profile _ctty=/dev/console - if type setsid >/dev/null 2>&1; then + if [ -n "$(command -v setsid)" ]; then _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}" [ -c "$_ctty" ] || _ctty=/dev/tty1 setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1 diff --git a/modules.d/99shutdown/shutdown b/modules.d/99shutdown/shutdown index 21bb37f8d..019a451a9 100755 --- a/modules.d/99shutdown/shutdown +++ b/modules.d/99shutdown/shutdown @@ -32,7 +32,7 @@ emergency_shell() export PS1="$_rdshell_name:\${PWD}# " [ -e /.profile ] || >/.profile _ctty=/dev/console - if type setsid >/dev/null 2>&1; then + if [ -n "$(command -v setsid)" ]; then _ctty="$(getarg rd.ctty=)" && _ctty="/dev/${_ctty##*/}" [ -c "$_ctty" ] || _ctty=/dev/tty1 setsid sh -i -l 0<$_ctty 1>$_ctty 2>&1 -- 2.47.3