Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Hostname error and the Pump solution< Next Oldest | Next Newest >
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: July 02 2008,03:10 QUOTE

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.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: July 02 2008,15:47 QUOTE

Good analysis and suggestion will implement.
Back to top
Profile PM WEB 
1 replies since July 02 2008,03:10 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Hostname error and the Pump solution

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code