Unify the installers

- Clean up code

Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Matt Darfeuille 2017-02-20 18:51:59 +01:00 committed by Tom Eastep
parent f6f7e691d0
commit f48b2e715f
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
4 changed files with 31 additions and 28 deletions

View File

@ -22,17 +22,17 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>. # along with this program; if not, see <http://www.gnu.org/licenses/>.
# #
VERSION=xxx #The Build script inserts the actual version VERSION=xxx # The Build script inserts the actual version
PRODUCT=shorewall-core PRODUCT=shorewall-core
Product="Shorewall Core" Product="Shorewall Core"
usage() # $1 = exit status usage() # $1 = exit status
{ {
ME=$(basename $0) ME=$(basename $0)
echo "usage: $ME [ <configuration-file> ] " echo "usage: $ME [ <option> ] [ <shorewallrc file> ]"
echo " $ME -v" echo "where <option> is one of"
echo " $ME -h" echo " -h"
echo " -v"
exit $1 exit $1
} }
@ -406,6 +406,6 @@ if [ ${SHAREDIR} != /usr/share ]; then
done done
fi fi
# #
# Report Success # Report Success
# #
echo "$Product Version $VERSION Installed" echo "$Product Version $VERSION Installed"

View File

@ -27,17 +27,18 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# #
VERSION=xxx #The Build script inserts the actual version. VERSION=xxx # The Build script inserts the actual version
PRODUCT=shorewall-init PRODUCT=shorewall-init
Product="Shorewall Init" Product="Shorewall Init"
usage() # $1 = exit status usage() # $1 = exit status
{ {
ME=$(basename $0) ME=$(basename $0)
echo "usage: $ME [ <configuration-file> ]" echo "usage: $ME [ <option> ] [ <shorewallrc file> ]"
echo " $ME -v" echo "where <option> is one of"
echo " $ME -h" echo " -h"
echo " $ME -n" echo " -v"
echo " -n"
exit $1 exit $1
} }
@ -379,7 +380,7 @@ else
# Gentoo does not support if-{up,down}.d # Gentoo does not support if-{up,down}.d
/bin/true /bin/true
elif [ $HOST = openwrt ]; then elif [ $HOST = openwrt ]; then
# Not implemented on openwrt # Not implemented on OpenWRT
/bin/true /bin/true
else else
make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755 make_parent_directory ${DESTDIR}/${ETC}/NetworkManager/dispatcher.d 0755
@ -573,6 +574,6 @@ if [ -d ${DESTDIR}/etc/ppp ]; then
esac esac
fi fi
# #
# Report Success # Report Success
# #
echo "shorewall Init Version $VERSION Installed" echo "shorewall Init Version $VERSION Installed"

View File

@ -22,15 +22,16 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>. # along with this program; if not, see <http://www.gnu.org/licenses/>.
# #
VERSION=xxx #The Build script inserts the actual version VERSION=xxx # The Build script inserts the actual version
usage() # $1 = exit status usage() # $1 = exit status
{ {
ME=$(basename $0) ME=$(basename $0)
echo "usage: $ME [ <configuration-file> ]" echo "usage: $ME [ <option> ] [ <shorewallrc file> ]"
echo " $ME -v" echo "where <option> is one of"
echo " $ME -h" echo " -h"
echo " $ME -n" echo " -v"
echo " -n"
exit $1 exit $1
} }
@ -558,6 +559,6 @@ if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${
fi fi
# #
# Report Success # Report Success
# #
echo "$Product Version $VERSION Installed" echo "$Product Version $VERSION Installed"

View File

@ -22,17 +22,18 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>. # along with this program; if not, see <http://www.gnu.org/licenses/>.
# #
VERSION=4.5.5 #The Build script inserts the actual version VERSION=xxx # The Build script inserts the actual version
usage() # $1 = exit status usage() # $1 = exit status
{ {
ME=$(basename $0) ME=$(basename $0)
echo "usage: $ME [ <configuration-file> ]" echo "usage: $ME [ <option> ] [ <shorewallrc file> ]"
echo " $ME -v" echo "where <option> is one of"
echo " $ME -h" echo " -h"
echo " $ME -s" echo " -v"
echo " $ME -a" echo " -s"
echo " $ME -n" echo " -a"
echo " -n"
exit $1 exit $1
} }
@ -1230,6 +1231,6 @@ if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${
fi fi
# #
# Report Success # Report Success
# #
echo "$Product Version $VERSION Installed" echo "$Product Version $VERSION Installed"