Commit ed264a5c authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: fix warning when sudo is unaccessible

parent 3fd0e2dc
...@@ -553,8 +553,8 @@ check_sudo_access() ...@@ -553,8 +553,8 @@ check_sudo_access()
for i in /bin/sudo /usr/bin/sudo ; do for i in /bin/sudo /usr/bin/sudo ; do
[ -f $i ] && cmd="$i" [ -f $i ] && cmd="$i"
done done
[ ! -f $cmd ] && warning "sudo command is missed. Try install sudo package (http://altlinux.org/sudo)." && return 1 [ ! -f "$cmd" ] && warning "sudo command is missed. Try install sudo package (http://altlinux.org/sudo)." && return 1
local group="$(stat -c '%G' $cmd)" || fatal local group="$(stat -c '%G' "$cmd")" || fatal
warning "Check if you are in $group group to have access to sudo command." warning "Check if you are in $group group to have access to sudo command."
return 1 return 1
} }
...@@ -567,8 +567,8 @@ check_sudo_access_only() ...@@ -567,8 +567,8 @@ check_sudo_access_only()
for i in /bin/sudo /usr/bin/sudo ; do for i in /bin/sudo /usr/bin/sudo ; do
[ -f $i ] && cmd="$i" [ -f $i ] && cmd="$i"
done done
[ ! -f $cmd ] && return 1 [ ! -f "$cmd" ] && return 1
local group="$(stat -c '%G' $cmd)" || fatal local group="$(stat -c '%G' "$cmd")" || fatal
warning "sudo command is presence, but is not accessible for you. Check if you are in $group group to have access to sudo command." warning "sudo command is presence, but is not accessible for you. Check if you are in $group group to have access to sudo command."
return 1 return 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment