Sponsored Content
Top Forums Shell Programming and Scripting Shell/Perl Script to edit dhcpd.conf Post 302096980 by Yogesh Sawant on Tuesday 21st of November 2006 02:48:16 AM
Old 11-21-2006
one approach:
1. read entire file dhcp.conf in an array
2. then do the operations in that array (adding, editing, removing lines) and then
3.write the contents of array back to the file
 

10 More Discussions You Might Find Interesting

1. Linux

dhcpd.conf

I have intall a REdhat 9.0 as a server and Ive configure to act as a DHCP however Im having technical problems b/c the file /etc/dhcpd.conf does not exists. I went to the text edit and I created : subnet 192.192.168.100.0 netmask 255.255.255.0 { range 192.168.100.10 192.168.100.150;... (1 Reply)
Discussion started by: keliy1
1 Replies

2. UNIX for Dummies Questions & Answers

Cannot edit inetd.conf???

I'm trying to edit the inetd.conf but for some reason when I vi into it, it says "Read Only" even though I am root and the perms are 777?!? (2 Replies)
Discussion started by: shorty
2 Replies

3. Linux

dhcpd.conf - static route

Hi, I've setup DHCP Server on RH linux AS3 and everything works fine except static routes. They are not getting effected on client systems. My dhcpd.conf: +++++++++++ ddns-update-style interim; ddns-updates off; option domain-name-servers 192.168.116.122; option domain-name... (3 Replies)
Discussion started by: prvnrk
3 Replies

4. Shell Programming and Scripting

help on a perl script to edit file

Hi, sample file looks like this.. <hp> <name> <detail>adsg</detail> ... ... </name><ft>4264</ft> </hp> I need to edit the last but one line using perl script. I want the format to be .. <hp> <name> <detail>adsg</detail> ... ... </name> (9 Replies)
Discussion started by: meghana
9 Replies

5. Shell Programming and Scripting

shell script to edit a file

i have a file called number which contains data as 1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1 0 0 1 2 3 4 needed a shell script to print the output as 1 7 7 1 4 and (2 Replies)
Discussion started by: jacky29
2 Replies

6. UNIX for Dummies Questions & Answers

edit /etc/syslog.conf (Solaris 10)

Hi, Im editing the file /etc/syslog.conf for Solaris 10 server in production. I need to add "auth and authpriv.": someone set the same? Have been successful? I would appreciate any suggestions. Greetings. The unmodified arhive is: (0 Replies)
Discussion started by: musul
0 Replies

7. Shell Programming and Scripting

Help with Perl to change dhcpd.conf file

Hi all, I am too new for this stuff and i am lost in perl tutorials. I need help to change dhcp entries in .conf file with a perl script. The file entries are like below : host bertha-clp-0 { hardware ethernet AA:0A:A0:00:6c:40; fixed-address 10.10.10.72; option... (6 Replies)
Discussion started by: ekckabatop
6 Replies

8. Shell Programming and Scripting

Shell Script to check dhcp conf file

Hi, I have to prepare a script to check the dhcp conf file. The script has to check for a specific parameter called circuit ID. If the Circuit ID is unique it should show the output that it is unique and if it is duplicate it should show that the Circuit ID is duplicate. I have prepared the... (4 Replies)
Discussion started by: Crazy_Nix
4 Replies

9. Shell Programming and Scripting

Listing IPs from the dhcpd.conf

Hy everybody, Within a dhcpd.conf file, we got some fixed IP adresses from 192.168.0.1 - 192.168.0.254. Sample: #ddns-update-style interim; ddns-update-style none; ignore client-updates; deny client-updates; authoritative; #### By red for PXE Booting allow booting; allow bootp; ###... (17 Replies)
Discussion started by: hermouche
17 Replies

10. UNIX for Beginners Questions & Answers

Changes in dhcpd.conf do not make a difference in DHCP service behaviour

Hi Experts, Our DHCP server currently answers the DHCP Discover requests from ServerX. In our dhcpd.conf file there are parameters defined for ServerX. Now we introduced some additional Servers into the network and want them to get service from the same DHCP server. Similar configuration... (13 Replies)
Discussion started by: ekorgur
13 Replies
DHCLIENT.LEASES(5)					      BSD File Formats Manual						DHCLIENT.LEASES(5)

NAME
dhclient.leases -- DHCP client lease database DESCRIPTION
The Internet Software Consortium DHCP client keeps a persistent database of leases that it has acquired that are still valid. The database is a free-form ASCII file containing one valid declaration per lease. If more than one declaration appears for a given lease, the last one in the file is used. The file is written as a log, so this is not an unusual occurrence. The lease file is named dhclient.leases.IFNAME, where IFNAME represents the network interface the DHCP client acquired the lease on. For example, if dhclient(8) is configured for the em0 network device, the lease file will be named dhclient.leases.em0. The format of the lease declarations is described in dhclient.conf(5). FILES
/var/db/dhclient.leases.IFNAME Current lease file. SEE ALSO
dhclient.conf(5), dhcp-options(5), dhcpd.conf(5), dhclient(8), dhcpd(8) RFC 2132, RFC 2131. AUTHORS
The dhclient(8) utility was written by Ted Lemon <mellon@vix.com> under a contract with Vixie Labs. The current implementation was reworked by Henning Brauer <henning@openbsd.org>. BSD
January 1, 1997 BSD
All times are GMT -4. The time now is 03:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy