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 issue, host=TEST not working, etc.< Next Oldest | Next Newest >
aldar Offline

Group: Members
Posts: 1
Joined: Sep. 2007
Posted: Oct. 03 2007,18:29 QUOTE

I have this DSL install setup the way I want it, but for some reason it is ignoring the "host=test" setting in my grub line. Here is what I have:

kernel /boot/linux24 root=/dev/hda1 quiet vga=normal noscsi no pcmcia nodhcp nousb frugal host=TEST
(I have also tried the above w/o frugal)

What I'd really like is to make ONE file contain the hostname, ip, gw, mask, and dns so that a non-linux person will only have to modify ONE file to change those settings instead of them have to change several.

Currently I have a file that changes all the above settings EXCEPT the hostname which is run after dsl auto-login.

Any suggestions on how I can get all those settings in to one file so a non-linux user can make those changes in just one place easily and then I can just create a small script to bounce the eth0 to put the new settings into effect? Any suggestions would be greatly appreciated. Thanks.
Back to top
Profile PM 
chaostic Offline

Group: Members
Posts: 328
Joined: Mar. 2005
Posted: Oct. 03 2007,22:21 QUOTE

Quote (aldar @ Oct. 03 2007,14:29)

Traditional Install? I think there are 3 places you need to change to get the hostname to work right (but I'm going on experiece with old versions).

But about the info in one place, you can either make the script hold the info, commented so the user opens up the script and changes the variables, or have the script read a file with the variable names.


$hostvar= [cat ~/variablefilename | grep hostname= | awk hostname] ;
echo $hostvar >> /etc/hostname

Obviously, thats all psuedocode. I don't know how to use awk or remember correct bash shell script commands. So instead of a 2 line script to restart eth0, you have a 15~20 line script doing everything.
Back to top
Profile PM 
curaga Offline

Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Oct. 04 2007,14:29 QUOTE

For just a file that defines variables, using cat, grep and awk would make it Bloated!

Just source the file:
. myconfigfile
hostname $hostname
etc etc

There's no such thing as life. Those mean little jocks invented it ;)
Windows is not a virus. A virus does something!
Back to top
Profile PM 
roberts Offline

Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 04 2007,15:54 QUOTE

Some boot options are only supported for live CD or emulations thereof, i.e, poormans & frugal. The reason for this is becase on a traditional hard drive install you would typically perform these tasks only once and not upon every boot.

For traditional hard drive install, use traditional methods.
There is a script in /etc/init.d/sethostname

With the boot option in grub, (host boot option set), you should only have to call this script once to set the host name.
Back to top
Profile PM WEB 
3 replies since Oct. 03 2007,18:29 < Next Oldest | Next Newest >

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

reply to topic new topic new poll
Quick Reply: hostname issue

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