summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/auto
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-03-28 02:37:05 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-03-28 02:37:05 +0000
commitaf2e1861d25e1557b93f5e64a5585b525957e975 (patch)
tree8f8b996ca6cf29f69f9ad59537831cffa6ee3be3 /usr.sbin/bsdinstall/scripts/auto
parentaec80ebc2148e5a65e310340b3709c5e26166735 (diff)
downloadFreeBSD-src-af2e1861d25e1557b93f5e64a5585b525957e975.zip
FreeBSD-src-af2e1861d25e1557b93f5e64a5585b525957e975.tar.gz
Improve error handling.
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/auto')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index 8e28862..99c20a9 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -29,14 +29,14 @@
echo "Begun Installation at $(date)" > $BSDINSTALL_LOG
error() {
+ test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR
+ test -f $PATH_FSTAB && bsdinstall umount
dialog --backtitle "FreeBSD Installer" --title "Abort" \
--no-label "Exit" --yes-label "Restart" --yesno \
"An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0
if [ $? -ne 0 ]; then
exit
else
- test -n $DISTDIR_IS_UNIONFS && umount -f $BSDINSTALL_DISTDIR
- test -f $PATH_FSTAB && bsdinstall umount
exec $0
fi
}
@@ -81,7 +81,7 @@ if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then
NETCONFIG_DONE=yes
fi
-if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then
+if [ -n "$FETCH_DISTRIBUTIONS" ]; then
exec 3>&1
BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3`
MIRROR_BUTTON=$?
@@ -125,8 +125,7 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
# Try to use any existing distfiles
- if [ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != \
- "$ALL_DISTRIBUTIONS" ]; then
+ if [ -d $BSDINSTALL_DISTDIR ]; then
DISTDIR_IS_UNIONFS=1
mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
fi
OpenPOWER on IntegriCloud