summaryrefslogtreecommitdiff
path: root/network/shorewall6/doinst.sh
diff options
context:
space:
mode:
authorArTourter <artourter@gmail.com>2010-05-13 00:38:13 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:38:13 +0200
commitd3ba2890319099f07c2b631bafd4d9ff4b51b25f (patch)
tree4d22cff43383b48229b62e2861494b467e5bbccc /network/shorewall6/doinst.sh
parent970351448ca62423727332cea6cec4fdc3045740 (diff)
downloadslackbuilds-d3ba2890319099f07c2b631bafd4d9ff4b51b25f.tar.gz
network/shorewall6: Updated for version 4.4.7
Diffstat (limited to 'network/shorewall6/doinst.sh')
-rw-r--r--network/shorewall6/doinst.sh42
1 files changed, 14 insertions, 28 deletions
diff --git a/network/shorewall6/doinst.sh b/network/shorewall6/doinst.sh
index 5beaa1d282..48bfcdf984 100644
--- a/network/shorewall6/doinst.sh
+++ b/network/shorewall6/doinst.sh
@@ -1,3 +1,6 @@
+#!/bin/sh
+# vim: et ts=2 sw=2
+
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -11,32 +14,15 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/rc.d/rc.shorewall6.new
-
-config etc/shorewall6/accounting.new
-config etc/shorewall6/actions.new
-config etc/shorewall6/blacklist.new
-config etc/shorewall6/hosts.new
-config etc/shorewall6/init.new
-config etc/shorewall6/interfaces.new
-config etc/shorewall6/maclist.new
-config etc/shorewall6/notrack.new
-config etc/shorewall6/params.new
-config etc/shorewall6/policy.new
-config etc/shorewall6/providers.new
-config etc/shorewall6/restored.new
-config etc/shorewall6/route_rules.new
-config etc/shorewall6/routestopped.new
-config etc/shorewall6/rules.new
-config etc/shorewall6/shorewall6.conf.new
-config etc/shorewall6/start.new
-config etc/shorewall6/started.new
-config etc/shorewall6/stop.new
-config etc/shorewall6/stopped.new
-config etc/shorewall6/tcclasses.new
-config etc/shorewall6/tcdevices.new
-config etc/shorewall6/tcrules.new
-config etc/shorewall6/tos.new
-config etc/shorewall6/tunnels.new
-config etc/shorewall6/zones.new
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+preserve_perms etc/rc.d/rc.shorewall6.new