aboutsummaryrefslogtreecommitdiff
path: root/system/webmin/doinst.sh
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-04-08 20:47:37 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-04-11 00:10:56 -0500
commitd197798f653f3eef337e6e46a34d91b1f205564c (patch)
treea5a4522ad4c9197513a9e6025b0c236f2539394d /system/webmin/doinst.sh
parentc9c7692638f920da77321df9a54b644909001299 (diff)
system/webmin: Updated for version 1.540.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/webmin/doinst.sh')
-rw-r--r--system/webmin/doinst.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/system/webmin/doinst.sh b/system/webmin/doinst.sh
index 64789063c8159..74d778aaebeaf 100644
--- a/system/webmin/doinst.sh
+++ b/system/webmin/doinst.sh
@@ -11,12 +11,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.webmin.new:
-if [ -e etc/rc.d/rc.webmin ]; then
- cp -a etc/rc.d/rc.webmin etc/rc.d/rc.webmin.new.incoming
- cat etc/rc.d/rc.webmin.new > etc/rc.d/rc.webmin.new.incoming
- mv etc/rc.d/rc.webmin.new.incoming etc/rc.d/rc.webmin.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
+}
# Signal the startup script to do some post install configuration
touch etc/webmin/FIRSTRUN