[PC-BSD Commits] r21871 - in pcbsd/current/src-sh/pc-extractoverlay: . desktop-overlay/boot

svn at pcbsd.org svn at pcbsd.org
Thu Mar 14 19:15:42 PDT 2013


Author: kris
Date: 2013-03-15 02:15:41 +0000 (Fri, 15 Mar 2013)
New Revision: 21871

Added:
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/boot/loader.conf.pcbsd
Removed:
   pcbsd/current/src-sh/pc-extractoverlay/desktop-overlay/boot/loader.conf
Modified:
   pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay
Log:

Add /boot/loader.conf.pcbsd to base system, this will be where we ship
our loader.conf defaults, so that /boot/loader.conf can be left empty
for the user to put their own stuff without it getting blown away



Modified: pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay
===================================================================
--- pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay	2013-03-14 21:41:54 UTC (rev 21870)
+++ pcbsd/current/src-sh/pc-extractoverlay/pc-extractoverlay	2013-03-15 02:15:41 UTC (rev 21871)
@@ -81,6 +81,7 @@
 # Files we need to touch or change after an upgrade
 post_extract_setup()
 {
+  # Make sure rc.conf.pcbsd is enabled
   grep -q 'rc.conf.pcbsd' /etc/defaults/rc.conf
   if [ $? -ne 0 ] ; then
     # Setup /etc/defaults/rc.conf
@@ -92,6 +93,18 @@
     fi
   fi
 
+  # Make sure loader.conf.pcbsd is enabled
+  grep -q 'loader.conf.pcbsd' /boot/defaults/loader.conf
+  if [ $? -ne 0 ] ; then
+    # Setup /boot/defaults/loader.conf
+    sed -i '' 's|/boot/loader.conf /boot/loader.conf.local|/boot/loader.conf.pcbsd /boot/loader.conf /boot/loader.conf.local|g' /boot/defaults/loader.conf 2>/dev/null
+    grep -q "loader.conf.pcbsd" /boot/defaults/loader.conf
+    if [ $? -ne 0 ] ; then
+      echo "WARNING: loader.conf.pcbsd not enabled in /boot/defaults/loader.conf"
+      status="1"
+    fi
+  fi
+
   # See if we need to adjust pkg.conf
   grep -q "ARCH" /usr/local/etc/pkg.conf
   if [ $? -eq 0 ] ; then



More information about the Commits mailing list