Mageia Bugzilla – Attachment 2088 Details for
Bug 1419
dhcp server not started when sharing internet connection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Script to start/restart dhcpd server on interface start
dhcpd (text/plain), 824 bytes, created by
Dave Hodgins
on 2012-04-24 03:34:51 CEST
(
hide
)
Description:
Script to start/restart dhcpd server on interface start
Filename:
MIME Type:
Creator:
Dave Hodgins
Created:
2012-04-24 03:34:51 CEST
Size:
824 bytes
patch
obsolete
>#!/bin/bash > >runlevel=$(runlevel) >currentrunlevel="${runlevel:2}" >if [ -f "/etc/rc.d/rc${currentrunlevel}.d/S65dhcpd" ] ; then > if [ "${1}" != "lo" ] ; then > INTERFACES="" > [ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd > shouldstart="false" > if [ -z "$INTERFACES" ] ; then > shouldstart="true" > else > for interface in $INTERFACES ; do > if [ "${1}" == "$interface" ]; then > shouldstart="true" > fi > done > fi > if [ "${shouldstart}" == "true" ]; then > status=$(service dhcpd status) > if [ "${status}" == "dhcpd is stopped" ]; then > service dhcpd start > else > service dhcpd restart > fi > fi > fi >fi >
#!/bin/bash runlevel=$(runlevel) currentrunlevel="${runlevel:2}" if [ -f "/etc/rc.d/rc${currentrunlevel}.d/S65dhcpd" ] ; then if [ "${1}" != "lo" ] ; then INTERFACES="" [ -f /etc/sysconfig/dhcpd ] && . /etc/sysconfig/dhcpd shouldstart="false" if [ -z "$INTERFACES" ] ; then shouldstart="true" else for interface in $INTERFACES ; do if [ "${1}" == "$interface" ]; then shouldstart="true" fi done fi if [ "${shouldstart}" == "true" ]; then status=$(service dhcpd status) if [ "${status}" == "dhcpd is stopped" ]; then service dhcpd start else service dhcpd restart fi fi fi fi
View Attachment As Raw
Actions:
View
Attachments on
bug 1419
: 2088