]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tools: use "which"
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 21 Aug 2017 15:33:30 +0000 (17:33 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 22 Aug 2017 06:49:38 +0000 (02:49 -0400)
Somehow "type" doesn't really work.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxc-checkconfig.in

index ff6ee072ac6bb5b8c5e159bb3e1c0edd0aa35fed..4336dc558636f31a8795c87c47d6494941bebb0b 100644 (file)
@@ -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