$Id: CHANGES,v 1.21 2001/10/24 19:08:21 jeremy Exp $ Changes for dhcpreg.pl: 2001-10-24 ---------- DHCPReg v2.0 is now considered release code. CVS branch has been merged with v1.x. Beta information will be removed from the site momentarily. 2001-08-06 ---------- I am considering dhcpreg 2.00 to be in beta now. I've made a new dir for it. Changed the note on the dhcpreg page. Added additional comments to CheckAddr.pm. Changed mac var to macaddr for consistency. Removed duplicate macaddr check. Added additional comments to CheckConfByName.pm. Fixed some formatting issues. Made DSL leases return " - DSL" by them to make them noticable" Statics actually didn't get found in CheckConfByName. They do now and also denote "Static" in the results. CheckName.pm got additional comments, minor fix to POD (typo), and the Name var was change to username to make it a little more consistent. Fixed POD format in CheckStatics.pm. Made 1kiva revision just be 1 in spec file. Changed INSTALL to match. It shouldn't have kiva specific tags in the rpm. Updated the POD in all Write*.pm modules to define the input passed into the module. Slight change to '-h' output in dhcpreg.pl. Just a semantic change in wording. No functionality change. Added additional comments to CheckMacAddrEntry.pm to denote the logic chain followed. Slightly updated TODO. 2001-08-05 ---------- Added some code comments for Add*MacAddr modules. Toyed with making IPChange.pm, a replacement for the ipchange script, but instead, I think I'm going to change the ipchange to comply with the way dhcpreg works and keep it. I did remove the next call from the del function in ipchange that was screwing up the config in the other del fucntions. Explored other places that need additional code comments. It looks like I'm nearing completion and just need to give the whole thing the once over. 2001-08-04 ---------- Found that the separator line must always have a line feed after it. That's very strange. Looks like telling it to do a 'next' once it finds the separator ir the wrong thing to do. I've removed it. I did the same with DelBulMacAddr. Testing functionality: Calling help works as advertised (-h) Adding individual entries works - no -n throws proper error - username too short/long throws proper error - bad macaddrs throw proper errors (length, format, content) Removing individual entries works - extraneous options, e.g. -n are ignored - macaddr checks are working correctly Checking - checking statics works - trying to check statics and name fails (as it is set to) - checking by name works (all check_name checks work, length, starting with numbers, containing non alphanumeric) - checking by macaddr works (extra options are ignored) Adding bulk entries works - fails if input is not proper (mac whitespace_char name) - name checks work, macaddr checks work Deleting bulk entries works - extraneous data causes job to fail (as it should) - macaddr checks work Changes from here happened as a result of the tests above ----------------------------------------------------------------- Added check to dhcpreg.pl to make sure that -n is called and has a value if adding an individual entry. Added check_name to AddBulkMacAddr. Also added a upper->lower tr for username. Added the same tr to AddMacAddr, too. Added $Name to all output in CheckName.pm so user could tell which name is failing. Removed the output from Write* functions I added on 2August2001. It's really misplaced and misleading. Instead I added an array to the AddBulkMacAddr function itself and had it print only after successful returns. Removed \n from in front of separator line in Del*MacAddr modules because it keeps added cruft to the config file. It was unnecessary. Added mac var to CheckName to allow for more verbose output when using the bulk add function. Also gave special output if username is null so it makes a little more sense to the user. 2001-08-02 ---------- The bug in DelMacAddr was due to the fact that I alter the line separator from \n to }\n. Fixed that up and changed how the output writes to make sure it adds in that last bracket. Also added output to the Write*.pm modules to note when something is added. Fixed how dhcpreg.pl calls a regular check so it works correctly. 2001-08-01 ---------- Found a bug in AddBulkMacAddr that allowed the user to give bad input. The mac was getting checked but username was not. That allowed for a username to be null. A check for the null string and not a word string made the difference. Made some formatting changes in CheckMacAddrEntry to produce a little nicer output. DelBulkMacAddr works now. One fix was to make sure that we are creating a new tmpconf to append to. Another fix was a logic issue with CheckMacAddrEntry to make sure we are doing what we expect to be doing (I was zigging when I should have zagged...) DelMacAddr is still not quite working. It's somewhere in the logic for parsing the hash and looking for the passed in macaddr. Tomorrow. 2001-07-31 ---------- Started matching all flock locking with flock unlocking. It was sloppy of me not to do that. It also made me make sure that all OPENs closed again. At the suggestion of Cdent, I also put SEEKs in after each flock locking where we append to the file for safety. The problems with add seem to stem from the check_macaddr bit. As it stands now, I can add duplicate macaddrs to the dhcpd.conf file. That is not good. Okay, this is solved. Seems I was stepping on the tmp file again and again each time I called check_macaddr. I now have check, add, add bulk, and rm working. rm bulk is balking me at the moment. I shall tackle that tomorrow night when I can see again. Note for later -> Can ipchange be rolled in, too ? I think maybe yes. 2001-07-29 ---------- DelMacAddr had a bug in it where it just printed to stdout if it didn't find the entry to delete. I made it die there and it works much better. It also prints information as to whether it worked or not. All functions really need to produce some sort of success/failure message. I think they all produce failure messages. I'll audit that. Removed static-dhcpreg.pl from the package. It has been replaced with WriteStaticEntry.pm in the add routine. It's a step in the right direction. Removed check-static-ips.pl from the package. It has been replaced with CheckStatics.pm in the check routine. Again, another step in the right direction. As part of this, another option switch (-s) was added. A runtime check to make sure -s and -n are not simultaneously used was added in (that causes the program to die with an error). 2001-07-26 ---------- Long day and my eyes hurt. Corrected some typos in AddMacAddrEntry that were simply == where = would be proper. I also did quite a bit of extraneous variable cleanup in dhcpreg.pl. I created WriteStaticEntry.pm that will eventually replace the entire static-dhcpreg.pl utility because the only real difference there is the configuration stanza that gets created. It's been added to the MANIFEST,Makefile, and spec file. Corrected some of the POD in WriteCableEntry. 2001-07-25 ---------- AddMacAddr works now. For some reason I thought it had been working already, but, alas, no. AddBulkMacAddr is not working right. It is only adding the last entry in the STDIN instead of all of them. I suspect a logic problem where WriteCableEntry gets called but am too bleary eyed to track it. 2001-07-23/24 (late night) ---------- The DelBulkMacAddr module works now. In the transition from one huge program to a module, I somehow broke it. I'm actually wondering if it ever worked correctly. I thought it did, but now I'm not so sure. At any rate, it certainly does now. I need to give some notice in the docs as to how it should be called. I went ahead and did that in the README. 2001-07-23 (early morning) ---------- It actually compiles and mostly works again. The delete function works correctly and is a little more streamlined. A side effect of this, though, is that the GetHead module has been removed. Not counting the file handle open, lock, and close, there were 4 lines of code. I condensed it into 3 lines for efficiency anyway before deciding that it wasn't worth keeping for 3 lines. That was far, far less than setting up the environment and also it was only ever used in the delete function, anyway. That seems a tad extraneous. I updated the Makefile, spec, and MANIFEST to reflect GetHead.pm being gone. 2001-07-19 ---------- I fixed the problem with the compilation bug by squishing the checkout_body function back into the delete functions. Unfortunately, it looks like to work correctly I may need to do that with the get_head function as well. Hrm. Further exploration is necessary. I also fixed some documentation problems in the Add functions, added the DelBulkMacAddr module and removed the README. At this point, it's still not working quite right but I'm not too concerned at this point. 2001-07-18 ---------- Started the process of moving the delete functions out to their own modules. This necessitated going ahead and moving the checkout_body function out as well. In the add_macaddr module there was a documentation error. I corrected that. Updated CHANGES with last set of CVS information. Updated MANIFEST to include new modules. Updated spec to include new modules. Updated Makefile to include new modules Updated the version Noticed that CheckName.pm wasn't getting installed in the new stuff. Added it into Makefile and spec file. Tracked down why the two new modules were throwing compilation errors. I had variables outside the routines and that made things very unhappy in terms of scoping. That was an oversite and has been corrected. Added a readme file and marked the version as unusable. It doesn't compile at this time, but that's okay. I just wanted to get some modules going this evening and checkpointed in cvs and on the website. 2001-06-27 ---------- Updated CHANGES with last set of CVS information. Updated MANIFEST to include new modules. Updated spec to include new modules. Updated Makefile to include new modules Updated the version to a 2.00alpha designation. 2001-06-25 ---------- Began to reformat the input styles of dhcpreg - switching from Getopt::Long to Getopt::Std because it's just easier to deal with - switched the input from taking the command from $ARGV[0] to actually using option input. Added test mode switch to code -> it doesn't show up in the command line usage options, but that's actually on purpose. That switch is for development and should be documented as such. Added some additional comments to modules, variables, options, and values the options set...basically trying to make the code easier to navigate for someone besides me. There were comments, but probably not enough. Fixed a minor, non-fatal syntax error with how an array value is referenced in the AddMacAddr module. Diffed the existing, live branch of CheckConfByName module and patched the DSL matching changes into my branch because it's needed code. Before that patch, checks would only reveal dynamic cable registrations and ignore DSL entries. That was an oversight. Further checks should allow matches on any type of registration. ---------- 2001-02-02 Fixed some bugs in the way dhcpreg.pl wrote the dhcpd.conf file back out. The changes should make the file cleaner with less useless white spaces. Also changed the packaging to break the rpm into multiple packages and added a safe-install option to the Makefile. 2000-10-20 Added some smarts to the CheckAddr.pl module because the tests weren't complete. Break apart each pair of numbers in the macaddr and make sure that they are alphanumeric before letting it through. 2000-09-27 Fooey. I got so pleased with myself for getting get-lease-list.pl working that I forgot to include IPSort.pm in the Makefile and Specfile and the script itself from the Specfile. It's all in there now. 2000-09-20 Got get-lease-list.pl working with all functions. Some code cleanup still needs to happen, but it's working ! IPSort.pm also works now. 2000-09-13 Made a module out of the function that checks for dhcp registration entries by username from the dhcpd.conf file 2000-09-06 Made a module out of the function that reads/writes the static portions of the dhcpd.conf file since 3 of 4 scripts were using it 2000-09-05 Made a module out of the mac addr checking function since most of the scripts here use it 2000-08-30 changed the output formatting using a tip from Jason Fink 2000-05-19 fixed some formatting issues in check-static-ips.pl 2000-05-15 changed die() in check funtions to prints and exits 2000-04-20 Altered static-dhcpreg.pl to check for static addrs/macaddrs by name 2000-04-19 Altered dhcpreg.pl to check for macaddrs by name 2000-04-17 Added ipchange-dhcpreg.pl to allow others to change config files for CMs. 2000-04-03 - alh Changed the regex in check_addr to be a little more stringent. [All changes prior to this didn't get documented in here, I'm sorry to say. Suffice it to say that before this date, it worked, but was not terribly robust.] -jlf