View | Details | Raw Unified | Return to bug 640336
Collapse All | Expand All

(-)rc.dhcpd (-6 / +25 lines)
Lines 96-109 Link Here
96
# considered a success.
96
# considered a success.
97
97
98
if ! [ -x "$DAEMON_BIN" ]; then
98
if ! [ -x "$DAEMON_BIN" ]; then
99
	if [ "$1" = "stop" ]; then exit 0; fi
99
	case $1 in
100
	echo >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
100
	stop)   ;;
101
	exit 5
101
	*)	echo -n >&2 "$0: \"$DAEMON_BIN\" is not an executable file. Exiting."
102
		case $1 in
103
		status) rc_failed 4 ;;
104
		*)	rc_failed 5 ;;
105
		esac
106
		rc_status -v
107
	;;
108
	esac
109
	rc_exit
102
fi
110
fi
103
if ! [ -r "$DAEMON_CONF" ] ; then
111
if ! [ -r "$DAEMON_CONF" ] ; then
104
	if [ "$1" = "stop" ]; then exit 0; fi
112
	case $1 in
105
	echo >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
113
	stop|status)
106
	exit 6
114
		if test ! -s /etc/sysconfig/dhcpd ; then
115
			test -e $DAEMON_STATE/$DAEMON_PIDFILE && \
116
			CHROOT_PREFIX="$DAEMON_STATE" || CHROOT_PREFIX=''
117
		fi
118
	;;
119
	*)
120
		echo -n >&2 "$0: \"$DAEMON_CONF\" config file missed. Exiting."
121
		rc_failed 6
122
		rc_status -v
123
		rc_exit
124
	;;
125
	esac
107
fi
126
fi
108
127
109
# remove empty pid files to avoid disturbing warnings by checkproc/killproc
128
# remove empty pid files to avoid disturbing warnings by checkproc/killproc

Return to bug 640336