summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2015-11-02 22:09:43 +0000
committerdteske <dteske@FreeBSD.org>2015-11-02 22:09:43 +0000
commitf8362e9d6c2c32a66e270955515e43f3048258da (patch)
tree7f1614abd8c3274ca442ba0463478451cefe6cb9 /usr.sbin
parentee854dc81d75c244d3e5e6dcf915075f04254d06 (diff)
downloadFreeBSD-src-f8362e9d6c2c32a66e270955515e43f3048258da.zip
FreeBSD-src-f8362e9d6c2c32a66e270955515e43f3048258da.tar.gz
MFC r287686: Produce meaningful exit code
Diffstat (limited to 'usr.sbin')
-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 b7c61e0..511db67 100755
--- a/usr.sbin/bsdinstall/scripts/hostname
+++ b/usr.sbin/bsdinstall/scripts/hostname
@@ -44,6 +44,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