Great Circle Associates Majordomo-Users
(March 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Config corrected (tech note)
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Tue, 11 Mar 1997 12:02:54 -0600 (CST)
To: jjr @ databook . com (Jim Reisert)
Cc: rhiggins @ cybercorp . net, majordomo-users @ GreatCircle . COM
In-reply-to: <199703111703.MAA29096@mass4.databook.com> from "Jim Reisert" at Mar 11, 97 12:03:48 pm
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

[ Jim Reisert writes: ]
>
> If you have the files SPACE separated, you *must* put the explicit
> path to all but the first file on the list. For example, if I have two
> lists:
> 
> 	list
> 	list-digest
> 
> both in my 'lists' directory, I can put either:
> 
> 	restrict_post = list:list-digest
>         -or-
> 	restrict_post = list /path/to/lists/list-digest
> 
> But I can't put:
> 
> 	restrict_post = list list-digest
> 
> newkonfig will claim that it can't find the 'list-digest' file.

I can't reproduce your claim that "list /path/to/lists/list-digest"
(i.e. using a space separator) works. Grab_restrict_post() doesn't split
space delimited file names, but rather tries to find the entire string,
space and all:

>restrict_post = testlist.restrict testlist.restrict2
>
>The new config file for testlist was NOT accepted because:
>Can't find restrict_post file /.../lists/testlist.restrict testlist.restrict2 at line 292

>restrict_post = testlist.restrict /.../lists/testlist.restrict2
>
>The new config file for testlist was NOT accepted because:
>Can't find restrict_post file /.../lists/testlist.restrict /.../lists/testlist.restrict2 at line 292

Notice that both files are listed each time and the path is prepended
only to the beginning of the entire string. The following patch makes it
work for colon and any whitespace (note that this patch is already in
the Mj unofficial patches):

--- ../majordomo-1.94.1/config_parse.pl	Thu Feb 20 13:45:35 1997
+++ config_parse.pl	Tue Mar 11 11:42:00 1997
@@ -1087,7 +1087,7 @@
 	local($list) = @_;
 	local(@files) = ();
 	
-        @files = split (/[:\t\n]+/, $list);
+        @files = split (/[:\s]+/, $list);
 	foreach (@files) {
 	    # add listdir if no leading /
 	    #

-- 
 Dave Wolfe


References:
Indexed By Date Previous: Re: MajorDomo difficulties.
From: Dave Wolfe <dwolfe@risc.sps.mot.com>
Next: Problems upgrading
From: Daniel Baker <dbaker@hobbes.cuckoo.com>
Indexed By Thread Previous: Re: Config corrected (tech note)
From: Jim Reisert <jjr@databook.com>
Next: Degest Index
From: Sandi-J <sandij@verinet.com>

Google
 
Search Internet Search www.greatcircle.com