[joerg at alea.gnuu.de: Bug#206283: actsyncd: getlist want port with -p]
Russ Allbery
rra at stanford.edu
Sat Oct 18 05:51:08 UTC 2003
Marco d'Itri <md at Linux.IT> writes:
> Better (i.e. it actually works):
> --- inn2-2.4.0+20030808.orig/backends/actsyncd.in
> +++ inn2-2.4.0+20030808/backends/actsyncd.in
> @@ -160,10 +160,13 @@
> .*) cp $origdir/$host active; status=$? ;;
> *)
> if [ -z "$ftp" ]; then
> - echo "getlist -h $host" >>$out
> - if getlist -h $host > active 2>>$out; then
> - :
> - else
> + port=${host##*:}
> + real_host=${host%%:*}
> + if [ "$port" = "$host" ]; then
> + port=119
> + fi
> + echo "getlist -h $real_host -p $port" >>$out
> + if ! getlist -h $real_host -p $port > active 2>>$out; then
> status=$NOSYNC
> fi
> else
That syntax isn't portable Bourne shell, but that's the right idea. Fixed
thusly:
--- actsyncd.in 2002/09/26 23:39:17 1.6
+++ actsyncd.in 2003/10/18 05:46:26
@@ -160,8 +160,13 @@ for loop in 1 2 3 4 5 6 7 8 9 10; do
.*) cp $origdir/$host active; status=$? ;;
*)
if [ -z "$ftp" ]; then
- echo "getlist -h $host" >>$out
- if getlist -h $host > active 2>>$out; then
+ port=`expr "$host" : '.*:\(.*\)'`
+ if [ -n "$port" ]; then
+ port="-p $port"
+ host=`expr "$host" : '\(.*\):.*'`
+ fi
+ echo "getlist -h $host $port" >>$out
+ if getlist -h $host $port > active 2>>$out; then
:
else
status=$NOSYNC
> Other bug: storage/Make.methods should be deleted by the clean target
> of storage/Makefile.
In an ideal world, yeah, but right now it's still checked into CVS because
some makes can't cope with it not being present and we don't have a good
snapshot and release procedure to generate these files right now.
This is something I'd like to fix in general (it affects other things,
like the pre-built bison and flex parsers), but I'm not sure when I'll get
to that....
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers
mailing list