Postscript for automatic USB installation (MAC address for Hostname)
Hello,
I am looking for help on how to make my bootable USB drive to automatically change the hostname to the MAC address of the system. i know that i am suppose to add some scripts under the postscipt portion of the kickstart file and this is what i have so far and is not working. I also know for sure that the first script below works because when i echo it on linux mechine it gives me the MAC address the way i want. However there is more i need to do so that wherever the installation is the hostname automatically becomes the MAC address %post HOSTNAME=(`/sbin/ifconfig eth0 |grep HWaddr |cut -d ' ' -f11 |sed 's/://g'`) echo HOSTNAME=$HOSTNAME >> /etc/sysconfig/network HOSTNAME $HOSTNAME echo NETWORKING=yes > /etc/sysconfig/network Please Help! |
Take a look at runlevels and the man page for 'hostname';
If I understand you, you just want to use the hostname command to set it to $HOSTNAME, and you want to run it at boot. As a jumping off point, the file you'll want to look at is rc.local; I forget the path, but you'll find it |
All times are GMT -5. The time now is 11:43 AM. |