diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-15 17:48:01 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-15 18:12:34 +0200 |
commit | b583bcceafca79047bb5636026fd75aa54fca679 (patch) | |
tree | cc897399216d99b0285625b6b59ecf4e45e5801b /testing/keepalived | |
parent | 611311720446c33e88d84a998e0b404cdbc2b679 (diff) | |
download | aports-b583bcceafca79047bb5636026fd75aa54fca679.tar.bz2 aports-b583bcceafca79047bb5636026fd75aa54fca679.tar.xz |
testing/keepalived: improve runscript, remove misleading checkconfig
checkconfig should check a config file for syntax and maybe semantic
errors, not just that the file exists. This is useless and misleading.
Also keepalived does NOT provide a functionality for checking config
file for errors like nginx (its check command is for something else).
Diffstat (limited to 'testing/keepalived')
-rw-r--r-- | testing/keepalived/APKBUILD | 12 | ||||
-rw-r--r-- | testing/keepalived/keepalived.confd | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | testing/keepalived/keepalived.initd | 26 |
3 files changed, 15 insertions, 29 deletions
diff --git a/testing/keepalived/APKBUILD b/testing/keepalived/APKBUILD index 75b6464545..937ef7f3b3 100644 --- a/testing/keepalived/APKBUILD +++ b/testing/keepalived/APKBUILD @@ -60,11 +60,11 @@ samples() { } md5sums="451919d34d0af969a2c574529dca96e9 keepalived-1.2.23.tar.gz -965cb4d5deca2d00112cb82ed798edb9 keepalived.initd -a714b2a54e4f9bfea41f1476d36c22eb keepalived.confd" +ad67cf11d9fc60f55eff562728a16863 keepalived.initd +252a289af5b7c7ec6f0cb3fe48f57486 keepalived.confd" sha256sums="19e432bcf10ff3e801aa87acf84113a0b57d31524c3ca8866f13ffeb0475d910 keepalived-1.2.23.tar.gz -0567d2b8cfeb78951e6c9e9d8ae5ed018e9eb116dd9d3d92779cfb823700c9b9 keepalived.initd -dcc2d9b209a9836d861612547537df8f06bb08153482920dd4b927730ba6ae8d keepalived.confd" +535bcfe41410a86e6640bf8c8c8ddb31546ba83476fceef8e0799121737ee5c2 keepalived.initd +4e655777aa3d6afa6cd746e84aa87fbb356c6d4cac9846c3a2f8805d65763497 keepalived.confd" sha512sums="5879965990f5ad54493d2aa85fbd11ad486d76fe00848c63d293240d7d19ced81ff4f1e4a51cea5b85632b74e800eadd1cf4b2a8fa106abec896a1739f68336a keepalived-1.2.23.tar.gz -240201b81bcca7b213bd3ec45fc286f0305d72a6952a3baf485d717df413df3a2da0f4b018eaa050b0b12cda78767f5c4ae60ec75e5802cfe57cb29951e86ba0 keepalived.initd -468d176d22f1ce308871829f24624b33e6ba3b234a413395599a67a865f3cf815cc24a10c244dffd1421a0acf5352fe51027a2d3b282cd3822dfeadc8a1d4df0 keepalived.confd" +12361313dd044269150c9ea1a4ffc6987075b0106dfdd4b3804b1852d2a47f608d954ab473419474747b475c98fade3779800be8147134969016817cfa050ee4 keepalived.initd +413cb05aa2d1d8c0f552398bb5d511ee022b4d07f5b18217350c1159d013f2d26d87ae63d2977329ec78d7416760e84c4048a5ad20a1f63ef2bc3a1a84c3a41a keepalived.confd" diff --git a/testing/keepalived/keepalived.confd b/testing/keepalived/keepalived.confd index 5f56cb23b0..7979109c0f 100644 --- a/testing/keepalived/keepalived.confd +++ b/testing/keepalived/keepalived.confd @@ -1,6 +1,2 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# Keepalived options -# Increase logging: +# Keepalived options, see keepalived(8) man page. #KEEPALIVED_OPTS="-D" diff --git a/testing/keepalived/keepalived.initd b/testing/keepalived/keepalived.initd index c290c9dbc5..760c360c89 100755..100644 --- a/testing/keepalived/keepalived.initd +++ b/testing/keepalived/keepalived.initd @@ -2,28 +2,18 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -depend() { - use logger - # The interfaces do not actually need to exist to start, it handles them gracefully. - use net -} +extra_commands="reload" command="/usr/sbin/keepalived" command_args="${KEEPALIVED_OPTS}" -pidfile="/var/run/keepalived.pid" - -extra_commands="checkconfig reload" +pidfile="/run/keepalived.pid" +required_files="/etc/keepalived/keepalived.conf" -checkconfig() { - # keepalived has a config check command, but it does not work while the daemon is running! - if [ ! -e /etc/keepalived/keepalived.conf ] ; then - eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived" - return 1 - fi -} - -start_pre() { - checkconfig || return 1 +depend() { + use logger + # The interfaces do not actually need to exist to start, + # it handles them gracefully. + use net } reload() { |