diff options
author | dteske <dteske@FreeBSD.org> | 2015-09-11 20:56:36 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2015-09-11 20:56:36 +0000 |
commit | 5e54510dd089ed7e457d5b3023120c64850909f4 (patch) | |
tree | 629d7e67291d57f08ada3fda9473c1ddcee2002e /usr.sbin/bsdinstall/scripts/hostname | |
parent | 5bd4f328a6bffcd82dae596dbeb25399f32cb3c3 (diff) | |
download | FreeBSD-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/scripts/hostname')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/hostname | 5 |
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 |