summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-24 19:00:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-24 19:00:12 +0000
commit73c851144720e28b21a491b6250385170db9d752 (patch)
treedcc9fae4302b3d083ad7cc7a808e5d17f970bb8c
parent0dc3338257439d2265c1eb13c3a66c9431c88cb5 (diff)
downloaddrakx-73c851144720e28b21a491b6250385170db9d752.tar
drakx-73c851144720e28b21a491b6250385170db9d752.tar.gz
drakx-73c851144720e28b21a491b6250385170db9d752.tar.bz2
drakx-73c851144720e28b21a491b6250385170db9d752.tar.xz
drakx-73c851144720e28b21a491b6250385170db9d752.zip
perl_checker adaptations + fixes
-rw-r--r--perl-install/Xconfig/card.pm4
-rw-r--r--perl-install/Xconfig/monitor.pm6
-rw-r--r--perl-install/Xconfig/various.pm2
-rw-r--r--perl-install/Xconfig/xfree3.pm4
-rw-r--r--perl-install/any.pm8
-rw-r--r--perl-install/c.pm2
-rw-r--r--perl-install/commands.pm12
-rw-r--r--perl-install/common.pm12
-rw-r--r--perl-install/crypto.pm4
-rw-r--r--perl-install/detect_devices.pm66
-rw-r--r--perl-install/devices.pm2
-rw-r--r--perl-install/diskdrake/hd_gtk.pm8
-rw-r--r--perl-install/diskdrake/interactive.pm5
-rw-r--r--perl-install/diskdrake/removable.pm2
-rw-r--r--perl-install/diskdrake/smbnfs_gtk.pm4
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/fsedit.pm2
-rw-r--r--perl-install/harddrake/data.pm2
-rw-r--r--perl-install/harddrake/sound.pm2
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_any.pm16
-rw-r--r--perl-install/install_messages.pm8
-rw-r--r--perl-install/install_steps.pm6
-rw-r--r--perl-install/install_steps_auto_install.pm5
-rw-r--r--perl-install/install_steps_interactive.pm6
-rw-r--r--perl-install/interactive.pm14
-rw-r--r--perl-install/interactive/http.pm8
-rw-r--r--perl-install/interactive/newt.pm12
-rw-r--r--perl-install/interactive/stdio.pm2
-rw-r--r--perl-install/keyboard.pm10
-rw-r--r--perl-install/lang.pm8
-rw-r--r--perl-install/loopback.pm2
-rw-r--r--perl-install/lvm.pm2
-rw-r--r--perl-install/modules.pm10
-rw-r--r--perl-install/mouse.pm8
-rw-r--r--perl-install/network/isdn.pm4
-rw-r--r--perl-install/network/netconnect.pm4
-rw-r--r--perl-install/network/shorewall.pm4
-rw-r--r--perl-install/network/tools.pm16
-rw-r--r--perl-install/partition_table.pm2
-rw-r--r--perl-install/partition_table/gpt.pm2
-rw-r--r--perl-install/pkgs.pm15
-rw-r--r--perl-install/raid.pm4
-rw-r--r--perl-install/resize_fat/directory.pm2
-rw-r--r--perl-install/sbus_probing/main.pm2
-rwxr-xr-xperl-install/scanner.pm4
-rw-r--r--perl-install/security/level.pm8
-rw-r--r--perl-install/services.pm4
-rwxr-xr-xperl-install/standalone/draksec4
-rwxr-xr-xperl-install/standalone/harddrake22
-rw-r--r--perl-install/timezone.pm4
-rw-r--r--perl-install/ugtk2.pm11
52 files changed, 177 insertions, 183 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 5c38e7332..6a07e1cd6 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -416,8 +416,8 @@ sub multi_head_choices {
}
#- XFree version available, it would be better to parse available package and get version from it.
-sub xfree4_version { '4.3' }
-sub xfree3_version { '3.3.6' }
+sub xfree4_version() { '4.3' }
+sub xfree3_version() { '3.3.6' }
sub xfree_and_glx_choices {
my ($card) = @_;
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm
index 1df15ecd5..27475c0d1 100644
--- a/perl-install/Xconfig/monitor.pm
+++ b/perl-install/Xconfig/monitor.pm
@@ -9,7 +9,7 @@ use any;
use log;
-sub good_default_monitor {
+sub good_default_monitor() {
arch() =~ /ppc/ ?
(detect_devices::get_mac_model() =~ /^iBook/ ? 'Apple|iBook 800x600' : 'Apple|iMac/PowerBook 1024x768') :
(detect_devices::isLaptop() ? 'Generic|Flat Panel 1024x768' : 'Generic|1024x768 @ 70 Hz');
@@ -156,7 +156,7 @@ sub configure_automatic {
return $monitor->{HorizSync} && $monitor->{VertRefresh};
}
-sub getinfoFromDDC {
+sub getinfoFromDDC() {
my ($VideoRam, @l) = any::ddcxinfos() or return;
my @Modes;
@@ -180,7 +180,7 @@ sub getinfoFromDDC {
};
}
-sub monitors {
+sub monitors() {
readMonitorsDB("$ENV{SHARE_PATH}/ldetect-lst/MonitorsDB");
}
sub readMonitorsDB {
diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm
index d277937c5..5849a1c17 100644
--- a/perl-install/Xconfig/various.pm
+++ b/perl-install/Xconfig/various.pm
@@ -142,7 +142,7 @@ sub configure_FB_TVOUT {
}
}
-sub check_XF86Config_symlink {
+sub check_XF86Config_symlink() {
my $f = "$::prefix/etc/X11/XF86Config-4";
if (!-l $f && -e "$f.tvout") {
rename $f, "$f.standard";
diff --git a/perl-install/Xconfig/xfree3.pm b/perl-install/Xconfig/xfree3.pm
index 450ce3461..8f61fe55a 100644
--- a/perl-install/Xconfig/xfree3.pm
+++ b/perl-install/Xconfig/xfree3.pm
@@ -109,7 +109,9 @@ sub is_fbdev {
val($Screen->{Server}) eq 'FBDev';
}
-sub set_Option {}
+sub set_Option {
+ my ($_raw_X, $_category, $_node, @_names) = @_;
+}
sub val {
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 423bf990c..ce3680410 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -19,7 +19,7 @@ use modules;
use log;
use c;
-sub drakx_version {
+sub drakx_version() {
sprintf "DrakX v%s built %s", $::testing ? ('TEST', scalar gmtime()) : (split('/', cat_("$ENV{SHARE_PATH}/VERSION")))[2,3];
}
@@ -80,7 +80,7 @@ sub hdInstallPath() {
$tail && ($head ? "$head/$tail" : "/mnt/hd/$tail");
}
-sub kernelVersion {
+sub kernelVersion() {
my $kernel = readlink("$::prefix/boot/vmlinuz") || first(all("$::prefix/boot"));
first($kernel =~ /vmlinuz-(.*)/);
}
@@ -863,7 +863,7 @@ You can use userdrake to add a user to this group.")
}
}
-sub ddcxinfos {
+sub ddcxinfos() {
return if $::noauto;
my @l;
@@ -881,7 +881,7 @@ sub ddcxinfos {
@l;
}
-sub running_window_manager {
+sub running_window_manager() {
my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm);
foreach (@window_managers) {
diff --git a/perl-install/c.pm b/perl-install/c.pm
index 0d5fe8f00..56996ecf5 100644
--- a/perl-install/c.pm
+++ b/perl-install/c.pm
@@ -5,7 +5,7 @@ use vars qw($AUTOLOAD);
use c::stuff;
use MDK::Common;
-sub AUTOLOAD {
+sub AUTOLOAD() {
$AUTOLOAD =~ /::(.*)/;
my @l = eval { &{$c::stuff::{$1}} };
if (my $err = $@) {
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index fb5a8ada3..eb14a1362 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -38,13 +38,13 @@ sub getopts {
@r;
}
-sub true { exit 0 }
-sub false { exit 1 }
+sub true() { exit 0 }
+sub false() { exit 1 }
sub cat { @ARGV = @_; print while <> }
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 which {
ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG } }
}
@@ -447,13 +447,13 @@ sub kill {
kill $signal, @_ or die "kill failed: $!\n";
}
-sub lspci {
+sub lspci() {
require detect_devices;
print join "\n", detect_devices::stringlist(1), '';
}
*lssbus = \&lspci;
-sub dmesg { print cat_("/tmp/syslog") }
+sub dmesg() { print cat_("/tmp/syslog") }
sub sort {
my ($n, $h) = getopts(\@_, qw(nh));
@@ -518,6 +518,6 @@ sub loadkeys {
keyboard::setup({ KEYBOARD => $_[0] });
}
-sub sync { common::sync() }
+sub sync() { common::sync() }
1;
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 72a40bd32..87a491bcd 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -137,7 +137,7 @@ sub formatTime {
}
}
-sub usingRamdisk { any { /ram3/ } cat_("/proc/mounts") }
+sub usingRamdisk() { any { /ram3/ } cat_("/proc/mounts") }
sub expand_symlinks_but_simple {
my ($f) = @_;
@@ -160,7 +160,7 @@ sub group_n_lm {
@l
}
-sub screenshot_dir__and_move {
+sub screenshot_dir__and_move() {
my ($dir1, $dir2) = ("$::prefix/root", '/tmp/stage2');
if (-e $dir1) {
if (-e "$dir2/DrakX-screenshots") {
@@ -173,7 +173,7 @@ sub screenshot_dir__and_move {
}
}
-sub take_screenshot {
+sub take_screenshot() {
my $dir = screenshot_dir__and_move() . '/DrakX-screenshots';
my $warn;
if (!-e $dir) {
@@ -241,11 +241,11 @@ sub set_permissions {
or die "Could not start chmod!";
}
-sub mandrake_release {
+sub mandrake_release() {
chomp_(cat_("/etc/mandrake-release"))
}
-sub require_root_capability {
+sub require_root_capability() {
return unless $>; # we're already root
if (check_for_xserver()) {
if (fuzzy_pidofs(qr/\bkwin\b/) > 0) {
@@ -258,7 +258,7 @@ sub require_root_capability {
die "you must be root to run this program" if $>;
}
-sub check_for_xserver {
+sub check_for_xserver() {
if (!defined $::xtest) {
$::xtest = $ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0;
}
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index 76821f38c..8fa979678 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -45,7 +45,7 @@ use ftp;
%mirrors = ();
sub mirror2text { $mirrors{$_[0]} && $mirrors{$_[0]}[0] . '|' . $_[0] }
-sub mirrors {
+sub mirrors() {
unless (keys %mirrors) {
#- contact the following URL to retrieve list of mirror.
#- http://www.linux-mandrake.com/mirrorsfull.list
@@ -98,7 +98,7 @@ sub bestMirror {
}
#- hack to retrieve Mandrake Linux version...
-sub version {
+sub version() {
require pkgs;
my $pkg = pkgs::packageByName($::o->{packages}, 'mandrake-release');
$pkg && $pkg->version || '9.1'; #- safe but dangerous ;-)
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 49a0890ea..dde0ce63f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -22,10 +22,10 @@ my %serialprobe;
#-######################################################################################
#- Functions
#-######################################################################################
-sub dev_is_devfs { -e "/dev/.devfsd" } #- no $::prefix, returns false during install and that's nice :)
+sub dev_is_devfs() { -e "/dev/.devfsd" } #- no $::prefix, returns false during install and that's nice :)
-sub get {
+sub get() {
#- Detect the default BIOS boot harddrive is kind of tricky. We may have IDE,
#- SCSI and RAID devices on the same machine. From what I see so far, the default
#- BIOS boot harddrive will be
@@ -35,15 +35,15 @@ sub get {
getIDE(), getSCSI(), getDAC960(), getCompaqSmartArray(), getATARAID();
}
-sub hds { grep { $_->{media_type} eq 'hd' && !isRemovableDrive($_) } get() }
-sub tapes { grep { $_->{media_type} eq 'tape' } get() }
-sub cdroms { grep { $_->{media_type} eq 'cdrom' } get() }
-sub burners { grep { isBurner($_) } cdroms() }
-sub dvdroms { grep { isDvdDrive($_) } cdroms() }
-sub raw_zips { grep { member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get() }
+sub hds() { grep { $_->{media_type} eq 'hd' && !isRemovableDrive($_) } get() }
+sub tapes() { grep { $_->{media_type} eq 'tape' } get() }
+sub cdroms() { grep { $_->{media_type} eq 'cdrom' } get() }
+sub burners() { grep { isBurner($_) } cdroms() }
+sub dvdroms() { grep { isDvdDrive($_) } cdroms() }
+sub raw_zips() { grep { member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get() }
#-sub jazzs { grep { member($_->{media_type}, 'fd', 'hd') && isJazzDrive($_) } get() }
-sub ls120s { grep { member($_->{media_type}, 'fd', 'hd') && isLS120Drive($_) } get() }
-sub zips {
+sub ls120s() { grep { member($_->{media_type}, 'fd', 'hd') && isLS120Drive($_) } get() }
+sub zips() {
map {
$_->{device} .= 4;
$_->{devfs_device} = $_->{devfs_prefix} . '/part4';
@@ -51,8 +51,8 @@ sub zips {
} raw_zips();
}
-sub cdroms__faking_ide_scsi { grep { $_->{media_type} eq 'cdrom' } cdroms_and_zips__faking_ide_scsi() }
-sub cdroms_and_zips__faking_ide_scsi {
+sub cdroms__faking_ide_scsi() { grep { $_->{media_type} eq 'cdrom' } cdroms_and_zips__faking_ide_scsi() }
+sub cdroms_and_zips__faking_ide_scsi() {
my @l = grep { $_->{media_type} eq 'cdrom' || member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get();
if (my @l_need_fake = grep { !$::isStandalone && $_->{bus} eq 'ide' && !($_->{media_type} eq 'cdrom' && !isBurner($_)) } @l) {
@@ -101,10 +101,10 @@ sub floppies() {
@ide, @scsi, @fds;
}
sub floppies_dev() { map { $_->{device} } floppies() }
-sub floppy { first(floppies_dev()) }
+sub floppy() { first(floppies_dev()) }
#- example ls120, model = "LS-120 SLIM 02 UHD Floppy"
-sub removables {
+sub removables() {
floppies(), cdroms_and_zips__faking_ide_scsi();
}
@@ -341,7 +341,7 @@ sub getDAC960() {
values %idi;
}
-sub getATARAID {
+sub getATARAID() {
my %l;
foreach (syslog()) {
my ($device) = m|^\s*(ataraid/d\d+):| or next;
@@ -361,7 +361,7 @@ sub getATARAID {
# cpu_freq = arch() =~ /^alpha/ ? "cycle frequency [Hz]" :
# arch() =~ /^ppc/ ? "clock" : "cpu MHz"
-sub getCPUs {
+sub getCPUs() {
my (@cpus, $cpu);
foreach (cat_("/proc/cpuinfo")) {
if (/^processor/) { # ix86 specific
@@ -375,13 +375,13 @@ sub getCPUs {
@cpus;
}
-sub getSoundDevices {
+sub getSoundDevices() {
(arch() =~ /ppc/ ? \&modules::load_category : \&modules::probe_category)->('multimedia/sound');
}
sub isTVcard { $_[0]{driver} =~ /bttv|saa7134/ }
-sub getTVcards {
+sub getTVcards() {
grep { isTVcard($_) } detect_devices::probeall();
}
@@ -411,10 +411,10 @@ sub getModem() {
getSerialModem({}), @pci_modems;
}
-sub getSpeedtouch {
+sub getSpeedtouch() {
grep { $_->{description} eq 'Alcatel|USB ADSL Modem (Speed Touch)' } probeall(0);
}
-sub getSagem {
+sub getSagem() {
grep { $_->{description} eq 'Analog Devices Inc.|USB ADSL modem' } probeall(0);
}
@@ -478,7 +478,7 @@ sub pci_probe {
} c::pci_probe($probe_type || 0));
}
-sub usb_probe {
+sub usb_probe() {
-e "/proc/bus/usb/devices" or return;
add_addons($usbtable_addons, map {
@@ -490,7 +490,7 @@ sub usb_probe {
} c::usb_probe());
}
-sub pcmcia_probe {
+sub pcmcia_probe() {
-e '/var/run/stab' || -e '/var/lib/pcmcia/stab' or return ();
my (@devs, $desc);
@@ -541,7 +541,7 @@ sub tryWrite($) {
sysopen $F, devices::make($_[0]), 1 | c::O_NONBLOCK() and $F;
}
-sub syslog {
+sub syslog() {
-r "/tmp/syslog" and return map { /<\d+>(.*)/ } cat_("/tmp/syslog");
my $LD_LOADER = $ENV{LD_LOADER} || "";
`$LD_LOADER /bin/dmesg`;
@@ -567,23 +567,23 @@ sub get_mac_generation() {
return "Unknown Generation";
}
-sub hasSMP { !$::testing && c::detectSMP() }
-sub hasPCMCIA { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab)
+sub hasSMP() { !$::testing && c::detectSMP() }
+sub hasPCMCIA() { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab)
#- try to detect a laptop, we assume pcmcia service is an indication of a laptop or
#- the following regexp to match graphics card apparently only used for such systems.
-sub isLaptop {
+sub isLaptop() {
hasPCMCIA() || (matching_desc('C&T.*655[45]\d') || matching_desc('C&T.*68554') ||
matching_desc('Neomagic.*Magic(Media|Graph)') ||
matching_desc('ViRGE.MX') || matching_desc('S3.*Savage.*[IM]X') ||
matching_desc('ATI.*(Mobility|LT)'));
}
-sub usbMice { grep { $_->{media_type} =~ /\|Mouse/ && $_->{driver} !~ /Tablet:wacom/ ||
+sub usbMice() { grep { $_->{media_type} =~ /\|Mouse/ && $_->{driver} !~ /Tablet:wacom/ ||
$_->{driver} =~ /Mouse:USB/ } usb_probe() }
-sub usbWacom { grep { $_->{driver} =~ /Tablet:wacom/ } usb_probe() }
-sub usbKeyboards { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() }
-sub usbStorage { grep { $_->{media_type} =~ /Mass Storage\|/ } usb_probe() }
+sub usbWacom() { grep { $_->{driver} =~ /Tablet:wacom/ } usb_probe() }
+sub usbKeyboards() { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() }
+sub usbStorage() { grep { $_->{media_type} =~ /Mass Storage\|/ } usb_probe() }
sub usbKeyboard2country_code {
my ($usb_kbd) = @_;
@@ -594,7 +594,7 @@ sub usbKeyboard2country_code {
unpack("C", $tmp);
}
-sub probeSerialDevices {
+sub probeSerialDevices() {
foreach (0..3) {
#- make sure the device are created before probing,
devices::make("/dev/ttyS$_");
@@ -634,7 +634,7 @@ sub hasMousePS2 {
my $t; sysread(tryOpen($_[0]) || return, $t, 256) != 1 || $t ne "\xFE";
}
-sub raidAutoStartIoctl {
+sub raidAutoStartIoctl() {
sysopen(my $F, devices::make("md0"), 2) or return;
ioctl $F, 2324, 0;
}
@@ -677,7 +677,7 @@ sub raidAutoStart {
}
}
-sub is_a_recent_computer {
+sub is_a_recent_computer() {
my ($frequence) = map { /cpu MHz\s*:\s*(.*)/ } cat_("/proc/cpuinfo");
$frequence > 600;
}
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 7c57f43a0..e3ecc3185 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -37,7 +37,7 @@ sub del_loop {
my ($dev) = @_;
run_program::run("losetup", "-d", $dev);
}
-sub find_free_loop {
+sub find_free_loop() {
foreach (0..7) {
my $dev = make("loop$_");
sysopen(my $F, $dev, 2) or next;
diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm
index 2071b3e4a..82fe1964a 100644
--- a/perl-install/diskdrake/hd_gtk.pm
+++ b/perl-install/diskdrake/hd_gtk.pm
@@ -304,11 +304,11 @@ sub create_buttons4partitions {
################################################################################
# disks: helpers
################################################################################
-sub current_hd {
+sub current_hd() {
$current_kind->{type} eq 'hd' or die 'current_hd called but $current_kind is not an hd';
$current_kind->{val};
}
-sub current_part {
+sub current_part() {
current_hd();
$current_entry;
}
@@ -369,14 +369,14 @@ sub lvm2kind {
################################################################################
# raids: helpers
################################################################################
-sub raid2kind {
+sub raid2kind() {
{ type => 'raid', name => 'raid', val => $all_hds->{raids} };
}
################################################################################
# loopbacks: helpers
################################################################################
-sub loopback2kind {
+sub loopback2kind() {
{ type => 'loopback', name => 'loopback', val => $all_hds->{loopbacks} };
}
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index f32c872c7..85cdfa54e 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -235,6 +235,7 @@ sub main {
# general actions
################################################################################
sub general_possible_actions {
+ my ($_in, $_all_hds) = @_;
N_("Undo"), ($::expert ? N_("Toggle to normal mode") : N_("Toggle to expert mode"));
}
@@ -932,8 +933,8 @@ sub Options {
{
no strict;
- *{'Toggle to normal mode'} = sub { $::expert = 0 };
- *{'Toggle to expert mode'} = sub { $::expert = 1 };
+ *{'Toggle to normal mode'} = sub() { $::expert = 0 };
+ *{'Toggle to expert mode'} = sub() { $::expert = 1 };
*{'Clear all'} = \&Clear_all;
*{'Auto allocate'} = \&Auto_allocate;
*{'Mount point'} = \&Mount_point;
diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm
index 939e61283..6862225c5 100644
--- a/perl-install/diskdrake/removable.pm
+++ b/perl-install/diskdrake/removable.pm
@@ -19,7 +19,7 @@ sub main {
}
}
-sub actions {
+sub actions() {
(
N_("Mount point") => \&mount_point,
N_("Options") => \&options,
diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm
index 51152d991..8197d9ed1 100644
--- a/perl-install/diskdrake/smbnfs_gtk.pm
+++ b/perl-install/diskdrake/smbnfs_gtk.pm
@@ -261,11 +261,11 @@ sub add_smbnfs {
$kind;
}
-sub nfs2kind {
+sub nfs2kind() {
network::nfs->new({ type => 'nfs', name => 'NFS', val => $all_hds->{nfss}, no_auto => 1 });
}
-sub smb2kind {
+sub smb2kind() {
network::smb->new({ type => 'smb', name => 'Samba', val => $all_hds->{smbs}, no_auto => 1 });
}
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 40ee13b21..618c58f7d 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -298,7 +298,7 @@ sub auto_fs() {
grep { chop; $_ && !/nodev/ } cat_("/etc/filesystems");
}
-sub mount_options {
+sub mount_options() {
my %non_defaults = (
sync => 'async', noatime => 'atime', noauto => 'auto', ro => 'rw',
user => 'nouser', nodev => 'dev', noexec => 'exec', nosuid => 'suid',
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 978735b2a..c3303c83e 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -78,7 +78,7 @@ sub typeOfPart {
#-######################################################################################
#- Functions
#-######################################################################################
-sub empty_all_hds {
+sub empty_all_hds() {
{ hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfss => [], smbs => [], davs => [], special => [] };
}
sub recompute_loopbacks {
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index a89357b16..ba3248469 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -11,7 +11,7 @@ our ($version, $sbindir, $bindir) = ("9.1.0", "/usr/sbin", "/usr/bin");
my @devices = detect_devices::probeall(1);
# Update me each time you handle one more devices class (aka configurator)
-sub unknown {
+sub unknown() {
grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|SCSI)|tape/
&& $_->{driver} !~ /^(ohci1394|scanner|usbvision|mod_quickcam)$|Mouse:USB|class\|Mouse|Removable:zip|www.linmodems.org|nvnet/
&& $_->{type} ne 'network'
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 154f3ba29..aff29c8e0 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -288,7 +288,7 @@ The current driver for your \"%s\" sound card is \"%s\" ", $device->{description
}
-sub configure_sound_slots {
+sub configure_sound_slots() {
each_index {
modules::add_alias("sound-slot-$::i", $_->{driver});
} detect_devices::getSoundDevices();
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 4f268c3e2..e019b8538 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -302,7 +302,7 @@ sub exitInstall {
}
-sub start_i810fb {
+sub start_i810fb() {
my ($vga) = cat_('/proc/cmdline') =~ /vga=(\S+)/;
return if !$vga || listlength(cat_('/proc/fb'));
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index a43dc80c8..0ff254444 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -188,13 +188,13 @@ sub clean_postinstall_rpms() {
#-######################################################################################
#- Functions
#-######################################################################################
-sub getNextStep {
+sub getNextStep() {
my ($s) = $::o->{steps}{first};
$s = $::o->{steps}{$s}{next} while $::o->{steps}{$s}{done} || !$::o->{steps}{$s}{reachable};
$s;
}
-sub spawnShell {
+sub spawnShell() {
return if $::o->{localInstall} || $::testing;
-x "/bin/sh" or die "cannot open shell - /bin/sh doesn't exist";
@@ -280,7 +280,6 @@ sub setPackages {
#- open rpm db according to right mode needed.
$o->{packages}{rpmdb} ||= pkgs::rpmDbOpen($o->{prefix}, $rebuild_needed);
- pkgs::getDeps($o->{prefix}, $o->{packages});
pkgs::selectPackage($o->{packages},
pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);
@@ -289,9 +288,6 @@ sub setPackages {
pkgs::selectPackage($o->{packages},
pkgs::bestKernelPackage($o->{packages}) || die("missing kernel package"), 1);
- #- must be done after selecting base packages (to save memory)
- pkgs::getProvides($o->{packages});
-
#- must be done after getProvides
pkgs::read_rpmsrate($o->{packages}, getFile("Mandrake/base/rpmsrate"));
($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{meta_class});
@@ -507,7 +503,7 @@ sub write_smb_conf {
");
}
-sub killCardServices {
+sub killCardServices() {
my $pid = chomp_(cat_("/tmp/cardmgr.pid"));
$pid and kill(15, $pid); #- send SIGTERM
}
@@ -609,8 +605,8 @@ sub install_urpmi {
hdlist: hdlist.$name.cz
with_hdlist: ../base/" . ($_->{update} ? "hdlist.cz" : $_->{hdlist}) . ($need_list ? "
list: list.$name" : "") . ($dir =~ /removable:/ && "
- removable: /dev/cdrom") . ("
- update") . "
+ removable: /dev/cdrom") . "
+ update" . "
}
";
@@ -1111,7 +1107,7 @@ sub remove_unused {
}
}
-sub remove_bigseldom_used {
+sub remove_bigseldom_used() {
log::l("remove_bigseldom_used");
$::testing and return;
remove_unused();
diff --git a/perl-install/install_messages.pm b/perl-install/install_messages.pm
index b3d4af2b3..ccb54229c 100644
--- a/perl-install/install_messages.pm
+++ b/perl-install/install_messages.pm
@@ -5,7 +5,7 @@ use strict;
use common;
-sub main_license {
+sub main_license() {
N("Introduction
The operating system and the different components available in the Mandrake Linux distribution
@@ -85,14 +85,14 @@ For any question on this document, please contact MandrakeSoft S.A.
");
}
-sub warning_about_patents {
+sub warning_about_patents() {
"Warning: Free Software may not necessarily be patent free, and some Free
Software included may be covered by patents in your country. For example, the
MP3 decoders included may require a licence for further usage (see
http://www.mp3licensing.com for more details). If you are unsure if a patent
may be applicable to you, check your local laws.";
}
-sub com_license {
+sub com_license() {
N("
Warning
@@ -124,7 +124,7 @@ copyright laws applicable to software programs.
");
}
-sub install_completed {
+sub install_completed() {
N("Congratulations, installation is complete.
Remove the boot media and press return to reboot.
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 4d0b362c7..6de423d50 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -78,7 +78,11 @@ Continue at your own risk."), formatError($@) ]) if $@;
}
}
-sub errorInStep($$) { print "error :(\n"; c::_exit(1) }
+sub errorInStep {
+ my ($_o, $_err) = @_;
+ print "error :(\n";
+ c::_exit(1);
+}
sub kill_action {}
#-######################################################################################
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index b2f729f05..a4a92f1e3 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -90,9 +90,12 @@ sub ask_warn {
log::l(ref($_[1]) ? join " ", @{$_[1]} : $_[1]);
}
-sub wait_message {}
+sub wait_message {
+ my ($_o, $_title, $_message) = @_;
+}
sub errorInStep {
+ my ($_o, $_err) = @_;
print "error :(\n";
print "switch to console f2 for a shell\n";
print "Press <Enter> to reboot\n";
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 8158c23e0..46ae5bf15 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -35,7 +35,7 @@ use log;
#-######################################################################################
#- In/Out Steps Functions
#-######################################################################################
-sub errorInStep($$) {
+sub errorInStep {
my ($o, $err) = @_;
$o->ask_warn(N("Error"), [ N("An error occurred"), formatError($err) ]);
}
@@ -45,7 +45,9 @@ sub kill_action {
$o->kill;
}
-sub charsetChanged {}
+sub charsetChanged {
+ my ($_o) = @_;
+}
#-######################################################################################
#- Steps Functions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 46a325631..603b5d81a 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -107,16 +107,16 @@ sub vnew {
require 'log.pm'; #- "require log" causes some pb, perl thinking that "log" is the log() function
undef *log::l;
- *log::l = sub {}; # otherwise, it will bother us :(
+ *log::l = sub() {}; # otherwise, it will bother us :(
require interactive::newt;
interactive::newt->new;
}
-sub enter_console {}
-sub leave_console {}
-sub suspend {}
-sub resume {}
-sub end {}
+sub enter_console() {}
+sub leave_console() {}
+sub suspend() {}
+sub resume() {}
+sub end() {}
sub exit { exit($_[0]) }
#-######################################################################################
@@ -444,7 +444,7 @@ sub wait_message {
$b;
}
-sub kill {}
+sub kill() {}
diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm
index a4f9e3bfd..27ae507d8 100644
--- a/perl-install/interactive/http.pm
+++ b/perl-install/interactive/http.pm
@@ -17,7 +17,7 @@ my $uid;
my $pipe_r = "/tmp/interactive_http_r";
my $pipe_w = "/tmp/interactive_http_w";
-sub open_stdout {
+sub open_stdout() {
open STDOUT, ">$pipe_w" or die;
$| = 1;
print CGI::header();
@@ -31,12 +31,12 @@ sub cont_stdout {
$no_header = 0;
}
-sub new_uid {
+sub new_uid() {
my ($s, $ms) = gettimeofday();
$s * 256 + $ms % 256;
}
-sub new() {
+sub new {
open_stdout();
bless {}, $_[0];
}
@@ -49,7 +49,7 @@ sub end() {
close STDOUT;
unlink $pipe_r, $pipe_w;
}
-sub exit() { end(); exit($_[1]) }
+sub exit { end(); exit($_[1]) }
END { end() }
sub ask_fromW {
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index b94ae9193..087b19112 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -14,7 +14,7 @@ use Newt::Newt; #- !! provides Newt and not Newt::Newt
my ($width, $height) = (80, 25);
my @wait_messages;
-sub new() {
+sub new {
Newt::Init();
Newt::Cls();
Newt::SetSuspendCallback();
@@ -23,12 +23,12 @@ sub new() {
bless {}, $_[0];
}
-sub enter_console { Newt::Suspend() }
-sub leave_console { Newt::Resume() }
-sub suspend { Newt::Suspend() }
-sub resume { Newt::Resume() }
+sub enter_console() { Newt::Suspend() }
+sub leave_console() { Newt::Resume() }
+sub suspend() { Newt::Suspend() }
+sub resume() { Newt::Resume() }
sub end() { Newt::Finished() }
-sub exit() { end(); exit($_[1]) }
+sub exit { end(); exit($_[1]) }
END { end() }
sub messages {
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm
index a37b08c8e..209310339 100644
--- a/perl-install/interactive/stdio.pm
+++ b/perl-install/interactive/stdio.pm
@@ -11,7 +11,7 @@ use common;
$| = 1;
-sub readln {
+sub readln() {
my $l = <STDIN>;
chomp $l;
$l;
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 3e65df61e..a4239f73b 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -261,9 +261,9 @@ my %grp_toggles = (
#-######################################################################################
#- Functions
#-######################################################################################
-sub KEYBOARDs { keys %keyboards }
+sub KEYBOARDs() { keys %keyboards }
sub KEYBOARD2text { $keyboards{$_[0]} && $keyboards{$_[0]}[0] }
-sub keyboards { map { { KEYBOARD => $_ } } keys %keyboards }
+sub keyboards() { map { { KEYBOARD => $_ } } keys %keyboards }
sub keyboard2one {
my ($keyboard, $nb) = @_;
ref $keyboard or internal_error();
@@ -351,7 +351,7 @@ sub lang2keyboard {
{ KEYBOARD => $keyboards{$kb} ? $kb : 'us' }; #- handle incorrect keyboard mapping to us.
}
-sub from_usb {
+sub from_usb() {
return if $::noauto;
my ($usb_kbd) = detect_devices::usbKeyboards() or return;
my $country_code = detect_devices::usbKeyboard2country_code($usb_kbd) or return;
@@ -478,7 +478,7 @@ sub write {
}
}
-sub read {
+sub read() {
my %keyboard = getVarsFromSh("$::prefix/etc/sysconfig/keyboard") or return;
if (!$keyboard{KEYBOARD}) {
add2hash(\%keyboard, grep { keyboard2kmap($_) eq $keyboard{KEYTABLE} } keyboards());
@@ -488,7 +488,7 @@ sub read {
keyboard2text(\%keyboard) ? \%keyboard : {};
}
-sub check {
+sub check() {
require lang;
$^W = 0;
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 0e14abe15..6a13bad9a 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -123,7 +123,7 @@ sub list_langs {
$options{exclude_non_installed} ? grep { -e "/usr/share/locale/".l2locale($_)."/LC_CTYPE" } @l : @l;
}
-sub text_direction_rtl { N("default:LTR") eq "default:RTL" }
+sub text_direction_rtl() { N("default:LTR") eq "default:RTL" }
#- key: country name (that should be YY in xx_YY locale)
@@ -978,7 +978,7 @@ sub load_mo {
#- used in Makefile during "make get_needed_files"
-sub console_font_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),
@@ -1026,11 +1026,11 @@ sub during_install__l2charset {
uc($c);
}
-sub get_unneeded_png_lang_files {
+sub get_unneeded_png_lang_files() {
print join(' ', map { m|(langs/lang-(.*)\.png)|; if_(!member($2, list_langs()), $1) } glob("pixmaps/langs/lang-*.png"));
}
-sub check {
+sub check() {
$^W = 0;
my $ok = 1;
my $warn = sub {
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index d972339c2..45505bda4 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -104,7 +104,7 @@ sub verifFile {
undef;
}
-sub prepare_boot {
+sub prepare_boot() {
my $r = readlink "$::prefix/boot";
unlink "$::prefix/boot";
mkdir_p("$::prefix/boot");
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm
index 93209cca8..12c685e97 100644
--- a/perl-install/lvm.pm
+++ b/perl-install/lvm.pm
@@ -30,7 +30,7 @@ sub cylinder_size {
init();
-sub init {
+sub init() {
eval { modules::load('lvm-mod') };
run_program::run('vgscan') if !-e '/etc/lvmtab';
run_program::run('vgchange', '-a', 'y');
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index b5b784537..b458f706a 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -11,7 +11,7 @@ use list_modules;
%conf = ();
-sub modules_descriptions {
+sub modules_descriptions() {
my $f = '/lib/modules/' . c::kernel_version() . '/modules.description';
-e $f or $f = '/lib/modules.description';
map { /(\S+)\s+(.*)/ } cat_($f);
@@ -130,7 +130,7 @@ sub probe_category {
} detect_devices::probeall($b_probe_type);
}
-sub load_ide {
+sub load_ide() {
eval { load("ide-cd") }
}
@@ -347,10 +347,10 @@ sub write_pcmcia {
#-###############################################################################
#- internal functions
#-###############################################################################
-sub loaded_modules {
+sub loaded_modules() {
map { /(\S+)/ } cat_("/proc/modules");
}
-sub read_already_loaded {
+sub read_already_loaded() {
when_load($_) foreach reverse loaded_modules();
}
@@ -372,7 +372,7 @@ sub when_load {
}
}
-sub cz_file {
+sub cz_file() {
"/lib/modules" . (arch() eq 'sparc64' && "64") . ".cz-" . c::kernel_version();
}
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 6a2cbe87a..63787d556 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -128,7 +128,7 @@ my %mouse_btn_keymap = (
117 => "Num: =",
96 => "Enter",
);
-sub ppc_one_button_keys { keys %mouse_btn_keymap }
+sub ppc_one_button_keys() { keys %mouse_btn_keymap }
sub ppc_one_button_key2text { $mouse_btn_keymap{$_[0]} }
sub raw2mouse {
@@ -139,7 +139,7 @@ sub raw2mouse {
+{ %l, type => $type };
}
-sub fullnames {
+sub fullnames() {
map_each {
my $type = $::a;
grep { $_ } map {
@@ -176,7 +176,7 @@ sub serial_port2text {
$_[0] =~ /ttyS(\d+)/ ? "$_[0] / COM" . ($1 + 1) : $_[0];
}
-sub read {
+sub read() {
my %mouse = getVarsFromSh "$::prefix/etc/sysconfig/mouse";
eval { add2hash_(\%mouse, fullname2mouse($mouse{FULLNAME})) };
$mouse{nbuttons} ||= $mouse{XEMU3} eq "yes" ? 2 : $mouse{WHEEL} eq "yes" ? 5 : 3;
@@ -212,7 +212,7 @@ sub write {
}
}
-sub mouseconfig {
+sub mouseconfig() {
my ($t, $mouse, @wacom);
#- Whouah! probing all devices from ttyS0 to ttyS3 once a time!
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index 8834d7ba6..0028ecce7 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -235,7 +235,7 @@ sub isdn_ask_info {
ask_info2($isdn, $netc);
}
-sub isdn_ask_protocol {
+sub isdn_ask_protocol() {
my @toto = (
{ description => $::expert ? N("European protocol (EDSS1)") : N("European protocol"),
protokol => 2 },
@@ -327,7 +327,7 @@ sub isdn_detect_backend {
}
}
-sub isdn_get_list {
+sub isdn_get_list() {
map { $_->{description} } @isdn::isdndata;
}
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 8ef994583..3ba28075f 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -414,7 +414,7 @@ sub add_profile {
cp_af($cmd1, $cmd2);
}
-sub get_profiles {
+sub get_profiles() {
map { if_(/drakconnect_conf\.(.*)/, $1) } all("$::prefix/etc/sysconfig/network-scripts");
}
@@ -463,7 +463,7 @@ my $file = "$dir/draknet$suffix";
getVarsFromSh("$dir/drakconnect_conf");
}
-sub get_net_device {
+sub get_net_device() {
#${{ read_raw_net_conf() }}{InternetInterface};
my $connect_file = "/etc/sysconfig/network-scripts/net_cnx_up";
my $network_file = "/etc/sysconfig/network";
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 083c90ae3..b41bb636a 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -46,7 +46,7 @@ sub get_config_file {
map { [ split ' ' ] } grep { !/^#/ } cat_("$::prefix/etc/shorewall/$file");
}
-sub default_interfaces {
+sub default_interfaces() {
my %conf;
my @l = detect_devices::getNet() or return;
@@ -59,7 +59,7 @@ sub default_interfaces {
\%conf;
}
-sub read {
+sub read() {
my %conf;
$conf{disabled} = !glob_("$::prefix/etc/rc3.d/S*shorewall");
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index c7175a0d3..19921b5d0 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -39,7 +39,7 @@ sub unquotify {
$$word =~ s/^(['"]?)(.*)\1$/$2/;
}
-sub read_secret_backend {
+sub read_secret_backend() {
my $conf;
foreach my $i ("pap-secrets", "chap-secrets") {
foreach (cat_("$prefix/etc/ppp/$i")) {
@@ -102,9 +102,9 @@ Try to reconfigure your connection.");
$up;
}
-sub connect_backend { run_program::rooted($prefix, "$connect_prog &") }
+sub connect_backend() { run_program::rooted($prefix, "$connect_prog &") }
-sub disconnect_backend { run_program::rooted($prefix, "$disconnect_file &") }
+sub disconnect_backend() { run_program::rooted($prefix, "$disconnect_file &") }
sub read_providers_backend { my ($file) = @_; map { /(.*?)=>/ } catMaybeCompressed($file) }
@@ -141,7 +141,7 @@ sub ask_info2 {
1;
}
-sub detect_timezone {
+sub detect_timezone() {
my %tmz2country = (
'Europe/Paris' => N("France"),
'Europe/Amsterdam' => N("Netherlands"),
@@ -170,7 +170,7 @@ sub type2interface {
[ lan => 'eth' ];
}
-sub connected { gethostbyname("mandrakesoft.com") ? 1 : 0 }
+sub connected() { gethostbyname("mandrakesoft.com") ? 1 : 0 }
my $kid_pipe;
sub connected_bg {
@@ -235,7 +235,7 @@ sub test_connected {
return $current_connection_status;
}
-sub connected2 {
+sub connected2() {
if ($kid_pid = open(my $kid_to_read, "-|")) {
#- parent
$kid_to_read;
@@ -247,10 +247,10 @@ sub connected2 {
}
}
-sub disconnected {}
+sub disconnected() {}
-sub write_initscript {
+sub write_initscript() {
$::testing and return;
output_with_perm("$prefix/etc/rc.d/init.d/internet", 0755,
sprintf(<<'EOF', $connect_file, $connect_file, $disconnect_file, $disconnect_file));
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index a421c603c..5c50333dc 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -215,7 +215,7 @@ my %fs2type = reverse %type2fs;
1;
-sub important_types {
+sub important_types() {
my @l = (@important_types, if_($::expert, @important_types2, sort values %types));
difference2(\@l, \@bad_types);
}
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 4b78f193c..bb1cb82a4 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -63,7 +63,7 @@ $_ = join('', @$_) foreach $main_format, $partitionEntry_format, $guid_format;
my $magic = "EFI PART";
-sub generate_guid {
+sub generate_guid() {
my $tmp;
open(my $F, devices::make("random")) or die "Could not open /dev/random for GUID generation";
read $F, $tmp, psizeof($guid_format);
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 3b3631e93..e780927cc 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -442,21 +442,6 @@ sub psUsingHdlist {
$m;
}
-#OBSOLETED TODO
-sub getOtherDeps($$) {
- return; #TODO
-}
-
-#OBSOLETED TODO
-sub getDeps {
- return; #TODO
-}
-
-#OBSOLETED TODO
-sub getProvides($) {
- return; #TODO
-}
-
sub read_rpmsrate {
my ($packages, $f) = @_;
my $line_nb = 0;
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 82fb4e0db..df2cb6cde 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -13,7 +13,7 @@ use devices;
use modules;
use fs;
-sub max_nb { 31 }
+sub max_nb() { 31 }
sub nb {
my ($nb) = @_;
@@ -174,7 +174,7 @@ sub inactivate_and_dirty {
$part->{notFormatted} = 1; $part->{isFormatted} = 0;
}
-sub active_mds {
+sub active_mds() {
map { if_(/^(md\d+) /, $1) } cat_("/proc/mdstat");
}
diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm
index a742d7c26..6f8ae9445 100644
--- a/perl-install/resize_fat/directory.pm
+++ b/perl-install/resize_fat/directory.pm
@@ -28,7 +28,7 @@ my $psizeof_format = psizeof($format);
1;
-sub entry_size { $psizeof_format }
+sub entry_size() { $psizeof_format }
#- call `f' for each entry of the directory
#- if f return true, then modification in the entry are taken back
diff --git a/perl-install/sbus_probing/main.pm b/perl-install/sbus_probing/main.pm
index 96d50663b..1bd20fe30 100644
--- a/perl-install/sbus_probing/main.pm
+++ b/perl-install/sbus_probing/main.pm
@@ -127,7 +127,7 @@ sub prom_walk {
$nextnode = c::prom_getsibling($node) and prom_walk($sbus_probed, $nextnode, $sbus, $ebus);
}
-sub probe {
+sub probe() {
eval { modules::load("openprom") } if arch() =~ /sparc/;
my $root_node = c::prom_open() or return;
my @l;
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index cab0f344e..8234ee218 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -71,7 +71,7 @@ sub add2dll {
output("$sanedir/dll.conf", @dllconf);
}
-sub configured {
+sub configured() {
my @res;
# Run "scanimage -L", to find the scanners which are already working
local *LIST;
@@ -309,7 +309,7 @@ sub readScannerDB {
\%cards;
}
-sub updateScannerDBfromUsbtable {
+sub updateScannerDBfromUsbtable() {
substInFile { s/END// } "ScannerDB";
my $to_add = "# generated from usbtable by scannerdrake\n";
foreach (cat_("$ENV{SHARE_PATH}/ldetect-lst/usbtable")) {
diff --git a/perl-install/security/level.pm b/perl-install/security/level.pm
index 234fb2d4b..cc4dac187 100644
--- a/perl-install/security/level.pm
+++ b/perl-install/security/level.pm
@@ -5,7 +5,7 @@ use common;
use run_program;
-sub level_list {
+sub level_list() {
(
0 => N("Welcome To Crackers"),
1 => N("Poor"),
@@ -19,10 +19,10 @@ sub level_list {
sub to_string { +{ level_list() }->{$_[0]} }
sub from_string { +{ reverse level_list() }->{$_[0]} || 2 }
-sub get_string { to_string(get() || 2) }
-sub get_common_list { map { to_string($_) } (2, 3, 4) }
+sub get_string() { to_string(get() || 2) }
+sub get_common_list() { map { to_string($_) } (2, 3, 4) }
-sub get {
+sub get() {
cat_("$::prefix/etc/profile") =~ /export SECURE_LEVEL=(\d+)/ && $1 || #- 8.0 msec
cat_("$::prefix/etc/profile.d/msec.sh") =~ /export SECURE_LEVEL=(\d+)/ && $1 || #- 8.1 msec
${{ getVarsFromSh("$::prefix/etc/sysconfig/msec") }}{SECURE_LEVEL} || #- 8.2 msec
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 8042b4e42..7e5850d6a 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -276,7 +276,7 @@ sub doit {
#- returns:
#--- the listref of installed services
#--- the listref of "on" services
-sub services {
+sub services() {
local $ENV{LANGUAGE} = 'C';
my @raw_l = map { chomp; $_ } run_program::rooted_get_stdout($::prefix, '/sbin/chkconfig', '--list');
my @l;
@@ -339,7 +339,7 @@ sub is_service_running ($) {
sub starts_on_boot {
my ($service) = @_;
- my (undef, $on_services) = services($::prefix);
+ my (undef, $on_services) = services();
member($service, @$on_services);
}
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 6a08e4f8b..0e8f2b636 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -50,7 +50,7 @@ sub wait_msg {
sub remove_wait_msg { $_[0]->destroy }
-sub basic_seclevel_explanations {
+sub basic_seclevel_explanations() {
my $text = new Gtk2::TextView;
$text->set_editable(0);
gtktext_insert($text,
@@ -115,7 +115,7 @@ my $common_opts = { col_spacings => 10, row_spacings => 5 };
my $seclevel_entry;
$notebook->append_page(gtkshow(gtkpack(new Gtk2::VBox(0, 0),
- basic_seclevel_explanations($msec),
+ basic_seclevel_explanations(),
create_packtable($common_opts,
[
do {
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 429df9e7c..02ddb5abb 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -330,7 +330,7 @@ $_->hide foreach $module_cfg_button, $config_button; # hide buttons while no dev
$w->main;
-sub quit_global {
+sub quit_global() {
kill(15, $pid) if $pid;
setVarsInSh($conffile, \%options);
ugtk2->exit(0);
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 84c4d685f..dbce11f8d 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -16,7 +16,7 @@ sub getTimeZones {
sort @l;
}
-sub read {
+sub read() {
my %t = getVarsFromSh("$::prefix/etc/sysconfig/clock") or return {};
{ timezone => $t{ZONE}, UTC => text2bool($t{UTC}) };
}
@@ -127,7 +127,7 @@ sub fuzzyChoice {
}
sub bestTimezone { $c2t{fuzzyChoice($_[0])} || 'GMT' }
-sub ntp_servers {
+sub ntp_servers() {
q(Australia (ntp.adelaide.edu.au)
Australia (ntp.saard.net)
Australia (time.esec.com.au)
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 7e023d74a..4a069eb55 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -55,7 +55,7 @@ $border = 5;
# you're building.
sub gtkdestroy { $_[0] and $_[0]->destroy }
-sub gtkflush { Gtk2->update_ui }
+sub gtkflush() { Gtk2->update_ui }
sub gtkhide { $_[0]->hide; $_[0] }
sub gtkmove { $_[0]->window->move($_[1], $_[2]); $_[0] }
sub gtkpack { gtkpowerpack(1, 1, @_) }
@@ -145,7 +145,7 @@ sub gtkradio {
map { gtkset_active($radio = Gtk2::RadioButton->new($radio ? $radio->get_group : undef, $_), $_ eq $def) } @_;
}
-sub gtkroot {
+sub gtkroot() {
my $root if 0;
$root ||= Gtk2::Gdk::Window->foreign_new(Gtk2::Gdk->ROOT_WINDOW);
}
@@ -622,7 +622,8 @@ sub fill_tiled_coords {
sub fill_tiled {
my ($widget, $pixbuf) = @_;
- fill_tiled_coords($widget, $pixbuf, $pixbuf->get_width, $pixbuf->get_height, $widget->window->get_size);
+ my ($window_width, $window_height) = $widget->window->get_size;
+ fill_tiled_coords($widget, $pixbuf, $pixbuf->get_width, $pixbuf->get_height, $window_width, $window_height);
}
sub add2notebook {
@@ -727,7 +728,7 @@ sub gtkset_background {
}
sub add_icon_path { push @icon_paths, @_ }
-sub icon_paths {
+sub icon_paths() {
(@icon_paths, (exists $ENV{SHARE_PATH} ? ($ENV{SHARE_PATH}, "$ENV{SHARE_PATH}/icons", "$ENV{SHARE_PATH}/libDrakX/pixmaps") : ()),
"/usr/lib/libDrakX/icons", "pixmaps", 'standalone/icons', '/usr/share/rpmdrake/icons');
}
@@ -877,7 +878,7 @@ sub sync {
show($o);
flush();
}
-sub flush { gtkflush() }
+sub flush() { gtkflush() }
sub exit {
gtkset_mousecursor_normal(); #- for restoring a normal in any case
flush();