Commit f307aa2a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: set_sudo(): improve messages

parent d77adc58
...@@ -369,7 +369,7 @@ set_sudo() ...@@ -369,7 +369,7 @@ set_sudo()
SUDO_TESTED="1" SUDO_TESTED="1"
if ! is_command $SUDO_CMD ; then if ! is_command $SUDO_CMD ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't find sudo. Please install and tune sudo ('# epm install sudo') or run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'For this operation run epm under root, or install and tune sudo (http://altlinux.org/sudo)'"
SUDO_TESTED="2" SUDO_TESTED="2"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
...@@ -379,7 +379,7 @@ set_sudo() ...@@ -379,7 +379,7 @@ set_sudo()
if ! $SUDO_CMD -n true ; then if ! $SUDO_CMD -n true ; then
info "Please enter sudo user password to use sudo in the current session." info "Please enter sudo user password to use sudo in the current session."
if ! $SUDO_CMD -l >/dev/null ; then if ! $SUDO_CMD -l >/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'For this operation run epm under root, or install and tune sudo (http://altlinux.org/sudo)'"
SUDO_TESTED="3" SUDO_TESTED="3"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
...@@ -387,7 +387,7 @@ set_sudo() ...@@ -387,7 +387,7 @@ set_sudo()
else else
# use sudo if one is tuned and tuned without password # use sudo if one is tuned and tuned without password
if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo '" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported here). Please run epm under root or check http://altlinux.org/sudo '"
SUDO_TESTED="4" SUDO_TESTED="4"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
......
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