Ross Boylan
2006-May-20 21:46 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
The man page for update-exim4.conf says, in part If update-exim4.conf is called without the option -o, it checks the validity of the freshly generated configuration file and exits with an error. In that case, the new file is not installed to /var/lib/exim4/config.autogenerated. Is that the intended meaning? My guess is the intended meaning is If update-exim4.conf detects that the freshly generated configuration file is invalid it exits with an error. Unless the -o option was given, the old output file is retained.
Andreas Metzler
2006-May-21 08:57 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On 2006-05-20 Ross Boylan <ross@biostat.ucsf.edu> wrote:> The man page for update-exim4.conf says, in part> If update-exim4.conf is called without the option -o, it > checks the validity of the freshly generated configuration file and > exits with an error. In that case, the new file is > not installed to /var/lib/exim4/config.autogenerated.> Is that the intended meaning? My guess is the intended meaning is> If update-exim4.conf detects that the freshly generated configuration > file is invalid it exits with an error. Unless the -o option was > given, the old output file is retained.Hej, Afaict the documentation is correct, update-exim4.conf does not check the validity if -o is given and does not exit with an error if -o is given and the file is invalid: --------------------- argenau:/etc/exim4/conf.d/main# echo blah > invalid argenau:/etc/exim4/conf.d/main# update-exim4.conf 2006-05-21 10:54:00 Exim configuration error in line 201 of /var/lib/exim4/config.autogenerated.tmp: main option "blah" unknown Invalid new configfile /var/lib/exim4/config.autogenerated.tmp not installing /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated argenau:/etc/exim4/conf.d/main# update-exim4.conf -o /tmp/xxxxx --------------------- cu andreas -- The ''Galactic Cleaning'' policy undertaken by Emperor Zhark is a personal vision of the emperor''s, and its inclusion in this work does not constitute tacit approval by the author or the publisher for any such projects, howsoever undertaken. (c) Jasper Ffforde
Ross Boylan
2006-May-21 17:35 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Sun, May 21, 2006 at 10:57:29AM +0200, Andreas Metzler wrote:> On 2006-05-20 Ross Boylan <ross@biostat.ucsf.edu> wrote: > > The man page for update-exim4.conf says, in part >1)> > If update-exim4.conf is called without the option -o, it > > checks the validity of the freshly generated configuration file and > > exits with an error. In that case, the new file is > > not installed to /var/lib/exim4/config.autogenerated. > > > Is that the intended meaning? My guess is the intended meaning is >2)> > If update-exim4.conf detects that the freshly generated configuration > > file is invalid it exits with an error. Unless the -o option was > > given, the old output file is retained. > > Hej, >3)> Afaict the documentation is correct, update-exim4.conf does not check > the validity if -o is given and does not exit with an error if -o is > given and the file is invalid:I think 1, 2, and 3 above all mean different things. First, with -o: 1) gives no information about what happens when -o is used. 2) says when -o is used there is a check, and output occurs in all cases 3) with -o there is never an error check and output always occurs. 1) is consistent with 2) or 3), but implies neither. 2) and 3) are inconsistent. Since 2) is my guess, it''s probably wrong. Second, without -o: 1) validity is checked and an error exit occurs. My original concern was that 1) literally means an error exit *always* occurs, even if the file is valid. The new file is *never* installed (since "in that case" refers to something that always happens). 2) validity is checked and an error exit occurs if the generated file is invalid. If there is an error, the old file is retained; otherwise, the new one is installed. 3) gives no information on this case> --------------------- > argenau:/etc/exim4/conf.d/main# echo blah > invalid > argenau:/etc/exim4/conf.d/main# update-exim4.conf > 2006-05-21 10:54:00 Exim configuration error in line 201 of /var/lib/exim4/config.autogenerated.tmp: > main option "blah" unknown > Invalid new configfile /var/lib/exim4/config.autogenerated.tmp > not installing /var/lib/exim4/config.autogenerated.tmp to > /var/lib/exim4/config.autogenerated > argenau:/etc/exim4/conf.d/main# update-exim4.conf -o /tmp/xxxxx > --------------------- >These results are consistent with all 3 interpretations, though only weakly consistent with 3), which doesn''t discuss the not -o case. Ross
Andreas Metzler
2006-May-21 18:14 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On 2006-05-21 Ross Boylan <ross@biostat.ucsf.edu> wrote:> On Sun, May 21, 2006 at 10:57:29AM +0200, Andreas Metzler wrote: >> On 2006-05-20 Ross Boylan <ross@biostat.ucsf.edu> wrote: >>> The man page for update-exim4.conf says, in part> 1) >>> If update-exim4.conf is called without the option -o, it >>> checks the validity of the freshly generated configuration file and >>> exits with an error. In that case, the new file is >>> not installed to /var/lib/exim4/config.autogenerated.>>> Is that the intended meaning? My guess is the intended meaning is> 2) >>> If update-exim4.conf detects that the freshly generated configuration >>> file is invalid it exits with an error. Unless the -o option was >>> given, the old output file is retained.>> Hej,> 3) >> Afaict the documentation is correct, update-exim4.conf does not check >> the validity if -o is given and does not exit with an error if -o is >> given and the file is invalid:[ snip]> My original concern was that 1) literally means an error exit *always* > occurs, even if the file is valid. The new file is *never* installed > (since "in that case" refers to something that always happens).I can see the problem now.> 2) validity is checked and an error exit occurs if the generated file > is invalid. If there is an error, the old file is retained; > otherwise, the new one is installed. > 3) gives no information on this case[...] How about: (Only) if update-exim4.conf is called without the option -o, it checks the validity of the freshly generated configuration file. If the new file is invalid it is not installed to /var/lib/exim4/config.autogenerated and update-exim4.conf exits with an error. cu and- no native speaker -reas -- The ''Galactic Cleaning'' policy undertaken by Emperor Zhark is a personal vision of the emperor''s, and its inclusion in this work does not constitute tacit approval by the author or the publisher for any such projects, howsoever undertaken. (c) Jasper Ffforde
Ross Boylan
2006-May-22 17:14 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Sun, 2006-05-21 at 20:14 +0200, Andreas Metzler wrote:> (Only) if update-exim4.conf is called without the option -o, it > checks the validity of the freshly generated configuration file. If > the new file is invalid it is not installed to > /var/lib/exim4/config.autogenerated and update-exim4.conf exits with > an error. > cu and- no native speaker -reasThat''s pretty good. How about update-exim4.conf checks the validity of the freshly generated configuration file if and only if invoked without the -o option. If the new file is invalid, update-exim4.conf exits with an error and leaves the old /var/lib/exim4/config.autogenerated untouched. It might be nice to check the validity of the output file in all cases (which was the behavior I assumed), but that''s a somewhat separate issue. -- Ross Boylan wk: (415) 514-8146 185 Berry St #5700 ross@biostat.ucsf.edu Dept of Epidemiology and Biostatistics fax: (415) 514-8150 University of California, San Francisco San Francisco, CA 94107-1739 hm: (415) 550-1062
Marc Haber
2006-May-23 15:51 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Mon, May 22, 2006 at 09:47:56AM -0700, Ross Boylan wrote:> update-exim4.conf checks the validity of the freshly generated > configuration file if and only if invoked without the -o option. If the > new file is invalid, update-exim4.conf exits with an error and leaves > the old /var/lib/exim4/config.autogenerated untouched. > > It might be nice to check the validity of the output file in all cases > (which was the behavior I assumed), but that''s a somewhat separate > issue.So you want something that could be documented with: update-exim4.conf checks the validity of the freshly generated configuration file. If the new file is invalid, update-exim4.conf leaves the old /var/lib/exim4/config.autogenerated untouched, but will overwrite an output file specified with -o. Right? Genereally, the update-exim4.conf man page should be flagged for a major re-work. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Marc Haber
2006-Jun-26 12:26 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Tue, May 23, 2006 at 05:51:37PM +0200, Marc Haber wrote:> On Mon, May 22, 2006 at 09:47:56AM -0700, Ross Boylan wrote: > > update-exim4.conf checks the validity of the freshly generated > > configuration file if and only if invoked without the -o option. If the > > new file is invalid, update-exim4.conf exits with an error and leaves > > the old /var/lib/exim4/config.autogenerated untouched.I have committed the following new wording: If the new configuration will be written to /var/lib/exim4/config.autogenerated, update-exim4.conf will check the validity of the freshly generated configuration. If the new file is detected as invalid, update-exim4.conf leaves the old /var/lib/exim4/config.autogenerated untouched and exits with an error. However, there are still possible invalidities that can only be detected at run time. This most notably applies to errors in expressions that are expanded at run time. If the new configuration will be written to some other file, this file''s contents will always be overwritten regardless of the validity of the freshly generated configuration.> > It might be nice to check the validity of the output file in all cases > > (which was the behavior I assumed), but that''s a somewhat separate > > issue.I disagree on that point. The current behavior is just fine in my opinion. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Ross Boylan
2006-Jun-27 20:48 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Mon, 2006-06-26 at 14:26 +0200, Marc Haber wrote:> On Tue, May 23, 2006 at 05:51:37PM +0200, Marc Haber wrote: > > On Mon, May 22, 2006 at 09:47:56AM -0700, Ross Boylan wrote: > > > update-exim4.conf checks the validity of the freshly generated > > > configuration file if and only if invoked without the -o option. If the > > > new file is invalid, update-exim4.conf exits with an error and leaves > > > the old /var/lib/exim4/config.autogenerated untouched. > > I have committed the following new wording: > > If the new configuration will be written to > /var/lib/exim4/config.autogenerated, update-exim4.conf will > check the validity of the freshly generated configuration. If > the new file is detected as invalid, update-exim4.conf leaves > the old /var/lib/exim4/config.autogenerated untouched and exits > with an error. > > However, there are still possible invalidities that can only be > detected at run time. This most notably applies to errors in > expressions that are expanded at run time. > > If the new configuration will be written to some other file, > this file''s contents will always be overwritten regardless of > the validity of the freshly generated configuration. > > > > > It might be nice to check the validity of the output file in all cases > > > (which was the behavior I assumed), but that''s a somewhat separate > > > issue. > > I disagree on that point. The current behavior is just fine in my > opinion.It might be good to make this behavior a bit more explicit. Here''s a possible rewording of the last paragraph: If the new configuration will be written to some other file, no validity checking occurs and that file will always be overwritten. Ross
Marc Haber
2006-Jun-28 09:13 UTC
[Pkg-exim4-users] question about update-exim4.conf manpage
On Tue, Jun 27, 2006 at 01:48:22PM -0700, Ross Boylan wrote:> It might be good to make this behavior a bit more explicit. Here''s a > possible rewording of the last paragraph: > If the new configuration will be written to some other file, > no validity checking occurs and that file will always be > overwritten.Very nice. I have committed this wording to svn. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835