socsvn commit: r271863 - soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts
kczekirda at FreeBSD.org
kczekirda at FreeBSD.org
Mon Aug 4 19:11:36 UTC 2014
Author: kczekirda
Date: Mon Aug 4 19:11:34 2014
New Revision: 271863
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271863
Log:
flow control when bsdinstall tofile simulation and quotes
Modified:
soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto
soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/services
soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/time
Modified: soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto Mon Aug 4 19:11:28 2014 (r271862)
+++ soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto Mon Aug 4 19:11:34 2014 (r271863)
@@ -74,7 +74,7 @@
for dist in $EXTRA_DISTS; do
export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
done
- [ -n $TOFILE ] && echo "DISTRIBUTIONS=\"$DISTRIBUTIONS\"" >> $TOFILE
+ [ -n "$TOFILE" ] && echo "DISTRIBUTIONS=\"$DISTRIBUTIONS\"" >> "$TOFILE"
fi
FETCH_DISTRIBUTIONS=""
@@ -85,7 +85,7 @@
done
FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space
-if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" -z $TOFILE ]; then
+if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" -z "$TOFILE" ]; then
dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "No installation files were found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0
bsdinstall netconfig || error
NETCONFIG_DONE=yes
@@ -100,8 +100,10 @@
export BSDINSTALL_DISTSITE
fi
-rm -f $PATH_FSTAB
-touch $PATH_FSTAB
+if [ -z "$TOFILE" ]; then
+ rm -f $PATH_FSTAB
+ touch $PATH_FSTAB
+fi
PMODES="\
Guided \"Partitioning Tool (Recommended for Beginners)\" \
@@ -152,7 +154,7 @@
;;
esac
-if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
+if [ ! -z "$FETCH_DISTRIBUTIONS" && -z "$TOFILE" ]; then
ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
# Download to a directory in the new system as scratch space
@@ -174,9 +176,11 @@
export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
fi
-bsdinstall checksum || error
-bsdinstall distextract || error
-bsdinstall rootpass || error
+if [ -z "$TOFILE" ]; then
+ bsdinstall checksum || error
+ bsdinstall distextract || error
+ bsdinstall rootpass || error
+fi
trap true SIGINT # This section is optional
if [ "$NETCONFIG_DONE" != yes ]; then
@@ -240,14 +244,17 @@
finalconfig
trap error SIGINT # SIGINT is bad again
-bsdinstall config || error
+if [ -z "$TOFILE" ]; then
+ bsdinstall config || error
+fi
-if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then
+if [ ! -z "$BSDINSTALL_FETCHDEST" && -z "$TOFILE" ]; then
[ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \
umount "$BSDINSTALL_DISTDIR"
rm -rf "$BSDINSTALL_FETCHDEST"
fi
+if [ -z "$TOFILE" ]; then
dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
--yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0
if [ $? -eq 0 ]; then
@@ -260,6 +267,7 @@
bsdinstall entropy
bsdinstall umount
+fi
f_dprintf "Installation Completed at %s" "$( date )"
Modified: soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/services
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/services Mon Aug 4 19:11:28 2014 (r271862)
+++ soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/services Mon Aug 4 19:11:34 2014 (r271863)
@@ -54,7 +54,7 @@
havedump=
-if [ -z $TOFILE ]; then
+if [ -z "$TOFILE" ]; then
for daemon in $DAEMONS; do
[ "$daemon" = "dumpdev" ] && havedump=1 continue
echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services
@@ -63,7 +63,7 @@
for daemon in $DAEMONS; do
DAEMONLIST="$DAEMONLIST $daemon"
done
- echo "DAEMONS=\"$DAEMONLIST\"" >> $TOFILE
+ echo "DAEMONS=\"$DAEMONLIST\"" >> "$TOFILE"
fi
echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
Modified: soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/time
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/time Mon Aug 4 19:11:28 2014 (r271862)
+++ soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/time Mon Aug 4 19:11:34 2014 (r271863)
@@ -413,7 +413,7 @@
exit 1
;;
$DIALOG_OK)
- echo "TIMEZONE=\"$TIMEZONE\"" >> $TOFILE
+ echo "TIMEZONE=\"$TIMEZONE\"" >> "$TOFILE"
;;
esac
fi
More information about the svn-soc-all
mailing list