diff --git a/net/CHANGELOG b/net/CHANGELOG index 62cd6a73b..2b6b546bd 100644 --- a/net/CHANGELOG +++ b/net/CHANGELOG @@ -54,3 +54,4 @@ On Debian systems, if the dns-nameservers option is defined in /etc/network/inte Updated bonding support to use the new format in Debian 5.0, thanks to Caspar Smit. ---- Changes since 1.500 ---- Added a field for editing the MAC address to apply at boot time on Redhat and Debian-based systems. +Include hostname configuration files in backups, thanks to Caspar Smit. diff --git a/net/backup_config.pl b/net/backup_config.pl index 47aef362d..f604f08ce 100755 --- a/net/backup_config.pl +++ b/net/backup_config.pl @@ -6,11 +6,17 @@ do 'net-lib.pl'; sub backup_config_files { local @rv = ( $config{'hosts_file'} ); +if ($config{'ipnodes_file'}) { + push(@rv, $config{'ipnodes_file'}); + } local $dns = &get_dns_config(); push(@rv, @{$dns->{'files'}}); if (defined(&routing_config_files)) { push(@rv, &routing_config_files()); } +if (defined(&network_config_files)) { + push(@rv, &network_config_files()); + } push(@rv, map { $_->{'file'} } &boot_interfaces()); return &unique(@rv); } diff --git a/net/debian-linux-lib.pl b/net/debian-linux-lib.pl index f88af97b8..8ee6e4088 100755 --- a/net/debian-linux-lib.pl +++ b/net/debian-linux-lib.pl @@ -427,6 +427,11 @@ sub routing_config_files return ( $network_interfaces_config ); } +sub network_config_files +{ +return ( "/etc/hostname", "/etc/HOSTNAME", "/etc/mailname" ); +} + # show default router and device sub routing_input { diff --git a/net/redhat-linux-lib.pl b/net/redhat-linux-lib.pl index f48a546a6..7eb4ddeb0 100755 --- a/net/redhat-linux-lib.pl +++ b/net/redhat-linux-lib.pl @@ -285,6 +285,11 @@ else { return @rv; } +sub network_config_files +{ +return ( "/etc/HOSTNAME", $network_config ); +} + sub routing_input { local (%conf, @st, @hr, %sysctl); diff --git a/net/solaris-lib.pl b/net/solaris-lib.pl index 3c3d3d727..7834789a3 100755 --- a/net/solaris-lib.pl +++ b/net/solaris-lib.pl @@ -346,6 +346,11 @@ sub routing_config_files return ( "/etc/defaultrouter", "/etc/notrouter", "/etc/gateways" ); } +sub network_config_files +{ +return ( "/etc/nodename" ); +} + # get_defaultrouters() # Returns a list of all default routers sub get_defaultrouters