Date: Tue, 12 Sep 2017 00:44:16 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323476 - in stable/11/release: amd64 arm64 i386 powerpc Message-ID: <201709120044.v8C0iGVL022114@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Tue Sep 12 00:44:16 2017 New Revision: 323476 URL: https://svnweb.freebsd.org/changeset/base/323476 Log: make-memstick.sh: use 'set -e' to abort if any step fails Also remove the now-redundant error handling that was only for makefs. This script was run on an older FreeBSD host that lacked efi-on-mbr support in makefs. A warning was emitted on the console (from makefs) but the script continued running and exited with 0. MFC of r308171 (arm64) and r323178 (other architectures). Modified: stable/11/release/amd64/make-memstick.sh stable/11/release/arm64/make-memstick.sh stable/11/release/i386/make-memstick.sh stable/11/release/powerpc/make-memstick.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/release/amd64/make-memstick.sh ============================================================================== --- stable/11/release/amd64/make-memstick.sh Tue Sep 12 00:26:56 2017 (r323475) +++ stable/11/release/amd64/make-memstick.sh Tue Sep 12 00:44:16 2017 (r323476) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -31,10 +33,6 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local makefs -B little -o label=FreeBSD_Install ${2}.part ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: stable/11/release/arm64/make-memstick.sh ============================================================================== --- stable/11/release/arm64/make-memstick.sh Tue Sep 12 00:26:56 2017 (r323475) +++ stable/11/release/arm64/make-memstick.sh Tue Sep 12 00:44:16 2017 (r323476) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -31,10 +33,6 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local makefs -B little -o label=FreeBSD_Install ${2}.part ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: stable/11/release/i386/make-memstick.sh ============================================================================== --- stable/11/release/i386/make-memstick.sh Tue Sep 12 00:26:56 2017 (r323475) +++ stable/11/release/i386/make-memstick.sh Tue Sep 12 00:44:16 2017 (r323476) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -31,10 +33,6 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local makefs -B little -o label=FreeBSD_Install ${2}.part ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: stable/11/release/powerpc/make-memstick.sh ============================================================================== --- stable/11/release/powerpc/make-memstick.sh Tue Sep 12 00:26:56 2017 (r323475) +++ stable/11/release/powerpc/make-memstick.sh Tue Sep 12 00:44:16 2017 (r323476) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -36,10 +38,6 @@ echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fsta echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local rm -f ${tempfile} makefs -B big ${tempfile} ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709120044.v8C0iGVL022114>