summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2015-09-11 20:56:36 +0000
committerdteske <dteske@FreeBSD.org>2015-09-11 20:56:36 +0000
commit5e54510dd089ed7e457d5b3023120c64850909f4 (patch)
tree629d7e67291d57f08ada3fda9473c1ddcee2002e /usr.sbin/bsdinstall
parent5bd4f328a6bffcd82dae596dbeb25399f32cb3c3 (diff)
downloadFreeBSD-src-5e54510dd089ed7e457d5b3023120c64850909f4.zip
FreeBSD-src-5e54510dd089ed7e457d5b3023120c64850909f4.tar.gz
Produce meaningful exit code
MFC after: 3 days X-MFC-to: stable/10
Diffstat (limited to 'usr.sbin/bsdinstall')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/hostname5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/hostname b/usr.sbin/bsdinstall/scripts/hostname
index a53fd80..5418dad 100755
--- a/usr.sbin/bsdinstall/scripts/hostname
+++ b/usr.sbin/bsdinstall/scripts/hostname
@@ -43,6 +43,9 @@ if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
exec 3>&-
echo "hostname=\"$HOSTNAME\"" > $BSDINSTALL_TMPETC/rc.conf.hostname
-if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
+retval=$?
+if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
hostname -s "$HOSTNAME"
+ retval=$?
fi
+exit $retval
OpenPOWER on IntegriCloud