From 207f9157cddd883414321b1a3d17b433e6c6ec26 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 24 Mar 1995 00:23:18 +0000 Subject: [PATCH] Set hostname properly in /etc/sysconfig --- release/scripts/netinst.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release/scripts/netinst.sh b/release/scripts/netinst.sh index 04228c87079f..ceba14b23043 100644 --- a/release/scripts/netinst.sh +++ b/release/scripts/netinst.sh @@ -10,7 +10,7 @@ # putting your name on top after doing something trivial like reindenting # it, just to make it look like you wrote it!). # -# $Id: netinst.sh,v 1.4 1995/02/02 04:13:22 jkh Exp $ +# $Id: netinst.sh,v 1.5 1995/03/18 08:04:18 phk Exp $ if [ "${_NETINST_SH_LOADED_}" = "yes" ]; then return 0 @@ -48,7 +48,8 @@ network_basic_setup() HOSTNAME=${ANSWER} fi done - echo ${HOSTNAME} > ${ETC}/myname + sed -e "s/hostname=.\*\$/hostname=${HOSTNAME}/" < etc/sysconfig \ + > etc/sysconfig.new && mv etc/sysconfig.new etc/sysconfig ${HOSTNAME_CMD} ${HOSTNAME} DEFAULT_VALUE=`echo ${HOSTNAME} | sed -e 's/[^.]*\.//'`