diff options
author | Jonas Smedegaard <dr@jones.dk> | 2008-12-14 17:09:23 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2008-12-14 17:09:23 +0100 |
commit | a90ae0e8460bfb43da87a6d296823a50a3e3f604 (patch) | |
tree | 1b12c0005cb4d2aa19f599021a7cc1bd8a90c95e | |
parent | fd74219680cb7750b225fe209b28dd3651dd68f2 (diff) |
Add exit1 function to mkldapdb.
-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 |