summaryrefslogtreecommitdiff
path: root/system/openct/doinst.sh
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2013-02-10 10:26:11 -0500
committerdsomero <xgizzmo@slackbuilds.org>2013-02-13 19:33:40 -0500
commitca641aeab8dcba4808ad91a9f29292d08feb522b (patch)
treea27e5761749c74b1d67a1f41d6b27699dbf4be53 /system/openct/doinst.sh
parent97ff31a337e4f6986014c0c368d4a7518beb109b (diff)
downloadslackbuilds-ca641aeab8dcba4808ad91a9f29292d08feb522b.tar.gz
system/openct: Minor fixes and updated download link.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/openct/doinst.sh')
-rw-r--r--system/openct/doinst.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/system/openct/doinst.sh b/system/openct/doinst.sh
index bb02ff148c..76c6b78a52 100644
--- a/system/openct/doinst.sh
+++ b/system/openct/doinst.sh
@@ -11,14 +11,19 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.openctd.new:
-if [ -e etc/rc.d/rc.openctd ]; then
- cp -a etc/rc.d/rc.openctd etc/rc.d/rc.openctd.new.incoming
- cat etc/rc.d/rc.openctd.new > etc/rc.d/rc.openctd.new.incoming
- mv etc/rc.d/rc.openctd.new.incoming etc/rc.d/rc.openctd.new
-fi
+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
+}
+
-config etc/rc.d/rc.openctd.new
+preserve_perms etc/rc.d/rc.openctd.new
config etc/openct.conf.new
config etc/reader.conf.d/reader-openct.conf.new