summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/Xconfig/card.pm2
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm2
-rw-r--r--perl-install/any.pm13
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/bootlook.pm36
-rw-r--r--perl-install/commands.pm20
-rw-r--r--perl-install/detect_devices.pm24
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/diskdrake/hd_gtk.pm6
-rw-r--r--perl-install/diskdrake/interactive.pm8
-rw-r--r--perl-install/fsedit.pm6
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_any.pm6
-rw-r--r--perl-install/install_gtk.pm10
-rw-r--r--perl-install/install_interactive.pm6
-rw-r--r--perl-install/install_steps.pm9
-rw-r--r--perl-install/install_steps_gtk.pm14
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/interactive.pm6
-rw-r--r--perl-install/interactive/gtk.pm6
-rw-r--r--perl-install/interactive/stdio.pm4
-rw-r--r--perl-install/keyboard.pm6
-rw-r--r--perl-install/lang.pm6
-rw-r--r--perl-install/log.pm8
-rw-r--r--perl-install/modules.pm4
-rw-r--r--perl-install/mouse.pm14
-rw-r--r--perl-install/my_gtk.pm56
-rw-r--r--perl-install/network/adsl.pm2
-rw-r--r--perl-install/network/ethernet.pm4
-rw-r--r--perl-install/network/isdn.pm8
-rw-r--r--perl-install/network/isdn_consts.pm104
-rw-r--r--perl-install/network/netconnect.pm24
-rw-r--r--perl-install/network/network.pm6
-rw-r--r--perl-install/network/smb.pm2
-rw-r--r--perl-install/network/tools.pm4
-rw-r--r--perl-install/partition_table.pm4
-rw-r--r--perl-install/partition_table/raw.pm2
-rw-r--r--perl-install/pkgs.pm10
-rw-r--r--perl-install/printer.pm18
-rw-r--r--perl-install/printerdrake.pm50
-rw-r--r--perl-install/raid.pm8
-rw-r--r--perl-install/resize_fat/directory.pm2
-rw-r--r--perl-install/resize_fat/fat.pm2
-rw-r--r--perl-install/services.pm18
-rw-r--r--perl-install/swap.pm10
45 files changed, 279 insertions, 281 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 48d40e999..0b2b6c868 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -339,7 +339,7 @@ sub xfree_and_glx_choose {
my $tc =
$auto ? $choices[0] :
$in->ask_from_listf(_("XFree configuration"),
- formatAlaTeX(join("\n\n\n", (grep {$_} map { $_->{more_messages} } @choices),
+ formatAlaTeX(join("\n\n\n", (grep { $_ } map { $_->{more_messages} } @choices),
_("Which configuration of XFree do you want to have?"))),
sub { $_[0]{text} }, \@choices) or return;
log::l("Using $tc->{text}");
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 3cec7cbf9..f78509e01 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -239,7 +239,7 @@ sub choose_gtk {
gtkpack2__(new Gtk::VBox(0, 15),
$pixmap_mo,
gtkpack2(new Gtk::HBox(0,0),
- create_packtable({ col_spacings => 5, row_spacings => 5},
+ create_packtable({ col_spacings => 5, row_spacings => 5 },
[ $x_res_combo = new Gtk::Combo, new Gtk::Label("")],
[ $depth_combo = new Gtk::Combo, gtkadd(gtkset_shadow_type(new Gtk::Frame, 'etched_out'), $pix_colors) ],
),
diff --git a/perl-install/any.pm b/perl-install/any.pm
index fe9c4605c..6f59fc248 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -319,8 +319,7 @@ if (arch() !~ /ppc/) {
{ label => _("Default"), val => \$default, type => 'bool' },
);
} else {
- @l = ({ label => _("Label"), val => \$e->{label}, list=> ['macos', 'macosx', 'darwin'] },
- @l );
+ unshift @l, { label => _("Label"), val => \$e->{label}, list => ['macos', 'macosx', 'darwin'] };
if ($e->{type} eq "image") {
@l = ({ label => _("Label"), val => \$e->{label} },
$::expert ? @l[1..4] : (@l[1..2], { label => _("Append"), val => \$e->{append} }) ,
@@ -541,7 +540,7 @@ END
my @l = cat_($secrets);
my $replaced = 0;
do { $replaced ||= 1
- if s/^\s*"?$toreplace{login}"?\s+ppp0\s+(\S+)/"$toreplace{login}" ppp0 "$toreplace{passwd}"/; } foreach @l;
+ if s/^\s*"?$toreplace{login}"?\s+ppp0\s+(\S+)/"$toreplace{login}" ppp0 "$toreplace{passwd}"/ } foreach @l;
if ($replaced) {
local *F;
open F, ">$secrets" or die "Can't open $secrets: $!";
@@ -700,7 +699,7 @@ sub load_module__ask_options {
if (@$parameters) {
$in->ask_from('',
_("You may now provide its options to module %s.\nNote that any address should be entered with the prefix 0x like '0x123'", $module_descr),
- [ map {; { label => $_->[0], help => $_->[1], val => \$_->[2] } } @$parameters ],
+ [ map { { label => $_->[0], help => $_->[1], val => \$_->[2] } } @$parameters ],
) or return;
map { if_($_->[2], "$_->[0]=$_->[2]") } @$parameters;
} else {
@@ -792,7 +791,7 @@ sub ask_users {
}
},
complete => $verif,
- canceled => sub { $u->{name} ? &$verif : 0; },
+ canceled => sub { $u->{name} ? &$verif : 0 },
} }, [
{ label => _("Real name"), val => \$u->{realname} },
{ label => _("User name"), val => \$u->{name} },
@@ -803,7 +802,7 @@ sub ask_users {
{ label => _("Icon"), val => \ ($u->{icon} ||= 'man'), list => \@icons, icon2f => sub { face2png($_[0], $prefix) }, format => \&translate },
),
if_($security > 3,
- map {;
+ map {
{ label => $_, val => \$groups{$_}, text => $high_security_groups{$_}, type => 'bool' }
} keys %high_security_groups,
),
@@ -859,7 +858,7 @@ when your installation is complete and you restart your system.")),
},
[ { val => \$lang, separator => '|',
format => \&lang::lang2text, list => \@langs },
- if_($langs_, (map {;
+ if_($langs_, (map {
{ val => \$langs->{$_->[0]}, type => 'bool', disabled => sub { $langs->{all} },
text => $_->[1], advanced => 1,
}
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index be375ac31..a94e4bd29 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -644,7 +644,7 @@ sub install_silo($$$) {
print F "timeout=", round(10 * $silo->{timeout}) if $silo->{timeout};
print F "message=$silo->{boot}/message" if $silo->{message};
- foreach (@{$silo->{entries}}) {#my ($v, $e) = each %{$silo->{entries}}) {
+ foreach (@{$silo->{entries}}) { #-my ($v, $e) = each %{$silo->{entries}}) {
my $type = "$_->{type}=$_->{kernel_or_dev}"; $type =~ s|/boot|$silo->{boot}|;
print F $type;
print F "\tlabel=$_->{label}";
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 8747db249..36b553895 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -59,7 +59,7 @@ my $lilogrub = chomp_(`detectloader -q`);
my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel");
$window->signal_connect(delete_event => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) });
-$window->set_title(_("Boot Style Configuration") );
+$window->set_title(_("Boot Style Configuration"));
$window->border_width(2);
#$window->realize;
@@ -79,7 +79,7 @@ my $pixmap = new Gtk::Pixmap($h_pixmap, $h_mask);
my @menu_items = ( { path => _("/_File"), type => '<Branch>' },
{ path => _("/File/_Quit"), accelerator => _("<control>Q"), callback => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } },
);
-my $menubar = get_main_menu( $window );
+my $menubar = get_main_menu($window);
######### menus end
my $user_combo = new Gtk::Combo;
@@ -127,7 +127,7 @@ Click on Configure to launch the setup wizard.", $lilogrub),
# }
# }
# }),
-# gtkpack__ ( gtkset_sensitive ($a_box, $a_mode),
+# gtkpack__ (gtkset_sensitive ($a_box, $a_mode),
# gtksignal_connect ($a_c_button,clicked => sub{$pixmap->set($c_pixmap, $c_mask)}),
# gtksignal_connect ($a_h_button,clicked => sub{$pixmap->set($h_pixmap, $h_mask)}),
# gtksignal_connect ($a_v_button,clicked => sub{$pixmap->set($v_pixmap, $v_mask)}),
@@ -140,7 +140,7 @@ Click on Configure to launch the setup wizard.", $lilogrub),
# X
gtkadd (new Gtk::Frame (_("System mode")),
gtkpack__ (new Gtk::VBox(0, 5),
- gtksignal_connect(gtkset_active(new Gtk::CheckButton (_("Launch the graphical environment when your system starts")), $x_mode ), clicked => sub {
+ gtksignal_connect(gtkset_active(new Gtk::CheckButton (_("Launch the graphical environment when your system starts")), $x_mode), clicked => sub {
$x_box->set_sensitive(!$x_mode);
$x_mode = !$x_mode;
}),
@@ -157,8 +157,8 @@ Click on Configure to launch the setup wizard.", $lilogrub),
)
),
gtkadd (gtkset_layout(new Gtk::HButtonBox,-end),
- gtksignal_connect(new Gtk::Button (_("OK")), clicked=>sub{updateInit();updateAutologin();updateAurora();$::isEmbedded ? kill(USR1,$::CCPID) : Gtk->exit(0)}),
- gtksignal_connect(new Gtk::Button (_("Cancel")), clicked => sub {$::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0)})
+ gtksignal_connect(new Gtk::Button(_("OK")), clicked => sub{ updateInit(); updateAutologin(); updateAurora(); $::isEmbedded ? kill(USR1,$::CCPID) : Gtk->exit(0) }),
+ gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) })
)
)
);
@@ -167,10 +167,10 @@ $a_button->set_active($a_mode); # up == false == "0"
if ($a_mode) {
my $a = readlink "/etc/aurora/Monitor";
$a =~ s#/lib/aurora/Monitors/##;
- if ($a eq "NewStyle-Categorizing-WsLib") {$a_c_button->set_active(1); $pixmap->set($c_pixmap, $c_mask);}
- if ($a eq "NewStyle-WsLib") {$a_h_button->set_active(1); $pixmap->set($h_pixmap, $h_mask);}
- if ($a eq "Traditional-WsLib") {$a_v_button->set_active(1); $pixmap->set($v_pixmap, $v_mask);}
- if ($a eq "Traditional-Gtk+") {$a_g_button->set_active(1); $pixmap->set($g_pixmap, $g_mask);}
+ if ($a eq "NewStyle-Categorizing-WsLib") { $a_c_button->set_active(1); $pixmap->set($c_pixmap, $c_mask) }
+ if ($a eq "NewStyle-WsLib") { $a_h_button->set_active(1); $pixmap->set($h_pixmap, $h_mask) }
+ if ($a eq "Traditional-WsLib") { $a_v_button->set_active(1); $pixmap->set($v_pixmap, $v_mask) }
+ if ($a eq "Traditional-Gtk+") { $a_g_button->set_active(1); $pixmap->set($g_pixmap, $g_mask) }
} else {
$pixmap->set($t_pixmap, $t_mask);
}
@@ -207,17 +207,17 @@ sub get_wm
#-------------------------------------------------------------
sub print_hello {
- print( "mcdtg !\n" );
+ print("mcdtg !\n");
}
sub get_main_menu {
- my ( $window ) = @_;
+ my ($window) = @_;
my $accel_group = new Gtk::AccelGroup();
- my $item_factory = new Gtk::ItemFactory( 'Gtk::MenuBar', '<main>', $accel_group );
- $item_factory->create_items( @menu_items );
- $window->add_accel_group( $accel_group );
- return ( $item_factory->get_widget( '<main>' ) );
+ my $item_factory = new Gtk::ItemFactory('Gtk::MenuBar', '<main>', $accel_group);
+ $item_factory->create_items(@menu_items);
+ $window->add_accel_group($accel_group);
+ return $item_factory->get_widget('<main>');
}
#-------------------------------------------------------------
@@ -228,7 +228,7 @@ sub isXlaunched {
my $line;
open INITTAB, "/etc/inittab" or die _("can not open /etc/inittab for reading: %s", $!);
while (<INITTAB>) {
- if (/id:([1-6]):initdefault:/) { $line = $_; last; }
+ if (/id:([1-6]):initdefault:/) { $line = $_; last }
}
close INITTAB;
$line =~ s/id:([1-6]):initdefault:/$1/;
@@ -278,7 +278,7 @@ sub isAutologin {
my $line;
open AUTOLOGIN, "/etc/sysconfig/autologin";
while (<AUTOLOGIN>) {
- if (/AUTOLOGIN=(yes|no)/) { $line = $_; last; }
+ if (/AUTOLOGIN=(yes|no)/) { $line = $_; last }
}
close AUTOLOGIN;
$line =~ s/AUTOLOGIN=(yes|no)/$1/;
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 1c19a87db..99b0164d7 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -31,7 +31,7 @@ sub getopts {
while (1) {
local $_ = $o->[0];
$_ && /^-/ or return @r;
- for (my $i = 0; $i < @_; $i++) { /$_[$i]/ and $r[$i] = $_[$i]; }
+ for (my $i = 0; $i < @_; $i++) { /$_[$i]/ and $r[$i] = $_[$i] }
shift @$o;
}
@r;
@@ -40,11 +40,11 @@ sub getopts {
sub true { exit 0 }
sub false { exit 1 }
sub cat { @ARGV = @_; print while <> }
-sub which { ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG; }}}
+sub which { ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG }}}
sub dirname_ { print dirname(@_), "\n" }
sub basename_ { print basename(@_), "\n" }
sub rmdir_ { foreach (@_) { rmdir $_ or die "rmdir: can't remove $_\n" } }
-sub lsmod { print "Module Size Used by\n"; cat("/proc/modules"); }
+sub lsmod { print "Module Size Used by\n"; cat("/proc/modules") }
sub grep_ {
my ($h, $v, $i) = getopts(\@_, qw(hvi));
@@ -103,7 +103,7 @@ sub mknod {
require c;
my $mode = $ {{"b" => c::S_IFBLK(), "c" => c::S_IFCHR()}}{$_[1]} or die "unknown node type $_[1]\n";
syscall_('mknod', my $a = $_[0], $mode | 0600, makedev($_[2], $_[3])) or die "mknod failed: $!\n";
- } else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n"; }
+ } else { die "usage: mknod <path> [b|c] <major> <minor> or mknod <path>\n" }
}
sub ln {
@@ -217,7 +217,7 @@ sub ls {
displaySize($s[2]) ? $s[7] : join(", ", unmakedev($s[6])),
scalar localtime $s[9], -l $_ ? "$_ -> " . readlink $_ : $_);
print $^A; $^A = '';
- } else { print "$_\n"; }
+ } else { print "$_\n" }
}
}
sub cp {
@@ -276,7 +276,7 @@ sub ps {
@>>>> @>>>> @>>> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$pid, $rss, $cpu, $cmd
.
- foreach $pid (sort {$a <=> $b} grep { /\d+/ } all('/proc')) {
+ foreach $pid (sort { $a <=> $b } grep { /\d+/ } all('/proc')) {
my @l = split(' ', cat_("/proc/$pid/stat"));
$cpu = sprintf "%2.1f", max(0, min(99, ($l[13] + $l[14]) * 100 / $hertz / ($uptime - $l[21] / $hertz)));
$rss = (split ' ', cat_("/proc/$pid/stat"))[23] * $page;
@@ -297,7 +297,7 @@ sub dd {
$h{$1} = $2;
}
local (*IF, *OF); my ($tmp, $nb, $read);
- ref $h{if} eq 'GLOB' ? *IF = $h{if} : sysopen(IF, $h{if}, 0 ) || die "error: can't open file $h{if}\n";
+ ref $h{if} eq 'GLOB' ? *IF = $h{if} : sysopen(IF, $h{if}, 0) || die "error: can't open file $h{if}\n";
ref $h{of} eq 'GLOB' ? *OF = $h{of} : sysopen(OF, $h{of}, 0x41) || die "error: can't open file $h{of}\n";
$h{bs} = removeXiBSuffix($h{bs});
@@ -322,7 +322,7 @@ sub head_tail {
if ($0 eq 'head') {
while (<F>) { $n-- or return; print }
} else {
- @_ = (); while (<F>) { push @_, $_; @_ > $n and shift; }
+ @_ = (); while (<F>) { push @_, $_; @_ > $n and shift }
print @_;
}
}
@@ -376,7 +376,7 @@ sub pack_ {
local *F;
open F, $_ or die "can't read file $_: $!\n";
- while (read F, $t, $BUFFER_SIZE) { print $t; }
+ while (read F, $t, $BUFFER_SIZE) { print $t }
}
}
}
@@ -513,7 +513,7 @@ sub lspci {
}
*lssbus = *lspci;
-sub dmesg { print cat_("/tmp/syslog"); }
+sub dmesg { print cat_("/tmp/syslog") }
sub sort {
my ($n, $h) = getopts(\@_, qw(nh));
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index a80fb29c9..57c2145ef 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -166,7 +166,7 @@ sub isFloppyOrHD {
}
sub getSCSI() {
- my $err = sub { log::l("ERROR: unexpected line in /proc/scsi/scsi: $_[0]"); };
+ my $err = sub { log::l("ERROR: unexpected line in /proc/scsi/scsi: $_[0]") };
my ($first, @l) = common::join_lines(cat_("/proc/scsi/scsi")) or return;
$first =~ /^Attached devices:/ or $err->($first);
@@ -472,14 +472,14 @@ sub whatParport() {
{
local $_;
while (<F>) {
- if (/(.*):(.*);/) {
+ if (/(.*):(.*);/) { #-#
$elem->{$1} = $2;
$elem->{$1} =~ s/Hewlett[-\s_]Packard/HP/;
$elem->{$1} =~ s/HEWLETT[-\s_]PACKARD/HP/;
}
}
}
- push @res, { port => "/dev/lp$_", val => $elem};
+ push @res, { port => "/dev/lp$_", val => $elem };
}
@res;
}
@@ -528,12 +528,14 @@ sub whatUsbport() {
# _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
# _IOC(), _IOC_READ as defined in /usr/include/asm/ioctl.h
# Use "eval" so that program does not stop when IOCTL fails
- eval{ my $output = "\0" x 1024;
- ioctl(PORT, 0x84005001, $output);
- $idstr = $output; } or do {
- close PORT;
- next;
- };
+ eval {
+ my $output = "\0" x 1024;
+ ioctl(PORT, 0x84005001, $output);
+ $idstr = $output;
+ } or do {
+ close PORT;
+ next;
+ };
close PORT;
# Remove non-printable characters
$idstr =~ tr/[\x00-\x1f]/\./;
@@ -590,7 +592,7 @@ sub whatPrinter() {
}
sub whatPrinterPort() {
- grep { tryWrite($_)} qw(/dev/lp0 /dev/lp1 /dev/lp2 /dev/usb/lp0 /dev/usb/lp1 /dev/usb/lp2 /dev/usb/lp3 /dev/usb/lp4 /dev/usb/lp5 /dev/usb/lp6 /dev/usb/lp7 /dev/usb/lp8 /dev/usb/lp9);
+ grep { tryWrite($_) } qw(/dev/lp0 /dev/lp1 /dev/lp2 /dev/usb/lp0 /dev/usb/lp1 /dev/usb/lp2 /dev/usb/lp3 /dev/usb/lp4 /dev/usb/lp5 /dev/usb/lp6 /dev/usb/lp7 /dev/usb/lp8 /dev/usb/lp9);
}
sub probeSerialDevices {
@@ -656,7 +658,7 @@ sub raidAutoStart {
log::l("raidAutoStart");
eval { modules::load('md') };
- my %personalities = ( '1' => 'linear', '2' => 'raid0', '3' => 'raid1', '4' => 'raid5' );
+ my %personalities = ('1' => 'linear', '2' => 'raid0', '3' => 'raid1', '4' => 'raid5');
raidAutoStartIoctl() or raidAutoStartRaidtab(@parts);
if (my @needed_perso = map {
if_(/^kmod: failed.*md-personality-(.)/ ||
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 8c45a41f7..496a593bc 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -24,7 +24,7 @@ sub size($) {
my ($high, $mid);
#- first find n where 2^n < size <= 2^n+1
- for ($high = 1; $high > 0 && &$valid_offset($high); $high *= 2) { $low = $high; }
+ for ($high = 1; $high > 0 && &$valid_offset($high); $high *= 2) { $low = $high }
while ($low < $high - 1) {
$mid = int ($low + $high) / 2;
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index 35342c6e3..ea6a47724 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -120,7 +120,7 @@ sub try_ {
$update_all->();
if ($v && member($name, 'Done', 'Wizard')) {
- $::isEmbedded ? kill( 'USR1', $::CCPID) : Gtk->main_quit;
+ $::isEmbedded ? kill('USR1', $::CCPID) : Gtk->main_quit;
}
}
@@ -212,7 +212,7 @@ sub current_kind_changed {
my $v = $kind->{val};
my @parts =
- $kind->{type} eq 'raid' ? grep {$_} @$v :
+ $kind->{type} eq 'raid' ? grep { $_ } @$v :
$kind->{type} eq 'loopback' ? @$v : fsedit::get_fstab_and_holes($v);
my $totalsectors =
$kind->{type} =~ /raid|loopback/ ? sum(map { $_->{size} } @parts) : $v->{totalsectors};
@@ -242,7 +242,7 @@ sub create_automatic_notebooks {
};
$may_add->(hd2kind($_)) foreach @{$all_hds->{hds}};
$may_add->(lvm2kind($_)) foreach @{$all_hds->{lvms}};
- $may_add->(raid2kind()) if grep {$_} @{$all_hds->{raids}};
+ $may_add->(raid2kind()) if grep { $_ } @{$all_hds->{raids}};
$may_add->(loopback2kind()) if @{$all_hds->{loopbacks}};
@notebook = grep_index {
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 2c9b70ca0..fe5e897c4 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -42,7 +42,7 @@ struct part {
# !isFormatted && !notFormatted means we don't know which state we're in
int raid # for partitions of type isRawRAID and which isPartOfRAID, the raid device number
- string lvm # partition used as a PV for the VG with {lvm} as LVMname
+ string lvm # partition used as a PV for the VG with {lvm} as LVMname #-#
loopback loopback[] # loopback living on this partition
# internal
@@ -725,7 +725,7 @@ sub Add2RAID {
local $_ = @$raids == () ? "new" :
$in->ask_from_list_('', _("Choose an existing RAID to add to"),
- [ (grep {$_} map_index { $_ && "md$::i" } @$raids), __("new") ]) or return;
+ [ (grep { $_ } map_index { $_ && "md$::i" } @$raids), __("new") ]) or return;
if (/new/) {
my $nb1 = raid::new($raids, $part);
@@ -834,7 +834,7 @@ sub Options {
$in->ask_from(_("Mount options"),
'',
[
- (map {;
+ (map {
{ label => $_, text => scalar warp_text(formatAlaTeX($help{$_})), val => \$options->{$_},
advanced => !$part->{rootDevice} && !member($_, @simple_options), if_(!/=$/, type => 'bool'), }
} keys %$options),
@@ -1138,7 +1138,7 @@ sub format_hd_info {
$info .= _("Size: %s\n", formatXiB($hd->{totalsectors}, 512)) if $hd->{totalsectors};
$info .= _("Geometry: %s cylinders, %s heads, %s sectors\n", @{$hd->{geom}}{qw(cylinders heads sectors)}) if $::expert && $hd->{geom};
$info .= _("Info: ") . ($hd->{info} || $hd->{media_type}) . "\n" if $::expert && ($hd->{info} || $hd->{media_type});
- $info .= _("LVM-disks %s\n", join ", ", map {$_->{device}} @{$hd->{disks}}) if isLVM($hd) && $hd->{disks};
+ $info .= _("LVM-disks %s\n", join ", ", map { $_->{device} } @{$hd->{disks}}) if isLVM($hd) && $hd->{disks};
$info .= _("Partition table type: %s\n", $1) if $::expert && ref($hd) =~ /_([^_]+)$/;
$info .= _("on channel %d id %d\n", $hd->{channel}, $hd->{id}) if $::expert && exists $hd->{channel};
$info;
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index b1bb6ea6b..523a6afa8 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -303,18 +303,18 @@ sub get_holes {
sub get_all_fstab {
my ($all_hds) = @_;
my @parts = map { partition_table::get_normal_parts($_) } all_hds($all_hds);
- my @raids = grep {$_} @{$all_hds->{raids}};
+ my @raids = grep { $_ } @{$all_hds->{raids}};
@parts, @raids, @{$all_hds->{loopbacks}};
}
sub get_really_all_fstab {
my ($all_hds) = @_;
my @parts = map { partition_table::get_normal_parts($_) } all_hds($all_hds);
- my @raids = grep {$_} @{$all_hds->{raids}};
+ my @raids = grep { $_ } @{$all_hds->{raids}};
@parts, @raids, @{$all_hds->{loopbacks}}, @{$all_hds->{raw_hds}}, @{$all_hds->{nfss}}, @{$all_hds->{smbs}};
}
sub get_all_fstab_and_holes {
my ($all_hds) = @_;
- my @raids = grep {$_} @{$all_hds->{raids}};
+ my @raids = grep { $_ } @{$all_hds->{raids}};
get_fstab_and_holes(all_hds($all_hds)), @raids, @{$all_hds->{loopbacks}};
}
sub get_all_holes {
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 0fd32cb32..88f5b0967 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -555,7 +555,7 @@ sub main {
#-the main cycle
my $clicked = 0;
- MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) {
+ MAIN: for ($o->{step} = $o->{steps}{first}; ; $o->{step} = getNextStep()) {
$o->{steps}{$o->{step}}{entered}++;
$o->enteringStep($o->{step});
if ($o->{steps}{$o->{step}}{icon}) { $o->{icon} = $o->{steps}{$o->{step}}{icon} } else { undef $o->{icon} }
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index c121f04a4..824584f81 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -248,7 +248,7 @@ sub spawnShell {
ioctl(STDIN, c::TIOCSCTTY(), 0) or warn "could not set new controlling tty: $!";
my $busybox = "/usr/bin/busybox";
- exec {-e $busybox ? $busybox : "/bin/sh"} "/bin/sh" or log::l("exec of /bin/sh failed: $!");
+ exec { -e $busybox ? $busybox : "/bin/sh" } "/bin/sh" or log::l("exec of /bin/sh failed: $!");
}
sub getAvailableSpace {
@@ -347,7 +347,7 @@ sub setDefaultPackages {
push @{$o->{default_packages}}, "raidtools" if !is_empty_array_ref($o->{all_hds}{raids});
push @{$o->{default_packages}}, "lvm" if !is_empty_array_ref($o->{all_hds}{lvms});
push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/;
- push @{$o->{default_packages}}, uniq(grep {$_} map { fsedit::package_needed_for_partition_type($_) } @{$o->{fstab}});
+ push @{$o->{default_packages}}, uniq(grep { $_ } map { fsedit::package_needed_for_partition_type($_) } @{$o->{fstab}});
#- if no cleaning needed, populate by default, clean is used for second or more call to this function.
unless ($clean) {
@@ -814,7 +814,7 @@ sub getAndSaveAutoInstallFloppy {
", "07\n" if !$replay;
local $o->{partitioning}{clearall} = !$replay;
- eval { output("$mountdir/auto_inst.cfg", g_auto_install($replay)); };
+ eval { output("$mountdir/auto_inst.cfg", g_auto_install($replay)) };
$@ and log::l("Warning: <$@>");
fs::umount($mountdir);
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index 74ac6459c..b50e7d494 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -133,7 +133,7 @@ sub create_steps_window {
gtkadd($w->{window},
gtkpack_(new Gtk::VBox(0,0),
- (map {; 1, $_ } map {
+ (map { (1, $_) } map {
my $step_name = $_;
my $step = $o->{steps}{$_};
my $darea = new Gtk::DrawingArea;
@@ -144,7 +144,7 @@ sub create_steps_window {
$map, 0, 0,
($darea->allocation->[2]-$PIX_W)/2 + 3,
($darea->allocation->[3]-$PIX_H)/2,
- $PIX_W , $PIX_H );
+ $PIX_W , $PIX_H);
};
my $f = sub {
@@ -156,9 +156,9 @@ sub create_steps_window {
$darea->set_events(['exposure_mask', 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]);
$darea->signal_connect(expose_event => sub { $draw_pix->($f->('')) });
if ($step->{reachable}) {
- $darea->signal_connect(enter_notify_event => sub { $in_button=1; $draw_pix->($f->('-on')); });
- $darea->signal_connect(leave_notify_event => sub { undef $in_button; $draw_pix->($f->('')); });
- $darea->signal_connect(button_press_event => sub { $draw_pix->($f->('-click')); });
+ $darea->signal_connect(enter_notify_event => sub { $in_button=1; $draw_pix->($f->('-on')) });
+ $darea->signal_connect(leave_notify_event => sub { undef $in_button; $draw_pix->($f->('')) });
+ $darea->signal_connect(button_press_event => sub { $draw_pix->($f->('-click')) });
$darea->signal_connect(button_release_event => sub { $in_button && die "setstep $step_name\n" });
}
gtkpack_(new Gtk::HBox(0,5), 0, $darea, 0, new Gtk::Label(translate($step->{text})));
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index a9173f495..2ff4d27e6 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -18,7 +18,7 @@ use fs;
sub tellAboutProprietaryModules {
my ($o) = @_;
- my @l = grep {$_} map { $_->{driver} =~ /^Bad:(.*)/ && $1 } detect_devices::probeall();
+ my @l = grep { $_ } map { $_->{driver} =~ /^Bad:(.*)/ && $1 } detect_devices::probeall();
$o->ask_warn('',
_("Some hardware on your computer needs ``proprietary'' drivers to work.
You can find some information about them at: %s", join(", ", @l))) if @l;
@@ -235,8 +235,8 @@ sub partitionWizard {
my $level = $::expert ? -9999 : 0;
my @sol = grep { $_->[0] >= $level } @solutions;
- log::l( "solutions found: " . join('', map {$_->[1]} @sol) .
- " (all solutions found: " . join('', map {$_->[1]} @solutions) . ")");
+ log::l('' . "solutions found: " . join('', map { $_->[1] } @sol) .
+ " (all solutions found: " . join('', map { $_->[1] } @solutions) . ")");
@solutions = @sol if @sol > 1;
log::l("solutions: ", int @solutions);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 33df88586..dddb5a67a 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -703,7 +703,7 @@ sub addUser {
my $users = $o->{users} ||= [];
my (%uids, %gids);
- foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1; }
+ foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1 }
foreach (@$users) {
$_->{home} ||= "/home/$_->{name}";
@@ -712,7 +712,7 @@ sub addUser {
my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
#- search for available uid above 501 else initscripts may fail to change language for KDE.
if (!$u || getpwuid($u)) { for ($u = 501; getpwuid($u) || $uids{$u}; $u++) {} }
- if (!$g ) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
+ if (!$g) { for ($g = 501; getgrgid($g) || $gids{$g}; $g++) {} }
$_->{uid} = $u; $uids{$u} = 1;
$_->{gid} = $g; $gids{$g} = 1;
@@ -866,8 +866,7 @@ sub setupBootloader($) {
map_index { -e "$o->{prefix}/boot/initrd-$_->[1]" ?
"$::i:$b->{part_nb}$_->[0] root=$b->{root} initrd=/boot/initrd-$_->[1] $b->{perImageAppend}\n" :
"$::i:$b->{part_nb}$_->[0] root=$b->{root} $b->{perImageAppend}\n" }
- map { run_program::rooted($o->{prefix}, "mkinitrd", "-f", "/boot/initrd-$_->[1]", "--ifneeded", $_->[1]) ;#or
- #unlink "$o->{prefix}/boot/initrd-$_->[1]";$_ } grep { $_->[0] && $_->[1] }
+ map { run_program::rooted($o->{prefix}, "mkinitrd", "-f", "/boot/initrd-$_->[1]", "--ifneeded", $_->[1]);
$_ } grep { $_->[0] && $_->[1] }
map { [ m|$o->{prefix}(/boot/vmlinux-(.*))| ] } glob_("$o->{prefix}/boot/vmlinux-*");
# output "$o->{prefix}/etc/aboot.conf",
@@ -962,7 +961,7 @@ sub exitInstall {
output "$o->{prefix}$report", install_any::report_bug($o->{prefix});
run_program::rooted($o->{prefix}, 'gzip', $report);
};
- install_any::getAndSaveAutoInstallFloppy($o, 1, "$o->{prefix}/root/drakx/replay_install.img" );
+ install_any::getAndSaveAutoInstallFloppy($o, 1, "$o->{prefix}/root/drakx/replay_install.img");
eval { output "$o->{prefix}/root/drakx/README", "This directory contains several installation-related files,
mostly log files (very useful if you ever report a bug!).
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index ccfe6a53c..7d3c1503a 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -46,7 +46,7 @@ sub new($$) {
my $launchX = sub {
my $ok = 1;
my $xpmac_opts = cat_("/proc/cmdline");
- unless (-d "/var/log" ) { mkdir("/var/log"); }
+ unless (-d "/var/log") { mkdir("/var/log") }
local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 };
unless (fork) {
exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240",
@@ -325,7 +325,7 @@ sub choosePackagesTree {
push(@others, $p->name);
}
my $root2 = join('|', map { translate($_) } split('\|', $root));
- $add_node->($_, $root2 ) foreach sort @firstchoice;
+ $add_node->($_, $root2) foreach sort @firstchoice;
$add_node->($_, $root2 . '|' . _("Other")) foreach sort @others;
}
}
@@ -402,7 +402,7 @@ sub choosePackagesTree {
} else {
$o->ask_warn('', _("You can't unselect this package. It must be upgraded"));
}
- } else { return 1; }
+ } else { return 1 }
return;
},
auto_deps => _("Show automatically selected packages"),
@@ -411,7 +411,7 @@ sub choosePackagesTree {
icons => [ { icon => 'floppy',
help => _("Load/Save on floppy"),
wait_message => _("Updating package selection"),
- code => sub { $o->loadSavePackagesOnFloppy($packages); 1; },
+ code => sub { $o->loadSavePackagesOnFloppy($packages); 1 },
},
if_(0,
{ icon => 'feather',
@@ -524,9 +524,9 @@ sub installPackages {
$yicon > $y + ${$heights}[0] and $decy = $yicon - ($y + ${$heights}[$i]);
foreach (@{$lines}) {
$dbl_area->draw_string($darea->style->font, $gc_text,
- ($dx-$width)/2 + $x + ${$widths}[$i], ( $first ? 0 : $decy ) + $y + ${$heights}[$i], $_);
+ ($dx-$width)/2 + $x + ${$widths}[$i], ($first ? 0 : $decy) + $y + ${$heights}[$i], $_);
$bold and $dbl_area->draw_string($darea->style->font, $gc_text,
- ($dx-$width)/2 + $x + ${$widths}[$i] + 1, ( $first ? 0 : $decy ) + $y + ${$heights}[$i], $_);
+ ($dx-$width)/2 + $x + ${$widths}[$i] + 1, ($first ? 0 : $decy) + $y + ${$heights}[$i], $_);
$i++;
}
$first = 0;
@@ -608,7 +608,7 @@ If you don't have it, press Cancel to avoid installation from this Cd-Rom.", $na
}
};
my $install_result;
- catch_cdie { $install_result = $o->install_steps::installPackages($packages); }
+ catch_cdie { $install_result = $o->install_steps::installPackages($packages) }
sub {
if ($@ =~ /^error ordering package list: (.*)/) {
$o->ask_yesorno('', [
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 4ac7778e7..c28187579 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -694,7 +694,7 @@ sub reallyChooseGroups {
my ($path, $all);
$o->ask_from('', _("Package Group Selection"), [
{ val => \$size_text, type => 'label' }, {},
- (map {;
+ (map {
my $old = $path;
$path = $o->{compssUsers}{$_}{path};
if_($old ne $path, { val => translate($path) }),
@@ -807,7 +807,7 @@ If you don't have it, press Cancel to avoid installation from this Cd-Rom.", $na
};
};
my $install_result;
- catch_cdie { $install_result = $o->install_steps::installPackages($packages); }
+ catch_cdie { $install_result = $o->install_steps::installPackages($packages) }
sub {
if ($@ =~ /^error ordering package list: (.*)/) {
$o->ask_yesorno('', [
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 6a9f488a9..1c78dd931 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -86,7 +86,7 @@ sub vnew {
if (fuzzy_pidofs(qr/\bkwin\b/) > 0) {
exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing");
} else {
- exec {'consolehelper'} $0, @ARGV or die _("consolehelper missing");
+ exec { 'consolehelper' } $0, @ARGV or die _("consolehelper missing");
}
}
eval { require interactive::gtk };
@@ -97,7 +97,7 @@ sub vnew {
}
} else {
if ($su && $>) {
- exec {'consolehelper'} $0, @ARGV or die _("consolehelper missing");
+ exec { 'consolehelper' } $0, @ARGV or die _("consolehelper missing");
}
}
@@ -262,7 +262,7 @@ sub ask_from_normalize {
foreach my $e (@$l) {
if (my $li = $e->{list}) {
- ref($e->{val}) =~ /SCALAR|REF/ or internal_error($e->{val} ? "field {val} must be a reference (it is $e->{val})" : "field {val} is mandatory");
+ ref($e->{val}) =~ /SCALAR|REF/ or internal_error($e->{val} ? "field {val} must be a reference (it is $e->{val})" : "field {val} is mandatory"); #-#
if ($e->{sort} || @$li > 10 && !exists $e->{sort}) {
my @l2 = map { may_apply($e->{format}, $_) } @$li;
my @places = sort { $l2[$a] cmp $l2[$b] } 0 .. $#l2;
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 8c71711ef..29ed57316 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -392,7 +392,7 @@ sub ask_fromW {
$set->(${$e->{val}} = next_val_in_array(${$e->{val}}, $e->{list}));
$changed->();
});
- $real_w = gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::HBox(0,0), 0, $w, 1, new Gtk::HBox(0,0), );
+ $real_w = gtkpack_(new Gtk::HBox(0,10), 1, new Gtk::HBox(0,0), 0, $w, 1, new Gtk::HBox(0,0));
} elsif ($e->{type} eq 'bool') {
$w = Gtk::CheckButton->new($e->{text});
$w->signal_connect(clicked => $changed);
@@ -495,7 +495,7 @@ sub ask_fromW {
get => $get || sub { ${$e->{val}} }, set => $set || sub {},
icon_w => -e $e->{icon} ? gtkpng($e->{icon}) : '' };
};
- @widgets_always = map_index { $create_widget->($_, $::i ) } @$l;
+ @widgets_always = map_index { $create_widget->($_, $::i) } @$l;
my $always_total_size = $total_size;
@widgets_advanced = map_index { $create_widget->($_, $::i + @$l) } @$l2;
my $advanced_total_size = $total_size - $always_total_size;
@@ -560,7 +560,7 @@ sub ask_fromW {
$advanced_pack =
gtkpack_(new Gtk::VBox(0,0),
0, '',
- (map {; 0, new Gtk::Label($_) } @adv),
+ (map { (0, new Gtk::Label($_)) } @adv),
0, new Gtk::HSeparator,
1, $create_widgets->($advanced_total_size, @widgets_advanced));
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm
index 126e1d897..041235cef 100644
--- a/perl-install/interactive/stdio.pm
+++ b/perl-install/interactive/stdio.pm
@@ -59,7 +59,7 @@ ask_fromW_begin:
};
my @labels = ();
- my $format_label = sub { my ($e) = @_; return "`${$e->{val}}' $e->{label} $e->{text}\n"; };
+ my $format_label = sub { my ($e) = @_; return "`${$e->{val}}' $e->{label} $e->{text}\n" };
my $do_widget = sub {
my ($e, $ind) = @_;
@@ -134,7 +134,7 @@ Your choice? ");
}
my $lab;
- map_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print _("=> Notice, a label changed:\n%s", $lab); }
+ map_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print _("=> Notice, a label changed:\n%s", $lab) }
grep { $_->{type} eq 'label' } @$l;
my $i;
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index d99cfafd1..c730c2739 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -398,9 +398,9 @@ sub setup {
#- Xpmac doesn't map keys quite right
if (arch() =~ /ppc/ && !$::testing && $ENV{DISPLAY}) {
log::l("Fixing Mac keyboard");
- run_program::run('xmodmap', "-e", "keycode 59 = BackSpace" );
- run_program::run('xmodmap', "-e", "keycode 131 = Shift_R" );
- run_program::run('xmodmap', "-e", "add shift = Shift_R" );
+ run_program::run('xmodmap', "-e", "keycode 59 = BackSpace");
+ run_program::run('xmodmap', "-e", "keycode 131 = Shift_R");
+ run_program::run('xmodmap', "-e", "add shift = Shift_R");
return;
}
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 35a12953c..29af52819 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -764,9 +764,9 @@ sub load_mo {
#- used in Makefile during "make get_needed_files"
sub console_font_files {
map { -e $_ ? $_ : "$_.gz" }
- (map { "/usr/lib/kbd/consolefonts/$_.psf" } uniq grep {$_} map { $_->[0] } values %charsets),
- (map { -e $_ ? $_ : "$_.sfm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep {$_} map { $_->[1] } values %charsets),
- (map { -e $_ ? $_ : "$_.acm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep {$_} map { $_->[2] } values %charsets),
+ (map { "/usr/lib/kbd/consolefonts/$_.psf" } uniq grep { $_ } map { $_->[0] } values %charsets),
+ (map { -e $_ ? $_ : "$_.sfm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep { $_ } map { $_->[1] } values %charsets),
+ (map { -e $_ ? $_ : "$_.acm" } map { "/usr/lib/kbd/consoletrans/$_" } uniq grep { $_ } map { $_->[2] } values %charsets),
}
sub load_console_font {
diff --git a/perl-install/log.pm b/perl-install/log.pm
index ac024819f..448928812 100644
--- a/perl-install/log.pm
+++ b/perl-install/log.pm
@@ -36,11 +36,11 @@ sub w { &l }
sub openLog(;$) {
if ($::isInstall) {
if ($_[0]) { #- useLocal
- open LOG, "> $_[0]";# or die "no log possible :(";
+ open LOG, "> $_[0]";
} else {
- open LOG, "> /dev/tty3";# or die "no log possible :(";
+ open LOG, "> /dev/tty3";
}
- open LOG2, ">> /tmp/ddebug.log";# or die "no log possible :(";
+ open LOG2, ">> /tmp/ddebug.log";
select((select(LOG), $| = 1)[0]);
select((select(LOG2), $| = 1)[0]);
}
@@ -51,7 +51,7 @@ sub openLog(;$) {
sub closeLog() {
if ($::isStandalone) {
c::closelog();
- } else { close LOG; close LOG2; }
+ } else { close LOG; close LOG2 }
}
#-######################################################################################
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 21d3fe040..d3bada086 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -95,7 +95,7 @@ sub load_category {
!($@ && $_->{try});
} probe_category($category, $probe_type),
- map {; { driver => $_, description => $_, try => 1 } } @try_modules;
+ map { { driver => $_, description => $_, try => 1 } } @try_modules;
}
sub probe_category {
@@ -121,7 +121,7 @@ sub probe_category {
}
sub load_ide {
- eval { load("ide-cd"); }
+ eval { load("ide-cd") }
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 3907def87..1ab19052a 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -154,7 +154,7 @@ sub update_type_name {
sub fullnames {
map_each {
my $type = $::a;
- grep {$_} map {
+ grep { $_ } map {
if ($_) {
my $l = raw2mouse($type, $_);
"$type|$l->{name}";
@@ -282,13 +282,13 @@ sub detect() {
my $keep_mouse;
if (my (@l) = detect_devices::usbWacom()) {
log::l("found usb wacom $_->{driver} $_->{description} ($_->{type})") foreach @l;
- eval { modules::load("wacom", "evdev"); };
+ eval { modules::load("wacom", "evdev") };
unless ($@) {
foreach (0..$#l) {
detect_devices::tryOpen("input/event$_") and $keep_mouse = 1, push @wacom, "input/event$_";
}
}
- $keep_mouse or eval { modules::unload("evdev", "wacom"); };
+ $keep_mouse or eval { modules::unload("evdev", "wacom") };
}
}
@@ -393,7 +393,7 @@ sub test_mouse_install {
),
);
$okcancel->set_uposition(7, $height-43);
- Gtk->timeout_add(2000, sub { gtkset_sensitive($okcancel, 1); $okcancel->draw(undef); });
+ Gtk->timeout_add(2000, sub { gtkset_sensitive($okcancel, 1); $okcancel->draw(undef) });
test_mouse($mouse, $w, $darea, $width, $height);
$w->{window}->set_usize(undef, $height+10);
$w->sync; # HACK
@@ -472,9 +472,9 @@ sub test_mouse {
($darea->allocation->[2]-$width)/2+98, ($darea->allocation->[3]-$height)/2 + 67,
13, 62);
} else {
- $darea->window->draw_arc ( $darea->style->black_gc,
- 1, ($darea->allocation->[2]-$width)/2 + $x, ($darea->allocation->[3]-$height)/2 + 90, 20, 25,
- 0, 360*64);
+ $darea->window->draw_arc ($darea->style->black_gc,
+ 1, ($darea->allocation->[2]-$width)/2 + $x, ($darea->allocation->[3]-$height)/2 + 90, 20, 25,
+ 0, 360*64);
}
} elsif ($nb == 3) {
$wait=1;
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index ad8c4ea9e..d8ecf8b47 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -48,7 +48,7 @@ sub new {
if (!defined($::WizardWindow)) {
$::WizardWindow = new Gtk::Window;
$::WizardWindow->set_position('center_always');
- $::WizardWindow->signal_connect(delete_event => sub { die 'wizcancel'});
+ $::WizardWindow->signal_connect(delete_event => sub { die 'wizcancel' });
$::WizardTable = new Gtk::Table(2, 2, 0);
$::WizardWindow->add($::WizardTable);
my $draw1 = new Gtk::DrawingArea;
@@ -63,11 +63,10 @@ sub new {
$style->font(Gtk::Gdk::Font->fontset_load("-adobe-utopia-regular-r-*-*-25-*-*-*-p-*-iso8859-*"));
my $w = $style->font->string_width($::Wizard_title);
$draw1->signal_connect(expose_event => sub {
- my $i;
- for ($i=0;$i<(540/$y1);$i++) {
+ for (my $i=0; $i < (540/$y1); $i++) {
$draw1->window->draw_pixmap ($draw1->style->bg_gc('normal'),
$im_up, 0, 0, 0, $y1*$i,
- $x1 , $y1 );
+ $x1 , $y1);
$draw1->window->draw_string(
$style->font,
$draw1->style->white_gc,
@@ -76,11 +75,10 @@ sub new {
}
});
$draw2->signal_connect(expose_event => sub {
- my $i;
- for ($i=0;$i<(300/$y2);$i++) {
+ for (my $i=0; $i < (300/$y2); $i++) {
$draw2->window->draw_pixmap ($draw2->style->bg_gc('normal'),
$im_left, 0, 0, 0, $y2*$i,
- $x2 , $y2 );
+ $x2 , $y2);
}
});
$::WizardTable->attach($draw1, 0, 2, 0, 1, 'fill', 'fill', 0, 0);
@@ -266,7 +264,7 @@ sub gtkset_tip {
sub gtkappenditems {
my $w = shift;
- map {gtkshow($_) } @_;
+ map { gtkshow($_) } @_;
$w->append_items(@_);
$w
}
@@ -390,7 +388,7 @@ sub gtkcreate_xpm {
my ($f) = @_;
my $rw = gtkroot();
$f =~ m|.xpm$| or $f="$f.xpm";
- if ( $f !~ /\//) { -e "$_/$f" and $f="$_/$f", last foreach icon_paths() }
+ if ($f !~ /\//) { -e "$_/$f" and $f="$_/$f", last foreach icon_paths() }
my @l = Gtk::Gdk::Pixmap->create_from_xpm($rw, new Gtk::Style->bg('normal'), $f) or die "gtkcreate_xpm: missing pixmap file $f";
@l;
}
@@ -398,7 +396,7 @@ sub gtkcreate_xpm {
sub gtkcreate_png {
my ($f) = shift;
$f =~ m|.png$| or $f="$f.png";
- if ( $f !~ /\//) { -e "$_/$f" and $f="$_/$f", last foreach icon_paths() }
+ if ($f !~ /\//) { -e "$_/$f" and $f="$_/$f", last foreach icon_paths() }
my $im = Gtk::Gdk::ImlibImage->load_image($f) or die "gtkcreate_png: missing png file $f";
$im->render($im->rgb_width, $im->rgb_height);
($im->move_image(), $im->move_mask);
@@ -485,7 +483,7 @@ sub get_text_coord {
while (1) {
$i >= @c and last;
$el .= $c[$i];
- if (ord($c[$i]) >= 128) { $el .= $c[$i+1]; $i++; push @t2, $el; $el = ''}
+ if (ord($c[$i]) >= 128) { $el .= $c[$i+1]; $i++; push @t2, $el; $el = '' }
$i++;
}
$el ne '' and push @t2, $el;
@@ -582,26 +580,26 @@ sub gtkicons_labels_widget {
($darea->{dx}, $darea->{dy}) = ($dx, $dy);
});
$darea->set_events(['exposure_mask', 'enter_notify_mask', 'leave_notify_mask', 'button_press_mask', 'button_release_mask' ]);
- $darea->signal_connect( enter_notify_event => sub {
+ $darea->signal_connect(enter_notify_event => sub {
if ($darea->{state} == 0) {
$darea->{state} = 1;
$darea->draw(undef);
}
});
- $darea->signal_connect( leave_notify_event => sub {
+ $darea->signal_connect(leave_notify_event => sub {
if ($darea->{state} == 1) {
$darea->{state} = 0;
$darea->draw(undef);
}
});
my $label_exec = $_->[0];
- $darea->signal_connect( button_release_event => sub {
+ $darea->signal_connect(button_release_event => sub {
$darea->{state} = 0;
$darea->draw(undef);
$exec_func->($exec_hash->{$label_exec});
# $exec_hash->{$label_exec}{function}->($exec_hash->{$label_exec}{arg});
});
- $darea->signal_connect( realize => sub { $darea->window->set_cursor($cursor_hand) });
+ $darea->signal_connect(realize => sub { $darea->window->set_cursor($cursor_hand) });
$tab[$i] = $darea;
$i++;
}
@@ -610,7 +608,7 @@ sub gtkicons_labels_widget {
my $redraw_function = sub {
$fixed->move(@$_) foreach compute_icons($fixed->allocation->[2], $fixed->allocation->[3], 40, 15, 20, @tab);
};
- $fixed->signal_connect(expose_event => $redraw_function );
+ $fixed->signal_connect(expose_event => $redraw_function);
$fixed->signal_connect(realize => sub {
$fixed->window->set_back_pixmap($background, 0);
$redraw_function->();
@@ -620,7 +618,7 @@ sub gtkicons_labels_widget {
my $w_ret = createScrolledWindow($fixed, ['automatic', 'automatic']);
#- Ugly hacks, don't touch! ########
- my $timeout2 = Gtk->timeout_add(100, sub { $fixed->set_usize($w_ret->allocation->[2] - 22, 0); 0; });
+ my $timeout2 = Gtk->timeout_add(100, sub { $fixed->set_usize($w_ret->allocation->[2] - 22, 0); 0 });
$w_ret->vscrollbar->set_usize(19, undef);
gtkset_border_width($w_ret, -2); #- ok, this is very very ugly...
}
@@ -879,18 +877,18 @@ sub _create_window($$) {
if ($::isStandalone || $::live || $::g_auto_install || $::noShadow) { gtkadd($w, $inner) } else {
my $sqw = $my_gtk::shape_width;
gtkadd($w, $table = new Gtk::Table(2, 2, 0));
- $table->attach( $inner, 0, 1, 0, 1, 1|4, 1|4, 0, 0);
- $table->attach( gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, $sqw, 1), expose_event => sub {
+ $table->attach($inner, 0, 1, 0, 1, 1|4, 1|4, 0, 0);
+ $table->attach(gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, $sqw, 1), expose_event => sub {
$_[0]->window->draw_rectangle($_[0]->style->bg_gc('normal'), 1, 0, 0, $sqw, $sqw);
$_[0]->window->draw_rectangle($gc, 1, 0, $sqw, $sqw, $_[0]->allocation->[3]);
}),
1, 2, 0, 1, 'fill', 'fill', 0, 0);
- $table->attach( gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, 1, $sqw), expose_event => sub {
+ $table->attach(gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, 1, $sqw), expose_event => sub {
$_[0]->window->draw_rectangle($_[0]->style->bg_gc('normal'), 1, 0, 0, $sqw, $sqw);
$_[0]->window->draw_rectangle($gc, 1, $sqw, 0, $_[0]->allocation->[2], $sqw);
}),
0, 1, 1, 2, 'fill', 'fill', 0, 0);
- $table->attach( gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, $sqw, $sqw), expose_event => sub {
+ $table->attach(gtksignal_connect(gtkset_usize(new Gtk::DrawingArea, $sqw, $sqw), expose_event => sub {
$_[0]->window->draw_rectangle($gc, 1, 0, 0, $sqw, $sqw);
}),
1, 2, 1, 2, 'fill', 'fill', 0, 0);
@@ -943,7 +941,7 @@ sub _create_window($$) {
do { $s = $::o->{steps}{$s}{$d} } until !$s || $::o->{steps}{$s}{reachable};
$::setstep && $s and die "setstep $s\n";
}
- });# if $::isInstall;
+ }); #- if $::isInstall;
$w->signal_connect(size_allocate => sub {
my ($wi, $he) = @{$_[1]}[2,3];
@@ -982,7 +980,7 @@ my ($next_child, $left, $right, $up, $down);
$i += $dir;
0 <= $i && $i < @childs ? $childs[$i] : undef;
};
- $left = sub { &$next_child($_[0]->parent, 0); };
+ $left = sub { &$next_child($_[0]->parent, 0) };
$right = sub {
my ($c) = @_;
if ($c->subtree) {
@@ -1053,10 +1051,10 @@ sub create_treeitem($) {
#- just give a title and some args, and it will return the value given by the user
#-###############################################################################
-sub ask_warn { my $w = my_gtk->new(shift @_); $w->_ask_warn(@_); main($w); }
-sub ask_yesorno { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Yes"), _("No")); main($w); }
-sub ask_okcancel { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Is this correct?"), _("Ok"), _("Cancel")); main($w); }
-sub ask_from_entry { my $w = my_gtk->new(shift @_); $w->_ask_from_entry(@_); main($w); }
+sub ask_warn { my $w = my_gtk->new(shift @_); $w->_ask_warn(@_); main($w) }
+sub ask_yesorno { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Yes"), _("No")); main($w) }
+sub ask_okcancel { my $w = my_gtk->new(shift @_); $w->_ask_okcancel(@_, _("Is this correct?"), _("Ok"), _("Cancel")); main($w) }
+sub ask_from_entry { my $w = my_gtk->new(shift @_); $w->_ask_from_entry(@_); main($w) }
sub _ask_from_entry($$@) {
my ($o, @msgs) = @_;
@@ -1144,7 +1142,7 @@ sub ask_browse_tree_info {
ftin => [ _("Collapse Tree") , sub { $tree->collapse_recursive(undef) } ],
reload => [ _("Toggle between flat and group sorted"), sub { invbool(\$common->{state}{flat}); $common->{rebuild_tree}->() } ]);
foreach my $ic (@{$common->{icons} || []}) {
- push @toolbar, ( $ic->{icon} => [ $ic->{help}, sub {
+ push @toolbar, ($ic->{icon} => [ $ic->{help}, sub {
if ($ic->{code}) {
my $w = $ic->{wait_message} && $common->{wait_message}->('', $ic->{wait_message});
$ic->{code}();
@@ -1160,7 +1158,7 @@ sub ask_browse_tree_info {
}
$toolbar->set_style("icons");
- my $widgets = { w => $w, tree => $tree, info => $info, status => $status};
+ my $widgets = { w => $w, tree => $tree, info => $info, status => $status };
ask_browse_tree_info_given_widgets($common, $widgets);
}
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index bf5a63475..d27292cf4 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -83,7 +83,7 @@ sub adsl_conf {
adsl_conf_step_1:
adsl_ask_info ($adsl, $netc, $intf) or return;
adsl_conf_step_2:
- $adsl_type eq 'speedtouch' or conf_network_card($netc, $intf, 'static' , '10.0.0.10' ) or goto adsl_conf_step_1;
+ $adsl_type eq 'speedtouch' or conf_network_card($netc, $intf, 'static' , '10.0.0.10') or goto adsl_conf_step_1;
adsl_conf_backend($adsl, $netc, $adsl_type);
1;
}
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index e25cb7e68..1bdaec245 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -37,7 +37,7 @@ sub configure_cable {
_("Which dhcp client do you want to use?
Default is dhcpcd"),
sub { $_[0]{description} },
- \@m )) {
+ \@m)) {
$f->{c}==1 and $netcnx->{dhcp_client}="dhcpcd" and $in->do_pkgs->install(qw(dhcpcd));
$f->{c}==3 and $netcnx->{dhcp_client}="dhcpxd" and $in->do_pkgs->install(qw(dhcpxd));
$f->{c}==4 and $netcnx->{dhcp_client}="dhcp-client" and $in->do_pkgs->install(qw(dhcp-client));
@@ -91,7 +91,7 @@ I cannot set up this connection type.")) and return;
again :
$interface = $in->ask_from_list(_("Choose the network interface"),
_("Please choose which network adapter you want to use to connect to Internet"),
- [ map { $_->[0] . ($_->[1] ? " ( using module $_->[1] )" : "") } @all_cards ]
+ [ map { $_->[0] . ($_->[1] ? " (using module $_->[1])" : "") } @all_cards ]
) or return;
defined $interface or goto again;
l1:
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 1ab029b87..504655d11 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -167,7 +167,7 @@ sub isdn_ask_info {
my ($isdn, $netc) = @_;
my $f = "$ENV{SHARE_PATH}/ldetect-lst/isdn.db";
$f = "$prefix$f" if !-e $f;
- my $str= $in->ask_from_treelist( _("ISDN Configuration"), _("Select your provider.\nIf it isn't listed, choose Unlisted."),
+ my $str= $in->ask_from_treelist(_("ISDN Configuration"), _("Select your provider.\nIf it isn't listed, choose Unlisted."),
'|', ['Unlisted - edit manually',
read_providers_backend($f)], 'Unlisted - edit manually')
or return;
@@ -188,7 +188,7 @@ sub isdn_ask_protocol {
my $e = $in->ask_from_listf(_("ISDN Configuration"),
_("Which protocol do you want to use?"),
sub { $_[0]{description} },
- \@toto ) or return 0;
+ \@toto) or return 0;
$e->{protokol};
}
@@ -215,7 +215,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
$e = $in->ask_from_listf(_("ISDN Configuration"),
_("Which is your ISDN card?"),
sub { $_[0]{description} },
- [ grep {$_->{card} eq $isdn->{card_type}; } @isdndata ] ) or goto isdn_ask_step_1;
+ [ grep { $_->{card} eq $isdn->{card_type} } @isdndata ]) or goto isdn_ask_step_1;
$e->{$_} and $isdn->{$_} = $e->{$_} foreach qw(driver type mem io io0 io1 irq firmware);
isdn_ask_step_3:
@@ -229,7 +229,7 @@ If you have a PCMCIA card, you have to know the \"irq\" and \"io\" of your card.
sub isdn_detect {
my ($isdn, $netc) = @_;
if ($isdn->{id}) {
- log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor};id : $isdn->{id}; driver : $isdn->{driver}\n");
+ log::l("found isdn card : $isdn->{description}; vendor : $isdn->{vendor}; id : $isdn->{id}; driver : $isdn->{driver}\n");
$isdn->{description} =~ s/\|/ -- /;
if ($isdn->{type} eq '') {
isdn_ask($isdn, $netc, _("I have detected an ISDN PCI card, but I don't know its type. Please select a PCI card on the next screen.")) or return;
diff --git a/perl-install/network/isdn_consts.pm b/perl-install/network/isdn_consts.pm
index 357da529a..831bb6f25 100644
--- a/perl-install/network/isdn_consts.pm
+++ b/perl-install/network/isdn_consts.pm
@@ -2,7 +2,7 @@ package network::isdn; # $Id$
@isdndata =
(
- {description => "Teles 16.0 (ISA)", #1 irq, mem, io
+ { description => "Teles 16.0 (ISA)", #1 irq, mem, io
driver => 'hisax',
type => '1',
irq => '5',
@@ -10,28 +10,28 @@ package network::isdn; # $Id$
io => '0xd80',
card => 'isa',
},
- {description => "Teles 8.0 (ISA)", #2 irq, mem
+ { description => "Teles 8.0 (ISA)", #2 irq, mem
driver => 'hisax',
type => '2',
irq => '9',
mem => '0xd800',
card => 'isa',
},
- {description => "Teles 16.3 (ISA non PnP)", #3 irq, io
+ { description => "Teles 16.3 (ISA non PnP)", #3 irq, io
driver => 'hisax',
type => '3',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "Teles 16.3c (ISA PnP)", #14 irq, io
+ { description => "Teles 16.3c (ISA PnP)", #14 irq, io
driver => 'hisax',
type => '14',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "Creatix/Teles (ISA PnP)", #4 irq, io0 (ISAC), io1 (HSCX)
+ { description => "Creatix/Teles (ISA PnP)", #4 irq, io0 (ISAC), io1 (HSCX)
driver => 'hisax',
type => '4',
irq => '5',
@@ -39,156 +39,156 @@ package network::isdn; # $Id$
io1 => '0x0000',
card => 'isa',
},
- {description => "Teles generic (PCI)", #21 no parameter
+ { description => "Teles generic (PCI)", #21 no parameter
driver => 'hisax',
type => '21',
card => 'pci',
},
- {description => "Teles 16.3 (PCMCIA)", #8 irq, io
+ { description => "Teles 16.3 (PCMCIA)", #8 irq, io
driver => 'hisax',
type => '8',
irq => '',
io => '0x',
card => 'isa',
},
- {description => "Teles S0Box", #25 irq, io (of the used lpt port)
+ { description => "Teles S0Box", #25 irq, io (of the used lpt port)
driver => 'hisax',
type => '25',
irq => '7',
io => '0x378',
card => 'isa',
},
- {description => "ELSA PCC/PCF cards (ISA)", #6 io or nothing for autodetect (the io is required only if you have n>1 ELSA card )
+ { description => "ELSA PCC/PCF cards (ISA)", #6 io or nothing for autodetect (the io is required only if you have n>1 ELSA card)
driver => 'hisax',
type => '6',
io => "",
card => 'isa',
},
- {description => "ELSA Quickstep 1000 (ISA)", #7 irq, io (from isapnp setup)
+ { description => "ELSA Quickstep 1000 (ISA)", #7 irq, io (from isapnp setup)
driver => 'hisax',
type => '7',
irq => '5',
io => '0x300',
card => 'isa',
},
- {description => "ELSA Quickstep 1000 (PCI)", #18 no parameter
+ { description => "ELSA Quickstep 1000 (PCI)", #18 no parameter
driver => 'hisax',
type => '18',
card => 'pci',
},
- {description => "ELSA Quickstep 3000 (PCI)", #18 no parameter
+ { description => "ELSA Quickstep 3000 (PCI)", #18 no parameter
driver => 'hisax',
type => '18',
card => 'pci',
},
- {description => "ELSA generic (PCMCIA)", #10 irq, io (set with card manager)
+ { description => "ELSA generic (PCMCIA)", #10 irq, io (set with card manager)
driver => 'hisax',
type => '10',
irq => '',
io => '0x',
card => 'isa',
},
- {description => "ELSA MicroLink (PCMCIA)", #10 irq, io (set with card manager)
+ { description => "ELSA MicroLink (PCMCIA)", #10 irq, io (set with card manager)
driver => 'elsa_cs',
card => 'isa',
},
- {description => "ITK ix1-micro Rev.2 (ISA)", #9 irq, io
+ { description => "ITK ix1-micro Rev.2 (ISA)", #9 irq, io
driver => 'hisax',
type => '9',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "Eicon.Diehl Diva (ISA PnP)", #11 irq, io
+ { description => "Eicon.Diehl Diva (ISA PnP)", #11 irq, io
driver => 'hisax',
type => '11',
irq => '9',
io => '0x180',
card => 'isa',
},
- {description => "Eicon.Diehl Diva 20 (PCI)", #11 no parameter
+ { description => "Eicon.Diehl Diva 20 (PCI)", #11 no parameter
driver => 'hisax',
type => '11',
card => 'pci',
},
- {description => "Eicon.Diehl Diva 20PRO (PCI)", #11 no parameter
+ { description => "Eicon.Diehl Diva 20PRO (PCI)", #11 no parameter
driver => 'hisax',
type => '11',
card => 'pci',
},
- {description => "Eicon.Diehl Diva 20_U (PCI)", #11 no parameter
+ { description => "Eicon.Diehl Diva 20_U (PCI)", #11 no parameter
driver => 'hisax',
type => '11',
card => 'pci',
},
- {description => "Eicon.Diehl Diva 20PRO_U (PCI)", #11 no parameter
+ { description => "Eicon.Diehl Diva 20PRO_U (PCI)", #11 no parameter
driver => 'hisax',
type => '11',
card => 'pci',
},
- {description => "ASUS COM ISDNLink (ISA)", #12 irq, io (from isapnp setup)
+ { description => "ASUS COM ISDNLink (ISA)", #12 irq, io (from isapnp setup)
driver => 'hisax',
type => '12',
irq => '5',
io => '0x200',
card => 'isa',
},
- {description => "ASUS COM ISDNLink (PCI)",
+ { description => "ASUS COM ISDNLink (PCI)",
driver => 'hisax',
type => '35',
card => 'pci',
},
- {description => "DynaLink (PCI)",
+ { description => "DynaLink (PCI)",
driver => 'hisax',
type => '12',
card => 'pci',
},
- {description => "DynaLink IS64PH, ASUSCOM (PCI)", #36
+ { description => "DynaLink IS64PH, ASUSCOM (PCI)", #36
driver => 'hisax',
type => '36',
card => 'pci',
},
- {description => "HFC-2BS0 based cards (ISA)", #13 irq, io
+ { description => "HFC-2BS0 based cards (ISA)", #13 irq, io
driver => 'hisax',
type => '13',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "HFC 2BDS0 (PCI)", #35 none
+ { description => "HFC 2BDS0 (PCI)", #35 none
driver => 'hisax',
type => '35',
card => 'pci',
},
- {description => "HFC 2BDS0 S+, SP (PCMCIA)", #37 irq,io (pcmcia must be set with cardmgr)
+ { description => "HFC 2BDS0 S+, SP (PCMCIA)", #37 irq,io (pcmcia must be set with cardmgr)
driver => 'hisax',
type => '37',
card => 'isa',
},
- {description => "Sedlbauer Speed Card (ISA)", #15 irq, io
+ { description => "Sedlbauer Speed Card (ISA)", #15 irq, io
driver => 'hisax',
type => '15',
irq => '9',
io=> '0xd80',
card => 'isa',
},
- {description => "Sedlbauer PC/104 (ISA)", #15 irq, io
+ { description => "Sedlbauer PC/104 (ISA)", #15 irq, io
driver => 'hisax',
type => '15',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "Sedlbauer Speed Card (PCI)", #15 no parameter
+ { description => "Sedlbauer Speed Card (PCI)", #15 no parameter
driver => 'hisax',
type => '15',
card => 'pci',
},
- {description => "Sedlbauer Speed Star (PCMCIA)", #22 irq, io (set with card manager)
+ { description => "Sedlbauer Speed Star (PCMCIA)", #22 irq, io (set with card manager)
driver => 'sedlbauer_cs',
card => 'isa',
},
- {description => "Sedlbauer Speed Fax+ (ISA Pnp)", #28 irq, io (from isapnp setup)
+ { description => "Sedlbauer Speed Fax+ (ISA Pnp)", #28 irq, io (from isapnp setup)
driver => 'hisax',
type => '28',
irq => '9',
@@ -196,27 +196,27 @@ package network::isdn; # $Id$
card => 'isa',
firmware => '/usr/lib/isdn/ISAR.BIN',
},
- {description => "Sedlbauer Speed Fax+ (PCI)", #28 no parameter
+ { description => "Sedlbauer Speed Fax+ (PCI)", #28 no parameter
driver => 'hisax',
type => '28',
card => 'pci',
firmware => '/usr/lib/isdn/ISAR.BIN',
},
- {description => "USR Sportster internal (ISA)", #16 irq, io
+ { description => "USR Sportster internal (ISA)", #16 irq, io
driver => 'hisax',
type => '16',
irq => '9',
io=> '0xd80',
card => 'isa',
},
- {description => "MIC card (ISA)", #17 irq, io
+ { description => "MIC card (ISA)", #17 irq, io
driver => 'hisax',
type => '17',
irq => '9',
io => '0xd80',
card => 'isa',
},
- {description => "Compaq ISDN S0 card (ISA)", #19 irq, io0, io1, io (from isapnp setup io=IO2)
+ { description => "Compaq ISDN S0 card (ISA)", #19 irq, io0, io1, io (from isapnp setup io=IO2)
driver => 'hisax',
type => '19',
irq => '5',
@@ -225,12 +225,12 @@ package network::isdn; # $Id$
io1 => '0x0000',
card => 'isa',
},
- {description => "NETjet card (PCI)", #20 no parameter
+ { description => "NETjet card (PCI)", #20 no parameter
driver => 'hisax',
type => '20',
card => 'pci',
},
- {description => "Dr. Neuhaus Niccy (ISA PnP)", #24 irq, io0, io1 (from isapnp setup)
+ { description => "Dr. Neuhaus Niccy (ISA PnP)", #24 irq, io0, io1 (from isapnp setup)
driver => 'hisax',
type => '24',
irq => '5',
@@ -238,41 +238,41 @@ package network::isdn; # $Id$
io1 => '0x0000',
card => 'isa',
},
- {description => "Dr. Neuhaus Niccy (PCI)", ##24 no parameter
+ { description => "Dr. Neuhaus Niccy (PCI)", ##24 no parameter
driver => 'hisax',
type => '24',
card => 'pci',
},
- {description => "AVM A1 (Fritz) (ISA non PnP)", #5 irq, io
+ { description => "AVM A1 (Fritz) (ISA non PnP)", #5 irq, io
driver => 'hisax',
type => '5',
irq => '10',
io => '0x300',
card => 'isa',
},
- {description => "AVM (ISA Pnp)", #27 irq, io (from isapnp setup)
+ { description => "AVM (ISA Pnp)", #27 irq, io (from isapnp setup)
driver => 'hisax',
type => '27',
irq => '5',
io => '0x300',
card => 'isa',
},
- {description => "AVM A1 (Fritz) (PCMCIA)", #26 irq, io (set with card manager)
+ { description => "AVM A1 (Fritz) (PCMCIA)", #26 irq, io (set with card manager)
driver => 'hisax',
type => '26',
irq => '',
card => 'isa',
},
- {description => "AVM PCI (Fritz!) (PCI)", #27 no parameter
+ { description => "AVM PCI (Fritz!) (PCI)", #27 no parameter
driver => 'hisax',
type => '27',
card => 'pci',
},
- {description => "AVM B1 (PCI)",
+ { description => "AVM B1 (PCI)",
driver => 'b1pci',
card => 'pci',
},
- {description => "Siemens I-Surf 1.0 (ISA Pnp)", #29 irq, io, memory (from isapnp setup)
+ { description => "Siemens I-Surf 1.0 (ISA Pnp)", #29 irq, io, memory (from isapnp setup)
driver => 'hisax',
type => '29',
irq => '9',
@@ -280,43 +280,43 @@ package network::isdn; # $Id$
mem => '0xd000',
card => 'isa',
},
- {description => "ACER P10 (ISA Pnp)", #30 irq, io (from isapnp setup)
+ { description => "ACER P10 (ISA Pnp)", #30 irq, io (from isapnp setup)
driver => 'hisax',
type => '30',
irq => '5',
io => '0x300',
card => 'isa',
},
- {description => "HST Saphir (ISA Pnp)", #31 irq, io
+ { description => "HST Saphir (ISA Pnp)", #31 irq, io
driver => 'hisax',
type => '31',
irq => '5',
io => '0x300',
card => 'isa',
},
- {description => "Telekom A4T (PCI)", #32 none
+ { description => "Telekom A4T (PCI)", #32 none
driver => 'hisax',
type => '32',
card => 'pci',
},
- {description => "Scitel Quadro (PCI)", #33 subcontroller (4*S0, subctrl 1...4)
+ { description => "Scitel Quadro (PCI)", #33 subcontroller (4*S0, subctrl 1...4)
driver => 'hisax',
type => '33',
card => 'pci',
},
- {description => "Gazel ISDN cards (ISA)", #34 irq,io
+ { description => "Gazel ISDN cards (ISA)", #34 irq,io
driver => 'hisax',
type => '34',
irq => '5',
io => '0x300',
card => 'isa',
},
- {description => "Gazel ISDN cards (PCI)", #34 none
+ { description => "Gazel ISDN cards (PCI)", #34 none
driver => 'hisax',
type => '34',
card => 'pci',
},
- {description => "W6692 and Winbond based cards (PCI)", #36 none
+ { description => "W6692 and Winbond based cards (PCI)", #36 none
driver => 'hisax',
type => '36',
card => 'pci',
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 2edf23245..f15797687 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -50,7 +50,7 @@ sub intro {
my $e = $in->ask_from_listf(_("Internet connection & configuration"),
_($text),
sub { $_[0]{description} },
- \@l );
+ \@l);
run_program::rooted($prefix, $connect_prog) if ($e->{c}==1);
run_program::rooted($prefix, $disconnect_file) if ($e->{c}==2);
main($prefix, $netcnx, $netc, $mouse, $in, $intf, 0, 0) if ($e->{c}==3);
@@ -76,11 +76,11 @@ sub detect {
require network::adsl;
network::adsl->import;
map {
- ( !$net_install and adsl_detect($_->[0]) ) ? $auto_detect->{adsl}=$_->[0] : $auto_detect->{lan}{$_->[0]}=$_->[1]; } @all_cards;
+ (!$net_install and adsl_detect($_->[0])) ? $auto_detect->{adsl}=$_->[0] : $auto_detect->{lan}{$_->[0]}=$_->[1] } @all_cards;
my $modem={};
require network::modem;
network::modem->import;
- modem_detect_backend($modem);#, $mouse);
+ modem_detect_backend($modem);
$modem->{device} and $auto_detect->{modem}=$modem->{device};
}
@@ -118,7 +118,7 @@ sub init_globals {
prefix => $prefix,
connect_file => "/etc/sysconfig/network-scripts/net_cnx_up",
disconnect_file => "/etc/sysconfig/network-scripts/net_cnx_down",
- connect_prog => "/etc/sysconfig/network-scripts/net_cnx_pg" );
+ connect_prog => "/etc/sysconfig/network-scripts/net_cnx_pg");
}
sub main {
@@ -194,7 +194,7 @@ If you don't want to use the auto detection, deselect the checkbox.
[_("LAN connection"), $netc->{autodetect}{lan}, __("ethernet card(s) detected"), \$conf{lan}]
);
my $i=0;
- map { defined $set_default or do { $_->[1] and $set_default=$i; }; $i++; } @l;
+ map { defined $set_default or do { $_->[1] and $set_default=$i }; $i++ } @l;
@l = (
[_("Normal modem connection") . if_($netc->{autodetect}{modem}, " - " . _("detected on port %s", $netc->{autodetect}{modem})), \$conf{modem}],
[_("ISDN connection") . if_($netc->{autodetect}{isdn}{description}, " - " . _("detected %s", $netc->{autodetect}{isdn}{description})), \$conf{isdn}],
@@ -218,9 +218,9 @@ If you don't want to use the auto detection, deselect the checkbox.
# load_conf ($netcnx, $netc, $intf);
$conf{modem} and do { pre_func("modem"); require network::modem; network::modem::configure($netcnx, $mouse, $netc) or goto step_2 };
$conf{isdn} and do { pre_func("isdn"); require network::isdn; network::isdn::configure($netcnx, $netc) or goto step_2 };
- $conf{adsl} and do { pre_func("adsl"); require network::adsl; network::adsl::configure($netcnx, $netc, $intf, $first_time) or goto step_2};
- $conf{cable} and do { pre_func("cable"); require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1; };
- $conf{lan} and do { pre_func("local network"); require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1; };
+ $conf{adsl} and do { pre_func("adsl"); require network::adsl; network::adsl::configure($netcnx, $netc, $intf, $first_time) or goto step_2 };
+ $conf{cable} and do { pre_func("cable"); require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1 };
+ $conf{lan} and do { pre_func("local network"); require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2; $netconnect::need_restart_network = 1 };
step_2_1:
my $nb = keys %{$netc->{internet_cnx}};
@@ -276,7 +276,7 @@ Test your connection via net_monitor or mcc. If your connection doesn't work, yo
$in->ask_okcancel(_("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
- } else { $::isStandalone and $in->ask_warn('', $m ); }
+ } else { $::isStandalone and $in->ask_warn('', $m) }
step_5:
@@ -365,7 +365,7 @@ sub save_conf {
output("$prefix/etc/sysconfig/network-scripts/drakconnect_conf",
"SystemName=" . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
DomainName=" . do { $netc->{HOSTNAME} =~ /\.(.*)/; $1 } . "
-InternetAccessType=" . do { if ($netcnx->{type}) { $netcnx->{type}; } else { $netc->{GATEWAY} ? "lan" : ""; } } . "
+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}) . "
InternetGateway=$netc->{GATEWAY}
DNSPrimaryIP=$netc->{dnsServer}
@@ -426,7 +426,7 @@ PPPLogin=$modem->{login}
PPPPassword=$modem->{passwd}
PPPConfirmPassword=$modem->{passwd}
PPPAuthentication=$modem->{auth}
-PPPSpecialCommand=" . ($netcnx->{type} eq 'isdn_external' ? $netcnx->{isdn_external}{special_command} : '' ) . "
+PPPSpecialCommand=" . ($netcnx->{type} eq 'isdn_external' ? $netcnx->{isdn_external}{special_command} : '') . "
ADSLInterfacesList=
ADSLModem=" . q( # Obsolete information. Please don't use it.) . "
@@ -606,7 +606,7 @@ sub read_net_conf {
sub set_net_conf {
my ($netcnx, $netc)=@_;
- setVarsInShMode("$prefix/etc/sysconfig/drakconnect", 0600, $netcnx, "NET_DEVICE", "NET_INTERFACE", "type", "PROFILE" );
+ setVarsInShMode("$prefix/etc/sysconfig/drakconnect", 0600, $netcnx, "NET_DEVICE", "NET_INTERFACE", "type", "PROFILE");
setVarsInShMode("$prefix/etc/sysconfig/drakconnect." . $netcnx->{type}, 0600, $netcnx->{$netcnx->{type}}); #- doesn't work, don't know why
setVarsInShMode("$prefix/etc/sysconfig/drakconnect.netc", 0600, $netc); #- doesn't work, don't know why
}
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 60d8ffd41..57c08784e 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -128,7 +128,7 @@ sub write_interface_conf {
my @mask = split '\.', $intf->{NETMASK};
my $hwaddr;
$::o->{miscellaneous}{track_network_id} and $hwaddr = -e "$prefix/sbin/ip" && `LC_ALL= LANG= $prefix/sbin/ip -o link show $intf->{DEVICE} 2>/dev/null`;
- if ($hwaddr) { chomp $hwaddr; $hwaddr =~ s/.*link\/ether\s([0-9a-z:]+)\s.*/$1/; }
+ if ($hwaddr) { chomp $hwaddr; $hwaddr =~ s/.*link\/ether\s([0-9a-z:]+)\s.*/$1/ }
$hwaddr and $intf->{HWADDR} = undef;
add2hash($intf, {
BROADCAST => join('.', mapn { int $_[0] | ~int $_[1] & 255 } \@ip, \@mask),
@@ -228,7 +228,7 @@ sub netmask {
$ip =~ $ip_regexp;
if ($1 >= 1 && $1 < 127) {
return "255.0.0.0"; #-1.0.0.0 to 127.0.0.0
- } elsif ($1 >= 128 && $1 <= 191 ){
+ } elsif ($1 >= 128 && $1 <= 191){
return "255.255.0.0"; #-128.0.0.0 to 191.255.0.0
} elsif ($1 >= 192 && $1 <= 223) {
return "255.255.255.0";
@@ -306,7 +306,7 @@ notation (for example, 1.2.3.4).");
my @fields = qw(IPADDR NETMASK);
$::isStandalone or $in->set_help('configureNetworkIP');
$in->ask_from(_("Configuring network device %s", $intf->{DEVICE}),
- (_("Configuring network device %s", $intf->{DEVICE}) . ( $module ? _(" (driver %s)", $module) : '' ) ."\n\n") .
+ (_("Configuring network device %s", $intf->{DEVICE}) . ($module ? _(" (driver %s)", $module) : '') ."\n\n") .
$text,
[ { label => _("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } },
{ label => _("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } },
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm
index abf742800..751dbbc4a 100644
--- a/perl-install/network/smb.pm
+++ b/perl-install/network/smb.pm
@@ -41,7 +41,7 @@ sub smbclient {
my $ip = $server->{ip} ? "-I $server->{ip}" : '';
my $group = $server->{group} ? " -W $server->{group}" : '';
- my $U = $server->{username} ? "$server->{domain}/$server->{username}%$server->{password}" : '%';
+ my $U = $server->{username} ? sprintf("%s/%s%%%s", @$server{'domain', 'username', 'password'}) : '%';
`smbclient -U $U -L $name $ip$group`;
}
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index f155f359d..33f3bb6be 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -63,7 +63,7 @@ Try to reconfigure your connection.");
$in->ask_okcancel(_("Network Configuration"), $m, 1);
undef $::Wizard_no_previous;
undef $::Wizard_finished;
- } else { $in->ask_warn('', $m ); }
+ } else { $in->ask_warn('', $m) }
$::isInstall and disconnect_backend();
}
undef $::Wizard_no_previous;
@@ -153,7 +153,7 @@ sub connected_bg {
undef $kid_pipe;
$$ref = $a;
}
- } else { $kid_pipe = connected2(); }
+ } else { $kid_pipe = connected2() }
1;
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 4912f7fc3..fd8d64370 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -277,7 +277,7 @@ sub description {
sub isPrimary {
my ($part, $hd) = @_;
- foreach (@{$hd->{primary}{raw}}) { $part eq $_ and return 1; }
+ foreach (@{$hd->{primary}{raw}}) { $part eq $_ and return 1 }
0;
}
@@ -703,7 +703,7 @@ The only solution is to move your primary partitions to have the hole next to th
my ($ext, $ext_size) = is_empty_array_ref($hd->{extended}) ?
($hd->{primary}, -1) : #- -1 size will be computed by adjust_main_extended
(top(@{$hd->{extended}}), $part->{size});
- my %ext = ( type => $extended_type || 5, start => $part->{start}, size => $ext_size );
+ my %ext = (type => $extended_type || 5, start => $part->{start}, size => $ext_size);
$hd->raw_add($ext->{raw}, \%ext);
$ext->{extended} = \%ext;
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 3be68fe56..faa4b8fc1 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -106,7 +106,7 @@ sub get_geometry($) {
{ geom => \%geom, totalsectors => $total };
}
-sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }
+sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0 }
# cause kernel to re-read partition table
sub kernel_read($) {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index cea2d1b72..c75a9404d 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -314,7 +314,7 @@ sub psUpdateHdlistsDeps {
#- for getting header of package during installation or after by urpmi.
my $fakemedium = "$descr ($method$medium)";
my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2");
- -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; };
+ -e $newf and do { unlink $newf or die "cannot remove $newf: $!" };
install_any::getAndSaveFile("Mandrake/base/$hdlist", $newf) or die "no $hdlist found";
symlinkf $newf, "/tmp/$hdlist";
install_any::getAndSaveFile("Mandrake/base/synthesis.$hdlist",
@@ -378,7 +378,7 @@ sub psUsingHdlist {
#- copy hdlist file directly to $prefix/var/lib/urpmi, this will be used
#- for getting header of package during installation or after by urpmi.
my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2");
- -e $newf and do { unlink $newf or die "cannot remove $newf: $!"; };
+ -e $newf and do { unlink $newf or die "cannot remove $newf: $!" };
install_any::getAndSaveFile($fhdlist || "Mandrake/base/$hdlist", $newf) or die "no $hdlist found";
$m->{hdlist_size} = -s $newf; #- keep track of size for post-check.
symlinkf $newf, "/tmp/$hdlist";
@@ -614,7 +614,7 @@ sub computeGroupSize {
return if @$l1 > @$l2;
foreach (@$l1) {
my $c;
- while ($c = $l2->[$i++] cmp $_ ) {
+ while ($c = $l2->[$i++] cmp $_) {
return if $c == 1 || $i > @$l2;
}
}
@@ -1077,8 +1077,8 @@ sub remove($$) {
eval { fs::mount("/proc", "$prefix/proc", "proc", 0) } unless -e "$prefix/proc/cpuinfo";
- my $callbackOpen = sub { log::l("trying to open file from $_[0] which should not happen"); };
- my $callbackClose = sub { log::l("trying to close file from $_[0] which should not happen"); };
+ my $callbackOpen = sub { log::l("trying to open file from $_[0] which should not happen") };
+ my $callbackClose = sub { log::l("trying to close file from $_[0] which should not happen") };
#- we are not checking depends since it should come when
#- upgrading a system. although we may remove some functionalities ?
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 367663f9d..2e8c2b7a7 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -61,7 +61,7 @@ my $ptalinitread = 0;
#------------------------------------------------------------------------------
-sub set_prefix($) { $prefix = $_[0]; }
+sub set_prefix($) { $prefix = $_[0] }
sub default_printer_type($) { "LOCAL" }
@@ -116,7 +116,7 @@ sub set_permissions {
# We only need to set the permissions during installation to be able to
# print test pages. After installation the devfsd daemon does the business
# automatically.
- if (!$::isInstall) {return 1;}
+ if (!$::isInstall) { return 1 }
if ($owner && $group) {
run_program::rooted($prefix, "/bin/chown", "$owner.$group", $file)
|| die "Could not start chown!";
@@ -184,7 +184,7 @@ sub stop_service ($) {
# Exit silently if the service is not installed
return 1 if (!(-x "$prefix/etc/rc.d/init.d/$service"));
run_program::rooted($prefix, "/etc/rc.d/init.d/$service", "stop");
- if (($? >> 8) != 0) {return 0;} else {return 1;}
+ if (($? >> 8) != 0) { return 0 } else { return 1 }
}
sub service_starts_on_boot ($) {
@@ -213,9 +213,9 @@ sub start_service_on_boot ($) {
sub SIGHUP_daemon {
my ($service) = @_;
- if ($service eq "cupsd") {$service = "cups"};
+ if ($service eq "cupsd") { $service = "cups" };
# PDQ has no daemon, exit.
- if ($service eq "pdq") {return 1};
+ if ($service eq "pdq") { return 1 };
# CUPS needs auto-correction for its configuration
run_program::rooted($prefix, "/usr/sbin/correctcupsconfig") if ($service eq "cups");
# Name of the daemon
@@ -1078,7 +1078,7 @@ sub poll_ppd_base {
while (<PPDS>) {
chomp;
my ($ppd, $mf, $descr, $lang) = split /\|/;
- if ($ppd eq "raw") {next;}
+ if ($ppd eq "raw") { next }
my ($model, $driver);
if ($descr) {
if ($descr =~ /^([^,]+), (.*)$/) {
@@ -1507,7 +1507,7 @@ sub configure_hpoj {
$bus = "par";
$address_arg = parport_addr($device);
$address_arg =~ /^\s*-base\s+(\S+)/;
- eval ("$base_address = $1;");
+ eval ("$base_address = $1");
}
my $devdata;
@@ -1775,7 +1775,7 @@ mtools_skip_check=1
close F;
$mtoolsfmconf =~ m/^\s*DRIVES\s*=\s*\"([A-Za-z ]*)\"/m;
my $alloweddrives = lc($1);
- foreach my $letter ( "p", "q", "r", "s" ) {
+ foreach my $letter ("p", "q", "r", "s") {
if ($alloweddrives !~ /$letter/) {
$alloweddrives .= $letter;
}
@@ -2383,7 +2383,7 @@ sub addentry {
$sectionfound = 1;
}
} else {
- if (!/^\s*$/ && !/^\s*;/) {
+ if (!/^\s*$/ && !/^\s*;/) { #-#
$_ = "$entry\n$_";
$entryinserted = 1;
last;
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 09f274ec1..ba3f7bd60 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -37,7 +37,7 @@ sub config_cups {
local $::isWizard = 0;
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork)) {return 0};
+ if (!check_network($printer, $in, $upNetwork)) { return 0 };
$in->set_help('configureRemoteCUPSServer') if $::isInstall;
my $queue = $printer->{OLD_QUEUE};
@@ -144,7 +144,7 @@ sub auto_detect {
{
modules::get_probeall("usb-interface") and eval { modules::load("printer") };
eval { modules::unload(qw(lp parport_pc parport_probe parport)) }; #- on kernel 2.4 parport has to be unloaded to probe again
- eval { modules::load(qw(parport_pc lp parport_probe)); }; #- take care as not available on 2.4 kernel (silent error).
+ eval { modules::load(qw(parport_pc lp parport_probe)) }; #- take care as not available on 2.4 kernel (silent error).
}
my $b = before_leaving { eval { modules::unload("parport_probe") } };
detect_devices::whatPrinter();
@@ -396,7 +396,7 @@ Do you really want to get your printers auto-detected?"),
my $manualconf = 0;
$manualconf = 1 if (($printer->{MANUAL}) || (!$do_auto_detect));
if (!$in->ask_from_(
- {title => _("Local Printer"),
+ { title => _("Local Printer"),
messages => (($do_auto_detect ?
($::expert ?
(($#menuentrieslist == 0) ?
@@ -607,7 +607,7 @@ _(" (Parallel Ports: /dev/lp0, /dev/lp1, ..., equivalent to LPT1:, LPT2:, ..., 1
if (($descr !~ /$guessedmake/i) &&
(($guessedmake ne "hp") ||
($descr !~ /Hewlett[\s-]+Packard/i)))
- {$printer->{DBENTRY} = ""};
+ { $printer->{DBENTRY} = "" };
}
#- Pre-fill the "Description" field with the printer's model name
@@ -629,7 +629,7 @@ sub setup_lpd {
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork)) {return 0};
+ if (!check_network($printer, $in, $upNetwork)) { return 0 };
$in->set_help('setupLPD') if $::isInstall;
my ($uri, $remotehost, $remotequeue);
@@ -680,7 +680,7 @@ sub setup_smb {
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork)) {return 0};
+ if (!check_network($printer, $in, $upNetwork)) { return 0 };
$in->set_help('setupSMB') if $::isInstall;
my ($uri, $smbuser, $smbpassword, $workgroup, $smbserver, $smbserverip, $smbshare);
@@ -789,7 +789,7 @@ sub setup_ncp {
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork)) {return 0};
+ if (!check_network($printer, $in, $upNetwork)) { return 0 };
$in->set_help('setupNCP') if $::isInstall;
my ($uri, $ncpuser, $ncppassword, $ncpserver, $ncpqueue);
@@ -859,7 +859,7 @@ sub setup_socket {
# Check whether the network functionality is configured and
# running
- if (!check_network($printer, $in, $upNetwork)) {return 0};
+ if (!check_network($printer, $in, $upNetwork)) { return 0 };
$in->set_help('setupSocket') if $::isInstall;
my ($hostname, $port, $uri, $remotehost,$remoteport);
@@ -933,7 +933,7 @@ complete => sub {
# Non-local printer, check network and abort if no network available
if (($printer->{currentqueue}{connect} !~ m!^file:/!) &&
- (!check_network($printer, $in, $upNetwork))) {return 0};
+ (!check_network($printer, $in, $upNetwork))) { return 0 };
# If the chosen protocol needs additional software, install it.
@@ -1109,7 +1109,7 @@ sub get_db_entry {
if (($matchstr !~ /$guessedmake/i) &&
(($guessedmake ne "hp") ||
($matchstr !~ /Hewlett[\s-]+Packard/i)))
- {$printer->{DBENTRY} = ""};
+ { $printer->{DBENTRY} = "" };
}
# Set the OLD_CHOICE to a non-existing value
$printer->{OLD_CHOICE} = "XXX";
@@ -1303,8 +1303,8 @@ sub get_printer_info {
$printer->{currentqueue}{connect} = 'file:/dev/null';
#install packages
my $drivertype = $printer->{currentqueue}{model};
- if ($drivertype eq 'Z22') {$drivertype = 'Z32';}
- if ($drivertype eq 'Z23') {$drivertype = 'Z33';}
+ if ($drivertype eq 'Z22') { $drivertype = 'Z32' }
+ if ($drivertype eq 'Z23') { $drivertype = 'Z33' }
$drivertype = lc($drivertype);
if (!printer::files_exist("/usr/local/lexmark/$drivertype/$drivertype")) {
eval { $in->do_pkgs->install("lexmark-drivers-$drivertype") };
@@ -2007,7 +2007,7 @@ sub check_network {
# Second check: Is the network running?
- if (printer::network_running()) {return 1;}
+ if (printer::network_running()) { return 1 }
# The network is configured now, start it.
if (!start_network($in, $upNetwork)) {
@@ -2050,14 +2050,14 @@ sub security_check {
}
# Exit silently if the spooler is PDQ
- if ($spooler eq "pdq") {return 1;}
+ if ($spooler eq "pdq") { return 1 }
# Exit silently in medium or lower security levels
- if ((!$security) || ($security < 4)) {return 1;}
+ if ((!$security) || ($security < 4)) { return 1 }
# Exit silently if the current spooler is already activated for the current
# security level
- if (printer::spooler_in_security_level($spooler, $security)) {return 1;}
+ if (printer::spooler_in_security_level($spooler, $security)) { return 1 }
# Tell user in which security mode he is and ask him whether he really
# wants to activate the spooler in the given security mode. Stop the
@@ -2370,7 +2370,7 @@ sub main {
# If we have chosen a spooler, install it and mark it as default spooler
if (($printer->{SPOOLER}) && ($printer->{SPOOLER} ne '')) {
- if (!install_spooler($printer, $in, $upNetwork)) {return;}
+ if (!install_spooler($printer, $in, $upNetwork)) { return }
printer::set_default_spooler($printer);
}
@@ -2468,7 +2468,7 @@ sub main {
}
# Generate the list of available printers
my @printerlist =
- ( (sort((map {$printer->{configured}{$_}{queuedata}{menuentry}
+ ((sort((map { $printer->{configured}{$_}{queuedata}{menuentry}
. ($_ eq $printer->{DEFAULT} ?
_(" (Default)") : (""))}
keys(%{$printer->{configured}
@@ -2483,7 +2483,7 @@ sub main {
$menuchoice = $cursorpos;
# Show the main dialog
$in->ask_from_(
- {title => _("Printerdrake"),
+ { title => _("Printerdrake"),
messages =>
($noprinters ? "" :
(($printer->{SPOOLER} eq "cups") ?
@@ -2506,7 +2506,7 @@ sub main {
1;
},
val => _("Add a new printer") },
- ( $printer->{SPOOLER} eq "cups" ?
+ ($printer->{SPOOLER} eq "cups" ?
({ clicked_may_quit =>
sub {
# Save the cursor position
@@ -2524,7 +2524,7 @@ sub main {
},
val => ($::expert ? _("CUPS configuration") :
_("Specify CUPS server")) }) : ()),
- ( $::expert ?
+ ($::expert ?
{ clicked_may_quit =>
sub {
# Save the cursor position
@@ -2534,13 +2534,13 @@ sub main {
},
val => _("Change the printing system") } :
()),
- ( !$::isInstall ?
+ (!$::isInstall ?
{ clicked_may_quit =>
- sub { $menuchoice = "\@usermode"; 1; },
+ sub { $menuchoice = "\@usermode"; 1 },
val => ($::expert ? _("Normal Mode") :
_("Expert Mode")) } : ()),
{ clicked_may_quit =>
- sub { $menuchoice = "\@quit"; 1; },
+ sub { $menuchoice = "\@quit"; 1 },
val => _("Quit") },
]
);
@@ -2577,7 +2577,7 @@ sub main {
$newqueue = 1;
my %queues;
@queues{map { split '\|', $_ } keys %{$printer->{configured}}} = ();
- my $i = ''; while ($i < 150) { last unless exists $queues{"$defaultprname$i"}; ++$i; }
+ my $i = ''; while ($i < 150) { last unless exists $queues{"$defaultprname$i"}; ++$i }
$queue = "$defaultprname$i";
}
# Function to switch to another spooler
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 86a27d866..492225ceb 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -82,7 +82,7 @@ sub updateSize {
$part->{size} = do {
if (/0|linear/) { sum @l }
- elsif (/1/ ) { min @l }
+ elsif (/1/) { min @l }
elsif (/4|5/) { min(@l) * $#l }
};
}
@@ -107,7 +107,7 @@ sub write {
local $\ = "\n";
open F, ">$file" or die _("Can't write file %s", $file);
- foreach (grep {$_} @$raids) {
+ foreach (grep { $_ } @$raids) {
print F <<"EOF";
raiddev /dev/$_->{device}
raid-level $_->{level}
@@ -149,7 +149,7 @@ sub format_part {
sub verify {
my ($raids) = @_;
$raids or return;
- foreach (grep {$_} @$raids) {
+ foreach (grep { $_ } @$raids) {
@{$_->{disks}} >= ($_->{level} =~ /4|5/ ? 3 : 2) or die _("Not enough partitions for RAID level %d\n", $_->{level});
}
}
@@ -159,7 +159,7 @@ sub prepare_prefixed {
$raids or return;
eval { cp_af("/etc/raidtab", "$prefix/etc/raidtab") };
- foreach (grep {$_} @$raids) {
+ foreach (grep { $_ } @$raids) {
devices::make("$prefix/dev/$_->{device}") foreach @{$_->{disks}};
}
}
diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm
index 1f2b1ede6..455f579a2 100644
--- a/perl-install/resize_fat/directory.pm
+++ b/perl-install/resize_fat/directory.pm
@@ -35,7 +35,7 @@ sub entry_size { $psizeof_format }
sub traverse($$$) {
my ($directory, $curr_dir_name, $f) = @_;
- for (my $i = 0;; $i++) {
+ for (my $i = 0; ; $i++) {
my $raw = \substr($directory, $i * $psizeof_format, $psizeof_format);
#- empty entry means end of directory
diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm
index 31643f0a3..fdf0c2ac8 100644
--- a/perl-install/resize_fat/fat.pm
+++ b/perl-install/resize_fat/fat.pm
@@ -84,7 +84,7 @@ sub update {
}
-sub endianness16($) { (($_[0] & 0xff) << 8) + ($_[0] >> 8); }
+sub endianness16($) { (($_[0] & 0xff) << 8) + ($_[0] >> 8) }
sub endianness($$) {
my ($val, $nb_bits) = @_;
my $r = 0;
diff --git a/perl-install/services.pm b/perl-install/services.pm
index bec714e70..7174048a9 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -119,20 +119,20 @@ sub ask_install_simple {
sub ask_install {
my ($in, $prefix) = @_;
my %root_services = (
- _("Printing") => [ qw(cups cupslpd lpr lpd oki4daemon hpoj cups-lpd ) ],
+ _("Printing") => [ qw(cups cupslpd lpr lpd oki4daemon hpoj cups-lpd) ],
_("Internet") => [ qw(httpd boa tux roxen ftp pftp tftp proftpd wu-ftpd pure-ftpdipsec proftpd-xinetd
ipchains iptables ipvsadm isdn4linux ibod jabber jabber-icq adsl squid
- portsentry prelude nessusd junkbuster radvd cddbp ippl iptoip jail.init ) ],
+ portsentry prelude nessusd junkbuster radvd cddbp ippl iptoip jail.init) ],
_("File sharing") => [ qw(nfs nfslock smb nettalk netfs mcserv autofs amd
- venus.init auth2.init codasrv.init update.init swat ) ],
+ venus.init auth2.init codasrv.init update.init swat) ],
_("System") => [ qw(usb usbd pcmcia irda xinetd inetd kudzu harddrake apmd sound network xfs
alsa functions halt kheader killall mandrake_everytime mandrake_firstime
random rawdevices single keytable syslog crond medusa-init portmap acon
anacron atd gpm psacct wine acpid numlock jserver sensors mosix bpowerd bpowerfail
fcron powertweak.init ups syslog-ng cvs apcupsd) ],
_("Remote Administration") => [ qw(sshd telnetd telnet rsh rlogin rexec webmin cfd heartbeat ldirectord
- iplog mon vncserver netsaint olympusd drakxtools_http ) ],
-# _("Network Client") => [ qw(ypbind nscd arpwatch fetchmail dnrd_rc diald rsync ) ],
+ iplog mon vncserver netsaint olympusd drakxtools_http) ],
+# _("Network Client") => [ qw(ypbind nscd arpwatch fetchmail dnrd_rc diald rsync) ],
# _("Network Server") => [ qw(named bootparamd ntpd xntpd chronyd postfix sendmail
# imap imaps ipop2 ipop3 pop3s routed yppasswdd ypserv ldap dhcpd dhcrelay
# hylafax innd identd rstatd rusersd rwalld rwhod gated
@@ -226,7 +226,7 @@ sub ask_standalone_gtk {
"@$on_services" =~ /$service/ or push(@$on_services,$service)
} else {
@$on_services = grep(!/$service/, @$on_services)
- }}), "@$on_services" =~ /$service/ )),
+ }}), "@$on_services" =~ /$service/)),
map { my $a = $_;
gtkpack__(new Gtk::HBox(0,0), gtksignal_connect(new Gtk::Button(_($a)),
clicked => sub { my $c = "service $service " . (lc($a) eq "start" ? "restart" : lc($a)) . " 2>&1"; local $_=`$c`; s/\033\[[^mG]*[mG]//g;
@@ -240,10 +240,10 @@ sub ask_standalone_gtk {
0, gtkpack(gtkset_border_width(new Gtk::HBox(0,0),5), $W->create_okcancel)
))
);
- $b->signal_connect( motion_notify_event => sub { my ($w, $e) = @_;
+ $b->signal_connect(motion_notify_event => sub { my ($w, $e) = @_;
my ($ox, $oy) = $w->window->get_deskrelative_origin;
- $x = $e->{'x'}+$ox; $y = $e->{'y'}+$oy; });
- $b->signal_connect( button_press_event => sub { $nopop->()});
+ $x = $e->{'x'}+$ox; $y = $e->{'y'}+$oy });
+ $b->signal_connect(button_press_event => sub { $nopop->() });
$::isEmbedded and Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill (12, $::CCPID);
$W->main or return;
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
index 7b7597c10..171c2ea1d 100644
--- a/perl-install/swap.pm
+++ b/perl-install/swap.pm
@@ -78,14 +78,14 @@ sub make($;$) {
$nbpages >= 10 or die "swap area needs to be at least " . (10 * $pagesize / 1024) . "kB";
-b $devicename or $checkBlocks = 0;
- my $rdev = (stat $devicename)[6];# or log::l("stat of $devicename failed: $!");
+ my $rdev = (stat $devicename)[6];
$rdev == 0x300 || $rdev == 0x340 and die "$devicename is not a good device for swap";
sysopen F, $devicename, 2 or die "opening $devicename for writing failed: $!";
- if ($version == 0) { $maxpages = $V0_MAX_PAGES; }
- elsif (kernel_greater_or_equal(2,2,1)) { $maxpages = $V1_MAX_PAGES; }
- else { $maxpages = min($V1_OLD_MAX_PAGES, $V1_MAX_PAGES); }
+ if ($version == 0) { $maxpages = $V0_MAX_PAGES }
+ elsif (kernel_greater_or_equal(2,2,1)) { $maxpages = $V1_MAX_PAGES }
+ else { $maxpages = min($V1_OLD_MAX_PAGES, $V1_MAX_PAGES) }
if ($nbpages > $maxpages) {
$nbpages = $maxpages;
@@ -95,7 +95,7 @@ sub make($;$) {
if ($checkBlocks) {
$badpages = check_blocks(*F, $version, $nbpages);
} elsif ($version == 0) {
- for (my $i = 0; $i < $nbpages; $i++) { vec($signature_page, $i, 1) = 1; }
+ for (my $i = 0; $i < $nbpages; $i++) { vec($signature_page, $i, 1) = 1 }
}
$version == 0 and !vec($signature_page, 0, 1) and die "bad block on first page";