Mercurial > masqmail
comparison admin/config-transition @ 311:e230bcd0f1c6
removed protocol option from route config
It was somehow redundant. Now, if `pipe' is set, the protocol will be
pipe, otherwise it'll be smtp. That's just natural.
author | meillo@marmaro.de |
---|---|
date | Sun, 24 Apr 2011 19:37:56 +0200 |
parents | f10a56dc7481 |
children | 55b7bde95d37 |
comparison
equal
deleted
inserted
replaced
310:f10a56dc7481 | 311:e230bcd0f1c6 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # check masqmail config files for options that are obsolete | 3 # check masqmail config files for options that are obsolete |
4 # -v enables verbose output | |
5 # | 4 # |
6 # 2010 markus schnalke <meillo@marmaro.de> | 5 # 2010 markus schnalke <meillo@marmaro.de> |
7 | 6 |
8 if [ $# -eq 0 ] ; then | 7 if [ $# -eq 0 ] ; then |
9 echo "usage: config-transition [-v] CONFIGFILE..." >&2 | 8 echo "usage: config-transition CONFIGFILE..." >&2 |
10 exit 1 | 9 exit 1 |
11 fi | 10 fi |
12 | 11 |
13 awkscript="/tmp/masqmail-config-transition-$$" | 12 awkscript="/tmp/masqmail-config-transition-$$" |
14 | 13 |
91 Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ | 90 Please report to the mailing list at <masqmail@marmaro.de> that you used this option. \ |
92 We still don't know the rationale behind this option. \ | 91 We still don't know the rationale behind this option. \ |
93 All we have is a comment in the code saying: This option is used by sqilconf. \ | 92 All we have is a comment in the code saying: This option is used by sqilconf. \ |
94 " | 93 " |
95 | 94 |
95 check["protocol"] = "route" SUBSEP "Removed in 0.3.2" SUBSEP "\ | |
96 If pipe is given, pipe will be used, otherwise smtp will be used. \ | |
97 " | |
98 | |
96 # get files | 99 # get files |
97 | 100 |
98 # already covered by the get.* and online_gets.* options in the conf | 101 # already covered by the get.* and online_gets.* options in the conf |
99 # file. This check is just to make sure, because one might only check | 102 # file. This check is just to make sure, because one might only check |
100 # the get file. | 103 # the get file. |
124 } | 127 } |
125 # we have a match | 128 # we have a match |
126 split(check[key], a, SUBSEP); # array index starts with 1 | 129 split(check[key], a, SUBSEP); # array index starts with 1 |
127 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); | 130 printf("%s:%d: [%s] %s%s\n", FILENAME, NR, a[1], key, checkcomment()); |
128 cmd = "fold -sw 70 | sed 's,^,\t,'" | 131 cmd = "fold -sw 70 | sed 's,^,\t,'" |
129 if (verbose) { | 132 print "\t>>>> " \$0 " <<<<" |
130 print "\t>>>> " \$0 " <<<<" | 133 print a[3] | cmd |
131 print a[3] | cmd | 134 close(cmd) |
132 close(cmd) | 135 print "\t" a[2] |
133 print "\t" a[2] | 136 print "" |
134 print "" | |
135 } | |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 ! | 140 ! |
140 | 141 |
141 | 142 |
142 verbose=0 | |
143 if [ X"$1" = X"-v" ] ; then | |
144 verbose=1 | |
145 shift | |
146 fi | |
147 | |
148 for i do | 143 for i do |
149 awk -f "$awkscript" "verbose=$verbose" "$i" | 144 awk -f "$awkscript" "$i" |
150 done | 145 done |
151 |