Joined: Mar. 2005
||Posted: Oct. 03 2007,22:21
|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.