summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-08 00:41:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-08 00:41:59 +0000
commit909309f431897fa7a6601d58a45590157323d2e1 (patch)
treee59fd497df5da78c640c3de017f850f3570ee138 /perl-install/standalone
parent2bda801375131eadb2c2b24546f42cef39d14ec9 (diff)
downloaddrakx-backup-do-not-use-909309f431897fa7a6601d58a45590157323d2e1.tar
drakx-backup-do-not-use-909309f431897fa7a6601d58a45590157323d2e1.tar.gz
drakx-backup-do-not-use-909309f431897fa7a6601d58a45590157323d2e1.tar.bz2
drakx-backup-do-not-use-909309f431897fa7a6601d58a45590157323d2e1.tar.xz
drakx-backup-do-not-use-909309f431897fa7a6601d58a45590157323d2e1.zip
it's better to warn package installation failure in ensure_is_installed than each callers (bugzilla #17251)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakgw20
1 files changed, 4 insertions, 16 deletions
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 5fcbe5f3c..bccf75c24 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -213,10 +213,7 @@ I am about to setup your Local Area Network with that adapter.", format_interfac
$dhcpd_conf->{domain_name_servers}[0] eq $lan_intf->{IPADDR} or return 0;
!$use_caching_dns || $::testing and return 0;
#- install a caching name server if the specified DNS is the gateway
- unless ($in->do_pkgs->ensure_is_installed('caching-nameserver', '/var/named/named.local')) {
- $in->ask_warn(N("Error"), N("Could not install the %s package!", 'caching-nameserver'));
- return 1;
- }
+ $in->do_pkgs->ensure_is_installed('caching-nameserver', '/var/named/named.local') or return 1;
0;
},
post => sub {
@@ -254,10 +251,7 @@ If you do not know the meaning of an option, simply leave it as it is."),
},
complete => sub {
!$use_dhcpd || $::testing and return 0;
- unless ($in->do_pkgs->ensure_is_installed('dhcp-server', '/usr/sbin/dhcpd')) {
- $in->ask_warn(N("Error"), N("Could not install the %s package!", 'dhcp-server'));
- return 1;
- }
+ $in->do_pkgs->ensure_is_installed('dhcp-server', '/usr/sbin/dhcpd') or return 1;
0;
},
post => sub {
@@ -288,10 +282,7 @@ If you do not know the meaning of an option, simply leave it as it is."),
},
complete => sub {
!$use_caching_proxy || $::testing and return 0;
- unless ($in->do_pkgs->ensure_is_installed('squid', '/usr/sbin/squid')) {
- $in->ask_warn(N("Error"), N("Could not install the %s package!", 'squid'));
- return 1;
- }
+ $in->do_pkgs->ensure_is_installed('squid', '/usr/sbin/squid') or return 1;
0;
},
post => sub {
@@ -390,10 +381,7 @@ sub gw_configure() {
N("Warning! An existing firewalling configuration has been detected. You may need some manual fixes after installation."));
}
- unless ($in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall')) {
- $in->ask_warn(N("Error"), N("Could not install the %s package!", 'shorewall'));
- $in->exit(-1);
- }
+ $in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall') or $in->exit(-1);
my $_wait_configuring = $in->wait_message(N("Configuring..."),
N("Configuring firewall..."));