[PC-BSD Commits] r6197 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Mon Feb 8 08:01:03 PST 2010


Author: kris
Date: 2010-02-08 08:01:03 -0800 (Mon, 08 Feb 2010)
New Revision: 6197

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
Log:

Cleanup hostname creation, make sure we don't have a duplicate



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-02-08 15:52:38 UTC (rev 6196)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-02-08 16:01:03 UTC (rev 6197)
@@ -241,6 +241,10 @@
     HOSTNAME="${VAL}"
   fi
 
+  # Clean up any saved hostname
+  cat ${FSMNT}/etc/rc.conf | grep -v "hostname=" >${FSMNT}/etc/rc.conf.new
+  mv ${FSMNT}/etc/rc.conf.new ${FSMNT}/etc/rc.conf
+
   # Set the hostname now
   echo_log "Setting hostname: ${HOSTNAME}"
   echo "hostname=\"${HOSTNAME}\"" >> ${FSMNT}/etc/rc.conf



More information about the Commits mailing list