Out of the box, an LFS system will report (None) as the domainname. You can see this if you try to put the domainname into /etc/issue. For a long time I'd kept a local patch on init.d/localnet that looks for DOMAINNAME in /etc/sysconfig/network and then used the `domainname' utility from net-tools to set it. Obviously, this wouldn't work for LFS since there's no net-tools.
Recently I discovered that you can do the same thing with sysctl through the parameter kernel.domainname. Attached patch works on my system. There could be some corresponding text in Ch. 7 about setting the domainname. What do you guys think? -- Dan
Index: bootscripts/lfs/init.d/localnet =================================================================== --- bootscripts/lfs/init.d/localnet (revision 7952) +++ bootscripts/lfs/init.d/localnet (working copy) @@ -26,6 +26,12 @@ boot_mesg "Setting hostname to ${HOSTNAME}..." hostname ${HOSTNAME} evaluate_retval + + if [ -n "$DOMAINNAME" ]; then + boot_mesg "Setting domainname to ${DOMAINNAME}..." + /sbin/sysctl -q kernel.domainname="${DOMAINNAME}" + evaluate_retval + fi ;; stop)
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page