ALT Linux Bugzilla
– Attachment 3632 Details for
Bug 3488
[FR][4.1] /etc/dhcpd.conf-sample proposal
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
init script patch for add conftest()
dhcpd-init-conftest.patch (text/plain), 1.86 KB, created by
Mike Lykov
on 2009-06-30 13:03:18 MSD
(
hide
)
Description:
init script patch for add conftest()
Filename:
MIME Type:
Creator:
Mike Lykov
Created:
2009-06-30 13:03:18 MSD
Size:
1.86 KB
patch
obsolete
>--- dhcpd-def 2006-11-06 16:37:12 +0400 >+++ dhcpd 2009-06-30 13:55:42 +0500 >@@ -26,6 +26,7 @@ > DHCPD_CONF=/etc/dhcp/dhcpd.conf > DHCPD_CONF_SAMPLE=/etc/dhcp/dhcpd.conf.sample > LOCKFILE=/var/lock/subsys/dhcpd >+PROCESSNAME=dhcpd > > # Source config. > SourceIfNotEmpty /etc/sysconfig/dhcpd >@@ -36,10 +37,10 @@ > { > is_yes "$NETWORKING" || return 0 > if [ -e "$DHCPD_CONF" ]; then >- start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd $DHCPDARGS >+ start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- $PROCESSNAME $DHCPDARGS > RETVAL=$? > else >- msg_starting dhcpd >+ msg_starting $PROCESSNAME > printf "%s: %s" "$DHCPD_CONF" "No such file or directory" > failure "dhcpd startup" > echo >@@ -53,7 +54,7 @@ > > stop() > { >- stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- dhcpd >+ stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user dhcpd -- $PROCESSNAME > RETVAL=$? > return $RETVAL > } >@@ -61,12 +62,29 @@ > restart() > { > stop >+ conftest $PROCESSNAME > start > } > >+conftest() >+{ >+ echo -n "Checking configuration sanity for $PROCESSNAME: " >+ DAEMON_BIN="$(absolute "$1")" >+ $DAEMON_BIN -q -t -cf $DHCPD_CONF >+ if [ $? -ne 0 ]; then >+ echo_failure >+ echo >+ $DAEMON_BIN -t -cf $DHCPD_CONF >+ else >+ echo_success >+ echo >+ fi >+} >+ > # See how we were called. > case "$1" in > start) >+ conftest $PROCESSNAME > start > ;; > stop) >@@ -86,11 +104,14 @@ > fi > ;; > status) >- status --pidfile "$PIDFILE" --expect-user dhcpd -- dhcpd >+ status --pidfile "$PIDFILE" --expect-user dhcpd -- $PROCESSNAME > RETVAL=$? > ;; >+ configtest) >+ conftest $PROCESSNAME >+ ;; > *) >- msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}" >+ msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status|configtest}" > RETVAL=1 > esac >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3488
:
330
|
335
|
1408
|
3631
| 3632