mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
0782d45ca0
- update to newest version - disabled nftables support as it doesn't compile on 14.2 - removed dependency of optional sysvinit-functions and simplified rc.keepalived - moved daemon configuration to /etc/default Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
23 lines
708 B
Bash
23 lines
708 B
Bash
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...
|
|
}
|
|
|
|
if [ -e etc/rc.d/rc.keepalived ]; then
|
|
cp -a etc/rc.d/rc.keepalived etc/rc.d/rc.keepalived.new.incoming
|
|
cat etc/rc.d/rc.keepalived.new > etc/rc.d/rc.keepalived.new.incoming
|
|
mv etc/rc.d/rc.keepalived.new.incoming etc/rc.d/rc.keepalived.new
|
|
fi
|
|
|
|
config etc/default/keepalived.new
|
|
config etc/keepalived/keepalived.conf.new
|
|
config etc/rc.d/rc.keepalived.new
|
|
|