Skip to content
Snippets Groups Projects
Commit dd6f42f4 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

check validity of the user

parent 83b86fc9
No related branches found
No related tags found
No related merge requests found
......@@ -6,18 +6,23 @@ export VERBOSITY="${MOD_VERBOSITY}"
export CLOCK_ENABLED=0
export COLOR_ENABLED="${MOD_COLOR}"
die(){
66-yeller -f "${@}"
exit 111
}
owner="${1}"
home_env=$(homeof "${owner}")
home_env=$(homeof "${owner}" 2>/dev/null)
if [ -z "${home_env}" ]; then
die "invalid user: ${owner}"
fi
home_env="${home_env}/${MOD_SERVICE_USERCONFDIR}svscan@${owner}"
service_dir="${MOD_MODULE_DIR}/service@"
svscan="${service_dir}/svscan@"
die(){
66-yeller -f "${@}"
exit 111
}
check_empty_var(){
name="${1}" var_value="${2}"
if [ -z "${var_value}" ]; then
......@@ -45,6 +50,8 @@ absolute_path(){
fi
}
if execl-toc -X -V LIVE_DIRECTORY; then
check_empty_var "LIVE_DIRECTORY" "${LIVE_DIRECTORY}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment