mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Include hostname config files in backups
This commit is contained in:
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -285,6 +285,11 @@ else {
|
||||
return @rv;
|
||||
}
|
||||
|
||||
sub network_config_files
|
||||
{
|
||||
return ( "/etc/HOSTNAME", $network_config );
|
||||
}
|
||||
|
||||
sub routing_input
|
||||
{
|
||||
local (%conf, @st, @hr, %sysctl);
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user