From: valianp@southwestern.edu
Date: Thu Aug 05 2004 - 15:09:28 CDT
or maybe add the end quote:
echo $"Usage: $0"
^add
that seems more consistant with the rest of the script...Ive never actually used
that syntax $"xxxx"...any shell wizard care to enlightent us what the dollar
before quotes means?
-p
Quoting Robert Lowe <Robert.H.Lowe@lawrence.edu>:
>
>
> Ronald I. Nutter wrote:
> > 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
> ^
> remove
>
> -Robert
>
> > {start|stop|status|restart|condrestart|reload}"
> > RETVAL=1
> > esac
> > exit $RETVAL
> > [root@resnet init.d]#
>
> **********************************************************************
> 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
**********************************************************************
This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:47 CDT