author | jurikm |
Sun, 12 Feb 2012 14:04:10 +0000 | |
changeset 8245 | 383896da4129 |
parent 1835 | 92e4335cbbf6 |
permissions | -rw-r--r-- |
1835
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
1 |
--- virtual/tmp/postfix-etc-init.d-postfix Fri Apr 17 20:52:22 2009 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
2 |
+++ virtual/tmp/postfix Fri Apr 17 20:28:06 2009 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
3 |
@@ -17,15 +17,22 @@ |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
4 |
# 23/11/00: Changes & suggestions by Ajay Ramaswamy <[email protected]> |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
5 |
# 20/01/01: Changes to fall in line with RedHat 7.0 style |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
6 |
# 23/02/01: Fix a few untidy problems with help from Daniel Roesen. |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
7 |
+# 17/04/09: Solaris fixes (SFE) |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
8 |
|
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
9 |
# Source function library. |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
10 |
-. /etc/rc.d/init.d/functions |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
11 |
+#. /etc/rc.d/init.d/functions |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
12 |
+function success { |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
13 |
+echo "successfull started postfix" |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
14 |
+} |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
15 |
+function failure { |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
16 |
+echo "successfull started postfix" |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
17 |
+} |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
18 |
|
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
19 |
# Source networking configuration. |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
20 |
-. /etc/sysconfig/network |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
21 |
+#. /etc/sysconfig/network |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
22 |
|
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
23 |
# Check that networking is up. |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
24 |
-[ ${NETWORKING} = "no" ] && exit 0 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
25 |
+#[ ${NETWORKING} = "no" ] && exit 0 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
26 |
|
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
27 |
[ -x /usr/sbin/postfix ] || exit 0 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
28 |
[ -d /etc/postfix ] || exit 0 |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
29 |
@@ -38,7 +45,7 @@ |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
30 |
echo -n "Starting postfix: " |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
31 |
/usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
32 |
RETVAL=$? |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
33 |
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
34 |
+ [ $RETVAL -eq 0 ] && touch /var/run/postfix |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
35 |
echo |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
36 |
return $RETVAL |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
37 |
} |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
38 |
@@ -48,7 +55,7 @@ |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
39 |
echo -n "Shutting down postfix: " |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
40 |
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
41 |
RETVAL=$? |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
42 |
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/postfix |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
43 |
+ [ $RETVAL -eq 0 ] && rm -f /var/run/postfix |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
44 |
echo |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
45 |
return $RETVAL |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
46 |
} |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
47 |
@@ -108,7 +115,7 @@ |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
48 |
status master |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
49 |
;; |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
50 |
condrestart) |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
51 |
- # don't use /var/lock/subsys/postfix, check for postfix running directly |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
52 |
+ # don't use /var/run/postfix, check for postfix running directly |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
53 |
daemon_directory=$(postconf -h daemon_directory) |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
54 |
$daemon_directory/master -t 2>/dev/null && : || restart |
92e4335cbbf6
experimental/SFEpostfix.spec: - add SpamAssassin filter.sh, protect
tom68
parents:
diff
changeset
|
55 |
;; |