|
From: <svn...@op...> - 2009-10-23 18:12:56
|
Author: scriptor Date: Fri Oct 23 20:12:45 2009 New Revision: 5892 URL: http://www.opensync.org/changeset/5892 Log: Changed an error message. Modified: plugins/ldap-sync/misc/clean_ldap.sh Modified: plugins/ldap-sync/misc/clean_ldap.sh ============================================================================== --- plugins/ldap-sync/misc/clean_ldap.sh Fri Oct 23 20:10:15 2009 (r5891) +++ plugins/ldap-sync/misc/clean_ldap.sh Fri Oct 23 20:12:45 2009 (r5892) @@ -29,12 +29,18 @@ if test -f "$tmpfile"; then - rm -f "$tmpfile"; -fi + if test -w "$tmpfile"; then + rm -f "$tmpfile"; -if test -f "$tmpfile"; then - echo "$file:$LINENO: ERROR: $tmpfile already exists and is NOT writable. Exiting." - exit 1 + if test -f "$tmpfile"; then + echo "$file:$LINENO: ERROR: $tmpfile still exists, although rm has been called. As it seems, it is NOT writable. Exiting." + exit 1 + fi + + else + echo "$file:$LINENO: ERROR: $tmpfile already exists and is NOT writable. Exiting." + exit 1 + fi fi @@ -50,7 +56,7 @@ if test $rv -ne 0; then echo -e "The command \n\n$cmd\n\nhas failed. Exiting." - exit + exit 1 fi return $rv |