Revision: 467
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=467&view=rev
Author: GingerDog
Date: 2008-10-19 18:27:14 +0000 (Sun, 19 Oct 2008)
Log Message:
-----------
error handling fixes - see also http://sourceforge.net/forum/forum.php?thread_id=2349320&forum_id=676076
Modified Paths:
--------------
trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh
Modified: trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh
===================================================================
--- trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh 2008-10-16 11:31:25 UTC (rev 466)
+++ trunk/ADDITIONS/postfixadmin-mailbox-postcreation.sh 2008-10-19 18:27:14 UTC (rev 467)
@@ -23,12 +23,12 @@
basedir=/var/spool/maildirs
if [ ! -e "$basedir" ]; then
- echo "basedir '$basedir' does not exist; bailing out."
+ echo "$0: basedir '$basedir' does not exist; bailing out."
exit 1
fi
if [ `echo $3 | fgrep '..'` ]; then
- echo "An argument contained a double-dot sequence; bailing out."
+ echo "$0: An argument contained a double-dot sequence; bailing out."
exit 1
fi
@@ -36,27 +36,25 @@
parent=`dirname "$maildir"`
if [ ! -d "$parent" ]; then
if [ -e "$parent" ]; then
- echo "Strainge - directory '$parent' exists, but is not a directory."
- echo "Bailing out."
+ echo "$0: strange - directory '$parent' exists, but is not a directory; bailing out."
exit 1
else
mkdir -p "${parent}"
if [ $? -ne 0 ]; then
- echo "mkdir -p '$parent' returned non-zero; bailing out."
+ echo "$0: mkdir -p '$parent' returned non-zero; bailing out."
exit 1
fi
fi
fi
if [ -e "$maildir" ]; then
- echo "Directory '$maildir' already exists! Bailing out"
+ echo "$0: Directory '$maildir' already exists! bailing out"
exit 1
fi
maildirmake "$maildir"
if [ ! -d "$maildir" ]; then
- echo "maildirmake didn't produce a directory"
- echo "Bailing out."
+ echo "$0: maildirmake didn't produce a directory; bailing out."
exit 1
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|