1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## postfix-script2.dpatch by LaMont Jones <lamont@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad --exclude=CVS --exclude=.svn ./conf/postfix-script /tmp/dpep-work.gXE1m7/postfix/conf/postfix-script
--- ./conf/postfix-script 2005-04-14 10:14:16.000000000 -0600
+++ /tmp/dpep-work.gXE1m7/postfix/conf/postfix-script 2006-01-18 23:21:34.000000000 -0700
@@ -42,6 +42,13 @@
FATAL="$LOGGER -p fatal"
PANIC="$LOGGER -p panic"
+if [ "X${1#quiet-}" != "X${1}" ]; then
+ INFO=:
+ x=${1#quiet-}
+ shift
+ set -- $x "$@"
+fi
+
umask 022
SHELL=/bin/sh
@@ -84,6 +91,20 @@
echo "Stop postfix"
;;
+quick-start)
+
+ $daemon_directory/master -t 2>/dev/null || {
+ $FATAL the Postfix mail system is already running
+ exit 1
+ }
+ $config_directory/postfix-script quick-check || {
+ $FATAL Postfix integrity check failed!
+ exit 1
+ }
+ $INFO starting the Postfix mail system
+ $daemon_directory/master &
+ ;;
+
start)
$daemon_directory/master -t 2>/dev/null || {
@@ -125,7 +146,7 @@
$daemon_directory/master -t 2>/dev/null && {
$FATAL the Postfix mail system is not running
- exit 1
+ exit 0
}
$INFO stopping the Postfix mail system
kill `sed 1q pid/master.pid`
@@ -135,7 +156,7 @@
$daemon_directory/master -t 2>/dev/null && {
$FATAL the Postfix mail system is not running
- exit 1
+ exit 0
}
$INFO aborting the Postfix mail system
kill `sed 1q pid/master.pid`
@@ -169,9 +190,7 @@
exit 0
;;
-check-fatal)
- # This command is NOT part of the public interface.
-
+quick-check)
$SHELL $config_directory/post-install create-missing || {
$WARN unable to create missing queue directories
exit 1
@@ -183,6 +202,13 @@
$FATAL no $config_directory/master.cf file found
exit 1
}
+ exit 0
+ ;;
+
+check-fatal)
+ # This command is NOT part of the public interface.
+
+ $config_directory/postfix-script quick-check
# See if all queue files are in the right place. This is slow.
# We must scan all queues for mis-named queue files before the
|