On 5/27/2015 8:37 AM, PGNd wrote:
> This appears to get the gateway cleanly from the active/current lease
>
>       svc_status=$( systemctl is-active wickedd-dhcp4.service )
>       echo $svc_status
>       if [ $svc_status == 'active' ]; then
>         data="/var/lib/wicked/lease-eth0-dhcp-ipv4.xml"
>         if [ -f $data ]; then
>           gateway=$( xml_grep 'gateway' $data --text_only )
>           echo $gateway
>         fi
>       fi
>
> So for use in SHOREWALL/findgw
>
>       svc_status=$( systemctl is-active wickedd-dhcp4.service )
>       echo $svc_status
>       if [ $svc_status == 'active' ]; then
>         data="/var/lib/wicked/lease-${1}-dhcp-ipv4.xml"
>         if [ -f $data ]; then
>           gateway=$( xml_grep 'gateway' $data --text_only )
>           echo $gateway
>         fi
>       fi
>
> That gets the gateway addr.  I'm not clear whether it correctly gets the gw 
> addr INTO Shorewall.
>
> Is that ^^ sufficient?
>
Should work.  Incidentally, the findgw file that I release is empty
(except for comments). So if you have one that is non-empty, it must
have been supplied by the SuSE Shorewall maintainer.

-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 \________________________________________________


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to