aboutsummaryrefslogtreecommitdiff
path: root/network/wicd/doinst.sh
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 20:01:46 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 20:01:46 +0200
commit0f4d19b856480f56bfebc83cb94571c8e2992ec0 (patch)
tree8d0567852240ab245b68ec2559094a7c018eff04 /network/wicd/doinst.sh
parent887eff71d9175eb84051d76e941c94c4eb6b73ff (diff)
network/wicd: Added to 12.0 repository
Diffstat (limited to 'network/wicd/doinst.sh')
-rw-r--r--network/wicd/doinst.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/network/wicd/doinst.sh b/network/wicd/doinst.sh
new file mode 100644
index 0000000000000..a818fc605d446
--- /dev/null
+++ b/network/wicd/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.wicd.new:
+if [ -e etc/rc.d/rc.wicd ]; then
+ cp -a etc/rc.d/rc.wicd etc/rc.d/rc.wicd.new.incoming
+ cat etc/rc.d/rc.wicd.new > etc/rc.d/rc.wicd.new.incoming
+ mv etc/rc.d/rc.wicd.new.incoming etc/rc.d/rc.wicd.new
+fi
+
+if [ -x usr/bin/update-desktop-database ]; then
+ usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
+fi
+
+config etc/rc.d/rc.wicd.new
+config etc/dbus-1/system.d/wicd.conf.new
+