aboutsummaryrefslogtreecommitdiff
path: root/system/postgresql/doinst.sh
diff options
context:
space:
mode:
authorAdis Nezirovic <adis_at_linux.org.ba>2010-05-11 22:27:00 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:27:00 +0200
commit99e62536447ecb3c2c89631437848c42ec0f5b93 (patch)
treee9ba6886a68a04db0f68621ea6f0735a36794bf0 /system/postgresql/doinst.sh
parent65739ea69c3643507c111655bce1ce3f98dc0f45 (diff)
system/postgresql: Updated for version 8.3.5
Diffstat (limited to 'system/postgresql/doinst.sh')
-rw-r--r--system/postgresql/doinst.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/system/postgresql/doinst.sh b/system/postgresql/doinst.sh
index 4eed17e907f29..5a067b8cf5d20 100644
--- a/system/postgresql/doinst.sh
+++ b/system/postgresql/doinst.sh
@@ -2,15 +2,23 @@
config() {
NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
+ 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
+ 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.postgresql.new:
+if [ -e etc/rc.d/rc.postgresql ]; then
+ cp -a etc/rc.d/rc.postgresql etc/rc.d/rc.postgresql.new.incoming
+ cat etc/rc.d/rc.postgresql.new > etc/rc.d/rc.postgresql.new.incoming
+ mv etc/rc.d/rc.postgresql.new.incoming etc/rc.d/rc.postgresql.new
+fi
+
config etc/rc.d/rc.postgresql.new
config etc/logrotate.d/postgresql.new
+