Red Hat Bugzilla – Bug 71516
rc.sysinit doesn't reset hostname if /.unconfigured is present
Last modified: 2014-03-16 22:30:01 EDT
I install machines with kickstart and touch /.unconfigured in the kickstart
post, there is no option to set my hostname (even though your script actually
resets it from the value of HOSTNAME at the end, but nothing changes that)
Something more fancy than this would be nice:
(there isn't a text mode "change your hostname" tool, is there?)
--- /etc/rc.d/rc.sysinit.redhat Tue Aug 13 18:00:32 2002
+++ rc.sysinit.local Wed Aug 14 10:27:28 2002
@@ -568,6 +568,11 @@
# Configure machine if necessary.
if [ -f /.unconfigured ]; then
+ echo "Please type the new hostname (fully qualified name: server.domain.tld)"
+ read HOSTNAME
+ perl -p -i -e "s/^HOSTNAME=.*/HOSTNAME=$HOSTNAME/" /etc/sysconfig/network
+ perl -p -i -e "s/^127.0.0.1.*/127.0.0.1 $HOSTNAME localhost/"
Closing bugs on older, no longer supported, releases. Apologies for any lack of
If this persists on a current release, such as Fedora Core 4, please open a new bug.