svn commit: r217259 - user/nwhitehorn/bsdinstall/scripts
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Jan 11 06:07:36 UTC 2011
Author: nwhitehorn
Date: Tue Jan 11 06:07:36 2011
New Revision: 217259
URL: http://svn.freebsd.org/changeset/base/217259
Log:
Unmount mounted filesystems if the installation is aborted and restarted
after filesystems have been initialized and mounted. This prevents the
installer from becoming confused.
Added:
user/nwhitehorn/bsdinstall/scripts/umount
- copied, changed from r217257, user/nwhitehorn/bsdinstall/scripts/mount
Modified:
user/nwhitehorn/bsdinstall/scripts/Makefile
user/nwhitehorn/bsdinstall/scripts/auto
user/nwhitehorn/bsdinstall/scripts/mount
Modified: user/nwhitehorn/bsdinstall/scripts/Makefile
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/Makefile Tue Jan 11 05:49:03 2011 (r217258)
+++ user/nwhitehorn/bsdinstall/scripts/Makefile Tue Jan 11 06:07:36 2011 (r217259)
@@ -1,6 +1,7 @@
# $FreeBSD $
-SCRIPTS= auto adduser config hostname mount netconfig rootpass services time
+SCRIPTS= auto adduser config hostname mount netconfig rootpass services time \
+ umount
BINDIR= /usr/libexec/bsdinstall
NO_MAN= true
Modified: user/nwhitehorn/bsdinstall/scripts/auto
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/auto Tue Jan 11 05:49:03 2011 (r217258)
+++ user/nwhitehorn/bsdinstall/scripts/auto Tue Jan 11 06:07:36 2011 (r217259)
@@ -9,6 +9,7 @@ error() {
if [ $? -ne 0 ]; then
exit
else
+ test -f $PATH_FSTAB && bsdinstall umount
exec $0
fi
}
Modified: user/nwhitehorn/bsdinstall/scripts/mount
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/mount Tue Jan 11 05:49:03 2011 (r217258)
+++ user/nwhitehorn/bsdinstall/scripts/mount Tue Jan 11 06:07:36 2011 (r217259)
@@ -25,5 +25,5 @@ for i in $FILESYSTEMS; do
done
# User might want a shell and require devfs, so mount it
-mkdir $BSDINSTALL_CHROOT/dev
+mkdir $BSDINSTALL_CHROOT/dev 2>/dev/null
mount -t devfs devfs $BSDINSTALL_CHROOT/dev
Copied and modified: user/nwhitehorn/bsdinstall/scripts/umount (from r217257, user/nwhitehorn/bsdinstall/scripts/mount)
==============================================================================
--- user/nwhitehorn/bsdinstall/scripts/mount Tue Jan 11 05:22:31 2011 (r217257, copy source)
+++ user/nwhitehorn/bsdinstall/scripts/umount Tue Jan 11 06:07:36 2011 (r217259)
@@ -12,18 +12,5 @@ cat $PATH_FSTAB | awk -v BSDINSTALL_CHRO
}
}' > $TMP_FSTAB
-FILESYSTEMS=`cat $TMP_FSTAB | awk '/^[^#].*/ {if ($2 ~ "^/.*") printf("%s\n", $2);}' | sort -t /`
-
-for i in $FILESYSTEMS; do
- mkdir -p $i 2>/dev/null
- MNTERROR=`mount -F $TMP_FSTAB $i 2>&1`
- if [ $? -ne 0 ]; then
- cdialog --backtitle "FreeBSD Installer" --title "Error" \
- --msgbox "Error mounting partition $i:\n$MNTERROR" 0 0
- exit 1
- fi
-done
-
-# User might want a shell and require devfs, so mount it
-mkdir $BSDINSTALL_CHROOT/dev
-mount -t devfs devfs $BSDINSTALL_CHROOT/dev
+umount $BSDINSTALL_CHROOT/dev 2>/dev/null
+umount -F $TMP_FSTAB -a 2>/dev/null
More information about the svn-src-user
mailing list