Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[Design] _updown custom arguments

From: John S. Denker <jsd(at)monmouth.com>
Date: Sat Feb 15 2003 - 08:49:31 EST

Hi --

0) Pre-background: I think it is a good design to have an _updown script. It makes freeswan more extensible. Thanks!

  1. Background and rationale for today's discussion: Writing an updown script from scratch would be a pile of work. There is a class of people who would like to have a slightly customized updown script, but don't want to start from scratch. We should encourage people to
    • start with the as-distributed script
    • make a copy
    • change the copy as necessary... but no more than necessary!

Alas, some of the defensive arg-checking in the as-distributed version makes things more complicated than they need to be.

2) Suggestion: It should be a _documented_ feature that calling _updown (or copy_of_updown, before modifications) with the arguments "custom blah blah foo bar" is exactly equivalent to calling it with no arguments at all, no matter what arguments follow the word "custom".

(The point being that the user can then edit the thing in some minimal way to add handling for the custom features.)

I believe the foregoing suggestion can be accomplished by simple changes to two lines in the code. To avoid export issues I won't send you the code, but ask yourself what happens when the pluto verb is up-client or down-client and $1 is "custom" as opposed to "". Adding a disjunction to the two

        case-selector)
statements helps a lot in my experience.

Do you need help?X

3) After changing the code, don't forget to change the fine documentation (man ipsec_pluto).

The documentation (and the code) would have been simpler if we could say that the standard features are implemented by passing stuff in the enviroment, while the users can do what they want with positional parameters. Things used to be nice and orthogonal like that, but the introduction of the ipfwadm argument de-orthogonalized things.

	Digression: I suspect the code would have been
	simpler if ipfwadm had been implemented as new
	pluto_verbs (up-client-fw and down-client-fw).

But in any case, the current suggestion is intended to orthogonality to whatever arguments come after the magic word "custom".

===
For a not-quite unrelated suggestion, see next msg.



Design mailing list
Design@lists.freeswan.org
http://lists.freeswan.org/mailman/listinfo/design Received on Sat Feb 15 19:29:17 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:59:32 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library