RE: NetReg: Problem starting DHCPd

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Ronald I. Nutter (ronald_nutter@georgetowncollege.edu)
Date: Thu Aug 05 2004 - 14:56:55 CDT


Here is the dhcpd script that I am using -

Last login: Thu Aug 5 14:51:05 2004
[root@resnet root]# service dhcpd start
/etc/init.d/dhcpd: line 76: syntax error near unexpected token `$0'
/etc/init.d/dhcpd: line 76: ` echo $"Usage: $0
{start|stop|status|restart|condrestart|reload}"'
[root@resnet root]# cd /etc/rc.d/init.d
[root@resnet init.d]# cat dhcpd | more
#!/bin/bash
#dhcpd - init file for ISC DHCPd
#
#description: Internet Software Consortium DHCP Server Daemon

#source function library
. /etc/init.d/functions

#source networking functions
. /etc/sysconfig/network

#Check that networking is up
[ ${NETWORKING} = "no" ] && exit 0

#Check that ISC DHCPD files exist
[ -f /usr/sbin/dhcpd ] || exit 0
[ -f /etc/dhcpd/dhcpd.conf ] || exit 0
[ -f /var/state/dhcp/dhcpd.leases ] || exit 0

OPTIONS="-cf /etc/dhcpd/dhcpd.conf -lf /var/state/dhcp/dhcpd.leases"
RETVAL=0
prog="dhcpd"

start() {
        echo -n $"Starting $prog: "
        daemon /usr/sbin/dhcpd $OPTIONS
        RETVAL=$?
        echo
        touch /var/lock/subsys/dhcpd
        return $RETVAL
}
stop() {
        echo -n $"Stopping $prog: "
        killproc /usr/sbin/dhcpd
        RETVAL=$?
        echo
        rm -v /var/lock/subsys/dhcpd
        return $RETVAL
}
reload(){
        echo -n $"Reloading $prog: "
        killproc /usr/sbin/dhcpd -HUP
        RETVAL=$?
        echo
        return $RETVAL
}
restart(){
        stop
        start
}
condrestart(){
        [-e /var/lock/subsys/dhcpd ] && restart
        return 0
}
case "$1"" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                restart
                ;;
        reload)
                reload
                ;;
        condrestart)
                condrestart
                ;;
        status)
                status dhcpd
                RETVAL=$?
                ;;
        *)
                echo $"Usage: $0
{start|stop|status|restart|condrestart|reload}"
                RETVAL=1
esac
exit $RETVAL
[root@resnet init.d]#

--------------------------------------------------------------------
Ron Nutter ron_nutter@georgetowncollege.edu
Network Manager
Information Technology Services (502)863-7002
Georgetown College
Georgetown, KY 40324-1696
--------------------------------------------------------------------
 

-----Original Message-----
From: owner-netreg@southwestern.edu
[mailto:owner-netreg@southwestern.edu] On Behalf Of
valianp@southwestern.edu
Sent: Thursday, August 05, 2004 3:49 PM
To: netreg@southwestern.edu
Subject: RE: NetReg: Problem starting DHCPd

yes.

chmod 755 /etc/rc.d/init.d/dhcpd

What I don't understand is where the "/etc/init.d/dhcpd" came from...(no
rc.d directory in that path).

Quoting "Ronald I. Nutter" <ronald_nutter@georgetowncollege.edu>:

> I created a startup script called dhcpd in /etc/rc.d/init.d. It says
> to change the file permissions and gives an example of chmod 755
> /etc/rc.d/init.d/dhcpd. Is that what I am supposed to type ?
>
> Ron
>
> --------------------------------------------------------------------
> Ron Nutter ron_nutter@georgetowncollege.edu
> Network Manager
> Information Technology Services (502)863-7002
> Georgetown College
> Georgetown, KY 40324-1696
> --------------------------------------------------------------------
>
>
> -----Original Message-----
> From: owner-netreg@southwestern.edu
> [mailto:owner-netreg@southwestern.edu] On Behalf Of
> valianp@southwestern.edu
> Sent: Thursday, August 05, 2004 3:39 PM
> To: netreg@southwestern.edu
> Subject: RE: NetReg: Problem starting DHCPd
>
>
> is the file really at
> /etc/init.d/dhcpd
> or
> /etc/rc.d/init.d/dhcpd
>
> is that where the guide said to put it?
>
> Quoting "Ronald I. Nutter" <ronald_nutter@georgetowncollege.edu>:
>
> > Redhat 9
> >
> > --------------------------------------------------------------------
> > Ron Nutter ron_nutter@georgetowncollege.edu

