aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-09-05 12:57:45 +0000
committerEd Maste <emaste@FreeBSD.org>2017-09-05 12:57:45 +0000
commit708c2585e3d801be8c3ba5e6a712fcb667bc7673 (patch)
treef921021bc3bb90dc27adf914814ac75a543edd08
parent733ba7f881784dc588a317e29e78c9cff759eb08 (diff)
downloadsrc-708c2585e3d801be8c3ba5e6a712fcb667bc7673.tar.gz
src-708c2585e3d801be8c3ba5e6a712fcb667bc7673.zip
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 change applies arm64's r308171 to the other make-memstick.sh versions. Reviewed by: gjb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12195
Notes
Notes: svn path=/head/; revision=323178
-rwxr-xr-xrelease/amd64/make-memstick.sh6
-rwxr-xr-xrelease/i386/make-memstick.sh6
-rwxr-xr-xrelease/powerpc/make-memstick.sh6
3 files changed, 6 insertions, 12 deletions
diff --git a/release/amd64/make-memstick.sh b/release/amd64/make-memstick.sh
index 52e17cc97b5f..64edb733c43d 100755
--- a/release/amd64/make-memstick.sh
+++ b/release/amd64/make-memstick.sh
@@ -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
diff --git a/release/i386/make-memstick.sh b/release/i386/make-memstick.sh
index f824382ec4b0..c8f6f13de6cf 100755
--- a/release/i386/make-memstick.sh
+++ b/release/i386/make-memstick.sh
@@ -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
diff --git a/release/powerpc/make-memstick.sh b/release/powerpc/make-memstick.sh
index 3c1cfa400746..92f27a23e194 100755
--- a/release/powerpc/make-memstick.sh
+++ b/release/powerpc/make-memstick.sh
@@ -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/fstab
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