由 訪客 » 週日 2月 16, 2003 11:08 pm
我已經改用 dhcp3了
這是我的/usr/sbin/dhcpd3的內容 為何他沒有指定INTERFACES
那我該如何改 是將--exec /usr/sbin/dhcpd3 -- -q $INTERFACES 這行改成
--exec /usr/sbin/dhcpd3 eth0 這樣對嗎
-------------------------------------------------------------------以下是檔案內容
#!/bin/sh
#
# $Id: dhcp3-server.init.d,v 1.6 2002/05/05 20:09:35 peloy Exp $
#
# It is not safe to start if we don't have a default configuration...
if [ ! -f /etc/default/dhcp3-server ]; then
echo "/etc/default/dhcp3-server does not exist! - Aborting..."
echo "Run 'dpkg-reconfigure dhcp3-server' to fix the problem."
exit 1
fi
# Read init script configuration (so far only interfaces the daemon
# should listen on.)
. /etc/default/dhcp3-server
DHCPDPID=/var/run/dhcpd.pid
case "$1" in
start)
echo -n "Starting DHCP server: "
start-stop-daemon --start --quiet --pidfile $DHCPDPID \
--exec /usr/sbin/dhcpd3 -- -q $INTERFACES
sleep 2
if [ -f "$DHCPDPID" ] && ps h `cat "$DHCPDPID"` >/dev/null; then
echo "dhcpd3."
else
echo "dhcpd3 failed to start - check syslog for diagnostics."
fi
;;
stop)
echo -n "Stopping DHCP server: dhcpd3"
start-stop-daemon --stop --quiet --pidfile $DHCPDPID
echo "."
;;
restart | force-reload)
$0 stop
sleep 2
$0 start
;;
*)
echo "Usage: /etc/init.d/dhcp3-server {start|stop|restart|force-reload}"
exit 1
esac
exit 0