From owner-freebsd-net Fri May 29 13:26:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA01345 for freebsd-net-outgoing; Fri, 29 May 1998 13:26:07 -0700 (PDT) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from southampton.Cairnwood.com ([207.19.67.69]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA01153 for ; Fri, 29 May 1998 13:25:38 -0700 (PDT) (envelope-from DuncanP@Cairnwood.com) Received: by Southampton.Cairnwood.com with Internet Mail Service (5.5.1960.3) id ; Fri, 29 May 1998 16:24:58 -0400 Message-ID: From: "Pitcairn, Duncan" To: "'Ted Lemon'" Cc: "'dhcp-client@fugue.com'" , "'freebsd-net@freebsd.org'" Subject: RE: FreeBSD Dhclient-script errors Date: Fri, 29 May 1998 16:24:49 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.1960.3) Content-Type: text/plain Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org As always the problem was simple but hard to find. Because the script and conf files were not installed as part of the FreeBSD package I got them from the dhcp-2_0b1pl0_tar.gz file. I extracted them with WinZip on my laptop then moved them to the FreeBSD system. I edited them with Emacs and all look well. Today I opened them with VI and found that they had the wrong end of line character -- they had the cr/lf (^M). When I stripped these off the script worked. At this point dhclient looks to be working but it wipes out the route table. I get the ip address, subnet, domain-name-server, router values just fine, but I can not ping to anywhere. This is a problem with dhclient.conf with the example settings, with the file empty, and with a shot a site specific settings. Regards, Duncan Pitcairn CCC Alliance, Cairnwood Cooperative Southampton, Pennsylvania USA -----Original Message----- From: Ted Lemon [mailto:mellon@hoffman.vix.com] Sent: Friday, May 29, 1998 1:55 PM To: Pitcairn, Duncan Cc: 'dhcp-client@fugue.com' Subject: Re: FreeBSD Dhclient-script errors > Now the hard part. The dhclient-script file has problems. First, it > needs a blank line added at the top, without which dhclient will not > open the file. dhclient doesn't open it - it execs it. It should have a #!/bin/sh at the top, and should be mode 755. It should *not* have a blank line at the top. You should definitely not change the for statements to foreach! :') > I am stumped at this point. Any ideas? Put back the old script and make it mode 755, and make sure there's a #!/bin/sh at the top, and let us know what happens. All of the errors you're reporting are consistent with the script being executed by csh rather than sh, which is bound to cause no end of chaos... _MelloN_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message