Date: Mon, 29 Jun 2015 18:56:54 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284938 - stable/10/usr.sbin/freebsd-update Message-ID: <201506291856.t5TIuskV099837@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506291856.t5TIuskV099837>