On 3/22/2015 8:06 AM, Tom Eastep wrote:
> On 3/21/2015 9:45 PM, [email protected] wrote:
>> i'm now managing shorewall centrally on a bunch of different machines.
>>
>> I want to control the version I install so I can have a consistent version, 
>> with its capabilities, across all platforms.
>>
>> Can't depend on the different pkgs for this -- they're different versions.  
>> Building rpms & debs etc is a PITA.
>>
>> My goal is a single tarball install that I will deploy into /opt/shorewall.
>>
>> I found the build & install docs about the shorewallrc 'method'.
>>
>> I created a 'shorewallrc.generic' for each of the packages and setup the 
>> locations like i need them.
>>
>> Since I want a 'generic' build, I chose HOST=linux -- it's one of the 
>> options, and you can't set your own if it's not listed.  The install fails.
>>
>> With HOST=linux all the installs are OK -- except for shorewall-init.
>>
>> It fails with
>>
>>      ERROR: Shorewall-init is not supported on this system
>>
>>
>> That's because of
>>
>> cat  ./shorewall-init-4.6.7/install.sh
>>      ...
>>      case "$HOST" in
>>      ...
>>>>>       linux)
>>>>>           echo "ERROR: Shorewall-init is not supported on this system" >&2
>>>>>           exit 1
>>              ;;
>>          *)
>>              echo "ERROR: Unsupported HOST distribution: \"$HOST\"" >&2
>>              exit 1;
>>              ;;
>>      ...
>>
>> I can patch that out of the way, but it's inconvenient and making an not 
>> necessarily valid assumption.
>>
>> Can we possibly have an option to install a generic shorewall that doesn't 
>> make presumptions and forces an exit?
>>
>> either an override $PARAM to the HOST=linux case check, a 'generic' HOST 
>> with no restrictions at all, or the option to name our own host would do the 
>> trick.
>>
> 
> I could do what you suggest, but the installed product wouldn't work.
> Each major distribution has a unique method for handling network
> interface up/down processing, and Shorewall-init must be installed to
> match that processing. The location and name of the scripts are
> different for each distribution, as are the parameters passed to those
> scripts.
> 
> As a consequence, both the Shorewall-init installer and installed code
> have distribution-dependent logic.

I could release the attached patch. It attempts to detect the
distribution if BUILD = linux. But that will only work if:

a) The Shorewall-init install.sh script is run on each host; and
b) The distribution running on each host is supported by Shorewall-init.

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________
diff --git a/Shorewall-init/install.sh b/Shorewall-init/install.sh
index d9f1738..e24d95c 100755
--- a/Shorewall-init/install.sh
+++ b/Shorewall-init/install.sh
@@ -188,7 +188,7 @@ done
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
 
-if [ -z "$BUILD" ]; then
+if [ -z "$BUILD" -o $BUILD = linux ]; then
     case $(uname) in
        cygwin*)
            BUILD=cygwin

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to