diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-12-08 19:30:41 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-12-08 19:30:41 +0000 |
commit | c6100257bd23f1b3e4486b7556c647736def600b (patch) | |
tree | 119ba6c19457032d7c0774e81ecfc38963edb00a /distrib/crunch | |
parent | 827d9d54bf141c93a08704b62bf09e69c56c292f (diff) |
Fix & cleanup logic, especially around interrupted installs.
Use value of 'hostname' to store all HOSTNAME and FQDN information. Elminate
those global variables. For install accept user input as is, but if the short
form hostname is unchanged, save any domain info by not re-setting hostname.
For upgrade just set hostname from /tmp/myname.
Unconditionally create default hosts file in install.sh, rather than doing it
in separate places depending on whether or not the user configures the network.
Always ask if the user wants to edit the hosts file when the network is
configured, but without listing it out.
Don't put 'search' command in resolv.conf as we now set hostnames to include
fully qualified domain names, which will be used to yield local domain name.
Loop asking for the default route until the user enters one that 'route'
accepts or the user explicitly asks for no default route by entering 'none'.
Add FQDN info to hosts file just before saving configuration files to the
installed system. Preserve user added lines - those with aliases or with domain
information in the hostname.
Clean up donetconfig() logic. Delete network config files in install.sh so that
if the user restarts an interrupted install previous network configuration does
not leak into installed system.
Elminiate get_resolv_fqdn(), searching resolv.conf for domain info only when
dhcp was used. get_fqdn() is reduced to looking for domain info in current
hostname, and supplying 'my.domain' if none found.
Add save_comments() and use to preserve useful comments in the installed
/etc/hosts and /etc/dhclient.conf files. Previous logic for dhclient.conf could
cause repeated appending of configuration info rather than just preserving the
comments.
Cleanup logic copying files from /tmp to /mnt/etc, eliminating unneeded
cfgfiles variable. Use wildcards and subshells to shrink code size.
Diffstat (limited to 'distrib/crunch')
0 files changed, 0 insertions, 0 deletions