summaryrefslogtreecommitdiff
path: root/network/vnstat/doinst.sh
diff options
context:
space:
mode:
authorMichiel van Wessem <michiel@slackbuilds.org>2010-05-12 17:44:25 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 17:44:25 +0200
commitb83a67ebf626bbe4bf6f9558db2ce44881e340ce (patch)
tree7a9ab36100191f022d815ba75cc7975714f7c954 /network/vnstat/doinst.sh
parent1ecd34752cc70faa167f0b40483b709765425656 (diff)
downloadslackbuilds-b83a67ebf626bbe4bf6f9558db2ce44881e340ce.tar.gz
network/vnstat: Updated for version 1.7
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