summaryrefslogtreecommitdiff
path: root/network/vnstat/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'network/vnstat/doinst.sh')
-rw-r--r--network/vnstat/doinst.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/network/vnstat/doinst.sh b/network/vnstat/doinst.sh
index 206b717881..052e2f8929 100644
--- a/network/vnstat/doinst.sh
+++ b/network/vnstat/doinst.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -13,5 +11,12 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/vnstat.conf.new
+# Keep same perms on rc.vnstat.new:
+if [ -e etc/rc.d/rc.vnstat ]; then
+ cp -a etc/rc.d/rc.vnstat etc/rc.d/rc.vnstat.new.incoming
+ cat etc/rc.d/rc.vnstat.new > etc/rc.d/rc.vnstat.new.incoming
+ mv etc/rc.d/rc.vnstat.new.incoming etc/rc.d/rc.vnstat.new
+fi
+config etc/rc.d/rc.vnstat.new
+config etc/vnstat.conf.new