svn commit: r284938 - stable/10/usr.sbin/freebsd-update
Xin LI
delphij at FreeBSD.org
Mon Jun 29 18:56:54 UTC 2015
Author: delphij
Date: Mon Jun 29 18:56:53 2015
New Revision: 284938
URL: https://svnweb.freebsd.org/changeset/base/284938
Log:
MFC r274630,r274653 (feld):
Add logic for detecting non-persistent filesystems being utilized by
workdir which would break the upgrade process upon reboot.
Currently we check for tmpfs and md.
Modified:
stable/10/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:51:08 2015 (r284937)
+++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Jun 29 18:56:53 2015 (r284938)
@@ -603,6 +603,7 @@ fetchupgrade_check_params () {
_KEYPRINT_z="Key must be given via -k option or configuration file."
_KEYPRINT_bad="Invalid key fingerprint: "
_WORKDIR_bad="Directory does not exist or is not writable: "
+ _WORKDIR_bad2="Directory is not on a persistent filesystem: "
if [ -z "${SERVERNAME}" ]; then
echo -n "`basename $0`: "
@@ -626,6 +627,13 @@ fetchupgrade_check_params () {
echo ${WORKDIR}
exit 1
fi
+ case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*)
+ echo -n "`basename $0`: "
+ echo -n "${_WORKDIR_bad2}"
+ echo ${WORKDIR}
+ exit 1
+ ;;
+ esac
chmod 700 ${WORKDIR}
cd ${WORKDIR} || exit 1
More information about the svn-src-stable
mailing list