Author: emaste
Date: Tue Sep  5 12:57:45 2017
New Revision: 323178
URL: https://svnweb.freebsd.org/changeset/base/323178

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 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

Modified:
  head/release/amd64/make-memstick.sh
  head/release/i386/make-memstick.sh
  head/release/powerpc/make-memstick.sh

Modified: head/release/amd64/make-memstick.sh
==============================================================================
--- head/release/amd64/make-memstick.sh Tue Sep  5 07:46:45 2017        
(r323177)
+++ head/release/amd64/make-memstick.sh Tue Sep  5 12:57:45 2017        
(r323178)
@@ -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: head/release/i386/make-memstick.sh
==============================================================================
--- head/release/i386/make-memstick.sh  Tue Sep  5 07:46:45 2017        
(r323177)
+++ head/release/i386/make-memstick.sh  Tue Sep  5 12:57:45 2017        
(r323178)
@@ -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: head/release/powerpc/make-memstick.sh
==============================================================================
--- head/release/powerpc/make-memstick.sh       Tue Sep  5 07:46:45 2017        
(r323177)
+++ head/release/powerpc/make-memstick.sh       Tue Sep  5 12:57:45 2017        
(r323178)
@@ -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
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to