diff options
-rwxr-xr-x | ldap/mkldapdb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ldap/mkldapdb b/ldap/mkldapdb index 77cb6d5..229abc9 100755 --- a/ldap/mkldapdb +++ b/ldap/mkldapdb @@ -15,11 +15,16 @@ fi # config defaults as of slapd 2.4.10-3 backend="hdb" +exit1() { + echo >&2 "Error: $1" + echo >&2 "Exiting..." + exit 1 +} + # Ensure all required values are properly resolved for var in basedn dnsdomain orgname backend; do if [ -z "`eval echo '$'$var`" ]; then - echo 1>&2 "ERROR: Required variable '$var' missing. Exiting...!" - exit 1 + exit1 "Required variable '$var' missing. Exiting...!" fi done |