diff options
author | Antonio Hernández Blas <hba.nihilismus@gmail.com> | 2011-05-31 23:01:19 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-06-13 01:33:39 -0400 |
commit | c5137b75f202ae38907001d5e98f1a4d0b13d3c6 (patch) | |
tree | 5462d90e6aea665b64b781ae247068a5934fec24 /network/hiawatha/doinst.sh | |
parent | 8ded3a301541221fc4249cb4ebfb19b80c590fd4 (diff) |
network/hiawatha: Updated for version 7.4.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/hiawatha/doinst.sh')
-rw-r--r-- | network/hiawatha/doinst.sh | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/network/hiawatha/doinst.sh b/network/hiawatha/doinst.sh index 2242b31cb1610..21e47e39984de 100644 --- a/network/hiawatha/doinst.sh +++ b/network/hiawatha/doinst.sh @@ -11,17 +11,14 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -# Keep same perms on rc.hiawatha.new: -if [ -e etc/rc.d/rc.hiawatha ]; then - cp -a etc/rc.d/rc.hiawatha etc/rc.d/rc.hiawatha.new.incoming - cat etc/rc.d/rc.hiawatha.new > etc/rc.d/rc.hiawatha.new.incoming - mv etc/rc.d/rc.hiawatha.new.incoming etc/rc.d/rc.hiawatha.new -fi - -# Keep same perms on rc.php-fcgi.new: -if [ -e etc/rc.d/rc.php-fcgi ]; then - cp -a etc/rc.d/rc.php-fcgi etc/rc.d/rc.php-fcgi.new.incoming - cat etc/rc.d/rc.php-fcgi.new > etc/rc.d/rc.php-fcgi.new.incoming - mv etc/rc.d/rc.php-fcgi.new.incoming etc/rc.d/rc.php-fcgi.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 +} |