diff options
author | Adis Nezirovic <adis_at_linux.org.ba> | 2011-10-08 09:45:11 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-10-11 21:20:15 -0500 |
commit | f7624e6796d0d4f6adb58b7dee1597376a6431b9 (patch) | |
tree | ab30fcc9111d4976d030ac38a26375f478b38215 /system/postgresql/doinst.sh | |
parent | ba21b2a8745f81ee63b6fb86354e663ed7e80bbd (diff) | |
download | slackbuilds-f7624e6796d0d4f6adb58b7dee1597376a6431b9.tar.gz |
system/postgresql: Updated for version 9.1.1.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'system/postgresql/doinst.sh')
-rw-r--r-- | system/postgresql/doinst.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/system/postgresql/doinst.sh b/system/postgresql/doinst.sh index 203ba5aa89..d9f098a6ff 100644 --- a/system/postgresql/doinst.sh +++ b/system/postgresql/doinst.sh @@ -10,13 +10,17 @@ config() { # 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 +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.postgresql.new +preserve_perms etc/rc.d/rc.postgresql.new config etc/logrotate.d/postgresql.new |