CLEANUP: extract quiet_check() to avoid duplication
Signed-off-by: Adam Spiers <aspiers@suse.com>
This commit is contained in:
parent
c5123f3982
commit
ecb74a3d86
|
@ -43,7 +43,7 @@ LOCKFILE=/var/lock/subsys/$BASENAME
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
$BIN -c -q -f $CFG
|
quiet_check
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
||||||
return 1
|
return 1
|
||||||
|
@ -68,7 +68,7 @@ stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
$BIN -c -q -f $CFG
|
quiet_check
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
||||||
return 1
|
return 1
|
||||||
|
@ -78,7 +78,7 @@ restart() {
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
$BIN -c -q -f $CFG
|
quiet_check
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
echo "Errors found in configuration file, check it with '$BASENAME check'."
|
||||||
return 1
|
return 1
|
||||||
|
@ -90,6 +90,10 @@ check() {
|
||||||
$BIN -c -q -V -f $CFG
|
$BIN -c -q -V -f $CFG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quiet_check()
|
||||||
|
$BIN -c -q -f $CFG
|
||||||
|
}
|
||||||
|
|
||||||
rhstatus() {
|
rhstatus() {
|
||||||
status $BASENAME
|
status $BASENAME
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue