From: Christian Brauner Date: Mon, 21 Aug 2017 15:33:30 +0000 (+0200) Subject: tools: use "which" X-Git-Tag: lxc-1.0.11~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a7fb53a79357a3382cc8e6bab78b7702f7f8d5b;p=thirdparty%2Flxc.git tools: use "which" Somehow "type" doesn't really work. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in index ff6ee072a..4336dc558 100644 --- a/src/lxc/lxc-checkconfig.in +++ b/src/lxc/lxc-checkconfig.in @@ -79,16 +79,16 @@ echo -n "Ipc namespace: " && is_enabled CONFIG_IPC_NS yes echo -n "Pid namespace: " && is_enabled CONFIG_PID_NS yes echo -n "User namespace: " && is_enabled CONFIG_USER_NS if is_set CONFIG_USER_NS; then - if type newuidmap > /dev/null 2>&1; then - f=`type -P newuidmap` + if which newuidmap > /dev/null 2>&1; then + f=`which newuidmap` if [ ! -u "${f}" ]; then echo "Warning: newuidmap is not setuid-root" fi else echo "newuidmap is not installed" fi - if type newgidmap > /dev/null 2>&1; then - f=`type -P newgidmap` + if which newgidmap > /dev/null 2>&1; then + f=`which newgidmap` if [ ! -u "${f}" ]; then echo "Warning: newgidmap is not setuid-root" fi