> > Network Manager
> > Information Technology Services (502)863-7002
> > Georgetown College
> > Georgetown, KY 40324-1696
> > --------------------------------------------------------------------
> >
> >
> > -----Original Message-----
> > From: owner-netreg@southwestern.edu
> > [mailto:owner-netreg@southwestern.edu] On Behalf Of
> > valianp@southwestern.edu
> > Sent: Thursday, August 05, 2004 3:18 PM
> > To: netreg@southwestern.edu
> > Subject: RE: NetReg: Problem starting DHCPd
> >
> >
> > what platform are you running on?
> >
> > Quoting "Ronald I. Nutter" <ronald_nutter@georgetowncollege.edu>:
> >
> > > That help fix part of the errors. I am now getting -
> > >
> > > /etc/init.d/dhcpd: line 76: syntax error near unexpected token
`$0'
> > > /etc/init.d/dhcpd: line 76: ` echo $"Usage: $0
> > > {start|stop|status|restart|condrestart|reload}"'
> > >
> > > I have tried putting spaces between all the words. I have tried
> > > retyping the entire line but no luck.
> > >
> > > Suggestions ?
> > >
> > > Ron
> > >
> > >
--------------------------------------------------------------------
> > > Ron Nutter
ron_nutter@georgetowncollege.edu
>
> > > Network Manager
> > > Information Technology Services
(502)863-7002
> > > Georgetown College
> > > Georgetown, KY
40324-1696
> > > ------------------------------------------------------------------
> > > --
> > >
> > >
> > > -----Original Message-----
> > > From: owner-netreg@southwestern.edu
> > > [mailto:owner-netreg@southwestern.edu] On Behalf Of Tim Cantin
> > > Sent: Thursday, August 05, 2004 2:43 PM
> > > To: netreg@southwestern.edu
> > > Subject: RE: NetReg: Problem starting DHCPd
> > >
> > >
> > > ...and I think you fix that one by putting a space between the
> > > period
> > > and the first slash:
> > >
> > > . /etc/sysconfig/network
> > >
> > > As opposed to:
> > >
> > > ./etc/sysconfig/network
> > >
> > > -Tim
> > >
> > > ---
> > > Tim Cantin, Director, Systems & Networks
> > > Wellesley College, Information Services
> > > 223 Simpson Hall East, 106 Central Street
> > > Wellesley, Massachusetts 02481-8203
> > > http://www.wellesley.edu/~tcantin/
> > > phone: (781)283-3520 fax: (781)283-3682
> > >
> > >
> > > -----Original Message-----
> > > From: owner-netreg@southwestern.edu
> > > [mailto:owner-netreg@southwestern.edu] On Behalf Of Robert Lowe
> > > Sent: Thursday, August 05, 2004 2:39 PM
> > > To: netreg@southwestern.edu
> > > Subject: Re: NetReg: Problem starting DHCPd
> > >
> > > Ronald I. Nutter wrote:
> > >
> > > Ron,
> > >
> > > > Please bear with me while I ask some stupid questions. I am new
> > > > to linux and have done fairly well so far getting all the
> > > > modules/files
> >
> > > > download/compiled etc. Running into a problem trying to start
> > DHCPd.
> > >
> > > > I have typed the script from Patrick Jaques PDF but am getting
> > > > the
>
> > > > following error when trying to start dhcpd. Suggestions ?
> > > >
> > > > /etc/init.d/dhcpd: line 10: ./etc/sysconfig/network: Permission
> > > > denied
> > >
> > > Fix this one, and I'll bet everything else falls into place. Are
> > > you
> > > running as root when you attempt to start dhcpd?
> > >
> > > -Robert
> > >
> > > > /etc/init.d/dhcpd: line 13: [=no]: command not found
> > > > /etc/init.d/dhcpd: line 16: [-f: command not found
> > >
> > >
> > > ******************************************************************
> > > **
> > > **
> > > To unsubscribe from this list, send an e-mail message to
> > > majordomo@southwestern.edu containing a single line with the
words:
> > > unsubscribe netreg Send requests for assistance to:
> > > owner-netreg@southwestern.edu
> > >
> **********************************************************************
> > >
> > > ******************************************************************
> > > **
> > > **
> > > To unsubscribe from this list, send an e-mail message to
> > > majordomo@southwestern.edu containing a single line with the
words:
> > > unsubscribe netreg Send requests for assistance to:
> > > owner-netreg@southwestern.edu
> > >
> **********************************************************************
> > >
> **********************************************************************
> > > To unsubscribe from this list, send an e-mail message to
> > > majordomo@southwestern.edu containing a single line with the
words:
> > > unsubscribe netreg Send requests for assistance to:
> > > owner-netreg@southwestern.edu
> > >
> **********************************************************************
> > >
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > ********************************************************************
> > **
> > To unsubscribe from this list, send an e-mail message to
> > majordomo@southwestern.edu containing a single line with the words:
> > unsubscribe netreg Send requests for assistance to:
> > owner-netreg@southwestern.edu
> >
**********************************************************************
> >
**********************************************************************
> > To unsubscribe from this list, send an e-mail message to
> > majordomo@southwestern.edu containing a single line with the words:
> > unsubscribe netreg Send requests for assistance to:
> > owner-netreg@southwestern.edu
> >
**********************************************************************
> >
>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg Send requests for assistance to:
> owner-netreg@southwestern.edu
> **********************************************************************
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg Send requests for assistance to:
> owner-netreg@southwestern.edu
> **********************************************************************
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg Send requests for assistance to:
owner-netreg@southwestern.edu
**********************************************************************
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************


New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:47 CDT