diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-02-14 18:43:28 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-02-16 01:33:35 +0700 |
commit | 24500f52969a61a7787557618025e1da632e77b9 (patch) | |
tree | 29448146e7f40da48ca785fc5626177544bcd5da /multimedia/mythtv/doinst.sh | |
parent | 9a97e05d11b5762ba3606dc9f4f1603ea198cc10 (diff) | |
download | slackbuilds-24500f52969a61a7787557618025e1da632e77b9.tar.gz |
multimedia/mythtv: Updated for version 0.27.6.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/mythtv/doinst.sh')
-rw-r--r-- | multimedia/mythtv/doinst.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/multimedia/mythtv/doinst.sh b/multimedia/mythtv/doinst.sh index 4034523b95..99ebfdadb8 100644 --- a/multimedia/mythtv/doinst.sh +++ b/multimedia/mythtv/doinst.sh @@ -11,13 +11,18 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.mythbackend.new: -if [ -e etc/rc.d/rc.mythbackend ]; then - cp -a etc/rc.d/rc.mythbackend etc/rc.d/rc.mythbackend.new.incoming - cat etc/rc.d/rc.mythbackend.new > etc/rc.d/rc.mythbackend.new.incoming - mv etc/rc.d/rc.mythbackend.new.incoming etc/rc.d/rc.mythbackend.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 +} +preserve_perms etc/rc.d/rc.mythbackend.new config etc/rc.d/rc.mythbackend.new config etc/logrotate.d/mythbackend.new config etc/mythtv/config.xml.new |