summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/network/netconnect.pm8
-rwxr-xr-xperl-install/standalone/drakgw5
2 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 7d7464872..7474b9b66 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -370,7 +370,7 @@ sub save_conf {
"SystemName=" . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
DomainName=" . do { $netc->{HOSTNAME} =~ /\.(.*)/; $1 } . "
InternetAccessType=" . do { if ($netcnx->{type}) { $netcnx->{type} } else { $netc->{GATEWAY} ? "lan" : "" } } . "
-InternetInterface=" . ($netc->{GATEWAY} && (!$netcnx->{type} || $netcnx->{type} eq 'lan') ? $netc->{NET_DEVICE} : $netcnx->{NET_INTERFACE}) . "
+InternetInterface=" . ($netc->{GATEWAY} && (!$netcnx->{type} || $netcnx->{type} eq 'lan') ? $netc->{GATEWAYDEV} : $netcnx->{NET_INTERFACE}) . "
InternetGateway=$netc->{GATEWAY}
DNSPrimaryIP=$netc->{dnsServer}
DNSSecondaryIP=$netc->{dnsServer2}
@@ -594,14 +594,14 @@ sub load_conf {
#- ensures the migration from old config files
sub read_raw_net_conf {
my ($suffix) = @_;
- my $dir = "$::prefix/etc/sysconfig";
+ my $dir = "$::prefix/etc/sysconfig/network-scripts";
$suffix = $suffix ? ".$suffix" : '';
rename "$dir/draknet$suffix", "$dir/drakconnect$suffix";
- getVarsFromSh("$dir/drakconnect$suffix");
+ getVarsFromSh("$dir/drakconnect_conf");
}
sub get_net_device {
- ${{ read_raw_net_conf() }}{NET_DEVICE};
+ ${{ read_raw_net_conf() }}{InternetInterface};
}
sub read_net_conf {
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 6362d11fa..0e66b15b4 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -89,7 +89,7 @@ sub start_daemons ()
sys("/etc/rc.d/init.d/network restart");
$netmon_need_start and system("$netmon --connect --force --quiet >/dev/null");
- sys("/etc/init.d/shorewall start");
+ sys("/etc/init.d/shorewall restart");
sys("/etc/rc.d/init.d/$_ start"), sys("/sbin/chkconfig --level 345 $_ on") foreach 'named', 'dhcpd', 'shorewall';
sys("/etc/rc.d/init.d/cups start") if $cups_used;
@@ -98,9 +98,10 @@ sub start_daemons ()
sub stop_daemons ()
{
standalone::explanations("Stopping daemons");
- foreach (qw(dhcpd named shorewall)) {
+ foreach (qw(dhcpd named)) {
system("/etc/rc.d/init.d/$_ status >/dev/null 2>/dev/null") == 0 and sys("/etc/rc.d/init.d/$_ stop");
}
+ system("/etc/rc.d/init.d/shorewall status >/dev/null 2>/dev/null") == 0 and sys("/etc/rc.d/init.d/shorewall clear");
sys("/sbin/chkconfig --level 345 $_ off") foreach 'named', 'dhcpd';
}