summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-16 13:29:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-16 13:29:19 +0000
commit2ff8d37f7c51c03e37638c37e030e060d2c34669 (patch)
treec72f5c3597f86bd98cde9765692820dc4af7b89e /perl-install/network
parente78fb4780e2059e155ec011dbefe71dd665cf7be (diff)
downloaddrakx-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar
drakx-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.gz
drakx-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.bz2
drakx-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.xz
drakx-2ff8d37f7c51c03e37638c37e030e060d2c34669.zip
replace occurences of "$foo ? $foo : $bar" with "$foo || $bar"
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm4
-rw-r--r--perl-install/network/network.pm2
-rw-r--r--perl-install/network/tools.pm2
3 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index e33096aac..b02c5b05e 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -351,7 +351,7 @@ ADSLLogin=$adsl->{login}
"DOMAINNAME2=$netc->{DOMAINNAME2}" if $conf{adsl};
output_with_perm("$prefix/etc/sysconfig/network-scripts/drakconnect_conf", 0600, $str);
- my $a = $netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default";
+ my $a = $netcnx->{PROFILE} || "default";
cp_af("$prefix/etc/sysconfig/network-scripts/drakconnect_conf", "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $a);
chmod 0600, "$prefix/etc/sysconfig/network-scripts/drakconnect_conf";
chmod 0600, "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $a;
@@ -407,7 +407,7 @@ sub add_profile {
my ($netcnx, $profile) = @_;
$profile or return;
$profile eq "default" and return;
- my $cmd1 = "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . ($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
+ my $cmd1 = "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . ($netcnx->{PROFILE} || "default");
my $cmd2 = "$prefix/etc/sysconfig/network-scripts/drakconnect_conf." . $profile;
cp_af($cmd1, $cmd2);
}
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 49d32a2bb..870f5f7e6 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -476,7 +476,7 @@ sub configureNetwork2 {
add2hosts("$etc/hosts", $netc->{HOSTNAME}, map { $_->{IPADDR} } values %$intf);
if (any { $_->{BOOTPROTO} =~ /^(dhcp)$/ } values %$intf) {
- $in->do_pkgs->install($netc->{dhcp_client} ? $netc->{dhcp_client} : 'dhcp-client');
+ $in->do_pkgs->install($netc->{dhcp_client} || 'dhcp-client');
}
if (any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %$intf) {
$in->do_pkgs->install('pump');
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 489e0d966..3d75a3073 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -36,7 +36,7 @@ sub write_secret_backend {
sub unquotify {
my ($word) = @_;
my ($a, $b, $c) = $$word =~ /"(.*)"|'(.*)'|(.*)/;
- $$word = $a ? $a : $b ? $b : $c;
+ $$word = $a || $b || $c;
}
sub read_secret_backend {