diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-02 06:52:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-02 06:52:22 +0000 |
commit | db02946e5f58e282d5056a57d50208022f2fc796 (patch) | |
tree | 7755a8abb9c238d4e6405c546c516a7e2458114c /perl-install/network | |
parent | 16c8467a9f303721a889bf4248ae02ad178fa471 (diff) | |
download | drakx-backup-do-not-use-db02946e5f58e282d5056a57d50208022f2fc796.tar drakx-backup-do-not-use-db02946e5f58e282d5056a57d50208022f2fc796.tar.gz drakx-backup-do-not-use-db02946e5f58e282d5056a57d50208022f2fc796.tar.bz2 drakx-backup-do-not-use-db02946e5f58e282d5056a57d50208022f2fc796.tar.xz drakx-backup-do-not-use-db02946e5f58e282d5056a57d50208022f2fc796.zip |
introduce ->ensure_binary_is_installed and use it
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/drakfirewall.pm | 2 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 2 | ||||
-rw-r--r-- | perl-install/network/network.pm | 6 | ||||
-rw-r--r-- | perl-install/network/nfs.pm | 2 | ||||
-rw-r--r-- | perl-install/network/smb.pm | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/network/drakfirewall.pm b/perl-install/network/drakfirewall.pm index 5ade3db27..6fe4a629c 100644 --- a/perl-install/network/drakfirewall.pm +++ b/perl-install/network/drakfirewall.pm @@ -130,7 +130,7 @@ sub set_ports { my ($in, $disabled, $ports) = @_; my $shorewall = network::shorewall::read($in, 'not_silent') || network::shorewall::default_interfaces($in) or die N("No network card"); if (!$disabled || -x "$::prefix/sbin/shorewall") { - $in->do_pkgs->ensure_is_installed('shorewall', '/sbin/shorewall', $::isInstall) or return; + $in->do_pkgs->ensure_binary_is_installed('shorewall', 'shorewall', $::isInstall) or return; $shorewall->{disabled} = $disabled; $shorewall->{ports} = $$ports; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 1cfa15075..e08914a7e 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -634,7 +634,7 @@ killall pppd post => sub { network::modem::ppp_configure($in, $modem); $netc->{$_} = 'ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE'; - $in->do_pkgs->ensure_is_installed('kdenetwork-kppp', '/usr/bin/kppp'); + $in->do_pkgs->ensure_binary_is_installed('kdenetwork-kppp', 'kppp'); $handle_multiple_cnx->(); }, }, diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 1af6b6a44..06e86155c 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -410,7 +410,7 @@ sub configureNetwork2 { my ($in, $_prefix, $netc, $intf) = @_; my $etc = "$::prefix/etc"; if (!$::testing) { - $netc->{wireless_eth} and $in->do_pkgs->ensure_is_installed('wireless-tools', '/sbin/iwconfig', 'auto'); + $netc->{wireless_eth} and $in->do_pkgs->ensure_binary_is_installed('wireless-tools', 'iwconfig', 'auto'); write_conf("$etc/sysconfig/network", $netc); write_resolv_conf("$etc/resolv.conf", $netc) if ! $netc->{DHCP}; write_interface_conf("$etc/sysconfig/network-scripts/ifcfg-$_->{DEVICE}", $_, $netc, $::prefix) foreach grep { $_->{DEVICE} ne 'ppp0' } values %$intf; @@ -419,8 +419,8 @@ sub configureNetwork2 { any { $_->{BOOTPROTO} eq "dhcp" } values %$intf and $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client'); if ($netc->{ZEROCONF_HOSTNAME}) { - $in->do_pkgs->ensure_is_installed('tmdns', '/sbin/tmdns', 'auto') if !$in->do_pkgs->is_installed('bind'); - $in->do_pkgs->ensure_is_installed('zcip', '/sbin/zcip', 'auto'); + $in->do_pkgs->ensure_binary_is_installed('tmdns', 'tmdns', 'auto') if !$in->do_pkgs->is_installed('bind'); + $in->do_pkgs->ensure_binary_is_installed('zcip', 'zcip', 'auto'); write_zeroconf("$etc/tmdns.conf", $netc->{ZEROCONF_HOSTNAME}); } else { run_program::rooted($::prefix, "chkconfig", "--del", $_) foreach qw(tmdns zcip) } # disable zeroconf any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf and $in->do_pkgs->install('pump'); diff --git a/perl-install/network/nfs.pm b/perl-install/network/nfs.pm index 39faa716e..37dd954e5 100644 --- a/perl-install/network/nfs.pm +++ b/perl-install/network/nfs.pm @@ -29,7 +29,7 @@ sub to_dev_raw { sub check { my ($_class, $in) = @_; - $in->do_pkgs->ensure_is_installed('nfs-utils-clients', '/usr/sbin/showmount') or return; + $in->do_pkgs->ensure_binary_is_installed('nfs-utils-clients', 'showmount') or return; system('/etc/init.d/portmap start') if system('/etc/init.d/portmap status') != 0; 1; } diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm index 2deeb9507..26b61c518 100644 --- a/perl-install/network/smb.pm +++ b/perl-install/network/smb.pm @@ -32,7 +32,7 @@ sub to_dev_raw { sub check { my ($_class, $in) = @_; - $in->do_pkgs->ensure_is_installed('samba-client', '/usr/bin/nmblookup'); + $in->do_pkgs->ensure_binary_is_installed('samba-client', 'nmblookup'); } sub smbclient { |