summaryrefslogtreecommitdiffstats
path: root/system/xrdp/doinst.sh
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo2017-11-10 15:17:10 +0100
committer Willy Sudiarto Raharjo2017-11-11 01:07:31 +0100
commitd4976749397fedb9a5e30b80e74b994865415622 (patch)
treea66b3f987763171e7d9538a3e0b6a250c78e8574 /system/xrdp/doinst.sh
parent3c4b17c7e851a3f828a6ee964e6b960a23d5ed83 (diff)
downloadslackbuilds-d4976749397fedb9a5e30b80e74b994865415622.tar.gz
system/xrdp: Updated for version 0.9.4.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/xrdp/doinst.sh')
-rw-r--r--system/xrdp/doinst.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/system/xrdp/doinst.sh b/system/xrdp/doinst.sh
index fc2aca6ccd..68884e8cc8 100644
--- a/system/xrdp/doinst.sh
+++ b/system/xrdp/doinst.sh
@@ -11,21 +11,20 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.xrdp.new:
-if [ -e etc/rc.d/rc.xrdp ]; then
- cp -a etc/rc.d/rc.xrdp etc/rc.d/rc.xrdp.new.incoming
- cat etc/rc.d/rc.xrdp.new > etc/rc.d/rc.xrdp.new.incoming
- mv etc/rc.d/rc.xrdp.new.incoming etc/rc.d/rc.xrdp.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.xrdp.new
config etc/xrdp/xrdp-xinitrc.new
config etc/xrdp/rsakeys.ini.new
config etc/xrdp/sesman.ini.new
config etc/xrdp/xrdp.ini.new
-config etc/xrdp/km-0407.ini.new
-config etc/xrdp/km-0409.ini.new
-config etc/xrdp/km-040c.ini.new
-config etc/xrdp/km-0410.ini.new
-config etc/xrdp/km-0419.ini.new
-config etc/xrdp/km-041d.ini.new
+preserve_perms etc/rc.d/rc.xrdp.new