No exit with error if don't find sudoers line
This way, actions can be done with the result (eg. add the line,…).
This commit is contained in:
parent
4123be0626
commit
8bc6853b6c
|
@ -29,7 +29,6 @@ is_user() ## [[[
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
## ]]]
|
## ]]]
|
||||||
|
|
||||||
is_sudoers_line() ## [[[
|
is_sudoers_line() ## [[[
|
||||||
{
|
{
|
||||||
line_to_check="${1}"
|
line_to_check="${1}"
|
||||||
|
@ -39,8 +38,8 @@ is_sudoers_line() ## [[[
|
||||||
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : ${line_to_check} line is available in sudo configuration."
|
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : ${line_to_check} line is available in sudo configuration."
|
||||||
return "${SUCCESS}"
|
return "${SUCCESS}"
|
||||||
else
|
else
|
||||||
printf '\e[1;31m%-6s\e[m\n' "ERROR : ${line_to_check} was not found in sudo configuration."
|
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : ${line_to_check} was not found in sudo configuration."
|
||||||
exit "${ERROR}"
|
return "${ERROR}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
## ]]]
|
## ]]]
|
||||||
|
|
Loading…
Reference in New Issue