diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 91d95a499..46c6eee7e 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -43,6 +43,8 @@ Changes in Shorewall 4.4.9 20) In the routestopped file, assume 'routeback' if the interface has 'routeback'. +21) Make Shorewall and Shorewall6 installable on OS X. + Changes in Shorewall 4.4.8 1) Correct handling of RATE LIMIT on NAT rules. diff --git a/Shorewall/install.sh b/Shorewall/install.sh index c354f1412..d29c74c02 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -109,6 +109,7 @@ fi DEBIAN= CYGWIN= +MAC= SPARSE= MANDIR=${MANDIR:-"/usr/share/man"} @@ -124,6 +125,17 @@ case $(uname) in CYGWIN=Yes SPARSE=Yes ;; + Darwin) + if [ -z "$PREFIX" ]; then + DEST= + INIT= + fi + + [ -z "$OWNER" ] && OWNER=root + [ -z "$GROUP" ] && GROUP=wheel + MAC=Yes + SPARSE=Yes + ;; *) [ -z "$OWNER" ] && OWNER=root [ -z "$GROUP" ] && GROUP=root @@ -170,6 +182,7 @@ if [ -n "$PREFIX" ]; then install -d $OWNERSHIP -m 755 ${PREFIX}${DEST} CYGWIN= + MAC= else # # Verify that Perl is installed @@ -182,6 +195,8 @@ else if [ -n "$CYGWIN" ]; then echo "Installing Cygwin-specific configuration..." + elif [ -n "$MAC" ]; then + echo "Installing Mac-specific configuration..." else if [ -f /etc/debian_version ]; then echo "Installing Debian-specific configuration..." @@ -239,7 +254,7 @@ elif [ -n "$INIT" ]; then install_file init.sh ${PREFIX}${DEST}/$INIT 0544 fi -[ -n "$CYGWIN" ] || echo "Shorewall script installed in ${PREFIX}${DEST}/$INIT" +[ -n "$INIT" ] && echo "Shorewall script installed in ${PREFIX}${DEST}/$INIT" # # Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed @@ -845,7 +860,7 @@ if [ -z "$PREFIX" ]; then rm -rf /usr/share/shorewall-shell fi -if [ -z "$PREFIX" -a -n "$first_install" -a -z "$CYGWIN" ]; then +if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then if [ -n "$DEBIAN" ]; then run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 0a0e50db3..40231a08c 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -397,6 +397,9 @@ None. if the interface has 'routeback' specified (either explicitly or detected). +9) Apple Macs running OS X may now be used as a Shorewall + administrative system. Simply install using the tarball installer. + ---------------------------------------------------------------------------- V I. P R O B L E M S C O R R E C T E D A N D N E W F E A T U R E S I N P R I O R R E L E A S E S diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index 25f338eb9..004d44e8a 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -109,6 +109,7 @@ fi DEBIAN= CYGWIN= +MAC= MANDIR=${MANDIR:-"/usr/share/man"} SPARSE= @@ -124,6 +125,17 @@ case $(uname) in CYGWIN=Yes SPARSE=Yes ;; + Darwin) + if [ -z "$PREFIX" ]; then + DEST= + INIT= + fi + + [ -z "$OWNER" ] && OWNER=root + [ -z "$GROUP" ] && GROUP=wheel + MAC=Yes + SPARSE=Yes + ;; *) [ -z "$OWNER" ] && OWNER=root [ -z "$GROUP" ] && GROUP=root @@ -170,11 +182,14 @@ if [ -n "$PREFIX" ]; then install -d $OWNERSHIP -m 755 ${PREFIX}${DEST} CYGWIN= + MAC= else [ -x /usr/share/shorewall/compiler.pl ] || \ { echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; } if [ -n "$CYGWIN" ]; then echo "Installing Cygwin-specific configuration..." + elif [ -n "$MAC" ]; then + echo "Installing Mac-specific configuration..." else if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then echo "Installing Debian-specific configuration..." @@ -232,7 +247,7 @@ elif [ -n "$INIT" ]; then install_file init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout fi -[ -n "$CYGWIN" ] || echo "Shorewall6 script installed in ${PREFIX}${DEST}/$INIT" +[ -n "$INIT" ] && echo "Shorewall6 script installed in ${PREFIX}${DEST}/$INIT" # # Create /etc/shorewall, /usr/share/shorewall and /var/shorewall if needed @@ -699,7 +714,7 @@ if [ -d ${PREFIX}/etc/logrotate.d ]; then echo "Logrotate file installed as ${PREFIX}/etc/logrotate.d/shorewall6" fi -if [ -z "$PREFIX" -a -n "$first_install" -a -z "$CYGWIN" ]; then +if [ -z "$PREFIX" -a -n "$first_install" -a -z "${CYGWIN}${MAC}" ]; then if [ -n "$DEBIAN" ]; then run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6 ln -s ../init.d/shorewall6 /etc/rcS.d/S40shorewall6