summaryrefslogtreecommitdiff
path: root/network/avahi/doinst.sh
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-04-08 17:54:59 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-04-11 00:10:56 -0500
commit56d5e2206f961773fface7b49c73896ab892f084 (patch)
tree7bc49edb8f7b0d28559ca62b8a657983c1758d7b /network/avahi/doinst.sh
parentb713c54e667a51b47579135fb50f3ed4ad9303c7 (diff)
downloadslackbuilds-56d5e2206f961773fface7b49c73896ab892f084.tar.gz
network/avahi: Updated for version 0.6.30.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/avahi/doinst.sh')
-rw-r--r--network/avahi/doinst.sh30
1 files changed, 14 insertions, 16 deletions
diff --git a/network/avahi/doinst.sh b/network/avahi/doinst.sh
index a6a2efd52c..d22f3fa394 100644
--- a/network/avahi/doinst.sh
+++ b/network/avahi/doinst.sh
@@ -11,24 +11,22 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.avahidaemon.new:
-if [ -e etc/rc.d/rc.avahidaemon ]; then
- cp -a etc/rc.d/rc.avahidaemon etc/rc.d/rc.avahidaemon.new.incoming
- cat etc/rc.d/rc.avahidaemon.new > etc/rc.d/rc.avahidaemon.new.incoming
- mv etc/rc.d/rc.avahidaemon.new.incoming etc/rc.d/rc.avahidaemon.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
+}
-# Keep same perms on rc.avahidnsconfd.new:
-if [ -e etc/rc.d/rc.avahidnsconfd ]; then
- cp -a etc/rc.d/rc.avahidnsconfd etc/rc.d/rc.avahidnsconfd.new.incoming
- cat etc/rc.d/rc.avahidnsconfd.new > etc/rc.d/rc.avahidnsconfd.new.incoming
- mv etc/rc.d/rc.avahidnsconfd.new.incoming etc/rc.d/rc.avahidnsconfd.new
-fi
-config etc/rc.d/rc.avahidaemon.new
-config etc/rc.d/rc.avahidnsconfd.new
-config etc/avahi/avahi-daemon.conf.new
-config etc/dbus-1/system.d/avahi-dbus.conf.new
+preserve_perms etc/rc.d/rc.avahidaemon.new
+preserve_perms etc/rc.d/rc.avahidnsconfd.new
+preserve_perms etc/avahi/avahi-daemon.conf.new
+preserve_perms etc/dbus-1/system.d/avahi-dbus.conf.new
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1