summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakgw
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/drakgw')
-rwxr-xr-xperl-install/standalone/drakgw12
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index cd0fdc7e3..4cf70cc1f 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -62,8 +62,9 @@ $in->isa('interactive::gtk') and $::isWizard = 1;
sub sys { system(@_) == 0 or log::l("[drakgw] Warning, sys failed for $_[0]") }
sub outpend {
- log::explanations("modified file $_[0]");
- my $f = shift; local *F; open F, ">>$f" or die "outpend in file $f failed: $!\n"; print F foreach @_;
+ my $f = shift;
+ log::explanations("modified file $f");
+ append_to_file($f, @_);
}
sub start_daemons () {
@@ -139,7 +140,7 @@ What would you like to do?"),
substInFile {
s/#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/REDIRECT\tloc\t$squid_port\ttcp\twww\t-\nACCEPT\tfw\tnet\ttcp\twww\n#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/;
} "/etc/shorewall/rules";
- run_program::rooted($::prefix, 'chkconfig', '--add', 'shorewall');
+ run_program::run('chkconfig', '--add', 'shorewall');
run_program::run('service', '>', '/dev/null', 'shorewall', 'restart') if $::isStandalone;
}
log::l("[drakgw] Enabled");
@@ -210,7 +211,8 @@ my %aliased_devices;
my $card_netconnect = network::netconnect::get_net_device() || "eth0";
defined $card_netconnect and log::l("[drakgw] Information from netconnect: ignore card $card_netconnect");
-my @all_cards = network::ethernet::get_eth_cards();
+my $modules_conf = modules::any_conf->read;
+my @all_cards = network::ethernet::get_eth_cards($modules_conf);
my %net_devices = network::ethernet::get_eth_cards_names(@all_cards);
put_in_hash(\%net_devices, { 'ppp+' => 'ppp+', 'ippp+' => 'ippp+' });
@@ -585,7 +587,7 @@ print "add rules entries\n";
substInFile {
s/#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/REDIRECT\tloc\t$squid_port\ttcp\twww\t-\nACCEPT\tfw\tnet\ttcp\twww\n#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/;
} "/etc/shorewall/rules";
-run_program::rooted($::prefix, 'chkconfig', '--add', 'shorewall');
+run_program::run('chkconfig', '--add', 'shorewall');
run_program::run('service', '>', '/dev/null', 'shorewall', 'restart') if $::isStandalone;
#- bye-bye message