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