svn commit: r264472 - stable/10/usr.sbin/bsdinstall/scripts

Devin Teske dteske at FreeBSD.org
Mon Apr 14 21:04:59 UTC 2014


Author: dteske
Date: Mon Apr 14 21:04:58 2014
New Revision: 264472
URL: http://svnweb.freebsd.org/changeset/base/264472

Log:
  MFC r260866,260900,261960 (3 revisions; summarized below):
  260866: Fix a bad comparison operator and fix dumpdev comment
  260900: Dummy commit; show r260866 was in-part by Christoph Mallon
  261960: Add zfsboot to bsdinstall(8) scripted interface

Modified:
  stable/10/usr.sbin/bsdinstall/scripts/script
  stable/10/usr.sbin/bsdinstall/scripts/services
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/bsdinstall/scripts/script
==============================================================================
--- stable/10/usr.sbin/bsdinstall/scripts/script	Mon Apr 14 21:02:20 2014	(r264471)
+++ stable/10/usr.sbin/bsdinstall/scripts/script	Mon Apr 14 21:04:58 2014	(r264472)
@@ -95,7 +95,11 @@ fi
 # Make partitions
 rm -f $PATH_FSTAB
 touch $PATH_FSTAB
-bsdinstall scriptedpart "$PARTITIONS"
+if [ "$ZFSBOOT_DISKS" ]; then
+	bsdinstall zfsboot
+else
+	bsdinstall scriptedpart "$PARTITIONS"
+fi
 bsdinstall mount
 
 # Unpack distributions

Modified: stable/10/usr.sbin/bsdinstall/scripts/services
==============================================================================
--- stable/10/usr.sbin/bsdinstall/scripts/services	Mon Apr 14 21:02:20 2014	(r264471)
+++ stable/10/usr.sbin/bsdinstall/scripts/services	Mon Apr 14 21:04:58 2014	(r264472)
@@ -29,7 +29,8 @@
 : ${DIALOG_OK=0}
 
 if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then
-	eval `sed -e s/YES/on/i -e s/NO/off/i $BSDINSTALL_TMPETC/rc.conf.services`
+	eval $( sed -e s/YES/on/i -e s/NO/off/i \
+		$BSDINSTALL_TMPETC/rc.conf.services )
 else
 	# Default service states. Everything is off if not enabled.
 	sshd_enable="on"
@@ -38,30 +39,29 @@ fi
 echo -n > $BSDINSTALL_TMPETC/rc.conf.services
 
 exec 3>&1
-DAEMONS=$(dialog --backtitle "FreeBSD Installer" \
+DAEMONS=$( dialog --backtitle "FreeBSD Installer" \
     --title "System Configuration" --nocancel --separate-output \
     --checklist "Choose the services you would like to be started at boot:" \
     0 0 0 \
 	sshd	"Secure shell daemon" ${sshd_enable:-off} \
 	moused	"PS/2 mouse pointer on console" ${moused_enable:-off} \
 	ntpd	"Synchronize system and network time" ${ntpd_enable:-off} \
-	powerd	"Adjust CPU frequency dynamically if supported" ${powerd_enable:-off} \
+	powerd	"Adjust CPU frequency dynamically if supported" \
+		${powerd_enable:-off} \
 	dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \
-2>&1 1>&3)
+2>&1 1>&3 )
 exec 3>&-
 
 havedump=
 for daemon in $DAEMONS; do
-	if [ "$daemon" == "dumpdev" ]; then
-		havedump=1
-		echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
-		     'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services
-		echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services
-		continue
-	fi
+	[ "$daemon" = "dumpdev" ] && havedump=1 continue
 	echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services
 done
 
-if [ ! "$havedump" ]; then
+echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
+     'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services
+if [ "$havedump" ]; then
+	echo dumpdev=\"AUTO\" >> $BSDINSTALL_TMPETC/rc.conf.services
+else
 	echo dumpdev=\"NO\" >> $BSDINSTALL_TMPETC/rc.conf.services
 fi


More information about the svn-src-stable mailing list