forked from extern/shorewall_code
Allow installers to run under Cygwin without extra parameters
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8489 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
0f6d348187
commit
2b51b76131
@ -8,6 +8,8 @@ Changes in 4.1.8
|
|||||||
|
|
||||||
4) Add the -p option to start and stop
|
4) Add the -p option to start and stop
|
||||||
|
|
||||||
|
5) Allow installers to run under Cygwin without extra parameters.
|
||||||
|
|
||||||
Changes in 4.1.7
|
Changes in 4.1.7
|
||||||
|
|
||||||
1) Fix port verification.
|
1) Fix port verification.
|
||||||
|
@ -149,13 +149,24 @@ if [ -z "$RUNLEVELS" ] ; then
|
|||||||
RUNLEVELS=""
|
RUNLEVELS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$OWNER" ] ; then
|
DEBIAN=
|
||||||
OWNER=root
|
CYGWIN=
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$GROUP" ] ; then
|
case $(uname) in
|
||||||
GROUP=root
|
CYGWIN*)
|
||||||
fi
|
DEST=
|
||||||
|
INIT=
|
||||||
|
OWNER=$(id -un)
|
||||||
|
GROUP=$(id -gn)
|
||||||
|
CYGWIN=Yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
[ -z "$OWNER" ] && OWNER=root
|
||||||
|
[ -z "$GROUP" ] && GROUP=root
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||||
|
|
||||||
NOBACKUP=
|
NOBACKUP=
|
||||||
|
|
||||||
@ -184,35 +195,29 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
|||||||
#
|
#
|
||||||
# Determine where to install the firewall script
|
# Determine where to install the firewall script
|
||||||
#
|
#
|
||||||
DEBIAN=
|
|
||||||
CYGWIN=
|
|
||||||
|
|
||||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
|
||||||
|
|
||||||
if [ -n "$PREFIX" ]; then
|
if [ -n "$PREFIX" ]; then
|
||||||
if [ `id -u` != 0 ] ; then
|
if [ -z "$CYGWIN" -a `id -u` != 0 ] ; then
|
||||||
echo "Not setting file owner/group permissions, not running as root."
|
echo "Not setting file owner/group permissions, not running as root."
|
||||||
OWNERSHIP=""
|
OWNERSHIP=""
|
||||||
fi
|
|
||||||
|
|
||||||
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
|
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
|
||||||
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
|
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
[ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
|
[ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
|
||||||
{ echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
|
{ echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
|
||||||
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
|
if [ -z "$CYGWIN" ]; then
|
||||||
DEBIAN=yes
|
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
|
||||||
elif [ -f /etc/slackware-version ] ; then
|
DEBIAN=yes
|
||||||
DEST="/etc/rc.d"
|
elif [ -f /etc/slackware-version ] ; then
|
||||||
INIT="rc.firewall"
|
DEST="/etc/rc.d"
|
||||||
elif [ -f /etc/arch-release ] ; then
|
INIT="rc.firewall"
|
||||||
DEST="/etc/rc.d"
|
elif [ -f /etc/arch-release ] ; then
|
||||||
INIT="shorewall"
|
DEST="/etc/rc.d"
|
||||||
ARCHLINUX=yes
|
INIT="shorewall"
|
||||||
elif [ -d /cygdrive ]; then
|
ARCHLINUX=yes
|
||||||
DEST=
|
fi
|
||||||
INIT=
|
|
||||||
CYGWIN=yes
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -101,6 +101,10 @@ Other Changes in Shoreall 4.1.8.
|
|||||||
c) The arithmetic operators +-* and /.
|
c) The arithmetic operators +-* and /.
|
||||||
d) The word 'full'.
|
d) The word 'full'.
|
||||||
|
|
||||||
|
2) The installers (install.sh) now auto-detect a Cygwin environment
|
||||||
|
and install under the current user's ID if OWNER and GROUP are not
|
||||||
|
given.
|
||||||
|
|
||||||
New Features in Shorewall 4.1.
|
New Features in Shorewall 4.1.
|
||||||
|
|
||||||
1) Shorewall 4.1 contains support for multiple Internet providers
|
1) Shorewall 4.1 contains support for multiple Internet providers
|
||||||
@ -380,17 +384,23 @@ New Features in Shorewall 4.1.
|
|||||||
traffic by MARK value. Previously, Shorewall used the CLASSIFY
|
traffic by MARK value. Previously, Shorewall used the CLASSIFY
|
||||||
target in the POSTROUTING chain if it was available.
|
target in the POSTROUTING chain if it was available.
|
||||||
|
|
||||||
14) The Shorewall-common installer (install.sh) now works on Windows
|
14) The Shorewall installers (install.sh) now work on Windows
|
||||||
under Cygwin.
|
under Cygwin. By default, they install under the user id and group
|
||||||
|
of the person doing the install. This can be overridden by
|
||||||
|
specifying OWNER and GROUP explicitly.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
OWNER=foo GROUP=bar ./install.sh
|
||||||
|
|
||||||
To install Shorewall-perl under Cygwin:
|
To install Shorewall-perl under Cygwin:
|
||||||
|
|
||||||
$ tar -zxf shorewall-perl-4.x.y.tar.bz2
|
$ tar -zxf shorewall-perl-4.x.y.tar.bz2
|
||||||
$ tar -zxf shorewall-common-4.x.y.tar.bz2
|
$ tar -zxf shorewall-common-4.x.y.tar.bz2
|
||||||
$ cd shorewall-perl-4.x.y
|
$ cd shorewall-perl-4.x.y
|
||||||
$ USER=<your user id> GROUP=None ./install.sh
|
$ ./install.sh
|
||||||
$ cd ../shorewall-common-4.x.y
|
$ cd ../shorewall-common-4.x.y
|
||||||
$ USER=<your user id> GROUP=None ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
The 'shorewall' program is installed in /bin/ (a.k.a, /usr/bin/).
|
The 'shorewall' program is installed in /bin/ (a.k.a, /usr/bin/).
|
||||||
|
|
||||||
|
@ -102,13 +102,18 @@ if [ -z "$RUNLEVELS" ] ; then
|
|||||||
RUNLEVELS=""
|
RUNLEVELS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$OWNER" ] ; then
|
case $(uname) in
|
||||||
OWNER=root
|
CYGWIN*)
|
||||||
fi
|
DEST=
|
||||||
|
INIT=
|
||||||
if [ -z "$GROUP" ] ; then
|
OWNER=$(id -un)
|
||||||
GROUP=root
|
GROUP=$(id -gn)
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
[ -z "$OWNER" ] && OWNER=root
|
||||||
|
[ -z "$GROUP" ] && GROUP=root
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
NOBACKUP=
|
NOBACKUP=
|
||||||
|
|
||||||
|
@ -149,13 +149,18 @@ if [ -z "$RUNLEVELS" ] ; then
|
|||||||
RUNLEVELS=""
|
RUNLEVELS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$OWNER" ] ; then
|
case $(uname) in
|
||||||
OWNER=root
|
CYGWIN*)
|
||||||
fi
|
DEST=
|
||||||
|
INIT=
|
||||||
if [ -z "$GROUP" ] ; then
|
[ -z "$OWNER" ] && OWNER=$(id -un)
|
||||||
GROUP=root
|
[ -z "$GROUP" ] && GROUP=$(id -gn)
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
|
[ -z "$OWNER" ] && OWNER=root
|
||||||
|
[ -z "$GROUP" ] && GROUP=root
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
NOBACKUP=
|
NOBACKUP=
|
||||||
|
|
||||||
@ -184,7 +189,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
|||||||
#
|
#
|
||||||
# Determine where to install the firewall script
|
# Determine where to install the firewall script
|
||||||
#
|
#
|
||||||
DEBIAN=
|
|
||||||
|
|
||||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user