Hi tom, thank you for explaining the changes you made!

Are the patches also going to be in beta2?

Patching WRTLOGGING1.patch failed!:
$ patch ${HOME}/shorewall/5.0.1.1/shorewall-core-5.0.1.1/lib.cli 
WRTLOGGING1.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file 
/home/matt/shorewall/5.0.1.1/shorewall-core-5.0.1.1/lib.cli
Hunk #1 FAILED at 158.

Assuming that what need to be changed is the if in case statement 
with  an return  value of 0 in the function syslog_circular_buffer:
from
if [ x$arg = x-S ]; then
echo Yes
return
fi
to
case $arg in
-S)
return 0
;;
esac

then the line in the function setup_logread
if [ -n "$(syslog_circular_buffer)" ]; then
should also be changed to
if syslog_circular_buffer; then

--
The value of $LOGFILE should also be change if printed(EG: in 
function logwatch):
echo "Dropped/Rejected Packet Log ($LOGFILE)"
or it will print the default value of $LOGFILE(/var/log/messages)!

request:
Could the exit status of the scp command be properly returned?(it 
returns always 0 even on failure):
To illustrate my point it is failing on purpose!:

$ shorewall remote-start system && echo ok || echo failed

Copying firewall and firewall.conf to /var/lib/shorewall-lite...
root@path:/var/lib/shorewall-lite: No such file or directory
ok

-Matt

P.S. The hostname is not properly displayed on openwrt(maybe using 
"uname -n"?)!!!!!:)

On 31 Oct 2015 at 13:39, Tom Eastep wrote:

> On 10/31/2015 10:00 AM, matt darfeuille wrote:
> > Hi Tom,
> >
> > Thanks for the new patch; I will patch it later and do some testing
> > tomorrow!
> >
> > I change a bit the install/uninstall/configure scripts:
> > shorewall-core-5.0.1.1:
> > configure script:
> >
> > if configure is invoke as:
> > ./configure host=default
> > it works but will fail if an atempt is made to use the shorewallrc
> > file.
> > so an if statement that will change host=default to host=linux will
> > do it:
> >
> > if [ ${options[HOST]} = "default" ]; then
> > options[HOST]="linux"
> > fi
> 
> I changed it like this:
> 
> @ -156,10 +156,12 @@ elif [ $vendor = linux ]; then
>   else
>       rcfile=shorewallrc.$vendor
>       if [ ! -f $rcfile ]; then
>       echo "ERROR: $vendor is not a recognized host type" >&2
>       exit 1
> +    elif [ $vendor = default ]; then
> +       params[HOST]=linux
> +     vendor=linux
>       fi
>   fi
> 
>   if [ $vendor = linux ]; then
>       echo "INFO: Creating a generic Linux installation - " `date`;
> 
> >
> > install.sh:
> > On openwrt the "install" command is not  a base packet; adding an if
> > statement that will check for it and stop the execution of the script
> > if "install" is not present:
> >
> > run_install()
> > {
> > if qt mywhich install; then
> >      if ! install $*; then
> >          echo
> >          echo "ERROR: Failed to install $*" >&2
> >          exit 1
> >      fi
> > else
> > fatal_error "Shorewall-core requires the install command."
> > fi
> > }
> 
> I did it this way to reduce the number of calls to mywhich.
> 
> @@ -133,6 +133,8 @@ while [ $finished -eq 0 ]; do
>       esac
>   done
> 
> +[ -n $(mywhich install) ] || { fatal_error "This installer requires the 
> 'install' utility"
> +
>   #
>   # Read the RC file
>   #
> >
> > shorewall-lite-5.0.1.1/install.sh:
> > run_install also modified
> >
> 
> I did it similarly to the above.
> 
> > --
> > line 190 changed from(LIBEXECDIRDIRDIR):
> > for var in SHAREDIR LIBEXECDIRDIRDIR CONFDIR SBINDIR VARLIB VARDIR;
> > do
> > to
> > for var in SHAREDIR LIBEXECDIR CONFDIR SBINDIR VARLIB VARDIR; do
> >
> Done.
> > --
> > line377(the "/" between destdir and sharedir):
> > change from
> >   echo "Library ${f#*.} file installed as
> > ${DESTDIR}/${SHAREDIR}/shorewall/$f"
> > to
> > echo "Library ${f#*.} file installed as
> > ${DESTDIR}${SHAREDIR}/shorewall/$f"
> 
> Since the variable following ${DESTDIR} always begins with "/", the 
> slashes like that are superfluous. I've removed them all for consistency
> 
> >
> > shorewall-lite-5.0.1.1/uninstall.sh:
> > line 170(if statement because readlink has only -f -n):
> > if [ -L ${SHAREDIR}/shorewall-lite/init ]; then
> > if [ $HOST = "linux" -a -f /etc/openwrt_release -o -f
> > /etc/openwrt_version ]; then
> > FIREWALL=$(readlink ${SHAREDIR}/shorewall-lite/init)
> > else
> > FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall-lite/init)
> > fi
> > elif [ -n "$INITFILE" ]; then
> > FIREWALL=${INITDIR}/${INITFILE}
> >   fi
> >
> 
> Added.
> 
> > --
> > Adding the line to remove sysconfdir if set:
> > [ -n ${SYSCONFDIR} ] && rm -f ${SYSCONFDIR}/shorewall-lite*
> >
> 
> Added.
> 
> > request:
> > Could timestamp in the compiled script used %b instead of %_b?
> >
> 
> Done -- I missed a couple the last time :-)
> 
> These changes will be in Shorewall 5.0.2 Beta 2
> 
> -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 \________________________________________________
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Shorewall-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/shorewall-users



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

Reply via email to