Hostname error and the Pump solutionForum: User Feedback Topic: Hostname error and the Pump solution started by: chaostic Posted by chaostic on July 02 2008,03:10
Sometimes, the hostname, even with the hostname cheatcode, does not get get picked up by the dns/dhcp server on the network. Many times, when I reboot, while DSL reports the correct hostname, the dns server see's "box" (While writing this, I figured out that it is because the hostname "box" is set by knoppix-config before the hostname cheatcode is ever checked and the real hostname set). It turns out, pump has an option to request the hostname along with the dhcp request.I think that that feature should be used along with the regular pump request. It would require changing /etc/init.d/dsl-config, /etc/init.d/dsl-config/knoppix-autoconfig, and the /usr/local/bin/netcardconf.lua It would just require the "pump -i" instances in those three to become pump -h $HOSTNAME -i The only problem I see, is that the hostname setting is done (By dsl-config) after the initial dhcp/pump request (By knoppix-autoconfig). I believe this can be solved by changing knoppix-autoconfig to either source the dsl-function file then call the sethostname function, or by calling the redundant sethostname script from /etc/init.d/dsl-config (BTW, since that script was copied into dsl-config, why is it still around? And why is hostname.sh used when it is one line and can replace the one line used to call itself :/) I think this is best because this way, the hostname is set before the interface is ever brought up, giving the off chance that the wrong hostname is set. Pseudo list of changes: knoppix-config: 328: change to if(bootparm host)[call sethostname script/function)] else[hostname=box] 791: change pump -i $devices to add -h $HOSTNAME dsl-config: 354: Remove and note that was moved to knoppix-config /etc/init.d/sethostname: Remove since included in dsl-functions unless used by knoppix-config (because you don't want to source dsl-functions into knoppix-config for whatever reason) /etc/init.d/hostname.sh: Remove because it's useless to use a one line script without options :P /usr/local/bin/netcardconf.lua: 184,186,199: Add -h $HOSTNAME (Or the lua way of getting the hostname from the enviornment) If anything, by calling the sethostname script BEFORE any interface goes up would go a long way in fixing this bug. Posted by roberts on July 02 2008,15:47
Good analysis and suggestion will implement.
|