From ba62d50979ab443a94709dba6381b4e587e8362e Mon Sep 17 00:00:00 2001 From: dteske Date: Mon, 14 Apr 2014 21:04:58 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/10@264472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/bsdinstall/scripts/script | 6 +++++- usr.sbin/bsdinstall/scripts/services | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script index 84765c9ab..19cd39266 100755 --- a/usr.sbin/bsdinstall/scripts/script +++ b/usr.sbin/bsdinstall/scripts/script @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 3297407e1..54c501861 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -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 -- 2.45.0