mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
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).
This commit is contained in:
parent
6113117204
commit
b583bcceaf
@ -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"
|
||||
|
||||
@ -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"
|
||||
|
||||
26
testing/keepalived/keepalived.initd
Executable file → Normal file
26
testing/keepalived/keepalived.initd
Executable file → Normal file
@ -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"
|
||||
pidfile="/run/keepalived.pid"
|
||||
required_files="/etc/keepalived/keepalived.conf"
|
||||
|
||||
extra_commands="checkconfig reload"
|
||||
|
||||
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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user