summaryrefslogtreecommitdiffstats
path: root/system/webmin/doinst.sh
diff options
context:
space:
mode:
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 64789063c8..74d778aaeb 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