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
|
||||
|
||||
5) Allow installers to run under Cygwin without extra parameters.
|
||||
|
||||
Changes in 4.1.7
|
||||
|
||||
1) Fix port verification.
|
||||
|
@ -149,13 +149,24 @@ if [ -z "$RUNLEVELS" ] ; then
|
||||
RUNLEVELS=""
|
||||
fi
|
||||
|
||||
if [ -z "$OWNER" ] ; then
|
||||
OWNER=root
|
||||
fi
|
||||
DEBIAN=
|
||||
CYGWIN=
|
||||
|
||||
if [ -z "$GROUP" ] ; then
|
||||
GROUP=root
|
||||
fi
|
||||
case $(uname) in
|
||||
CYGWIN*)
|
||||
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=
|
||||
|
||||
@ -184,35 +195,29 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
|
||||
#
|
||||
# Determine where to install the firewall script
|
||||
#
|
||||
DEBIAN=
|
||||
CYGWIN=
|
||||
|
||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||
|
||||
if [ -n "$PREFIX" ]; then
|
||||
if [ `id -u` != 0 ] ; then
|
||||
echo "Not setting file owner/group permissions, not running as root."
|
||||
OWNERSHIP=""
|
||||
fi
|
||||
if [ -z "$CYGWIN" -a `id -u` != 0 ] ; then
|
||||
echo "Not setting file owner/group permissions, not running as root."
|
||||
OWNERSHIP=""
|
||||
|
||||
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
|
||||
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
|
||||
fi
|
||||
else
|
||||
[ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
|
||||
{ echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
|
||||
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
|
||||
DEBIAN=yes
|
||||
elif [ -f /etc/slackware-version ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
INIT="rc.firewall"
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
INIT="shorewall"
|
||||
ARCHLINUX=yes
|
||||
elif [ -d /cygdrive ]; then
|
||||
DEST=
|
||||
INIT=
|
||||
CYGWIN=yes
|
||||
if [ -z "$CYGWIN" ]; then
|
||||
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
|
||||
DEBIAN=yes
|
||||
elif [ -f /etc/slackware-version ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
INIT="rc.firewall"
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
INIT="shorewall"
|
||||
ARCHLINUX=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -101,6 +101,10 @@ Other Changes in Shoreall 4.1.8.
|
||||
c) The arithmetic operators +-* and /.
|
||||
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.
|
||||
|
||||
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
|
||||
target in the POSTROUTING chain if it was available.
|
||||
|
||||
14) The Shorewall-common installer (install.sh) now works on Windows
|
||||
under Cygwin.
|
||||
14) The Shorewall installers (install.sh) now work on Windows
|
||||
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:
|
||||
|
||||
$ tar -zxf shorewall-perl-4.x.y.tar.bz2
|
||||
$ tar -zxf shorewall-common-4.x.y.tar.bz2
|
||||
$ cd shorewall-perl-4.x.y
|
||||
$ USER=<your user id> GROUP=None ./install.sh
|
||||
$ ./install.sh
|
||||
$ 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/).
|
||||
|
||||
|
@ -102,13 +102,18 @@ if [ -z "$RUNLEVELS" ] ; then
|
||||
RUNLEVELS=""
|
||||
fi
|
||||
|
||||
if [ -z "$OWNER" ] ; then
|
||||
OWNER=root
|
||||
fi
|
||||
|
||||
if [ -z "$GROUP" ] ; then
|
||||
GROUP=root
|
||||
fi
|
||||
case $(uname) in
|
||||
CYGWIN*)
|
||||
DEST=
|
||||
INIT=
|
||||
OWNER=$(id -un)
|
||||
GROUP=$(id -gn)
|
||||
;;
|
||||
*)
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
;;
|
||||
esac
|
||||
|
||||
NOBACKUP=
|
||||
|
||||
|
@ -149,13 +149,18 @@ if [ -z "$RUNLEVELS" ] ; then
|
||||
RUNLEVELS=""
|
||||
fi
|
||||
|
||||
if [ -z "$OWNER" ] ; then
|
||||
OWNER=root
|
||||
fi
|
||||
|
||||
if [ -z "$GROUP" ] ; then
|
||||
GROUP=root
|
||||
fi
|
||||
case $(uname) in
|
||||
CYGWIN*)
|
||||
DEST=
|
||||
INIT=
|
||||
[ -z "$OWNER" ] && OWNER=$(id -un)
|
||||
[ -z "$GROUP" ] && GROUP=$(id -gn)
|
||||
;;
|
||||
*)
|
||||
[ -z "$OWNER" ] && OWNER=root
|
||||
[ -z "$GROUP" ] && GROUP=root
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
#
|
||||
DEBIAN=
|
||||
|
||||
OWNERSHIP="-o $OWNER -g $GROUP"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user