Date: Thu, 31 Aug 2017 09:50:13 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 221951] hostname does not update /etc/rc.conf with new hostname Message-ID: <bug-221951-7@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221951 Bug ID: 221951 Summary: hostname does not update /etc/rc.conf with new hostname Product: Base System Version: 11.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: tarjei@online.no When I change the hostname of a server using "hostname NewHostName", the hostname entry in /etc/rc.conf is not updated to reflect the new name. This is likely to be highly confusing to both newbies and users with no previous experience with this behaviour. The script fragment below will do the job. And it might be executed from the hostname program, but it might not be paranoid enough since it contains no error detection. nl=$'\n' rcCont=`grep -v "^hostname=" /etc/rc.conf` rcCont="${rcCont}${nl}hostname=\"NewHostName\"${nl}" echo "${rcCont}" > /etc/rc.conf -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221951-7>
