Revision d2baa21d doc/examples/ganeti.initd.in

b/doc/examples/ganeti.initd.in
27 27

  
28 28
. /lib/lsb/init-functions
29 29

  
30
check_config() {
31
    for fname in \
32
        "@LOCALSTATEDIR@/lib/ganeti/server.pem"
33
    do
34
        if ! [ -f "$fname" ]; then
35
            log_end_msg 0
36
            log_warning_msg "Config $fname not there, will not run."
37
            exit 0
38
        fi
39
    done
40
}
41

  
42 30
check_exitcode() {
43 31
    RC=$1
44 32
    case $RC in
......
80 68
}
81 69

  
82 70
start_all() {
83
    check_config
71
    if ! $DAEMON_UTIL check-config; then
72
        log_warning_msg "Incomplete configuration, will not run."
73
        exit 0
74
    fi
75

  
84 76
    for i in $NODED $MASTERD $CONFD $RAPI; do \
85 77
        maybe_do "$1" start_action $i
86 78
    done
......
111 103
        stop_all "$2"
112 104
        ;;
113 105
    restart|force-reload)
106
        log_daemon_msg "Restarting $DESC" "$2"
114 107
        stop_all "$2"
115 108
        start_all "$2"
116 109
        ;;

Also available in: Unified diff