summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
commit25f65beed0677fa247c513705dbf538225f979c4 (patch)
treee0ec937937cba2d6279e97b3b7036fe0856d5bb2
parenta0b5f74447cc699c43c354cb6397ed554605729b (diff)
downloaddrakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.gz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.bz2
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.xz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.zip
no_comment
-rw-r--r--perl-install/Xconfig.pm6
-rw-r--r--perl-install/Xconfigurator.pm98
-rw-r--r--perl-install/Xconfigurator_consts.pm78
-rw-r--r--perl-install/commands.pm46
-rw-r--r--perl-install/common.pm20
-rw-r--r--perl-install/detect_devices.pm18
-rw-r--r--perl-install/devices.pm12
-rw-r--r--perl-install/fs.pm26
-rw-r--r--perl-install/fsedit.pm40
-rw-r--r--perl-install/help.pm52
-rwxr-xr-xperl-install/install22
-rw-r--r--perl-install/install2.pm120
-rw-r--r--perl-install/install_any.pm8
-rw-r--r--perl-install/install_steps.pm20
-rw-r--r--perl-install/install_steps_interactive.pm134
-rw-r--r--perl-install/install_steps_stdio.pm18
-rw-r--r--perl-install/interactive.pm12
-rw-r--r--perl-install/interactive_gtk.pm26
-rw-r--r--perl-install/interactive_stdio.pm12
-rw-r--r--perl-install/keyboard.pm6
-rw-r--r--perl-install/lang.pm16
-rw-r--r--perl-install/log.pm4
-rw-r--r--perl-install/modparm.pm2
-rw-r--r--perl-install/modules.pm18
-rw-r--r--perl-install/my_gtk.pm64
-rw-r--r--perl-install/network.pm18
-rw-r--r--perl-install/partition_table.pm48
-rw-r--r--perl-install/partition_table_raw.pm11
-rw-r--r--perl-install/pkgs.pm14
-rw-r--r--perl-install/printer.pm210
-rw-r--r--perl-install/resize_fat/any.pm4
-rw-r--r--perl-install/resize_fat/boot_sector.pm8
-rw-r--r--perl-install/resize_fat/dir_entry.pm2
-rw-r--r--perl-install/resize_fat/directory.pm4
-rw-r--r--perl-install/resize_fat/fat.pm2
-rw-r--r--perl-install/resize_fat/io.pm6
-rw-r--r--perl-install/resize_fat/main.pm20
-rw-r--r--perl-install/run_program.pm2
-rw-r--r--perl-install/swap.pm12
-rw-r--r--perl-install/unused/cdrom.pm2
-rw-r--r--perl-install/unused/dns.pm30
-rw-r--r--perl-install/unused/otherinsmod.pm2
-rw-r--r--perl-install/unused/scsi.pm6
43 files changed, 630 insertions, 629 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm
index 48b1cddca..ba3dab2f6 100644
--- a/perl-install/Xconfig.pm
+++ b/perl-install/Xconfig.pm
@@ -6,7 +6,7 @@ use mouse;
# otherwise uses the rule substr($keymap, 0, 2)
my %keymap_translate = (
cf => "ca_enhanced",
- uk => "gb",
+ uk => "gb",
);
@@ -34,7 +34,7 @@ sub getinfoFromXF86Config {
my (%c, $depth);
$o->{card}{server} ||= $1 if readlink("/etc/X11/X") =~ /XF86_ (\w+)$/x; #- /x for perl2fcalls
-
+
local *F;
open F, "/etc/X11/XF86Config" or return {};
foreach (<F>) {
@@ -52,7 +52,7 @@ sub getinfoFromXF86Config {
$c{memory} ||= $1 if /^\s*VideoRam\s+(\d+)/;
$c{vendor} ||= $1 if /^\s*VendorName\s+"(.*?)"/;
$c{board} ||= $1 if /^\s*BoardName\s+"(.*?)"/;
-
+
push @{$c{lines}}, $_ unless /(Section|Identifier|VideoRam|VendorName|BoardName)/;
} elsif (/^Section "Monitor"/ .. /^EndSection/) {
$o->{monitor}{type} ||= $1 if /^\s*Identifier\s+"(.*?)"/;
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 05d5983b1..049a10d4e 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -19,7 +19,7 @@ my ($prefix, %cards, %monitors);
sub setVirtual($) {
my $vt = '';
- local *C;
+ local *C;
sysopen C, "/dev/console", 2 or die "failed to open /dev/console: $!";
ioctl(C, c::VT_GETSTATE(), $vt) or die "ioctl VT_GETSTATE failed";
ioctl(C, c::VT_ACTIVATE(), $_[0]) or die "ioctl VT_ACTIVATE failed";
@@ -37,7 +37,7 @@ sub readCardsDB {
open F, $file or die "file $file not found";
my ($lineno, $cmd, $val) = 0;
- my $fs = {
+ my $fs = {
LINE => sub { push @{$card->{lines}}, $val unless $val eq "VideoRam" },
NAME => sub {
$cards{$card->{type}} = $card if $card;
@@ -45,13 +45,13 @@ sub readCardsDB {
},
SEE => sub {
my $c = $cards{$val} or die "Error in database, invalid reference $val at line $lineno";
-
+
push @{$card->{lines}}, @{$c->{lines} || []};
add2hash($card->{flags}, $c->{flags});
add2hash($card, $c);
},
- CHIPSET => sub {
- $card->{chipset} = $val;
+ CHIPSET => sub {
+ $card->{chipset} = $val;
$card->{flags}{needVideoRam} = 1 if member($val, qw(mgag10 mgag200 RIVA128));
},
SERVER => sub { $card->{server} = $val; },
@@ -78,7 +78,7 @@ sub readCardsDB {
push @{$cards{S3}{lines}}, $s3_comment;
push @{$cards{'CL-GD'}{lines}}, $cirrus_comment;
- #- this entry is broken in X11R6 cards db
+ #- this entry is broken in X11R6 cards db
$cards{I128}{flags}{noclockprobe} = 1;
}
@@ -98,13 +98,13 @@ sub readMonitorsDB {
my @fields = qw(type bandwidth hsyncrange vsyncrange);
my @l = split /\s*;\s*/;
@l == @fields or log::l("bad line $lineno ($_)"), next;
-
+
my %l; @l{@fields} = @l;
$monitors{$l{type}} = \%l;
}
while (my ($k, $v) = each %standard_monitors) {
- $monitors{$k} =
- $monitors{$v->[0]} =
+ $monitors{$k} =
+ $monitors{$v->[0]} =
{ hsyncrange => $v->[1], vsyncrange => $v->[2] };
}
}
@@ -115,7 +115,7 @@ sub rewriteInittab {
local (*F, *G);
open F, "$prefix/etc/inittab" or die "cannot open $prefix/etc/inittab: $!";
open G, "> $prefix/etc/inittab-" or die "cannot write in $prefix/etc/inittab-: $!";
-
+
foreach (<F>) {
print G /^(id:)[35](:initdefault:)\s*$/ ? "$1$runlevel$2\n" : $_; # **
}
@@ -130,13 +130,13 @@ sub keepOnlyLegalModes {
my $hsync = max(split(/[,-]/, $monitor->{hsyncrange}));
while (my ($depth, $res) = each %{$card->{depth}}) {
- @$res = grep {
+ @$res = grep {
$mem >= product(@$_, $depth / 8) &&
$hsync >= ($min_hsync4wres{$_->[0]} || 0)
} @$res;
delete $card->{depth}{$depth} if @$res == 0;
}
-
+
}
sub cardConfigurationAuto() {
@@ -158,7 +158,7 @@ sub cardConfiguration(;$$) {
add2hash($card, $cards{$card->{type}}) if $card->{type}; #- try to get info from given type
$card->{type} = undef unless $card->{server}; #- bad type as we can't find the server
-
+
add2hash($card, cardConfigurationAuto()) unless $card->{server} || $noauto;
$card->{type} = $in->ask_from_list('', _("Choose a graphic card"), ['Unlisted', keys %cards]) unless $card->{type} || $card->{server};
$card->{type} = undef, $card->{server} = $in->ask_from_list('', _("Choose a X server"), \@allservers) if $card->{type} eq "Unlisted";
@@ -170,7 +170,7 @@ sub cardConfiguration(;$$) {
-x "$prefix$card->{prog}" or !defined $install or &$install($card->{server});
-x "$prefix$card->{prog}" or die "server $card->{server} is not available (should be in $prefix$card->{prog})";
-
+
unless ($::testing) {
unlink("$prefix/etc/X11/X");
symlink("../..$card->{prog}", "$prefix/etc/X11/X");
@@ -181,10 +181,10 @@ sub cardConfiguration(;$$) {
}
$card->{flags}{needVideoRam} and
- $card->{memory} ||=
- $videomemory{$in->ask_from_list_('',
- _("Select the memory size of your graphic card"),
- [ sort { $videomemory{$a} <=> $videomemory{$b} }
+ $card->{memory} ||=
+ $videomemory{$in->ask_from_list_('',
+ _("Select the memory size of your graphic card"),
+ [ sort { $videomemory{$a} <=> $videomemory{$b} }
keys %videomemory])};
$card;
}
@@ -198,7 +198,7 @@ sub monitorConfiguration(;$) {
add2hash($monitor, { type => $in->ask_from_list('', _("Choose a monitor"), ['Unlisted', keys %monitors]) }) unless $monitor->{type};
if ($monitor->{type} eq 'Unlisted') {
- $in->ask_from_entries_ref('',
+ $in->ask_from_entries_ref('',
_("The two critical parameters are the vertical refresh rate, which is the rate
at which the whole screen is refreshed, and most importantly the horizontal
sync rate, which is the rate at which scanlines are displayed.
@@ -257,7 +257,7 @@ sub testFinalConfig($;$) {
write_XF86Config($o, $::testing ? $tmpconfig : "$prefix/etc/X11/XF86Config");
- $auto
+ $auto
or $in->ask_yesorno(_("Test configuration"), _("Do you want to test the configuration?"))
or return 1;
@@ -314,7 +314,7 @@ sub autoResolutions($;$) {
$nowarning || $in->ask_okcancel(_("Automatic resolutions"),
_("To find the available resolutions i will try different ones.
-Your screen will blink...
+Your screen will blink...
You can switch if off if you want, you'll hear a beep when it's over")) or return;
#- swith to virtual console 1 (hopefully not X :)
@@ -354,7 +354,7 @@ sub autoDefaultDepth($$) {
sub autoDefaultResolution(;$) {
my $size = round(shift || 14); #- assume a small monitor (size is in inch)
- $monitorSize2resolution[$size] ||
+ $monitorSize2resolution[$size] ||
$monitorSize2resolution[$#monitorSize2resolution]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have
}
@@ -431,17 +431,17 @@ sub resolutionsConfiguration($%) {
return;
}
- #- some of these guys hate to be poked
+ #- some of these guys hate to be poked
#- if we dont know then its at the user's discretion
- #-my $manual ||=
- #- $card->{server} =~ /^(TGA|Mach32)/ ||
+ #-my $manual ||=
+ #- $card->{server} =~ /^(TGA|Mach32)/ ||
#- $card->{name} =~ /^Riva 128/ ||
#- $card->{chipset} =~ /^(RIVA128|mgag)/ ||
#- $::expert;
#-
- #-my $unknown =
+ #-my $unknown =
#- member($card->{server}, qw(S3 S3V I128 Mach64)) ||
- #- member($card->{type},
+ #- member($card->{type},
#- "Matrox Millennium (MGA)",
#- "Matrox Millennium II",
#- "Matrox Millennium II AGP",
@@ -455,18 +455,18 @@ sub resolutionsConfiguration($%) {
#-
#-$unknown and $manual ||= !$in->ask_okcancel('', [ _("I can try to autodetect information about graphic card, but it may freeze :("),
#- _("Do you want to try?") ]);
-
+
if (is_empty_hash_ref($card->{depth})) {
- $card->{depth}{$_} = [ map { [ split "x" ] } @resolutions ]
+ $card->{depth}{$_} = [ map { [ split "x" ] } @resolutions ]
foreach @depths;
unless ($options{noauto}) {
- if ($options{nowarning} || $in->ask_okcancel(_("Automatic resolutions"),
+ if ($options{nowarning} || $in->ask_okcancel(_("Automatic resolutions"),
_("I can try to find the available resolutions (eg: 800x600).
Alas it can freeze sometimes
Do you want to try?"))) {
autoResolutions($o, $options{nowarning});
- is_empty_hash_ref($card->{depth}) and $in->ask_warn('',
+ is_empty_hash_ref($card->{depth}) and $in->ask_warn('',
_("No valid modes found
Try with another video card or monitor")), return;
}
@@ -505,7 +505,7 @@ Try with another video card or monitor")), return;
}
-#- Create the XF86Config file.
+#- Create the XF86Config file.
sub write_XF86Config {
my ($o, $file) = @_;
my $O;
@@ -515,7 +515,7 @@ sub write_XF86Config {
print F $XF86firstchunk_text;
- #- Write keyboard section.
+ #- Write keyboard section.
$O = $o->{keyboard};
print F $keyboardsection_start;
@@ -524,12 +524,12 @@ sub write_XF86Config {
print F qq( XkbLayout "$O->{xkb_keymap}"\n);
print F $keyboardsection_end;
- #- Write pointer section.
+ #- Write pointer section.
$O = $o->{mouse};
print F $pointersection_text1;
print F qq( Protocol "$O->{XMOUSETYPE}"\n);
print F qq( Device "/dev/$O->{device}"\n);
- #- this will enable the "wheel" or "knob" functionality if the mouse supports it
+ #- this will enable the "wheel" or "knob" functionality if the mouse supports it
print F " ZAxisMapping 4 5\n" if
member($O->{XMOUSETYPE}, qw(IntelliMouse IMPS/2 ThinkingMousePS/2 NetScrollPS/2 NetMousePS/2 MouseManPlusPS/2));
@@ -545,7 +545,7 @@ sub write_XF86Config {
print F " ClearRTS\n\n" if $O->{cleardtrrts};
print F "EndSection\n\n\n";
- #- Write monitor section.
+ #- Write monitor section.
$O = $o->{monitor};
$O->{modelines} .= $o->{card}{type} eq "TG 96" ? $modelines_text_Trident_TG_96xx : $modelines_text;
@@ -564,7 +564,7 @@ sub write_XF86Config {
print F $O->{modelines} || ($o->{card}{type} eq "TG 96" ? $modelines_text_Trident_TG_96xx : $modelines_text);
print F "\nEndSection\n\n\n";
- #- Write Device section.
+ #- Write Device section.
$O = $o->{card};
print F $devicesection_text;
print F qq(Section "Device"\n);
@@ -588,7 +588,7 @@ sub write_XF86Config {
}
print F "EndSection\n\n\n";
- #- Write Screen sections.
+ #- Write Screen sections.
print F $screensection_text1;
my $screen = sub {
@@ -612,7 +612,7 @@ Section "Screen"
}
print F "EndSection\n";
}; #-"
-
+
#- SVGA screen section.
print F qq(
# The Colour SVGA server
@@ -625,11 +625,11 @@ Section "Screen"
}
&$screen("vga16", '',
- (member($O->{server}, "Mono", "VGA16") ? $O->{type} : "Generic VGA"),
+ (member($O->{server}, "Mono", "VGA16") ? $O->{type} : "Generic VGA"),
{ '' => [[ 640, 480 ], [ 800, 600 ]]});
&$screen("vga2", '',
- (member($O->{server}, "Mono", "VGA16") ? $O->{type} : "Generic VGA"),
+ (member($O->{server}, "Mono", "VGA16") ? $O->{type} : "Generic VGA"),
{ '' => [[ 640, 480 ], [ 800, 600 ]]});
&$screen("accel", $O->{default_depth}, $O->{type}, $O->{depth});
@@ -666,7 +666,7 @@ sub show_info {
$in->ask_warn('', $info);
}
-#- Program entry point.
+#- Program entry point.
sub main {
my $o;
($prefix, $o, $in, $install) = @_;
@@ -679,7 +679,7 @@ sub main {
$o->{monitor} = monitorConfiguration($o->{monitor});
my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto);
-
+
$ok &&= testFinalConfig($o, $::auto);
my $quit;
@@ -689,7 +689,7 @@ sub main {
__("Change Monitor") => sub { $o->{monitor} = monitorConfiguration() },
__("Change Graphic card") => sub { $o->{card} = cardConfiguration('', 'noauto') },
__("Change Resolution") => sub { resolutionsConfiguration($o, noauto => 1) },
- __("Automatical resolutions search") => sub {
+ __("Automatical resolutions search") => sub {
delete $o->{card}{depth};
resolutionsConfiguration($o, nowarning => 1);
},
@@ -697,22 +697,22 @@ sub main {
__("Test again") => sub { $ok = testFinalConfig($o, 1) },
__("Quit") => sub { $quit = 1 },
);
- &{$c{$in->ask_from_list_('',
+ &{$c{$in->ask_from_list_('',
_("What do you want to do?"),
[ grep { !ref } @c ])}};
}
if ($ok) {
- my $run = $o->{xdm} || $::auto || $in->ask_yesorno(_("X at startup"),
+ my $run = $o->{xdm} || $::auto || $in->ask_yesorno(_("X at startup"),
_("I can set up your computer to automatically start X upon booting.
Would you like X to start when you reboot?"));
rewriteInittab($run ? 5 : 3) unless $::testing;
$in->ask_warn(_("X successfully configured"),
-_("Configuration file has been written. Take a look at it before running 'startx'.
-Within the server press ctrl, alt and '+' simultaneously to cycle video resolutions.
-Pressing ctrl, alt and backspace simultaneously immediately exits the server
+_("Configuration file has been written. Take a look at it before running 'startx'.
+Within the server press ctrl, alt and '+' simultaneously to cycle video resolutions.
+Pressing ctrl, alt and backspace simultaneously immediately exits the server
For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.")) unless $::auto;
}
}
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index b44acf52b..b5b500185 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -36,11 +36,11 @@ $resolution_wanted = "1024x768";
}
%videomemory = (
- __("256 kb") => 256,
- __("512 kb") => 512,
- __("1 mb") => 1024,
- __("2 mb") => 2048,
- __("4 mb") => 4096,
+ __("256 kb") => 256,
+ __("512 kb") => 512,
+ __("1 mb") => 1024,
+ __("2 mb") => 2048,
+ __("4 mb") => 4096,
__("8 mb") => 8192,
__("16 mb or more") => 16384,
);
@@ -87,7 +87,7 @@ $resolution_wanted = "1024x768";
1600 => 75.0,
);
-#- * Screen/video card configuration.
+#- * Screen/video card configuration.
%ramdacs = (
__("No RAMDAC Setting (recommended)") => '',
__("AT&T 20C490 (S3 and AGX servers, ARK driver)"), => 'att20c490',
@@ -149,22 +149,22 @@ $resolution_wanted = "1024x768";
$intro_text = "
This program will create a basic XF86Config file, based on menu selections you make.
-The XF86Config file usually resides in /usr/X11R6/lib/X11 or /etc/X11. A
-sample XF86Config file is supplied with XFree86; it is configured for a
-standard VGA card and monitor with 640x480 resolution.
+The XF86Config file usually resides in /usr/X11R6/lib/X11 or /etc/X11. A
+sample XF86Config file is supplied with XFree86; it is configured for a
+standard VGA card and monitor with 640x480 resolution.
-You can either take the sample XF86Config as a base and edit it for your
-configuration, or let this program produce a base XF86Config file for your
-configuration and fine-tune it. Refer to /usr/X11R6/lib/X11/doc/README.Config
-for a detailed overview of the configuration process.
+You can either take the sample XF86Config as a base and edit it for your
+configuration, or let this program produce a base XF86Config file for your
+configuration and fine-tune it. Refer to /usr/X11R6/lib/X11/doc/README.Config
+for a detailed overview of the configuration process.
-For accelerated servers (including accelerated drivers in the SVGA server),
-there are many chipset and card-specific options and settings. This program
-does not know about these. On some configurations some of these settings must
-be specified. Refer to the server man pages and chipset-specific READMEs.
+For accelerated servers (including accelerated drivers in the SVGA server),
+there are many chipset and card-specific options and settings. This program
+does not know about these. On some configurations some of these settings must
+be specified. Refer to the server man pages and chipset-specific READMEs.
-Before continuing with this program, make sure you know the chipset and
-amount of video memory on your video card. SuperProbe can help with this.
+Before continuing with this program, make sure you know the chipset and
+amount of video memory on your video card. SuperProbe can help with this.
It is also helpful if you know what server you want to run.";
$finalcomment_text = "
@@ -195,38 +195,38 @@ $cirrus_comment = '
';
$probeonlywarning_text = '
-It is possible that the hardware detection routines in the server some how
-cause the system to crash and the screen to remain blank. If this is the
-case, skip this step the next time. The server may need a
-Ramdac, ClockChip or special option (e.g. "nolinear" for S3) to probe
+It is possible that the hardware detection routines in the server some how
+cause the system to crash and the screen to remain blank. If this is the
+case, skip this step the next time. The server may need a
+Ramdac, ClockChip or special option (e.g. "nolinear" for S3) to probe
and start-up correctly.
';
$monitorintro_text = __('
-Now we want to set the specifications of the monitor. The two critical
-parameters are the vertical refresh rate, which is the rate at which the
-the whole screen is refreshed, and most importantly the horizontal sync rate,
+Now we want to set the specifications of the monitor. The two critical
+parameters are the vertical refresh rate, which is the rate at which the
+the whole screen is refreshed, and most importantly the horizontal sync rate,
which is the rate at which scanlines are displayed.
-The valid range for horizontal sync and vertical sync should be documented
-in the manual of your monitor. If in doubt, check the monitor database
+The valid range for horizontal sync and vertical sync should be documented
+in the manual of your monitor. If in doubt, check the monitor database
/usr/X11R6/lib/X11/doc/Monitors to see if your monitor is there.
');
$hsyncintro_text = __('
-You must indicate the horizontal sync range of your monitor. You can either
+You must indicate the horizontal sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range.
-It is VERY IMPORTANT that you do not specify a monitor type with a horizontal
-sync range that is beyond the capabilities of your monitor. If in doubt,
+It is VERY IMPORTANT that you do not specify a monitor type with a horizontal
+sync range that is beyond the capabilities of your monitor. If in doubt,
choose a conservative setting.
');
$vsyncintro_text = __('
-You must indicate the vertical sync range of your monitor. You can either
+You must indicate the vertical sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
-standard monitor types, or give a specific range. For interlaced modes,
+standard monitor types, or give a specific range. For interlaced modes,
the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).
');
@@ -234,7 +234,7 @@ $XF86firstchunk_text = '
# File generated by XConfigurator.
# **********************************************************************
-# Refer to the XF86Config(4/5) man page for details about the format of
+# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************
@@ -264,7 +264,7 @@ EndSection
Section "ServerFlags"
- # Uncomment this to cause a core dump at the spot where a signal is
+ # Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
#NoTrapSignals
@@ -299,14 +299,14 @@ Section "Keyboard"
AutoRepeat 500 5
- # Let the server do the NumLock processing. This should only be
+ # Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
#ServerNumLock
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#Xleds 1 2 3
- #To set the LeftAlt to Meta, RightAlt key to ModeShift,
+ #To set the LeftAlt to Meta, RightAlt key to ModeShift,
#RightCtl key to Compose, and ScrollLock key to ModeLock:
LeftAlt Meta
@@ -535,9 +535,9 @@ Modeline "1600x1200" 220 1600 1616 1808 2080 1200 1204 1207 1244 +HSync +VS
# 1280x1024 @ 100 Hz, 107.16 kHz hsync
Modeline "1280x1024" 181.75 1280 1312 1440 1696 1024 1031 1046 1072 -HSync -VSync
-# 1800x1440 @ 64Hz, 96.15 kHz hsync
+# 1800x1440 @ 64Hz, 96.15 kHz hsync
ModeLine "1800X1440" 230 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync
-# 1800x1440 @ 70Hz, 104.52 kHz hsync
+# 1800x1440 @ 70Hz, 104.52 kHz hsync
ModeLine "1800X1440" 250 1800 1896 2088 2392 1440 1441 1444 1490 +HSync +VSync
# 512x384 @ 78 Hz, 31.50 kHz hsync
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index a0a9053d6..3c4c19a3e 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -39,15 +39,15 @@ 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 grep_ {
+sub grep_ {
my ($h, $v, $i) = getopts(\@_, qw(hvi));
@_ == 0 || $h and die "usage: grep <regexp> [files...]\n";
my $r = shift;
$r = qr/$r/i if $i;
- @ARGV = @_; (/$r/ ? $v || print : $v && print) while <>
+ @ARGV = @_; (/$r/ ? $v || print : $v && print) while <>
}
-sub tr_ {
+sub tr_ {
my ($s, $c, $d) = getopts(\@_, qw(s c d));
@_ >= 1 + (!$d || $s) or die "usage: tr [-c] [-s [-d]] <set1> <set2> [files...]\n or tr [-c] -d <set1> [files...]\n";
my $set1 = shift;
@@ -65,7 +65,7 @@ sub mount {
" (if /dev/ is left off the device name, a temporary node will be created)\n";
my ($dev, $where) = @_;
- $fs ||= $where =~ /:/ ? "nfs" :
+ $fs ||= $where =~ /:/ ? "nfs" :
$dev =~ /fd/ ? "vfat" : "ext2";
require 'fs.pm';
@@ -79,7 +79,7 @@ sub umount {
fs::umount($_[0]);
}
-sub mkdir_ {
+sub mkdir_ {
my ($rec) = getopts(\@_, qw(p));
my $mkdir; $mkdir = sub {
@@ -119,9 +119,9 @@ sub ln {
($soft ? symlink($source, $dest) : link($source, $dest)) or die "ln failed: $!\n";
}
-sub rm {
+sub rm {
my ($rec, undef) = getopts(\@_, qw(rf));
-
+
my $rm; $rm = sub {
foreach (@_) {
if (-d $_) {
@@ -134,7 +134,7 @@ sub rm {
&$rm(@_);
}
-sub chmod_ {
+sub chmod_ {
@_ >= 2 or die "usage: chmod <mode> <files>\n";
my $mode = shift;
@@ -206,14 +206,14 @@ sub ls {
@_ or @_ = '.';
@_ == 1 && -d $_[0] and @_ = glob_($_[0]);
- foreach (sort @_) {
+ foreach (sort @_) {
if ($l) {
my @s = lstat or warn("can't stat file $_\n"), next;
formline(
"@<<<<<<<<< @<<<<<<< @<<<<<<< @>>>>>>>> @>>>>>>>>>>>>>>> @*\n",
rights($s[2]), getpwuid $s[4] || $s[4], getgrgid $s[5] || $s[5],
- $s[6] ? join ", ", unmakedev($s[6]) : $s[7],
- scalar localtime $s[9], -l $_ ? "$_ -> " . readlink $_ : $_);
+ $s[6] ? join ", ", unmakedev($s[6]) : $s[7],
+ scalar localtime $s[9], -l $_ ? "$_ -> " . readlink $_ : $_);
print $^A; $^A = '';
} else { print "$_\n"; }
}
@@ -261,7 +261,7 @@ sub ps {
open PS, ">&STDOUT";
format PS_TOP =
- PID CMD
+ PID %CPU CMD
.
format PS =
@>>>> @>>> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -336,20 +336,20 @@ sub strings {
sub hexdump {
my $i = 0; $/ = \16; @ARGV = @_; while (<>) {
printf "%08lX ", $i; $i += 16;
- print join(" ", map({ sprintf "%02X", $_ } unpack("C*", $_)),
- ($_ =~ s/[^$printable_chars]/./og, $_)[1]), "\n";
+ print join(" ", map({ sprintf "%02X", $_ } unpack("C*", $_)),
+ ($_ =~ s/[^$printable_chars]/./og, $_)[1]), "\n";
}
}
-sub more {
+sub more {
@ARGV = @_;
require 'devices.pm';
my $tty = devices::make('tty');
- local *IN; open IN, "<$tty" or die "can't open $tty\n";
- my $n = 0; while (<>) {
- ++$n == 25 and $n = <IN>, $n = 0;
- print
- }
+ local *IN; open IN, "<$tty" or die "can't open $tty\n";
+ my $n = 0; while (<>) {
+ ++$n == 25 and $n = <IN>, $n = 0;
+ print
+ }
}
sub pack_ {
@@ -363,7 +363,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; }
}
}
}
@@ -382,7 +382,7 @@ sub unpack_ {
print "$filename\n";
my $dir = dirname($filename);
-d $dir or mkdir_('-p', $dir);
-
+
local *G;
open G, "> $filename" or die "can't write file $filename: $!\n";
while ($size) {
@@ -462,5 +462,5 @@ $dev, $size, $used, $free, $use, $mntpoint
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
-1; #
+1; #
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 199f2320a..41ddbf98e 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -18,10 +18,10 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
#-#####################################################################################
#- Globals
#-#####################################################################################
-$printable_chars = "\x20-\x7E";
-$sizeof_int = psizeof("i");
-$bitof_int = $sizeof_int * 8;
-$SECTORSIZE = 512;
+$printable_chars = "\x20-\x7E";
+$sizeof_int = psizeof("i");
+$bitof_int = $sizeof_int * 8;
+$SECTORSIZE = 512;
#-#####################################################################################
#- Functions
@@ -230,7 +230,7 @@ sub warp_text($;$) {
my ($text, $width) = @_;
$width ||= 80;
- my @l;
+ my @l;
foreach (split "\n", $text) {
my $t = '';
foreach (split /\s+/, $_) {
@@ -251,7 +251,7 @@ sub getVarsFromSh($) {
local *F;
open F, $_[0] or return;
foreach (<F>) {
- my ($v, $val, $val2) =
+ my ($v, $val, $val2) =
/^\s* # leading space
(\w+) = # variable
(
@@ -280,7 +280,7 @@ sub best_match {
my ($str, @lis) = @_;
my @words = split /\W+/, $str;
my ($max, $res) = 0;
-
+
foreach (@lis) {
my $count = 0;
foreach my $i (@words) {
@@ -298,7 +298,7 @@ sub bestMatchSentence {
my @s = split /\W+/, shift;
foreach (@_) {
my $count = 0;
- foreach my $e (@s) {
+ foreach my $e (@s) {
$count++ if /$e/i;
}
$best = $count, $bestSentence = $_ if $count > $best;
@@ -314,7 +314,7 @@ sub bestMatchSentence2 {
my @s = split /\W+/, shift;
foreach (@_) {
my $count = 0;
- foreach my $e (@s) {
+ foreach my $e (@s) {
$count+= length ($e) if /$e/i;
}
$best = $count, $bestSentence = $_ if $count > $best;
@@ -326,4 +326,4 @@ sub bestMatchSentence2 {
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
-1; #
+1; #
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 9cc57b2fb..60295f880 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -25,7 +25,7 @@ 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
- #- 1. The first IDE device if IDE exists. Or
+ #- 1. The first IDE device if IDE exists. Or
#- 2. The first SCSI device if SCSI exists. Or
#- 3. The first RAID device if RAID exists.
@@ -94,7 +94,7 @@ sub getSCSI() {
sub getIDE() {
my @idi;
- #- Great. 2.2 kernel, things are much easier and less error prone.
+ #- Great. 2.2 kernel, things are much easier and less error prone.
foreach my $d (glob_('/proc/ide/hd*')) {
my ($t) = chop_(cat_("$d/media"));
my $type = $ {{disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd'}}{$t} or next;
@@ -115,7 +115,7 @@ sub getCompaqSmartArray() {
if (m|^(ida/.*?):|) {
push @idi, { device => $1, info => "Compaq RAID logical disk", type => 'hd' };
last;
- }
+ }
}
}
@idi;
@@ -125,10 +125,10 @@ sub getDAC960() {
my @idi;
#- We are looking for lines of this format:DAC960#0:
- #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
+ #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
foreach (syslog()) {
my ($devicename, $info) = m|/dev/rd/(.*?): (.*?),| or next;
- push @idi, { info => $info, type => 'hd', devicename => $devicename };
+ push @idi, { info => $info, type => 'hd', devicename => $devicename };
log::l("DAC960: $devicename: $info");
}
@idi;
@@ -149,7 +149,7 @@ sub net2module() {
%l;
}
-sub getNet() {
+sub getNet() {
grep { hasNetDevice($_) } @netdevices;
}
sub getPlip() {
@@ -189,7 +189,7 @@ sub whatParport() {
my @res =();
foreach (0..3) {
local *F;
- my $elem = {};
+ my $elem = {};
open F, "/proc/parport/$_/autoprobe" or next;
foreach (<F>) { $elem->{$1} = $2 if /(.*):(.*);/ }
push @res, { port => "/dev/lp$_", val => $elem};
@@ -209,10 +209,10 @@ sub whatPrinter() {
sub whatPrinterPort() {
grep { tryWrite($_)} qw(/dev/lp0 /dev/lp1 /dev/lp2);
-}
+}
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
-1; #
+1; #
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 877e22680..b7f3a54d9 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -46,7 +46,7 @@ sub make($) {
$file = "$prefix/dev/$_";
-e $file or $file = "$prefix/tmp/$_";
}
- -e $file and return $file; #- assume nobody takes fun at creating files named as device
+ -e $file and return $file; #- assume nobody takes fun at creating files named as device
if (/^sd(.)(\d{0,2})/) {
$type = c::S_IFBLK();
@@ -54,7 +54,7 @@ sub make($) {
$minor = 16 * (ord($1) - ord('a')) + ($2 || 0);
} elsif (/^hd(.)(\d{0,2})/) {
$type = c::S_IFBLK();
- ($major, $minor) =
+ ($major, $minor) =
@{ $ {{'a' => [3, 0], 'b' => [3, 64],
'c' => [22,0], 'd' => [22,64],
'e' => [33,0], 'f' => [33,64],
@@ -76,7 +76,7 @@ sub make($) {
$major = 72 + $1;
$minor = 16 * $2 + ($4 || 0);
} else {
- ($type, $major, $minor) =
+ ($type, $major, $minor) =
@{ $ {{"aztcd" => [ c::S_IFBLK(), 29, 0 ],
"bpcd" => [ c::S_IFBLK(), 41, 0 ],
"cdu31a" => [ c::S_IFBLK(), 15, 0 ],
@@ -99,10 +99,10 @@ sub make($) {
"sjcd" => [ c::S_IFBLK(), 18, 0 ],
}}{$_} or die "unknown device $_" };
}
-
+
#- make a directory for this inode if needed.
- mkdir dirname($file), 0755;
-
+ mkdir dirname($file), 0755;
+
syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!";
$file;
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index df32535b8..fadb328a1 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -22,7 +22,7 @@ sub read_fstab($) {
local *F;
open F, $file or return;
-
+
map {
my ($dev, $mntpoint, @l) = split;
$dev =~ s,/(tmp|dev)/,,;
@@ -53,7 +53,7 @@ sub get_mntpoints_from_fstab($) {
$p->{device} eq $_->{device} or next;
$p->{mntpoint} ||= $_->{mntpoint};
$p->{options} ||= $_->{options};
- $_->{type} ne 'auto' && $_->{type} ne type2fs($p->{type}) and
+ $_->{type} ne 'auto' && $_->{type} ne type2fs($p->{type}) and
log::l("err, fstab and partition table do not agree for $_->{device} type: " . (type2fs($p->{type}) || type2name($p->{type})) . " vs $_->{type}");
}
}
@@ -97,11 +97,11 @@ sub format_part($;$) {
}
sub mount($$$;$) {
- my ($dev, $where, $fs, $rdonly) = @_;
+ my ($dev, $where, $fs, $rdonly) = @_;
log::l("mounting $dev on $where as type $fs");
-
+
-d $where or commands::mkdir_('-p', $where);
-
+
if ($fs eq 'nfs') {
log::l("calling nfs::mount($dev, $where)");
nfs::mount($dev, $where) or die _("nfs mount failed");
@@ -119,7 +119,7 @@ sub mount($$$;$) {
eval { modules::load('vfat') }; #- try using vfat
eval { modules::load('msdos') } if $@; #- otherwise msdos...
}
-
+
log::l("calling mount($dev, $where, $fs, $flag, $mount_opt)");
syscall_('mount', $dev, $where, $fs, $flag, $mount_opt) or die _("mount failed: ") . "$!";
}
@@ -129,7 +129,7 @@ sub mount($$$;$) {
}
#- takes the mount point to umount (can also be the device)
-sub umount($) {
+sub umount($) {
my ($mntpoint) = @_;
syscall_('umount', $mntpoint) or die _("error unmounting %s: %s", $mntpoint, "$!");
@@ -141,9 +141,9 @@ sub umount($) {
sub mount_part($;$) {
my ($part, $prefix) = @_;
-
+
$part->{isMounted} and return;
-
+
if (isSwap($part)) {
swap::swapon($part->{device});
} else {
@@ -194,8 +194,8 @@ sub write($$) {
unshift @cd_drives, grep { $_->{type} eq 'iso9660' } read_fstab("/proc/mounts");
log::l("found cdrom drive(s) " . join(', ', map { $_->{device} } @cd_drives));
- #- cd-rom rooted installs have the cdrom mounted on /dev/root which
- #- is not what we want to symlink to /dev/cdrom.
+ #- cd-rom rooted installs have the cdrom mounted on /dev/root which
+ #- is not what we want to symlink to /dev/cdrom.
my $cddev = first(grep { $_ ne 'root' } map { $_->{device} } @cd_drives);
log::l("resetting /etc/mtab");
@@ -217,14 +217,14 @@ sub write_fstab($;$$) {
my ($fstab, $prefix, $cddev) = @_;
$prefix ||= '';
- my @to_add =
+ my @to_add =
map {
my ($dir, $options, $freq, $passno) = qw(/dev/ defaults 0 0);
$options ||= $_->{options};
isExt2($_) and ($freq, $passno) = (1, ($_->{mntpoint} eq '/') ? 1 : 2);
isNfs($_) and ($dir, $options) = ('', 'ro');
-
+
[ "$dir$_->{device}", $_->{mntpoint}, type2fs($_->{type}), $options, $freq, $passno ];
} grep { $_->{mntpoint} && type2fs($_->{type}) } @$fstab;
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 96dc6edac..bf7574f5e 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -17,14 +17,14 @@ use log;
#- Globals
#-#####################################################################################
my @suggestions = (
- { mntpoint => "/boot", minsize => 10 << 11, size => 16 << 11, type => 0x83 },
- { mntpoint => "/", minsize => 50 << 11, size => 100 << 11, type => 0x83 },
+ { mntpoint => "/boot", minsize => 10 << 11, size => 16 << 11, type => 0x83 },
+ { mntpoint => "/", minsize => 50 << 11, size => 100 << 11, type => 0x83 },
{ mntpoint => "swap", minsize => 30 << 11, size => 60 << 11, type => 0x82 },
- { mntpoint => "/usr", minsize => 200 << 11, size => 600 << 11, type => 0x83 },
- { mntpoint => "/home", minsize => 50 << 11, size => 200 << 11, type => 0x83 },
- { mntpoint => "/var", minsize => 200 << 11, size => 250 << 11, type => 0x83 },
- { mntpoint => "/tmp", minsize => 50 << 11, size => 100 << 11, type => 0x83 },
- { mntpoint => "/mnt/iso", minsize => 700 << 11, size => 800 << 11, type => 0x83 },
+ { mntpoint => "/usr", minsize => 200 << 11, size => 600 << 11, type => 0x83 },
+ { mntpoint => "/home", minsize => 50 << 11, size => 200 << 11, type => 0x83 },
+ { mntpoint => "/var", minsize => 200 << 11, size => 250 << 11, type => 0x83 },
+ { mntpoint => "/tmp", minsize => 50 << 11, size => 100 << 11, type => 0x83 },
+ { mntpoint => "/mnt/iso", minsize => 700 << 11, size => 800 << 11, type => 0x83 },
);
my @suggestions_mntpoints = qw(/mnt/dos);
@@ -32,9 +32,9 @@ my @suggestions_mntpoints = qw(/mnt/dos);
#-######################################################################################
#- Functions
#-######################################################################################
-sub suggestions_mntpoint($) {
+sub suggestions_mntpoint($) {
my ($hds) = @_;
- sort grep { !/swap/ && !has_mntpoint($_, $hds) }
+ sort grep { !/swap/ && !has_mntpoint($_, $hds) }
(@suggestions_mntpoints, map { $_->{mntpoint} } @suggestions);
}
@@ -50,10 +50,10 @@ sub hds($$) {
$hd = { (%$_, %$hd) };
$hd->{file} = $file;
$hd->{prefix} = $hd->{device};
- # for RAID arrays of format c0d0p1
+ # for RAID arrays of format c0d0p1
$hd->{prefix} .= "p" if $hd->{prefix} =~ m,(rd|ida)/,;
- eval { partition_table::read($hd, $flags->{clearall}) };
+ eval { partition_table::read($hd, $flags->{clearall}) };
if ($@) {
&cdie($@) unless $flags->{eraseBadPartitions};
partition_table_raw::zero_MBR($hd);
@@ -74,13 +74,13 @@ sub suggest_part($$$;$) {
my $has_swap = grep { isSwap($_) } get_fstab(@$hds);
- my ($best, $second) =
+ my ($best, $second) =
grep { $part->{size} >= $_->{minsize} }
grep { ! has_mntpoint($_->{mntpoint}, $hds) || isSwap($_) && !$has_swap }
@$suggestions or return;
- $best = $second if
- $best->{mntpoint} eq '/boot' &&
+ $best = $second if
+ $best->{mntpoint} eq '/boot' &&
$part->{start} + $best->{minsize} > 1024 * partition_table::cylinder_size($hd); #- if the empty slot is beyond the 1024th cylinder, no use having /boot
defined $best or return; #- sorry no suggestion :(
@@ -105,7 +105,7 @@ sub suggest_part($$$;$) {
#- $text .= " - Model " . $_->{info};
#- $text .= " array" if $_->{device} =~ /^c.d/;
#-
-#- #- truncate at 50 columns for now
+#- #- truncate at 50 columns for now
#- $text = substr $text, 0, 50;
#- }
#- #-TODO TODO
@@ -208,7 +208,7 @@ sub auto_allocate($;$) {
my ($hds, $suggestions) = @_;
allocatePartitions($hds, [
grep { ! has_mntpoint($_->{mntpoint}, $hds) }
- @{ $suggestions || \@suggestions }
+ @{ $suggestions || \@suggestions }
]);
map { partition_table::assign_device_numbers($_) } @$hds;
}
@@ -231,7 +231,7 @@ sub undo($) {
foreach (@$hds) {
my $h; eval pop @{$_->{undo}} || next;
@{$_}{@partition_table::fields2save} = @$h;
-
+
$_->{isDirty} = $_->{needKernelReread} = 1;
}
}
@@ -246,7 +246,7 @@ sub move {
{
local ($part2->{notFormatted}, $part2->{isFormatted}); #- do not allow partition::add to change this
partition_table::add($hd2, $part2);
- }
+ }
return if $part2->{notFormatted} && !$part2->{isFormatted} || $::testing;
@@ -271,7 +271,7 @@ sub move {
my $f = sub {
c::lseek_sector(fileno(F), $base, 0) or die "seeking to sector $base failed on drive $hd->{device}";
c::lseek_sector(fileno(G), $base2, 0) or die "seeking to sector $base2 failed on drive $hd2->{device}";
-
+
my $buf;
sysread F, $buf, $SECTORSIZE * abs($_[0]) or die '';
syswrite G, $buf;
@@ -320,4 +320,4 @@ sub rescuept($) {
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
-1; #
+1; #
diff --git a/perl-install/help.pm b/perl-install/help.pm
index ba1d8bfd3..f906093ae 100644
--- a/perl-install/help.pm
+++ b/perl-install/help.pm
@@ -3,20 +3,20 @@ package help;
use common qw(:common);
%steps = (
-selectLanguage =>
+selectLanguage =>
__("Choose preferred language for install and system usage."),
selectKeyboard =>
__("Choose on the list of keyboards, the one corresponding to yours"),
-selectPath =>
+selectPath =>
__("Choose \"Installation\" if there are no previous versions of Linux
installed, or if you wish use to multiple distributions or versions.
Choose \"Update\" if you wish to update a previous version of Mandrake
Linux: 5.1 (Venice), 5.2 (Leeloo), 5.3 (Festen) or 6.0 (Venus)."),
-selectInstallClass =>
+selectInstallClass =>
__("Select:
- Beginner: If you have not installed Linux before, or wish to install
the distribution elected \"Product of the year\" for 1999, click here.
@@ -29,9 +29,9 @@ this.
- Expert: If you know GNU/Linux and want to perform a highly
customized installation, this Install Class is for you."),
-setupSCSI =>
+setupSCSI =>
__("The system did not detect a SCSI card. If you have one (or several)
-click on \"Yes\" and choose the module(s) to be tested. Otherwise,
+click on \"Yes\" and choose the module(s) to be tested. Otherwise,
select \"No\".
If you don't know if your computer has SCSI interfaces, consult the
@@ -39,7 +39,7 @@ original documentation delivered with the computer, or if you use
Microsoft Windows 95/98, inspect the information available via the \"Control
panel\", \"System's icon, \"Device Manager\" tab."),
-partitionDisks =>
+partitionDisks =>
__("At this point, hard drive partitions must be defined. (Unless you
are overwriting a previous install of Linux and have already defined
your hard drives partitions as desired.) This operation consists of
@@ -52,14 +52,14 @@ usually irreversible, partitioning can be intimidating and stressful to
the inexperienced. DiskDrake simplifies the process so that it need not
be. Consult the documentation and take your time before proceeding."),
-formatPartitions =>
+formatPartitions =>
__("Any partitions that have been newly defined must be formatted for
use. At this time, you may wish to re-format some pre-existing
partitions to erase the data they contain. Note: it is not necessary to
re-format pre-existing partitions, particularly if they contain files or
data you wish to keep. Typically retained are: /home and /usr/local."),
-choosePackages =>
+choosePackages =>
__("You may now select the packages you wish to install.
Please note that some packages require the installation of others. These
@@ -72,11 +72,11 @@ Information on each category and specific package is available in the
area titled \"Info\". This is located above the buttons: [confirmation]
[selection] [unselection]."),
-doInstallStep =>
+doInstallStep =>
__("The packages selected are now being installed. This operation
should only take a few minutes."),
-configureMouse =>
+configureMouse =>
__("Help"),
configureNetwork =>
@@ -91,7 +91,7 @@ configureServices =>
configurePrinter =>
__("Help"),
-setRootPassword =>
+setRootPassword =>
__("An administrator password for your Linux system must now be
assigned. The password must be entered twice to verify that both
password entries are identical.
@@ -112,7 +112,7 @@ addUser =>
__("You can now authorize one or more people to use your Linux
system. Each user account will have their own customizable environment.
-It is very important that you create a regular user account, even if
+It is very important that you create a regular user account, even if
there will only be one principle user of the system. The administrative
\"root\" account should not be used for day to day operation of the
computer. It is a security risk. The use of a regular user account
@@ -130,7 +130,7 @@ to place the information required to boot to Linux.
Unless you know exactly what you are doing, choose \"First sector of
drive\"."),
-configureX =>
+configureX =>
__("It is now time to configure the video card and monitor
configuration for the X Window Graphic User Interface (GUI). First
select your monitor. Next, you may test the configuration and change
@@ -141,20 +141,20 @@ exitInstall =>
#- ################################################################################
%steps_long = (
-selectLanguage =>
+selectLanguage =>
__("Choose preferred language for install and system usage."),
selectKeyboard =>
__("Choose on the list of keyboards, the one corresponding to yours"),
-selectPath =>
+selectPath =>
__("Choose \"Installation\" if there are no previous versions of Linux
installed, or if you wish use to multiple distributions or versions.
Choose \"Update\" if you wish to update a previous version of Mandrake
Linux: 5.1 (Venice), 5.2 (Leeloo), 5.3 (Festen) or 6.0 (Venus)."),
-selectInstallClass =>
+selectInstallClass =>
__("Select:
- Beginner: If you have not installed Linux before, or wish to install
the distribution elected \"Product of the year\" for 1999, click here.
@@ -167,9 +167,9 @@ this.
- Expert: If you know GNU/Linux and want to perform a highly
customized installation, this Install Class is for you."),
-setupSCSI =>
+setupSCSI =>
__("The system did not detect a SCSI card. If you have one (or several)
-click on \"Yes\" and choose the module(s) to be tested. Otherwise,
+click on \"Yes\" and choose the module(s) to be tested. Otherwise,
select \"No\".
If you don't know if your computer has SCSI interfaces, consult the
@@ -177,7 +177,7 @@ original documentation delivered with the computer, or if you use
Microsoft Windows 95/98, inspect the information available via the \"Control
panel\", \"System's icon, \"Device Manager\" tab."),
-partitionDisks =>
+partitionDisks =>
__("At this point, hard drive partitions must be defined. (Unless you
are overwriting a previous install of Linux and have already defined
your hard drives partitions as desired.) This operation consists of
@@ -190,14 +190,14 @@ usually irreversible, partitioning can be intimidating and stressful to
the inexperienced. DiskDrake simplifies the process so that it need not
be. Consult the documentation and take your time before proceeding."),
-formatPartitions =>
+formatPartitions =>
__("Any partitions that have been newly defined must be formatted for
use. At this time, you may wish to re-format some pre-existing
partitions to erase the data they contain. Note: it is not necessary to
re-format pre-existing partitions, particularly if they contain files or
data you wish to keep. Typically retained are: /home and /usr/local."),
-choosePackages =>
+choosePackages =>
__("You may now select the packages you wish to install.
Please note that some packages require the installation of others. These
@@ -210,11 +210,11 @@ Information on each category and specific package is available in the
area titled \"Info\". This is located above the buttons: [confirmation]
[selection] [unselection]."),
-doInstallStep =>
+doInstallStep =>
__("The packages selected are now being installed. This operation
should only take a few minutes."),
-configureMouse =>
+configureMouse =>
__("Help"),
configureNetwork =>
@@ -229,7 +229,7 @@ configureServices =>
configurePrinter =>
__("Help"),
-setRootPassword =>
+setRootPassword =>
__("An administrator password for your Linux system must now be
assigned. The password must be entered twice to verify that both
password entries are identical.
@@ -250,7 +250,7 @@ addUser =>
__("You can now authorize one or more people to use your Linux
system. Each user account will have their own customizable environment.
-It is very important that you create a regular user account, even if
+It is very important that you create a regular user account, even if
there will only be one principle user of the system. The administrative
\"root\" account should not be used for day to day operation of the
computer. It is a security risk. The use of a regular user account
@@ -268,7 +268,7 @@ to place the information required to boot to Linux.
Unless you know exactly what you are doing, choose \"First sector of
drive\"."),
-configureX =>
+configureX =>
__("It is now time to configure the video card and monitor
configuration for the X Window Graphic User Interface (GUI). First
select your monitor. Next, you may test the configuration and change
diff --git a/perl-install/install2 b/perl-install/install2
index 2498d14dc..b9459d527 100755
--- a/perl-install/install2
+++ b/perl-install/install2
@@ -27,5 +27,5 @@ $::testing = $ENV{PERL_INSTALL_TEST};
$::isStandalone = 0;
install2::main(@ARGV);
-
+
exec "true";
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 80ec99f6b..d308fe8e5 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -34,26 +34,26 @@ use run_program;
#-######################################################################################
my @installStepsFields = qw(text redoable onError needs entered reachable toBeDone help next done);
my @installSteps = (
- selectLanguage => [ __("Choose your language"), 1, 1 ],
- selectPath => [ __("Choose install or upgrade"), 0, 0 ],
- selectInstallClass => [ __("Select installation class"), 1, 1, "selectPath" ],
+ selectLanguage => [ __("Choose your language"), 1, 1 ],
+ selectPath => [ __("Choose install or upgrade"), 0, 0 ],
+ selectInstallClass => [ __("Select installation class"), 1, 1, "selectPath" ],
selectMouse => [ __("Configure mouse"), 1, 1 ],
- selectKeyboard => [ __("Choose your keyboard"), 1, 1 ],
- setupSCSI => [ __("Setup SCSI"), 1, 0 ],
- partitionDisks => [ __("Setup filesystems"), 1, 0 ],
- formatPartitions => [ __("Format partitions"), 1, -1, "partitionDisks" ],
- choosePackages => [ __("Choose packages to install"), 1, 1, "selectInstallClass" ],
- doInstallStep => [ __("Install system"), 1, -1, ["formatPartitions", "selectPath"] ],
- configureNetwork => [ __("Configure networking"), 1, 1, "formatPartitions" ],
- configureTimezone => [ __("Configure timezone"), 1, 1, "doInstallStep" ],
-#- configureServices => [ __("Configure services"), 0, 0 ],
+ selectKeyboard => [ __("Choose your keyboard"), 1, 1 ],
+ setupSCSI => [ __("Setup SCSI"), 1, 0 ],
+ partitionDisks => [ __("Setup filesystems"), 1, 0 ],
+ formatPartitions => [ __("Format partitions"), 1, -1, "partitionDisks" ],
+ choosePackages => [ __("Choose packages to install"), 1, 1, "selectInstallClass" ],
+ doInstallStep => [ __("Install system"), 1, -1, ["formatPartitions", "selectPath"] ],
+ configureNetwork => [ __("Configure networking"), 1, 1, "formatPartitions" ],
+ configureTimezone => [ __("Configure timezone"), 1, 1, "doInstallStep" ],
+#- configureServices => [ __("Configure services"), 0, 0 ],
configurePrinter => [ __("Configure printer"), 1, 0, "doInstallStep" ],
- setRootPassword => [ __("Set root password"), 1, 1, "formatPartitions" ],
- addUser => [ __("Add a user"), 1, 1, "doInstallStep" ],
- createBootdisk => [ __("Create bootdisk"), 1, 0, "doInstallStep" ],
- setupBootloader => [ __("Install bootloader"), 1, 1, "doInstallStep" ],
+ setRootPassword => [ __("Set root password"), 1, 1, "formatPartitions" ],
+ addUser => [ __("Add a user"), 1, 1, "doInstallStep" ],
+ createBootdisk => [ __("Create bootdisk"), 1, 0, "doInstallStep" ],
+ setupBootloader => [ __("Install bootloader"), 1, 1, "doInstallStep" ],
configureX => [ __("Configure X"), 1, 0, "formatPartitions" ],
- exitInstall => [ __("Exit install"), 0, 0, "alldone" ],
+ exitInstall => [ __("Exit install"), 0, 0, "alldone" ],
);
my (%installSteps, %upgradeSteps, @orderedInstallSteps, @orderedUpgradeSteps);
@@ -80,28 +80,28 @@ my @install_classes = (__("beginner"), __("developer"), __("server"), __("expert
#- partition layout
my %suggestedPartitions = (
beginner => [
- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
{ mntpoint => "swap", size => 128 << 11, type => 0x82 },
- { mntpoint => "/", size => 700 << 11, type => 0x83 },
- { mntpoint => "/home", size => 300 << 11, type => 0x83 },
+ { mntpoint => "/", size => 700 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 300 << 11, type => 0x83 },
],
developer => [
- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
{ mntpoint => "swap", size => 128 << 11, type => 0x82 },
- { mntpoint => "/", size => 200 << 11, type => 0x83 },
- { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
- { mntpoint => "/home", size => 500 << 11, type => 0x83 },
+ { mntpoint => "/", size => 200 << 11, type => 0x83 },
+ { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 500 << 11, type => 0x83 },
],
server => [
- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
{ mntpoint => "swap", size => 512 << 11, type => 0x82 },
- { mntpoint => "/", size => 200 << 11, type => 0x83 },
- { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
- { mntpoint => "/var", size => 600 << 11, type => 0x83 },
- { mntpoint => "/home", size => 500 << 11, type => 0x83 },
+ { mntpoint => "/", size => 200 << 11, type => 0x83 },
+ { mntpoint => "/usr", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/var", size => 600 << 11, type => 0x83 },
+ { mntpoint => "/home", size => 500 << 11, type => 0x83 },
],
expert => [
- { mntpoint => "/", size => 200 << 11, type => 0x83 },
+ { mntpoint => "/", size => 200 << 11, type => 0x83 },
],
);
@@ -111,23 +111,23 @@ my %suggestedPartitions = (
#-if you want to do a kickstart file, you just have to add all the required fields (see for example
#-the variable $default)
#-#######################################################################################
-$o = $::o = {
+$o = $::o = {
bootloader => { onmbr => 1, linear => 0, message => 1, keytable => 1, timeout => 50 },
autoSCSI => 0,
mkbootdisk => 1, #- no mkbootdisk if 0 or undef, find a floppy with 1
#- packages => [ qw() ],
partitioning => { clearall => 0, eraseBadPartitions => 0, auto_allocate => 0, autoformat => 0 },
#- partitions => [
-#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
-#- { mntpoint => "/", size => 256 << 11, type => 0x83 },
-#- { mntpoint => "/usr", size => 512 << 11, type => 0x83, growable => 1 },
-#- { mntpoint => "/var", size => 256 << 11, type => 0x83 },
-#- { mntpoint => "/home", size => 512 << 11, type => 0x83, growable => 1 },
+#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+#- { mntpoint => "/", size => 256 << 11, type => 0x83 },
+#- { mntpoint => "/usr", size => 512 << 11, type => 0x83, growable => 1 },
+#- { mntpoint => "/var", size => 256 << 11, type => 0x83 },
+#- { mntpoint => "/home", size => 512 << 11, type => 0x83, growable => 1 },
#- { mntpoint => "swap", size => 64 << 11, type => 0x82 }
-#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
-#- { mntpoint => "/", size => 300 << 11, type => 0x83 },
+#- { mntpoint => "/boot", size => 16 << 11, type => 0x83 },
+#- { mntpoint => "/", size => 300 << 11, type => 0x83 },
#- { mntpoint => "swap", size => 64 << 11, type => 0x82 },
-#- { mntpoint => "/usr", size => 400 << 11, type => 0x83, growable => 1 },
+#- { mntpoint => "/usr", size => 400 << 11, type => 0x83, growable => 1 },
#- ],
shells => [ map { "/bin/$_" } qw(bash tcsh zsh ash ksh) ],
lang => 'en',
@@ -138,7 +138,7 @@ $o = $::o = {
#- timezone => "Europe/Paris",
GMT => 1,
},
- printer => {
+ printer => {
want => 1,
complete => 0,
str_type => $printer::printer_type[0],
@@ -167,11 +167,11 @@ $o = $::o = {
},
#- superuser => { password => 'a', shell => '/bin/bash', realname => 'God' },
#- user => { name => 'foo', password => 'bar', home => '/home/foo', shell => '/bin/bash', realname => 'really, it is foo' },
-
+
#- keyboard => 'de',
#- display => "192.168.1.9:0",
- steps => \%installSteps,
- orderedSteps => \@orderedInstallSteps,
+ steps => \%installSteps,
+ orderedSteps => \@orderedInstallSteps,
base => [ qw(basesystem initscripts console-tools mkbootdisk anacron rhs-hwdiag utempter ldconfig chkconfig ntsysv mktemp setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep groff gzip hdparm info initscripts isapnptools kbdconfig kernel less ldconfig lilo logrotate losetup man mkinitrd mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash sed setconsole setserial shadow-utils sh-utils slocate stat sysklogd tar termcap textutils time timeconfig tmpwatch util-linux vim-minimal vixie-cron which cpio) ],
#- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm
@@ -191,7 +191,7 @@ $o = $::o = {
#-######################################################################################
#- Steps Functions
-#- each step function are called with two arguments : clicked(because if you are a
+#- each step function are called with two arguments : clicked(because if you are a
#- beginner you can force the the step) and the entered number
#-######################################################################################
@@ -206,7 +206,7 @@ sub selectLanguage {
}
#------------------------------------------------------------------------------
-sub selectMouse {
+sub selectMouse {
$o->selectMouse($_[0]);
addToBeDone { mouse::write($o->{mouse}, $o->{prefix}); } 'formatPartitions';
}
@@ -251,7 +251,7 @@ sub partitionDisks {
$o->{drives} = [ detect_devices::hds() ];
$o->{hds} = catch_cdie { fsedit::hds($o->{drives}, $o->{partitioning}) }
sub {
- $o->ask_warn(_("Error"),
+ $o->ask_warn(_("Error"),
_("I can't read your partition table, it's too corrupted for me :(
I'll try to go on blanking bad partitions"));
1;
@@ -286,7 +286,7 @@ sub formatPartitions {
$o->formatPartitions(@{$o->{fstab}});
fs::mount_all([ grep { isExt2($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix});
}
- mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/sysconfig etc/sysconfig/network-scripts
+ mkdir "$o->{prefix}/$_", 0755 foreach qw(dev etc etc/sysconfig etc/sysconfig/network-scripts
home mnt root tmp var var/tmp var/lib var/lib/rpm);
}
@@ -294,7 +294,7 @@ sub formatPartitions {
#-PADTODO
sub choosePackages {
$o->setPackages($o, \@install_classes) if $_[1] == 1;
- $o->choosePackages($o->{packages}, $o->{compss});
+ $o->choosePackages($o->{packages}, $o->{compss});
$o->{packages}{$_}{selected} = 1 foreach @{$o->{base}};
}
@@ -306,13 +306,13 @@ sub doInstallStep {
}
#------------------------------------------------------------------------------
-sub configureNetwork {
+sub configureNetwork {
my ($clicked, $entered) = @_;
- $o->configureNetwork($entered == 1 && !$clicked)
+ $o->configureNetwork($entered == 1 && !$clicked)
}
#------------------------------------------------------------------------------
#-PADTODO
-sub configureTimezone {
+sub configureTimezone {
my ($clicked) = $_[0];
my $f = "$o->{prefix}/etc/sysconfig/clock";
return if ((-s $f) || 0) > 0 && $_[1] == 1 && !$clicked && !$::testing;
@@ -326,7 +326,7 @@ sub configurePrinter { $o->printerConfig }
#------------------------------------------------------------------------------
sub setRootPassword { $o->setRootPassword }
#------------------------------------------------------------------------------
-sub addUser {
+sub addUser {
$o->addUser;
addToBeDone {
@@ -379,10 +379,10 @@ sub main {
$o->{partitioning}{auto_allocate} = 1;
} elsif (/--pcmcia/) {
$o->{pcmcia} = shift;
- }
+ }
}
- #- if this fails, it's okay -- it might help with free space though
+ #- if this fails, it's okay -- it might help with free space though
unlink "/sbin/install" unless $::testing;
unlink "/sbin/insmod" unless $::testing;
@@ -400,7 +400,7 @@ sub main {
mkdir $o->{prefix}, 0755;
mkdir $o->{root}, 0755;
- #- make sure we don't pick up any gunk from the outside world
+ #- make sure we don't pick up any gunk from the outside world
$ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin";
$ENV{LD_LIBRARY_PATH} = "";
@@ -427,15 +427,15 @@ sub main {
$o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt";
mkdir $o->{prefix}, 0755;
- #- make sure we don't pick up any gunk from the outside world
+ #- make sure we don't pick up any gunk from the outside world
$ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin";
$ENV{LD_LIBRARY_PATH} = "";
#- needed very early for install_steps_graphical
eval { $o->{mouse} ||= mouse::detect() };
- $::o = $o = $::auto_install ?
- install_steps->new($o) :
+ $::o = $o = $::auto_install ?
+ install_steps->new($o) :
install_steps_graphical->new($o);
$o->{netc} = network::read_conf("/tmp/network");
@@ -475,7 +475,7 @@ sub main {
last if $o->{step} eq 'exitInstall';
}
killCardServices();
-
+
log::l("installation complete, leaving");
if ($::g_auto_install) {
@@ -489,7 +489,7 @@ sub main {
}
}
-sub killCardServices {
+sub killCardServices {
my $pid = chop_(cat_("/tmp/cardmgr.pid"));
$pid and kill(15, $pid); #- send SIGTERM
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e8008bd82..d8e5a48f8 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -26,7 +26,7 @@ use log;
#-######################################################################################
sub relGetFile($) {
local $_ = $_[0];
- my $dir = m|/| ? "mdkinst" :
+ my $dir = m|/| ? "mdkinst" :
(member($_, qw(compss compssList depslist hdlist)) ? "base" : "RPMS");
$_ = "Mandrake/$dir/$_";
s/i386/i586/;
@@ -117,19 +117,19 @@ sub setPackages($$) {
$o->{packages} = pkgs::psUsingDirectory() if !$useHdlist || $@;
pkgs::getDeps($o->{packages});
-
+
$o->{compss} = pkgs::readCompss($o->{packages});
$o->{compssListLevels} = pkgs::readCompssList($o->{packages});
$o->{compssListLevels} ||= $install_classes;
push @{$o->{base}}, "kernel-smp" if detect_devices::hasSMP();
push @{$o->{base}}, "kernel-pcmcia-cs" if $o->{pcmcia};
}
-
+
do {
my $p = $o->{packages}{$_} or log::l("missing base package $_"), next;
pkgs::select($o->{packages}, $p, 1);
} foreach @{$o->{base}};
-
+
pkgs::setShowFromCompss($o->{compss}, $o->{installClass}, $o->{lang});
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $o->{packages}, getAvailableSpace($o) * 0.7, $o->{installClass}, $o->{lang});
}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 181c37099..c298c2c9f 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -29,7 +29,7 @@ use fs;
#-######################################################################################
sub new($$) {
my ($type, $o) = @_;
-
+
bless $o, ref $type || $type;
return $o;
}
@@ -51,7 +51,7 @@ sub enteringStep($$) {
my @l = ref $needs ? @$needs : $needs;
$reachable = min(map { $o->{steps}{$_}{done} || 0 } @l);
}
- $o->{steps}{$s}{reachable} = 1 if $reachable;
+ $o->{steps}{$s}{reachable} = 1 if $reachable;
}
}
sub leavingStep($$) {
@@ -62,7 +62,7 @@ sub leavingStep($$) {
while (my $f = shift @{$o->{steps}{$step}{toBeDone} || []}) {
eval { &$f() };
- $o->ask_warn(_("Error"), [
+ $o->ask_warn(_("Error"), [
_("An error occurred, i don't know how to handle it nicely,
so continue at your own risk :("), $@ ]) if $@;
}
@@ -86,9 +86,9 @@ sub selectLanguage {
}
}
#------------------------------------------------------------------------------
-sub selectKeyboard {
+sub selectKeyboard {
my ($o) = @_;
- keyboard::setup($o->{keyboard})
+ keyboard::setup($o->{keyboard})
}
#------------------------------------------------------------------------------
sub selectPath {}
@@ -113,7 +113,7 @@ sub rebootNeeded($) {
sub choosePartitionsToFormat($$) {
my ($o, $fstab) = @_;
- foreach (@$fstab) {
+ foreach (@$fstab) {
$_->{toFormat} = ($_->{mntpoint} && isExt2($_) || isSwap($_)) &&
($_->{notFormatted} || $o->{partitioning}{autoformat});
}
@@ -158,7 +158,7 @@ sub afterInstallPackages($) {
}
#------------------------------------------------------------------------------
-sub selectMouse($) {
+sub selectMouse($) {
my ($o) = @_;
}
@@ -173,7 +173,7 @@ sub configureNetwork($) {
network::add2hosts("$etc/hosts", $o->{netc}{HOSTNAME}, map { $_->{IPADDR} } @{$o->{intf}});
network::sethostname($o->{netc}) unless $::testing;
network::addDefaultRoute($o->{netc}) unless $::testing;
- #-res_init(); #- reinit the resolver so DNS changes take affect
+ #-res_init(); #- reinit the resolver so DNS changes take affect
}
#------------------------------------------------------------------------------
@@ -182,7 +182,7 @@ sub pcmciaConfig($) {
my $t = $o->{pcmcia};
my $f = "$o->{prefix}/etc/sysconfig/pcmcia";
- # should be set after installing the package above else the file will be renamed.
+ #- should be set after installing the package above else the file will be renamed.
setVarsInSh($f, {
PCMCIA => $t ? "yes" : "no",
PCIC => $t,
@@ -278,7 +278,7 @@ sub createBootdisk($) {
my @l = detect_devices::floppies();
- $dev = shift @l || die _("no floppy available")
+ $dev = shift @l || die _("no floppy available")
if $dev eq "1"; #- special case meaning autochoose
return if $::testing;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 1955a96dd..e55b866ed 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -49,16 +49,16 @@ sub selectLanguage($) {
my ($o) = @_;
$o->{lang} =
lang::text2lang($o->ask_from_list("Language",
- _("Which language do you want?"),
+ _("Which language do you want?"),
# the translation may be used for the help
- [ lang::list() ],
+ [ lang::list() ],
lang::lang2text($o->{lang})));
install_steps::selectLanguage($o);
}
#------------------------------------------------------------------------------
sub selectKeyboard($) {
my ($o) = @_;
- $o->{keyboard} =
+ $o->{keyboard} =
keyboard::text2keyboard($o->ask_from_list_("Keyboard",
_("Which keyboard do you have?"),
[ keyboard::list() ],
@@ -70,9 +70,9 @@ sub selectKeyboard($) {
sub selectPath($) {
my ($o) = @_;
$o->{isUpgrade} =
- $o->ask_from_list_(_("Install/Upgrade"),
+ $o->ask_from_list_(_("Install/Upgrade"),
_("Is this an install or an upgrade?"),
- [ __("Install"), __("Upgrade") ],
+ [ __("Install"), __("Upgrade") ],
$o->{isUpgrade} ? "Upgrade" : "Install") eq "Upgrade";
install_steps::selectPath($o);
@@ -121,7 +121,7 @@ sub choosePartitionsToFormat($$) {
install_steps::choosePartitionsToFormat($o, $fstab);
my @l = grep { $_->{mntpoint} && isExt2($_) || isSwap($_) && !$::beginner } @$fstab;
- my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"),
+ my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"),
[ map { $_->{mntpoint} || type2name($_->{type}) . " ($_->{device})" } @l ],
[ map { \$_->{toFormat} } @l ]);
defined @r or die "cancel";
@@ -155,7 +155,7 @@ sub configureNetwork($) {
__("Reconfigure network now"),
__("Don't set up networking"),
);
- $r = $o->ask_from_list_(_("Network Configuration"),
+ $r = $o->ask_from_list_(_("Network Configuration"),
_("LAN networking has already been configured. Do you want to:"),
[ @l ]);
$r ||= "Don't";
@@ -164,7 +164,7 @@ sub configureNetwork($) {
$o->ask_yesorno(_("Network Configuration"),
_("Do you want to configure LAN (not dialup) networking for your installed system?")) or $r = "Don't";
}
-
+
if ($r =~ /^Don't/) {
$o->{netc}{NETWORKING} = "false";
} elsif ($r !~ /^Keep/) {
@@ -182,7 +182,7 @@ sub configureNetwork($) {
delete $o->{netc}{GATEWAY};
$last = $intf;
}
- #- {
+ #- {
#- my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain..."));
#- network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf});
#- }
@@ -222,14 +222,14 @@ sub configureNetworkNet {
my ($o, $netc, $intf, @devices) = @_;
$netc->{dnsServer} ||= network::dns($intf->{IPADDR});
$netc->{GATEWAY} ||= network::gateway($intf->{IPADDR});
-
+
$o->ask_from_entries_ref(_("Configuring network"),
_("Please enter your host name.
Your host name should be a fully-qualified host name,
such as ``mybox.mylab.myco.com''.
Also give the gateway if you have one"),
[_("Host name:"), _("DNS server:"), _("Gateway:"), !$::beginner ? _("Gateway device:") : ()],
- [(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)),
+ [(map { \$netc->{$_}} qw(HOSTNAME dnsServer GATEWAY)),
{val => \$netc->{GATEWAYDEV}, list => \@devices}]
);
}
@@ -249,12 +249,12 @@ sub timeConfig {
#------------------------------------------------------------------------------
sub printerConfig($) {
my ($o) = @_;
- $o->{printer}{want} =
+ $o->{printer}{want} =
$o->ask_yesorno(_("Printer"),
_("Would you like to configure a printer?"),
$o->{printer}{want});
return if !$o->{printer}{want};
-
+
unless (($::testing)) {
printer::set_prefix($o->{prefix});
pkgs::select($o->{packages}, $o->{packages}{'rhs-printfilters'});
@@ -262,39 +262,39 @@ sub printerConfig($) {
}
printer::read_printer_db();
-
+
$o->{printer}{complete} = 0;
if ($::expert) {
#std info
#Don't wait, if the user enter something, you must remember it
$o->ask_from_entries_ref(_("Standard Printer Options"),
- _("Every print queue (which print jobs are directed to) needs a
-name (often lp) and a spool directory associated with it. What
+ _("Every print queue (which print jobs are directed to) needs a
+name (often lp) and a spool directory associated with it. What
name and directory should be used for this queue?"),
[_("Name of queue:"), _("Spool directory:")],
[\$o->{printer}{QUEUE}, \$o->{printer}{SPOOLDIR}],
- changed => sub
- {
- $o->{printer}{SPOOLDIR}
+ changed => sub
+ {
+ $o->{printer}{SPOOLDIR}
= "$printer::spooldir/$o->{printer}{QUEUE}" unless $_[0];
},
);
}
-
- $o->{printer}{str_type} =
+
+ $o->{printer}{str_type} =
$o->ask_from_list_(_("Select Printer Connection"),
_("How is the printer connected?"),
[keys %printer::printer_type],
${$o->{printer}}{str_type},
);
$o->{printer}{TYPE} = $printer::printer_type{$o->{printer}{str_type}};
-
+
if ($o->{printer}{TYPE} eq "LOCAL") {
{
my $w = $o->wait_message(_("Test ports"), _("Detecting devices..."));
eval { modules::load("lp");modules::load("parport_probe"); };
}
-
+
my @port = ();
my @parport = detect_devices::whatPrinter();
eval { modules::unload("parport_probe") };
@@ -319,21 +319,21 @@ name and directory should be used for this queue?"),
#-TAKE A GOODDEFAULT TODO
} elsif ($o->{printer}{TYPE} eq "REMOTE") {
- return if !$o->ask_from_entries_ref(_("Remote lpd Printer Options"),
- _("To use a remote lpd print queue, you need to supply
-the hostname of the printer server and the queue name
+ return if !$o->ask_from_entries_ref(_("Remote lpd Printer Options"),
+ _("To use a remote lpd print queue, you need to supply
+the hostname of the printer server and the queue name
on that server which jobs should be placed in."),
[_("Remote hostname:"), _("Remote queue:")],
[\$o->{printer}{REMOTEHOST}, \$o->{printer}{REMOTEQUEUE}],
);
-
+
} elsif ($o->{printer}{TYPE} eq "SMB") {
return if !$o->ask_from_entries_ref(
_("SMB/Windows 95/NT Printer Options"),
- _("To print to a SMB printer, you need to provide the
-SMB host name (this is not always the same as the machines
-TCP/IP hostname) and possibly the IP address of the print server, as
-well as the share name for the printer you wish to access and any
+ _("To print to a SMB printer, you need to provide the
+SMB host name (this is not always the same as the machines
+TCP/IP hostname) and possibly the IP address of the print server, as
+well as the share name for the printer you wish to access and any
applicable user name, password, and workgroup information."),
[_("SMB server host:"), _("SMB server IP:"),
_("Share name:"), _("User name:"), _("Password:"),
@@ -349,24 +349,24 @@ applicable user name, password, and workgroup information."),
}
return 0;
},
-
+
);
} else {#($o->{printer}{TYPE} eq "NCP") {
return if !$o->ask_from_entries_ref(_("NetWare Printer Options"),
- _("To print to a NetWare printer, you need to provide the
-NetWare print server name (this is not always the same as the machines
-TCP/IP hostname) as well as the print queue name for the printer you
+ _("To print to a NetWare printer, you need to provide the
+NetWare print server name (this is not always the same as the machines
+TCP/IP hostname) as well as the print queue name for the printer you
wish to access and any applicable user name and password."),
- [_("Printer Server:"), _("Print Queue Name:"),
+ [_("Printer Server:"), _("Print Queue Name:"),
_("User name:"), _("Password:")],
[\$o->{printer}{NCPHOST}, \$o->{printer}{NCPQUEUE},
\$o->{printer}{NCPUSER}, {val => \$o->{printer}{NCPPASSWD}, hidden => 1}],
);
}
-
-
- $o->{printer}{DBENTRY} =
+
+
+ $o->{printer}{DBENTRY} =
$printer::descr_to_db{
$o->ask_from_list_(_("Configure Printer"),
_("What type of printer do you have?"),
@@ -379,7 +379,7 @@ wish to access and any applicable user name and password."),
#-paper size conf
- $o->{printer}{PAPERSIZE} =
+ $o->{printer}{PAPERSIZE} =
$o->ask_from_list_(_("Paper Size"),
_("Paper Size"),
\@printer::papersize_type,
@@ -411,20 +411,20 @@ wish to access and any applicable user name and password."),
my @col = map { "$_->{DEPTH} $_->{DESCR}" } @list_col;
my %col_to_depth = map { ("$_->{DEPTH} $_->{DESCR}", $_->{DEPTH}) } @list_col;
my %depth_to_col = reverse %col_to_depth;
-
+
if (@list_col) {
my $is_uniprint = $db_entry{GSDRIVER} eq "uniprint";
if ($is_uniprint) {
- $o->{printer}{BITSPERPIXEL} =
+ $o->{printer}{BITSPERPIXEL} =
$col_to_depth{$o->ask_from_list_
(_("Configure Uniprint Driver"),
_("You may now configure the uniprint options for this printer."),
\@col,
$depth_to_col{$o->{printer}{BITSPERPIXEL}},
)};
-
+
} else {
- $o->{printer}{BITSPERPIXEL} =
+ $o->{printer}{BITSPERPIXEL} =
$col_to_depth{$o->ask_from_list_
(_("Configure Color Depth"),
_("You may now configure the color options for this printer."),
@@ -451,7 +451,7 @@ sub setRootPassword($) {
$o->ask_from_entries_ref(_("Set root password"),
_("Set root password"),
[_("Password"), _("Password (again)")],
- [{ val => \$sup->{password}, hidden => 1},
+ [{ val => \$sup->{password}, hidden => 1},
{ val => \$sup->{password2}, hidden => 1}],
complete => sub {
$sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("You must enter the same password"), _("Please try again") ]), return (1,1);
@@ -463,7 +463,7 @@ sub setRootPassword($) {
}
#------------------------------------------------------------------------------
-#-addUser
+#-addUser
#------------------------------------------------------------------------------
sub addUser($) {
my ($o) = @_;
@@ -476,7 +476,7 @@ sub addUser($) {
_("Add user"),
_("Enter a user"),
[ _("Real name"), _("User name"), _("Password"), _("Password (again)"), _("Shell") ],
- [ \$u->{realname}, \$u->{name},
+ [ \$u->{realname}, \$u->{name},
{val => \$u->{password}, hidden => 1}, {val => \$u->{password2}, hidden => 1},
{val => \$u->{shell}, list => \@shells, not_edit => !$::expert},
],
@@ -505,7 +505,7 @@ sub addUser($) {
sub createBootdisk {
my ($o, $first_time) = @_;
my @l = detect_devices::floppies();
-
+
if ($first_time || @l == 1) {
$o->ask_yesorno('',
_("A custom bootdisk provides a way of booting into your Linux system without
@@ -518,8 +518,8 @@ failures. Would you like to create a bootdisk for your system?"), !$o->{mkbootdi
} else {
@l or die _("Sorry, no floppy drive available");
- $o->{mkbootdisk} = $o->ask_from_list('',
- _("Choose the floppy drive you want to use to make the bootdisk"),
+ $o->{mkbootdisk} = $o->ask_from_list('',
+ _("Choose the floppy drive you want to use to make the bootdisk"),
[ @l, "Cancel" ], $o->{mkbootdisk});
return if $o->{mkbootdisk} eq "Cancel";
}
@@ -534,10 +534,10 @@ sub setupBootloader($) {
my ($o) = @_;
my @l = (__("First sector of drive"), __("First sector of boot partition"));
- $o->{bootloader}{onmbr} =
- $o->ask_from_list_(_("Lilo Installation"),
- _("Where do you want to install the bootloader?"),
- \@l,
+ $o->{bootloader}{onmbr} =
+ $o->ask_from_list_(_("Lilo Installation"),
+ _("Where do you want to install the bootloader?"),
+ \@l,
$l[!$o->{bootloader}{onmbr}]
) eq $l[0];
@@ -547,9 +547,9 @@ sub setupBootloader($) {
my @entries = grep { $_->{liloLabel} } @{$o->{fstab}};
$o->ask_from_entries_ref('',
-_("The boot manager Mandrake uses can boot other
-operating systems as well. You need to tell me
-what partitions you would like to be able to boot
+_("The boot manager Mandrake uses can boot other
+operating systems as well. You need to tell me
+what partitions you would like to be able to boot
and what label you want to use for each of them."),
[map {"$_->{device}" . type2name($_->{type})} @entries],
[map {\$_->{liloLabel}} @entries],
@@ -560,7 +560,7 @@ and what label you want to use for each of them."),
}
#------------------------------------------------------------------------------
-sub exitInstall {
+sub exitInstall {
my ($o) = @_;
$o->ask_warn('',
_("Congratulations, installation is complete.
@@ -578,15 +578,15 @@ install chapter of the Official Linux Mandrake User's Guide."));
sub loadModule {
my ($o, $type) = @_;
my @options;
-
- my $l = $o->ask_from_list('',
- _("What %s card have you?", $type),
+
+ my $l = $o->ask_from_list('',
+ _("What %s card have you?", $type),
[ modules::text_of_type($type) ]) or return;
my $m = modules::text2driver($l);
my @names = modparm::get_options_name($m);
- if ((!defined @names || @names > 0) && $o->ask_from_list('',
+ if ((!defined @names || @names > 0) && $o->ask_from_list('',
_("In some cases, the %s driver needs to have extra information to work
properly, although it normally works fine without. Would you like to specify
extra options for it or allow the driver to probe your machine for the
@@ -611,7 +611,7 @@ For example you can have ``io=0x300 irq=7''", $l),
}
eval { modules::load($m, $type, @options) };
if ($@) {
- $o->ask_yesorno('',
+ $o->ask_yesorno('',
_("Loading of module %s failed
Do you want to try again with other parameters?", $l)) or return;
goto ASK;
@@ -623,8 +623,8 @@ Do you want to try again with other parameters?", $l)) or return;
sub load_thiskind {
my ($o, $type) = @_;
my $w;
- modules::load_thiskind($type, sub {
- $w = $o->wait_message('',
+ modules::load_thiskind($type, sub {
+ $w = $o->wait_message('',
[ _("Installing driver for %s card %s", $type, $_->[0]),
$::beginner ? () : _("(module %s)", $_->[1])
]);
@@ -638,10 +638,10 @@ sub setup_thiskind {
return if $auto && (@l || !$at_least_one);
while (1) {
my $msg = @l ?
- [ _("Found %s %s interfaces", join(", ", map { $_->[0] } @l), $type),
+ [ _("Found %s %s interfaces", join(", ", map { $_->[0] } @l), $type),
_("Do you have another one?") ] :
_("Do you have an %s interface?", $type);
-
+
my $opt = [ __("Yes"), __("No") ];
push @$opt, __("See hardware info") if $::expert;
my $r = "Yes";
diff --git a/perl-install/install_steps_stdio.pm b/perl-install/install_steps_stdio.pm
index 8122c3ba2..651f3ba16 100644
--- a/perl-install/install_steps_stdio.pm
+++ b/perl-install/install_steps_stdio.pm
@@ -29,25 +29,25 @@ sub installPackages {
my $o = shift;
my $old = \&log::ld;
- local *log::ld = sub {
+ local *log::ld = sub {
my $m = shift;
if ($m =~ /^starting installing/) {
my $name = first($_[0] =~ m|([^/]*)-.+?-|);
print("installing package $name");
} else { goto $old }
- };
+ };
$o->SUPER::installPackages(@_);
}
sub setRootPassword($) {
my ($o) = @_;
-
+
my (%w);
do {
$w{password} and print "You must enter the same password, please try again\n";
- print "Password: "; $w{password} = $o->readln();
- print "Password (again for confirmation): ";
+ print "Password: "; $w{password} = $o->readln();
+ print "Password (again for confirmation): ";
} until ($w{password} eq $o->readln());
$o->{default}{rootPassword} = $w{password};
@@ -61,13 +61,13 @@ sub addUser($) {
print "Name: "; $w{name} = $o->readln() or return;
do {
$w{password} and print "You must enter the same password, please try again\n";
- print "Password: "; $w{password} = $o->readln();
- print "Password (again for confirmation): ";
+ print "Password: "; $w{password} = $o->readln();
+ print "Password (again for confirmation): ";
} until ($w{password} eq $o->readln());
print "Real name: "; $w{realname} = $o->readln();
-
+
$w{shell} = $o->ask_from_list('', 'Shell', [ install_any::shells($o) ], "/bin/bash");
-
+
$o->{default}{user} = { map { $_ => $w{$_}->get_text } qw(name password realname shell) };
$o->SUPER::addUser;
}
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index debbb0aba..2a18767e4 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -9,7 +9,7 @@ use strict;
use common qw(:common :functional);
#- heritate from this class and you'll get all made interactivity for same steps.
-#- for this you need to provide
+#- for this you need to provide
#- - ask_from_listW(o, title, messages, arrayref, default) returns one string of arrayref
#- - ask_many_from_listW(o, title, messages, arrayref, arrayref2) returns many strings of arrayref
#-
@@ -19,7 +19,7 @@ use common qw(:common :functional);
#- - messages is an refarray of strings
#- - default is an optional string (default is in arrayref)
#- - arrayref is an arrayref of strings
-#- - arrayref2 contains booleans telling the default state,
+#- - arrayref2 contains booleans telling the default state,
#-
#- ask_from_list and ask_from_list_ are wrappers around ask_from_biglist and ask_from_smalllist
#-
@@ -58,7 +58,7 @@ sub ask_okcancel($$$;$) {
}
sub ask_from_list_ {
- my ($o, $title, $message, $l, $def) = @_;
+ my ($o, $title, $message, $l, $def) = @_;
@$l == 0 and die '';
@$l == 1 and return $l->[0];
goto &ask_from_list2_;
@@ -116,7 +116,7 @@ sub ask_from_entries($$$$;$%) {
my $val = [ map { my $i = $_; \$i } @{$def || [('') x @$l]} ];
$o->ask_from_entries_ref($title, $message, $l, $val, %callback) ?
- map { $$_ } @$val :
+ map { $$_ } @$val :
undef;
}
#- can get a hash of callback: focus_out changed and complete
@@ -126,7 +126,7 @@ sub ask_from_entries_ref($$$$;$%) {
my ($o, $title, $message, $l, $val, %callback) = @_;
return unless @$l;
-
+
$message = ref $message ? $message : [ $message ];
my $val_hash = [ map {
@@ -139,7 +139,7 @@ sub ask_from_entries_ref($$$$;$%) {
} @$val ];
$o->ask_from_entries_refW($title, $message, $l, $val_hash, %callback)
-
+
}
sub wait_message($$$) {
my ($o, $title, $message) = @_;
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 5d328dc7c..253b7ef1c 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -56,11 +56,11 @@ sub ask_many_from_list_refW($$$$$) {
my ($o, $title, $messages, $list, $val) = @_;
my $n = 0;
my $w = my_gtk->new('', %$o);
- gtkadd($w->{window},
+ gtkadd($w->{window},
gtkpack(create_box_with_title($w, @$messages),
gtkpack(new Gtk::VBox(0,0),
- map {
- my $nn = $n++;
+ map {
+ my $nn = $n++;
my $o = Gtk::CheckButton->new($_);
$o->set_active(${$val->[$nn]});
$o->signal_connect(clicked => sub { ${$val->[$nn]} = !${$val->[$nn]} });
@@ -77,11 +77,11 @@ sub ask_many_from_list_refW($$$$$) {
sub ask_from_entries_refW {
my ($o, $title, $messages, $l, $val, %hcallback) = @_;
my $num_fields = @{$l};
- my $ignore = 0; #-to handle recursivity
+ my $ignore = 0; #-to handle recursivity
my $w = my_gtk->new($title, %$o);
#-the widgets
- my @entries = map {
+ my @entries = map {
if ($_->{type} eq "list") {
my $depth_combo = new Gtk::Combo;
$depth_combo->set_use_arrows_always(1);
@@ -101,12 +101,12 @@ sub ask_from_entries_refW {
($ref->{type} eq "list" && @{$ref->{list}}) ? $entry->entry : $entry
}
- my @updates = mapn {
+ my @updates = mapn {
my ($entry, $ref) = @_;
sub { ${$ref->{val}} = comb_entry($entry, $ref)->get_text };
} \@entries, $val;
- my @updates_inv = mapn {
+ my @updates_inv = mapn {
my ($entry, $ref) = @_;
sub { comb_entry($entry, $ref)->set_text(${$ref->{val}})
};
@@ -152,13 +152,13 @@ sub ask_from_entries_refW {
my $c = chr $e->{keyval};
if ($c eq "\x8d")
{
- #-don't know why it works, i believe that
+ #-don't know why it works, i believe that
#-i must say before &$go_to_next, but with it doen't work HACK!
$w->signal_emit_stop("key_press_event");
}
;
});
-
+
$entry->set_text(${$val->[$i]{val}}) if ${$val->[$i]{val}};
$entry->set_visibility(0) if $val->[$i]{hidden};
&{$updates[$i]};
@@ -166,7 +166,7 @@ sub ask_from_entries_refW {
my @entry_list = mapn { [($_[0], $_[1])]} $l, \@entries;
- gtkadd($w->{window},
+ gtkadd($w->{window},
gtkpack(
create_box_with_title($w, @$messages),
create_packtable({}, @entry_list),
@@ -200,9 +200,9 @@ sub wait_messageW($$$) {
my $w = my_gtk->new(_("Resizing"), %$o, grab => 1);
my $W = pop @$message;
- gtkadd($w->{window},
- gtkpack(new Gtk::VBox(0,0),
- @$message,
+ gtkadd($w->{window},
+ gtkpack(new Gtk::VBox(0,0),
+ @$message,
$w->{wait_messageW} = new Gtk::Label($W)));
$w->sync;
$w;
diff --git a/perl-install/interactive_stdio.pm b/perl-install/interactive_stdio.pm
index f77cc082f..d99ea990f 100644
--- a/perl-install/interactive_stdio.pm
+++ b/perl-install/interactive_stdio.pm
@@ -19,7 +19,7 @@ sub readln {
sub check_it {
my ($i, $n) = @_;
- $i =~ /^\s*\d+\s*$/ && 1 <= $i && $i <= $n
+ $i =~ /^\s*\d+\s*$/ && 1 <= $i && $i <= $n
}
sub ask_from_listW {
@@ -41,10 +41,10 @@ sub ask_from_listW {
} until (@l == 1);
$l[0];
} else {
- my $n = 0; foreach (@$list) {
+ my $n = 0; foreach (@$list) {
$n++;
$def eq $_ and $def = $n;
- print "$n: $_\n";
+ print "$n: $_\n";
}
do {
defined $i and print _("Bad choice, try again\n");
@@ -59,9 +59,9 @@ sub ask_many_from_list_refW {
my ($o, $title, $messages, $list, $val) = @_;
my @defaults;
print map { "$_\n" } @$messages;
- my $n = 0; foreach (@$list) {
- $n++;
- print "$n: $_\n";
+ my $n = 0; foreach (@$list) {
+ $n++;
+ print "$n: $_\n";
push @defaults, $n if ${$val->[$n - 1]};
}
my $i;
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 5f2ee9b14..77322e803 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -38,7 +38,7 @@ my %keyboards = (
"fr" => [ __("French"), "fr-latin1", "fr" ],
#- georgian keyboards have to be written...
#-"ge_ru"=>[__("Georgian (\"Russian\" layout)","ge_ru-georgian_academy","ge_ru"],
-#-"ge_la"=>[__("Georgian ("\Latin\" layout)","ge_la-georgian_academy","ge_ru"],
+#-"ge_la"=>[__("Georgian ("\Latin\" layout)","ge_la-georgian_academy","ge_ru"],
"gr" => [ __("Greek"), "gr-8859_7", "gr" ],
"hu" => [ __("Hungarian"), "hu-latin2", "hu" ],
"il" => [ __("Israelian"), "il-8859_8", "il" ],
@@ -51,7 +51,7 @@ my %keyboards = (
"pt" => [ __("Portuguese"), "pt-latin1", "pt" ],
"qc" => [ __("Canadian (Quebec)"), "qc-latin1","qc" ],
"ru" => [ __("Russian"), "ru-koi8", "ru" ],
- "se" => [ __("Swedish"), "se-latin1", "se" ],
+ "se" => [ __("Swedish"), "se-latin1", "se" ],
"sf" => [ __("Swiss (french layout)"), "sf-latin1", "sf" ],
"sg" => [ __("Swiss (german layout)"), "sg-latin1", "sg" ],
"si" => [ __("Slovenian"), "si-latin1", "si" ],
@@ -86,7 +86,7 @@ sub kmap($) {
sub lang2keyboard($) {
local ($_) = @_;
- $keyboards{$_} && $_ || $lang2keyboard{$_} || substr($_, 0, 2);
+ $keyboards{$_} && $_ || $lang2keyboard{$_} || substr($_, 0, 2);
}
sub load($) {
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 76d951442..ee6931fae 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -58,7 +58,7 @@ my %charsets = (
"Big5" => [ "?????", "????",
"*-helvetica-medium-r-normal--14-*-*-*-*-*-iso8859-1," .
"-taipei-*-medium-r-normal--16-*-*-*-*-*-big5-0" ],
- "iso-8859-1" => [ "lat0-sun16.psf", "iso15",
+ "iso-8859-1" => [ "lat0-sun16.psf", "iso15",
"*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1" ],
"iso-8859-2" => [ "lat2-sun16.psf", "iso02",
"*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1," .
@@ -105,7 +105,7 @@ my %charsets = (
#- korean needs special console driver for text mode
"ksc5601" => [ "?????", "?????",
"*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1," .
- "-*-*-medium-*-*--14-*-*-*-*-*-ksc5601.1987-*" ],
+ "-*-*-medium-*-*--14-*-*-*-*-*-ksc5601.1987-*" ],
"tcvn" => [ "tcvn8x16.psf", "tcvn",
"*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1," .
"*-helvetica-medium-r-normal--14-*-*-*-*-tcvn-5712" ],
@@ -133,8 +133,8 @@ sub set {
if ($lang) {
$ENV{LC_ALL} = $lang;
- $ENV{LANG} = $languages{$lang}[2];
- $ENV{LANGUAGES} = $languages{$lang}[3];
+ $ENV{LANG} = $languages{$lang}[2];
+ $ENV{LANGUAGES} = $languages{$lang}[3];
} else {
# stick with the default (English) */
delete $ENV{LANG};
@@ -164,9 +164,9 @@ sub write {
&$f("SYSFONTACM", $c->[1]);
my $p = "$prefix/usr/lib/kbd";
- commands::cp("-f",
- "$p/consolefonts/$c->[0].gz",
- glob_("$p/consoletrans/$c->[1]*"),
+ commands::cp("-f",
+ "$p/consolefonts/$c->[0].gz",
+ glob_("$p/consoletrans/$c->[1]*"),
"$prefix/etc/sysconfig/console");
}
}
@@ -181,7 +181,7 @@ sub write {
#- $fontFile = $c->[0];
#- }
#-
-#- # text mode font
+#- # text mode font
#- log::l("loading font /usr/share/consolefonts/$fontFile");
#- #c::loadFont("/tmp/$fontFile") or log::l("error in loadFont: one of PIO_FONT PIO_UNIMAPCLR PIO_UNIMAP PIO_UNISCRNMAP failed: $!");
#- #print STDERR "\033(K";
diff --git a/perl-install/log.pm b/perl-install/log.pm
index b1428408d..e29dc410e 100644
--- a/perl-install/log.pm
+++ b/perl-install/log.pm
@@ -16,7 +16,7 @@ my $logDebugMessages = 0;
#-######################################################################################
sub fd() { fileno LOG }
-sub l {
+sub l {
$logOpen or openLog();
print LOG "* ", @_, "\n";
print LOG2 "* ", @_, "\n";
@@ -31,7 +31,7 @@ sub openLog(;$) {
open LOG, "> $_[0]";# or die "no log possible :(";
} else {
open LOG, "> /dev/tty3" or open LOG, ">> /tmp/install.log";# or die "no log possible :(";
- }
+ }
open LOG2, ">> /tmp/ddebug.log";# or die "no log possible :(";
select((select(LOG), $| = 1)[0]);
select((select(LOG2), $| = 1)[0]);
diff --git a/perl-install/modparm.pm b/perl-install/modparm.pm
index 9cce087c0..b4ae12dc5 100644
--- a/perl-install/modparm.pm
+++ b/perl-install/modparm.pm
@@ -39,7 +39,7 @@ sub read_modparm_file($) {
sub get_options_result($@) {
my ($module, @value) = @_;
- mapn {
+ mapn {
my ($a, $b) = @_;
$a ? "$b=$a" : ()
} \@value, [ keys %{$modparm_hash{$module}} ];
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 076feab51..682b8959f 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -187,24 +187,24 @@ sub load($;$@) {
log::l("i try to install $name module (@options)");
} else {
$conf{$name}{loaded} and return;
-
+
$type ||= $drivers{$name}{type};
-
+
load($_, 'prereq') foreach @{$deps{$name}};
load_raw($name, @options);
}
- $conf{'scsi_hostadapter' . ($scsi++ || '')}{alias} = $name
+ $conf{'scsi_hostadapter' . ($scsi++ || '')}{alias} = $name
if $type eq 'scsi';
$conf{$name}{options} = join " ", @options if @options;
}
-sub unload($) {
+sub unload($) {
if ($::testing) {
log::l("rmmod $_[0]");
} else {
- run_program::run("rmmod", $_[0]);
+ run_program::run("rmmod", $_[0]);
}
}
@@ -284,11 +284,11 @@ sub write_conf {
}
}
-sub get_stage1_conf {
+sub get_stage1_conf {
%conf = read_conf($_[1], \$scsi);
add2hash(\%conf, $_[0]);
$conf{parport_lowlevel}{alias} ||= "parport_pc";
- $conf{pcmcia_core}{"pre-install"} ||= "/etc/rc.d/init.d/pcmcia start";
+ $conf{pcmcia_core}{"pre-install"} ||= "/etc/rc.d/init.d/pcmcia start";
$conf{plip}{"pre-install"} ||= "modprobe parport_pc ; echo 7 > /proc/parport/0/irq";
\%conf;
}
@@ -298,13 +298,13 @@ sub load_thiskind($;&) {
my @devs = pci_probing::main::probe($type);
log::l("pci probe found " . scalar @devs . " $type devices");
-
+
my %devs; foreach (@devs) {
my ($text, $mod) = @$_;
$devs{$mod}++ and log::l("multiple $mod devices found"), next;
$drivers{$mod} or log::l("module $mod not in install table"), next;
log::l("found driver for $mod");
- &$f($text, $mod) if $f;
+ &$f($text, $mod) if $f;
load($mod, $type);
}
@devs;
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 5f9159df5..30406cac0 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -40,7 +40,7 @@ sub main($;$) {
do {
local $::setstep = 1;
- Gtk->main
+ Gtk->main
} while ($o->{retval} && $f && !&$f());
$o->destroy;
$o->{retval}
@@ -51,7 +51,7 @@ sub show($) {
$o->{rwindow}->show;
$o->{rwindow}->grab_add if $my_gtk::grab || $o->{grab};
}
-sub destroy($) {
+sub destroy($) {
my ($o) = @_;
$o->{rwindow}->grab_remove if $my_gtk::grab || $o->{grab};
$o->{rwindow}->destroy;
@@ -69,16 +69,16 @@ sub sync($) {
sub flush(;$) {
Gtk->main_iteration while Gtk->events_pending;
}
-sub bigsize($) {
- $_[0]{rwindow}->set_usize(600,400);
+sub bigsize($) {
+ $_[0]{rwindow}->set_usize(600,400);
}
-sub gtkshow($) { $_[0]->show; $_[0] }
-sub gtkdestroy($) { $_[0] and $_[0]->destroy }
+sub gtkshow($) { $_[0]->show; $_[0] }
+sub gtkdestroy($) { $_[0] and $_[0]->destroy }
sub gtkset_usize($$$) { $_[0]->set_usize($_[1],$_[2]); $_[0] }
-sub gtkset_justify($$) { $_[0]->set_justify($_[1]); $_[0] }
-sub gtkset_active($$) { $_[0]->set_active($_[1]); $_[0] }
+sub gtkset_justify($$) { $_[0]->set_justify($_[1]); $_[0] }
+sub gtkset_active($$) { $_[0]->set_active($_[1]); $_[0] }
sub gtksignal_connect($@) {
my $w = shift;
@@ -88,7 +88,7 @@ sub gtksignal_connect($@) {
sub gtkpack($@) {
my $box = shift;
foreach (@_) {
- my $l = $_;
+ my $l = $_;
ref $l or $l = new Gtk::Label($l);
$box->pack_start($l, 1, 1, 0);
$l->show;
@@ -98,7 +98,7 @@ sub gtkpack($@) {
sub gtkpack_($@) {
my $box = shift;
for (my $i = 0; $i < @_; $i += 2) {
- my $l = $_[$i + 1];
+ my $l = $_[$i + 1];
ref $l or $l = new Gtk::Label($l);
$box->pack_start($l, $_[$i], 1, 0);
$l->show;
@@ -107,10 +107,10 @@ sub gtkpack_($@) {
}
sub gtkappend($@) {
my $w = shift;
- foreach (@_) {
- my $l = $_;
+ foreach (@_) {
+ my $l = $_;
ref $l or $l = new Gtk::Label($l);
- $w->append($l);
+ $w->append($l);
$l->show;
}
$w
@@ -118,7 +118,7 @@ sub gtkappend($@) {
sub gtkadd($@) {
my $w = shift;
foreach (@_) {
- my $l = $_;
+ my $l = $_;
ref $l or $l = new Gtk::Label($l);
$w->add($l);
$l->show;
@@ -155,7 +155,7 @@ sub gtkset_background {
my $color = gtkcolor($r, $g, $b);
$gc->set_foreground($color);
$root->set_background($color);
-
+
my ($h, $w) = $root->get_size;
$root->draw_rectangle($gc, 1, 0, 0, $w, $h);
}
@@ -283,13 +283,13 @@ sub _create_window($$) {
my $w = new Gtk::DrawingArea;
$w->set_usize($border, $border);
$w->set_events(['exposure_mask']);
- $w->signal_connect_after(expose_event =>
+ $w->signal_connect_after(expose_event =>
sub { $w->window->draw_rectangle($w->style->black_gc, 1, 0, 0, @{$w->allocation}[2,3]); 1 }
);
$w->show;
$w;
};
-
+
$t->attach(&$new(), 0, 1, 0, 3, [], , ["expand","fill"], 0, 0);
$t->attach(&$new(), 1, 2, 0, 1, ["expand","fill"], [], 0, 0);
$t->attach($f, 1, 2, 1, 2, ["expand","fill"], ["expand","fill"], 0, 0);
@@ -305,7 +305,7 @@ sub _create_window($$) {
$w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position};
$w->signal_connect(size_allocate => sub {
- my ($wi, $he) = @{$_[1]}[2,3];
+ my ($wi, $he) = @{$_[1]}[2,3];
my ($X, $Y, $Wi, $He) = @{$my_gtk::force_center || $o->{force_center}};
$w->set_uposition(max(0, $X + ($Wi - $wi) / 2), max(0, $Y + ($He - $he) / 2));
}) if ($my_gtk::force_center || $o->{force_center}) && !($my_gtk::force_position || $o->{force_position}) ;
@@ -352,8 +352,8 @@ sub _ask_from_list($$$$) {
my (@widgets, $timeout, $curr);
my $leave = sub { $o->{retval} = $l->[$curr]; Gtk->main_quit };
- my $select = sub {
- $list->focus_row($_[0]);
+ my $select = sub {
+ $list->focus_row($_[0]);
$list->select_row($_[0], 0);
$list->moveto($_[0], 0, 0.5, 0);
};
@@ -368,7 +368,7 @@ sub _ask_from_list($$$$) {
my $c = chr $e->{keyval};
Gtk->timeout_remove($timeout) if $timeout; $timeout = '';
-
+
if ($e->{keyval} >= 0x100) {
&$leave if $c eq "\r" || $c eq "\x8d";
$starting_word = '';
@@ -377,7 +377,7 @@ sub _ask_from_list($$$$) {
$curr++ if $starting_word eq '' || $starting_word eq $c;
$starting_word .= $c unless $starting_word eq $c;
-
+
my $word = quotemeta $starting_word;
my $j; for ($j = 0; $j < @$l; $j++) {
$l->[($j + $curr) % @$l] =~ /^$word/i and last;
@@ -385,21 +385,21 @@ sub _ask_from_list($$$$) {
$j == @$l ?
$starting_word = '' :
&$select(($j + $curr) % @$l);
-
+
$w->{timeout} = $timeout = Gtk->timeout_add($forgetTime, sub { $timeout = $starting_word = ''; 0 } );
}
1;
});
$list->set_selection_mode('browse');
- gtkadd($o->{window},
- gtkpack($o->create_box_with_title(@$messages),
+ gtkadd($o->{window},
+ gtkpack($o->create_box_with_title(@$messages),
@$l > 15 ? gtkset_usize(createScrolledWindow($list), 200, 280) : $list));
$o->sync; #- otherwise the moveto is not done
map_index {
$list->append($_);
- &$select($::i) if $def && $_ eq $def;
+ &$select($::i) if $def && $_ eq $def;
} @$l;
$list->grab_focus;
@@ -463,9 +463,9 @@ sub _ask_file($$) {
#- my $id = $w->signal_connect(key_press_event => sub {
#- my ($w, $e) = @_;
#- my $c = chr $e->{keyval};
-#-
+#-
#- Gtk->timeout_remove($timeout) if $timeout; $timeout = '';
-#-
+#-
#- if ($e->{keyval} >= 0x100) {
#- if ($c eq "\r" || $c eq "\x8d") {
#- $list->select_item($i);
@@ -474,14 +474,14 @@ sub _ask_file($$) {
#- } else {
#- my $curr = $i + bool($starting_word eq '' || $starting_word eq $c);
#- $starting_word .= $c unless $starting_word eq $c;
-#-
+#-
#- my $j; for ($j = 0; $j < @$l; $j++) {
#- $l->[($j + $curr) % @$l] =~ /^$starting_word/i and last;
#- }
#- $j == @$l ?
#- $starting_word = '' :
#- $widgets[($j + $curr) % @$l]->grab_focus;
-#-
+#-
#- $w->{timeout} = $timeout = Gtk->timeout_add($forgetTime, sub { $timeout = $starting_word = ''; 0 } );
#- }
#- 1;
@@ -500,8 +500,8 @@ sub _ask_file($$) {
#- $list;
#- }
#- };
-#- gtkadd($o->{window},
-#- gtkpack($o->create_box_with_title(@$messages),
+#- gtkadd($o->{window},
+#- gtkpack($o->create_box_with_title(@$messages),
#- $scroll_win));
#- $widgets[$def]->grab_focus;
#-
diff --git a/perl-install/network.pm b/perl-install/network.pm
index 7529261bd..9c7c325c8 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -36,19 +36,19 @@ sub write_conf {
my ($file, $netc) = @_;
add2hash($netc, {
- NETWORKING => "yes",
- FORWARD_IPV4 => "false",
+ NETWORKING => "yes",
+ FORWARD_IPV4 => "false",
HOSTNAME => "localhost.localdomain",
});
add2hash($netc, { DOMAINNAME => $netc->{HOSTNAME} =~ /\.(.*)/ });
-
+
setVarsInSh($file, $netc, qw(NETWORKING FORWARD_IPV4 HOSTNAME DOMAINNAME GATEWAY GATEWAYDEV));
}
sub write_resolv_conf {
my ($file, $netc) = @_;
- #- We always write these, even if they were autoconfigured. Otherwise, the reverse name lookup in the install doesn't work.
+ #- We always write these, even if they were autoconfigured. Otherwise, the reverse name lookup in the install doesn't work.
unless ($netc->{DOMAINNAME} || dnsServers($netc)) {
unlink($file);
log::l("neither domain name nor dns server are configured");
@@ -62,7 +62,7 @@ sub write_resolv_conf {
print F "nameserver $_\n" foreach dnsServers($netc);
print F "#$_" foreach @l;
- #-res_init(); # reinit the resolver so DNS changes take affect
+ #-res_init(); # reinit the resolver so DNS changes take affect
1;
}
@@ -71,7 +71,7 @@ sub write_interface_conf {
my @ip = split '\.', $intf->{IPADDR};
my @mask = split '\.', $intf->{NETMASK};
- add2hash($intf, {
+ add2hash($intf, {
BROADCAST => join('.', mapn { int $_[0] | ~int $_[1] & 255 } \@ip, \@mask),
NETWORK => join('.', mapn { int $_[0] & $_[1] } \@ip, \@mask),
ONBOOT => "yes",
@@ -103,7 +103,7 @@ sub add2hosts {
}
}
-# The interface/gateway needs to be configured before this will work!
+# The interface/gateway needs to be configured before this will work!
sub guessHostname {
my ($prefix, $netc, $intf) = @_;
@@ -185,14 +185,14 @@ sub dns {
my @masked = masked_ip($ip) =~ $ip_regexp;
$masked[3] = 12;
join (".", @masked);
-
+
}
sub gateway {
my ($ip) = @_;
my @masked = masked_ip($ip) =~ $ip_regexp;
$masked[3] = 1;
join (".", @masked);
-
+
}
#-######################################################################################
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index f6b8532dc..9cb2aee6f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -29,7 +29,7 @@ my %types = (
4 => "DOS 16-bit <32M",
5 => "Extended",
6 => "DOS FAT16",
- 7 => "OS/2 HPFS", #- or QNX?
+ 7 => "OS/2 HPFS", #- or QNX?
8 => "AIX",
9 => "AIX bootable",
10 => "OS/2 Boot Manager",
@@ -40,28 +40,28 @@ my %types = (
0x12 => "Compaq setup",
0x40 => "Venix 80286",
0x51 => "Novell?",
- 0x52 => "Microport", #- or CPM?
- 0x63 => "GNU HURD", #- or System V/386?
+ 0x52 => "Microport", #- or CPM?
+ 0x63 => "GNU HURD", #- or System V/386?
0x64 => "Novell Netware 286",
0x65 => "Novell Netware 386",
0x75 => "PC/IX",
- 0x80 => "Old MINIX", #- Minix 1.4a and earlier
-
- 0x81 => "Linux/MINIX", #- Minix 1.4b and later
+ 0x80 => "Old MINIX", #- Minix 1.4a and earlier
+
+ 0x81 => "Linux/MINIX", #- Minix 1.4b and later
0x82 => "Linux swap",
0x83 => "Linux native",
-
+
0x93 => "Amoeba",
- 0x94 => "Amoeba BBT", #- (bad block table)
+ 0x94 => "Amoeba BBT", #- (bad block table)
0xa5 => "BSD/386",
0xb7 => "BSDI fs",
0xb8 => "BSDI swap",
0xc7 => "Syrinx",
- 0xdb => "CP/M", #- or Concurrent DOS?
+ 0xdb => "CP/M", #- or Concurrent DOS?
0xe1 => "DOS access",
0xe3 => "DOS R/O",
0xf2 => "DOS secondary",
- 0xff => "BBT" #- (bad track table)
+ 0xff => "BBT" #- (bad track table)
);
my %type2fs = (
@@ -83,7 +83,7 @@ my %fs2type = reverse %type2fs;
1;
-sub important_types { $_[0] and return sort values %types; @important_types }
+sub important_types { $_[0] and return sort values %types; @important_types }
sub type2name($) { $types{$_[0]} || 'unknown' }
sub type2fs($) { $type2fs{$_[0]} }
@@ -103,7 +103,7 @@ sub isPrimary($$) {
0;
}
-sub cylinder_size($) {
+sub cylinder_size($) {
my ($hd) = @_;
$hd->{geom}{sectors} * $hd->{geom}{heads};
}
@@ -112,7 +112,7 @@ sub adjustStart($$) {
my ($hd, $part) = @_;
my $end = $part->{start} + $part->{size};
- $part->{start} = round_up($part->{start},
+ $part->{start} = round_up($part->{start},
$part->{start} % cylinder_size($hd) < 2 * $hd->{geom}{sectors} ?
$hd->{geom}{sectors} : cylinder_size($hd));
$part->{size} = $end - $part->{start};
@@ -157,8 +157,8 @@ sub verifyPrimary($) {
sub assign_device_numbers($) {
my ($hd) = @_;
- my $i = 1;
- $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}},
+ my $i = 1;
+ $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}},
map { $_->{normal} } @{$hd->{extended} || []};
#- try to figure what the windobe drive letter could be!
@@ -237,8 +237,8 @@ sub read_one($$) {
sub read($;$) {
my ($hd, $clearall) = @_;
- my $pt = $clearall ?
- partition_table_raw::clear_raw() :
+ my $pt = $clearall ?
+ partition_table_raw::clear_raw() :
read_one($hd, 0) || return 0;
$hd->{primary} = $pt;
@@ -297,7 +297,7 @@ sub write($) {
}
$hd->{isDirty} = 0;
- #- now sync disk and re-read the partition table
+ #- now sync disk and re-read the partition table
if ($hd->{needKernelReread}) {
sync();
partition_table_raw::kernel_read($hd);
@@ -309,7 +309,7 @@ sub active($$) {
my ($hd, $part) = @_;
$_->{active} = 0 foreach @{$hd->{primary}{normal}};
- $part->{active} = 0x80;
+ $part->{active} = 0x80;
}
@@ -363,7 +363,7 @@ sub add_extended($$) {
my $end = $e->{start} + $e->{size};
my $start = min($e->{start}, $part->{start});
$end = max($end, $part->{start} + $part->{size}) - $start;
-
+
{ #- faking a resizing of the main extended partition to test for problems
local $e->{start} = $start;
local $e->{size} = $end - $start;
@@ -388,7 +388,7 @@ The only solution is to move your primary partitions to have the hole next to th
($hd->{primary}, -1) : #- -1 size will be computed by adjust_main_extended
(top(@{$hd->{extended}}), $part->{size});
my %ext = ( type => 5, start => $part->{start}, size => $ext_size );
-
+
raw_add($ext->{raw}, \%ext);
$ext->{extended} = \%ext;
push @{$hd->{extended}}, { %ext, raw => [ $part, {}, {}, {} ], normal => $part };
@@ -411,7 +411,7 @@ sub add($$;$$) {
my $e = $hd->{primary}{extended};
- if ($primaryOrExtended eq 'Primary' ||
+ if ($primaryOrExtended eq 'Primary' ||
$primaryOrExtended ne 'Extended' && is_empty_array_ref($hd->{primary}{normal})) {
eval { add_primary($hd, $part) };
return unless $@;
@@ -428,7 +428,7 @@ sub next($$) {
my ($hd, $part) = @_;
first(
- sort { $a->{start} <=> $b->{start} }
+ sort { $a->{start} <=> $b->{start} }
grep { $_->{start} >= $part->{start} + $part->{size} }
get_normal_parts($hd)
);
@@ -483,6 +483,6 @@ sub save($$) {
my @h = @{$hd}{@fields2save};
local *F;
open F, ">$file"
- and print F Data::Dumper->Dump([\@h], ['$h']), "\0"
+ and print F Data::Dumper->Dump([\@h], ['$h']), "\0"
or die _("Error writing to file %s", $file);
}
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 8ccba3557..2cc83259f 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -15,8 +15,8 @@ my $nb_primary = 4;
my $offset = $common::SECTORSIZE - length($magic) - $nb_primary * common::psizeof($format);
my @MBR_signatures = (
- [ 'LILO', 0x6, 'LILO' ],
- [ 'DOS', 0xa0, '\x25\x03\x4E\x02\x\xCD\x13' ],
+ [ 'LILO', 0x6, "LILO" ],
+ [ 'DOS', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ],
);
sub compute_CHS($$) {
@@ -45,7 +45,7 @@ sub sector2CHS($$) {
sub get_geometry($) {
my ($dev) = @_;
my $g = "";
-
+
local *F; sysopen F, $dev, 0 or return;
ioctl(F, c::HDIO_GETGEO(), $g) or return;
@@ -56,7 +56,7 @@ sub get_geometry($) {
sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }
-# cause kernel to re-read partition table
+# cause kernel to re-read partition table
sub kernel_read($) {
my ($hd) = @_;
local *F; openit($hd, \*F) or return 0;
@@ -119,7 +119,8 @@ sub typeOfMBR($) {
foreach (@MBR_signatures) {
my ($name, $offset, $signature) = @$_;
sysseek(F, $offset, 0) or next;
- sysread(F, $tmp, length $signature) && $tmp eq $signature and return $name;
+ sysread(F, $tmp, length $signature);
+ $tmp eq $signature and return $name;
}
undef;
}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 7db25b53e..eb5f02a0a 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -119,17 +119,17 @@ sub psUsingHdlist() {
$packages{$name} = {
name => $name, header => $header, selected => 0, deps => [],
- version => c::headerGetEntry($header, 'version'),
+ version => c::headerGetEntry($header, 'version'),
release => c::headerGetEntry($header, 'release'),
size => c::headerGetEntry($header, 'size'),
};
}
log::l("psUsingHdlist read " . scalar keys(%packages) . " headers");
-
+
\%packages;
}
-sub chop_version($) {
+sub chop_version($) {
first($_[0] =~ /(.*)-[^-]+-[^-.]+/) || $_[0];
}
@@ -281,7 +281,7 @@ sub install($$) {
foreach my $p (@$toInstall) {
eval { getHeader($p) }; $@ and next;
$p->{file} ||= sprintf "%s-%s-%s.%s.rpm",
- $p->{name}, $p->{version}, $p->{release},
+ $p->{name}, $p->{version}, $p->{release},
c::headerGetEntry(getHeader($p), 'arch');
c::rpmtransAddPackage($trans, getHeader($p), $p->{file}, $p->{name} !~ /kernel/); #- TODO: replace `named kernel' by `provides kernel'
$nb++;
@@ -296,7 +296,7 @@ sub install($$) {
log::ld("starting installation: ", $nb, " packages, ", $total, " bytes");
#- !! do not translate these messages, they are used when catched (cf install_steps_graphical)
- my $callbackOpen = sub {
+ my $callbackOpen = sub {
my $fd = install_any::getFile($_[0]) or log::l("bad file $_[0]");
$fd ? fileno $fd : -1;
};
@@ -304,7 +304,7 @@ sub install($$) {
my $callbackStart = sub { log::ld("starting installing package ", $_[0]) };
my $callbackProgress = sub { log::ld("progressing installation ", $_[0], "/", $_[1]) };
- if (my @probs = c::rpmRunTransactions($trans, $callbackOpen, $callbackClose,
+ if (my @probs = c::rpmRunTransactions($trans, $callbackOpen, $callbackClose,
$callbackStart, $callbackProgress, 0)) {
my %parts;
@probs = reverse grep {
@@ -314,7 +314,7 @@ sub install($$) {
} reverse @probs;
die "installation of rpms failed:\n ", join("\n ", @probs);
}
- c::rpmtransFree($trans);
+ c::rpmtransFree($trans);
c::rpmdbClose($db);
log::l("rpm database closed");
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 5d3d9bb63..f7f31ced0 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -1,7 +1,7 @@
package printer;
#-#####################################################################################
-=head1 NAME
+=head1 NAME
printer - supply methods for manage the printer related files directory handles
@@ -56,11 +56,11 @@ use commands;
=item *
-an entry in the 'printerdb' file, which describes each type of
+an entry in the 'printerdb' file, which describes each type of
supported printer:
StartEntry: DeskJet550
- GSDriver: cdj550
+ GSDriver: cdj550
Description: {HP DeskJet 550C/560C/6xxC series}
About: { \
This driver supports the HP inkjet printers which have \
@@ -83,14 +83,14 @@ supported printer:
Example of data-struct:
- my %ex_printerdb_entry =
+ my %ex_printerdb_entry =
(
ENTRY => "DeskJet550", #-Human-readable name of the entry
GSDRIVER => "cdj550", #-gs driver used by this printer
DESCR => "HP DeskJet 550C/560C/6xxC series", #-Single line description of printer
ABOUT => "
- This driver supports the HP inkjet printers which have
- color capability using both black and color cartridges
+ This driver supports the HP inkjet printers which have
+ color capability using both black and color cartridges
...", #-Lengthy description of printer
RESOLUTION => [ #-List of resolutions supported
{
@@ -110,79 +110,79 @@ Example of data-struct:
=item *
-A printcap entry only represents a subset of possible options available
-Sufficient for the simple configuration we are interested in
+A printcap entry only represents a subset of possible options available
+Sufficient for the simple configuration we are interested in
there is also some text in the template (.in) file in the spooldir
- # /etc/printcap
- #
+ # /etc/printcap
+ #
# Please don't edit this file directly unless you know what you are doing
# Be warned that the control-panel printtool requires a very strict forma
- # Look at the printcap(5) man page for more info.
- #
- # This file can be edited with the printtool in the control-panel.
-
+ # Look at the printcap(5) man page for more info.
+ #
+ # This file can be edited with the printtool in the control-panel.
+
##PRINTTOOL3## LOCAL uniprint NAxNA letter {} U_NECPrinwriter2X necp2x6 1
- lpname:\
- :sd=/var/spool/lpd/lpnamespool:\
- :mx#45:\
- :sh:\
- :lp=/dev/device:\
- :if=/var/spool/lpd/lpnamespool/filter:
- ##PRINTTOOL3## REMOTE st800 360x180 a4 {} EpsonStylus800 Default 1
- remote:\
- :sd=/var/spool/lpd/remotespool:\
- :mx#47:\
- :sh:\
- :rm=remotehost:\
- :rp=remotequeue:\
- :if=/var/spool/lpd/remotespool/filter:
- ##PRINTTOOL3## SMB la75plus 180x180 letter {} DECLA75P Default {}
- smb:\
- :sd=/var/spool/lpd/smbspool:\
- :mx#46:\
- :sh:\
- :if=/var/spool/lpd/smbspool/filter:\
- :af=/var/spool/lpd/smbspool/acct:\
- :lp=/dev/null:
- ##PRINTTOOL3## NCP ap3250 180x180 letter {} EpsonAP3250 Default {}
- ncp:\
- :sd=/var/spool/lpd/ncpspool:\
- :mx#46:\
- :sh:\
- :if=/var/spool/lpd/ncpspool/filter:\
- :af=/var/spool/lpd/ncpspool/acct:\
- :lp=/dev/null:
+ lpname:\
+ :sd=/var/spool/lpd/lpnamespool:\
+ :mx#45:\
+ :sh:\
+ :lp=/dev/device:\
+ :if=/var/spool/lpd/lpnamespool/filter:
+ ##PRINTTOOL3## REMOTE st800 360x180 a4 {} EpsonStylus800 Default 1
+ remote:\
+ :sd=/var/spool/lpd/remotespool:\
+ :mx#47:\
+ :sh:\
+ :rm=remotehost:\
+ :rp=remotequeue:\
+ :if=/var/spool/lpd/remotespool/filter:
+ ##PRINTTOOL3## SMB la75plus 180x180 letter {} DECLA75P Default {}
+ smb:\
+ :sd=/var/spool/lpd/smbspool:\
+ :mx#46:\
+ :sh:\
+ :if=/var/spool/lpd/smbspool/filter:\
+ :af=/var/spool/lpd/smbspool/acct:\
+ :lp=/dev/null:
+ ##PRINTTOOL3## NCP ap3250 180x180 letter {} EpsonAP3250 Default {}
+ ncp:\
+ :sd=/var/spool/lpd/ncpspool:\
+ :mx#46:\
+ :sh:\
+ :if=/var/spool/lpd/ncpspool/filter:\
+ :af=/var/spool/lpd/ncpspool/acct:\
+ :lp=/dev/null:
Example of data-struct:
- my %ex_printcap_entry =
+ my %ex_printcap_entry =
(
QUEUE => "lpname", #-Queue name, can have multi separated by '|'
-
+
#-if you want something different from the default
SPOOLDIR => "/var/spool/lpd/lpnamespool/", #-Spool directory
IF => "/var/spool/lpd/lpnamespool/filter", #-input filter
-
+
#- commentaire inserer dans le printcap pour que printtool retrouve ses petits
- DBENTRY => "DeskJet670", #-entry in printer database for this printer
-
+ DBENTRY => "DeskJet670", #-entry in printer database for this printer
+
RESOLUTION => "NAxNA", #-ghostscript resolution to use
PAPERSIZE => "letter", #-Papersize
- BITSPERPIXEL => "necp2x6", #-ghostscript color option
- CRLF => 1 , #-Whether or not to do CR/LF xlation
-
+ BITSPERPIXEL => "necp2x6", #-ghostscript color option
+ CRLF => 1 , #-Whether or not to do CR/LF xlation
+
TYPE => "LOCAL",
-
+
#- LOCAL
DEVICE => "/dev/device", #-Print device
-
- #- REMOTE (lpd) printers only
+
+ #- REMOTE (lpd) printers only
REMOTEHOST => "remotehost", #-Remote host (not used for all entries)
- REMOTEQUEUE => "remotequeue", #-Queue on the remote machine
-
-
- #-SMB (LAN Manager) only
+ REMOTEQUEUE => "remotequeue", #-Queue on the remote machine
+
+
+ #-SMB (LAN Manager) only
#- in spooldir/.config
#-share='\\hostname\printername'
#-hostip=1.2.3.4
@@ -191,27 +191,27 @@ Example of data-struct:
#-workgroup='AS3'
SMBHOST => "hostname", #-Server name (NMB name, can have spaces)
SMBHOSTIP => "1.2.3.4", #-Can optional specify and IP address for host
- SMBSHARE => "printername", #-Name of share on the SMB server
- SMBUSER => "user", #-User to log in as on SMB server
- SMBPASSWD => "passowrd", #-Corresponding password
- SMBWORKGROUP => "AS3", #-SMB workgroup name
+ SMBSHARE => "printername", #-Name of share on the SMB server
+ SMBUSER => "user", #-User to log in as on SMB server
+ SMBPASSWD => "passowrd", #-Corresponding password
+ SMBWORKGROUP => "AS3", #-SMB workgroup name
AF => "/var/spool/lpd/smbspool/acct", #-accounting filter (needed for smbprint)
-
- #- NCP (NetWare) only
+
+ #- NCP (NetWare) only
#- in spooldir/.config
#-server=printerservername
#-queue=queuename
#-user=user
#-password=pass
- NCPHOST => "printerservername", #-Server name (NCP name)
- NCPQUEUE => "queuename", #-Queue on server
- NCPUSER => "user", #-User to log in as on NCP server
- NCPPASSWD => "pass", #-Corresponding password
-
+ NCPHOST => "printerservername", #-Server name (NCP name)
+ NCPQUEUE => "queuename", #-Queue on server
+ NCPUSER => "user", #-User to log in as on NCP server
+ NCPPASSWD => "pass", #-Corresponding password
+
)
;
-=cut
+=cut
#-#####################################################################################
@@ -243,11 +243,11 @@ my $PRINTER_FILTER_DIR = "/usr/lib/rhs/rhs-printfilters";
"local" => "LOCAL",
"Remote lpd" => "REMOTE",
"SMB/Windows 95/NT" => "SMB",
- "NetWare" => "NCP",
+ "NetWare" => "NCP",
);
%printer_type_inv = reverse %printer_type;
-%fields = (
+%fields = (
STANDARD => [qw(QUEUE SPOOLDIR IF)],
SPEC => [qw(DBENTRY RESOLUTION PAPERSIZE BITSPERPIXEL CRLF)],
LOCAL => [qw(DEVICE)],
@@ -280,22 +280,22 @@ sub read_printer_db(;$) {
local *DBPATH; #-don't have to do close
open DBPATH, $dbpath or die "An error has occurred on $dbpath : $!";
-
+
while (<DBPATH>) {
if (/^StartEntry:\s(\w*)/) {
my $entryname = $1;
my $entry;
-
+
$entry->{ENTRY} = $entryname;
-
- WHILE :
+
+ WHILE :
while (<DBPATH>) {
SWITCH: {
/GSDriver:\s*(\w*)/ and do { $entry->{GSDRIVER} = $1; last SWITCH };
/Description:\s*{(.*)}/ and do { $entry->{DESCR} = $1; last SWITCH };
/About:\s*{(.*)}/ and do { $entry->{ABOUT} = $1; last SWITCH };
- /About:\s*{(.*)/
- and do
+ /About:\s*{(.*)/
+ and do
{
my $string = "$1\n";
while (<DBPATH>) {
@@ -303,9 +303,9 @@ sub read_printer_db(;$) {
$string .= $_;
}
};
- /Resolution:\s*{(.*)}\s*{(.*)}\s*{(.*)}/
+ /Resolution:\s*{(.*)}\s*{(.*)}\s*{(.*)}/
and do { push @{$entry->{RESOLUTION}}, { XDPI => $1, YDPI => $2, DESCR => $3 }; last SWITCH };
- /BitsPerPixel:\s*{(.*)}\s*{(.*)}/
+ /BitsPerPixel:\s*{(.*)}\s*{(.*)}/
and do { push @{$entry->{BITSPERPIXEL}}, {DEPTH => $1, DESCR => $2}; last SWITCH };
/EndEntry/ and last WHILE;
@@ -314,7 +314,7 @@ sub read_printer_db(;$) {
$thedb{$entryname} = $entry;
}
}
-
+
@entries_db_short = sort keys %printer::thedb;
@entry_db_description = map { $printer::thedb{$_}{DESCR} } @entries_db_short;
%descr_to_db = map { $printer::thedb{$_}{DESCR}, $_ } @entries_db_short;
@@ -324,7 +324,7 @@ sub read_printer_db(;$) {
#-******************************************************************************
-#- write functions
+#- write functions
#-******************************************************************************
#------------------------------------------------------------------------------
@@ -333,30 +333,30 @@ sub read_printer_db(;$) {
sub create_spool_dir($) {
my ($queue_path) = @_;
my $complete_path = "$prefix/$queue_path";
-
+
unless (-d $complete_path) {
mkdir "$complete_path", 0755
or die "An error has occurred - can't create $complete_path : $!";
}
-
+
#-redhat want that "drwxr-xr-x root lp"
my $gid_lp = (getpwnam("lp"))[3];
- chown 0, $gid_lp, $complete_path
+ chown 0, $gid_lp, $complete_path
or die "An error has occurred - can't chgrp $complete_path to lp $!";
}
#------------------------------------------------------------------------------
#-given the input spec file 'input', and the target output file 'output'
-#-we set the fields specified by fieldname to the values in fieldval
-#-nval is the number of fields to set
-#-Doesnt currently catch error exec'ing sed yet
+#-we set the fields specified by fieldname to the values in fieldval
+#-nval is the number of fields to set
+#-Doesnt currently catch error exec'ing sed yet
#------------------------------------------------------------------------------
sub create_config_file($$%) {
my ($inputfile, $outpufile, %toreplace) = @_;
my ($in, $out) = ("$prefix/$inputfile", "$prefix/$outpufile");
local *OUT;
local *IN;
-
+
#-TODO my $oldmask = umask 0755;
open IN , $in or die "Can't open $in $!";
@@ -365,7 +365,7 @@ sub create_config_file($$%) {
} else {
open OUT, ">$out" or die "Can't open $out $!";
}
-
+
while (<IN>) {
if (/@@@(.*)@@@/) {
my $r = $toreplace{$1};
@@ -389,7 +389,7 @@ sub copy_master_filter($) {
}
#------------------------------------------------------------------------------
-#- given a PrintCap Entry, create the spool dir and special
+#- given a PrintCap Entry, create the spool dir and special
#- rhs-printfilters related config files which are required
#------------------------------------------------------------------------------
my $intro_printcap_test = "
@@ -411,12 +411,12 @@ sub configure_queue($) {
$entry->{SPOOLDIR} ||= "$spooldir";
$entry->{IF} ||= "$spooldir/$entry->{QUEUE}/filter";
$entry->{AF} ||= "$spooldir/$entry->{QUEUE}/acct";
-
+
my $queue_path = "$entry->{SPOOLDIR}";
create_spool_dir($queue_path);
- my $get_name_file = sub {
- my ($name) = @_;
+ my $get_name_file = sub {
+ my ($name) = @_;
("$PRINTER_FILTER_DIR/$name.in", "$entry->{SPOOLDIR}/$name")
};
my ($filein, $file);
@@ -431,13 +431,13 @@ sub configure_queue($) {
$fieldname{printertype} = $entry->{TYPE};
create_config_file($filein, $file, %fieldname);
- #- successfully created general.cfg, now do postscript.cfg
+ #- successfully created general.cfg, now do postscript.cfg
($filein, $file) = &$get_name_file("postscript.cfg");
%fieldname = ();
$fieldname{gsdevice} = $dbentry->{GSDRIVER};
$fieldname{papersize} = $entry->{PAPERSIZES} ? $entry->{PAPERSIZES} : "letter";
$fieldname{resolution} = ($entry->{RESOLUTION} eq "Default") ? "Default" : "";
- $fieldname{color} =
+ $fieldname{color} =
do {
if ($dbentry->{GSDRIVER} eq "uniprint") {
($entry->{BITSPERPIXEL} eq "Default") ? "-dBitsPerPixel=Default" : "";
@@ -452,7 +452,7 @@ sub configure_queue($) {
$fieldname{rtlftmar} = "18";
$fieldname{topbotmar} = "18";
create_config_file($filein, $file, %fieldname);
-
+
#- finally, make textonly.cfg
($filein, $file) = &$get_name_file("textonly.cfg");
%fieldname = ();
@@ -491,7 +491,7 @@ sub configure_queue($) {
} else {
open PRINTCAP, ">$prefix/etc/printcap" or die "Can't open printcap file $!";
}
-
+
print PRINTCAP $intro_printcap_test;
printf PRINTCAP "##PRINTTOOL3## %s %s %s %s %s %s %s \n",
$entry->{TYPE},
@@ -503,14 +503,14 @@ sub configure_queue($) {
$entry->{BITSPERPIXEL},
$entry->{CRLF} ? "1" : "";
-
+
print PRINTCAP "$entry->{QUEUE}:\\\n";
print PRINTCAP "\t:sd=$entry->{SPOOLDIR}:\\\n";
print PRINTCAP "\t:mx#0:\\\n\t:sh:\\\n";
-
+
if ($entry->{TYPE} eq "LOCAL") {
print PRINTCAP "\t:lp=$entry->{DEVICE}:\\\n";
- } elsif ($entry->{TYPE} eq "REMOTE") {
+ } elsif ($entry->{TYPE} eq "REMOTE") {
print PRINTCAP "\t:rm=$entry->{REMOTEHOST}:\\\n";
print PRINTCAP "\t:rp=$entry->{REMOTEQUEUE}:\\\n";
} else {
@@ -521,12 +521,12 @@ sub configure_queue($) {
#- cheating to get the input filter!
print PRINTCAP "\t:if=$entry->{SPOOLDIR}/filter:\n";
-
+
}
#------------------------------------------------------------------------------
-#- interface function
+#- interface function
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
@@ -565,7 +565,7 @@ sub test {
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
-1; #
+1; #
=head1 AUTHOR
diff --git a/perl-install/resize_fat/any.pm b/perl-install/resize_fat/any.pm
index 26c98f886..6acd0b52c 100644
--- a/perl-install/resize_fat/any.pm
+++ b/perl-install/resize_fat/any.pm
@@ -40,7 +40,7 @@ sub min_size($) {
#- moment, 2 directories are there, but that way nothing wrong can happen :)
my $min_cluster_count = max(2 + $count->{used} + $count->{bad} + $count->{dirs}, min_cluster_count($fs));
- $min_cluster_count * divide($fs->{cluster_size}, $SECTORSIZE) +
+ $min_cluster_count * divide($fs->{cluster_size}, $SECTORSIZE) +
divide($fs->{cluster_offset}, $SECTORSIZE);
}
#- calculates the maximum size of a partition, in physical sectors
@@ -53,7 +53,7 @@ sub max_size($) {
divide($fs->{cluster_offset}, $SECTORSIZE);
}
-#- fills in $fs->{fat_flag_map}.
+#- fills in $fs->{fat_flag_map}.
#- Each FAT entry is flagged as either FREE, FILE or DIRECTORY.
sub flag_clusters {
my ($fs) = @_;
diff --git a/perl-install/resize_fat/boot_sector.pm b/perl-install/resize_fat/boot_sector.pm
index 6da81e420..48e2a8d4e 100644
--- a/perl-install/resize_fat/boot_sector.pm
+++ b/perl-install/resize_fat/boot_sector.pm
@@ -48,12 +48,12 @@ my @fields = (
#- on success, 0 on failureparameters: filesystem an empty structure to fill.
sub read($) {
my ($fs) = @_;
-
+
my $boot = eval { resize_fat::io::read($fs, 0, $SECTORSIZE) }; $@ and die "reading boot sector failed on device $fs->{fs_name}";
@{$fs}{@fields} = unpack $format, $boot;
$fs->{nb_sectors} = $fs->{small_nb_sectors} || $fs->{big_nb_sectors};
- $fs->{cluster_size} = $fs->{cluster_size_in_sectors} * $fs->{sector_size};
+ $fs->{cluster_size} = $fs->{cluster_size_in_sectors} * $fs->{sector_size};
$fs->{boot_sign} == 0xAA55 or die "Invalid signature for a MS-based filesystem.";
$fs->{nb_fats} == 2 or die "Weird number of FATs: $fs->{nb_fats}, not 2.",
@@ -75,7 +75,7 @@ sub read($) {
$fs->{info_offset} = $fs->{info_offset_in_sectors} * $fs->{sector_size};
$resize_fat::bad_cluster_value = 0xffffff7;
}
-
+
$fs->{fat_offset} = $fs->{nb_reserved} * $fs->{sector_size};
$fs->{fat_size} = $fs->{fat_length} * $fs->{sector_size};
$fs->{root_dir_offset} = $fs->{fat_offset} + $fs->{fat_size} * $fs->{nb_fats};
@@ -84,7 +84,7 @@ sub read($) {
$fs->{nb_fat_entries} = divide($fs->{fat_size}, $fs->{fs_type_size} / 8);
- #- - 2 because clusters 0 & 1 doesn't exist
+ #- - 2 because clusters 0 & 1 doesn't exist
$fs->{nb_clusters} = divide($fs->{nb_sectors} * $fs->{sector_size} - $fs->{cluster_offset}, $fs->{cluster_size}) - 2;
$fs->{dir_entries_per_cluster} = divide($fs->{cluster_size}, psizeof($format));
diff --git a/perl-install/resize_fat/dir_entry.pm b/perl-install/resize_fat/dir_entry.pm
index 47f326735..cfee23dae 100644
--- a/perl-install/resize_fat/dir_entry.pm
+++ b/perl-install/resize_fat/dir_entry.pm
@@ -57,7 +57,7 @@ sub is_special_entry($) {
#- return true if entry has been modified
sub remap {
my ($fat_remap, $entry) = @_;
-
+
is_special_entry($entry) and return;
my $cluster = get_cluster($entry);
diff --git a/perl-install/resize_fat/directory.pm b/perl-install/resize_fat/directory.pm
index 3b779e2de..46e810021 100644
--- a/perl-install/resize_fat/directory.pm
+++ b/perl-install/resize_fat/directory.pm
@@ -42,7 +42,7 @@ sub traverse($$$) {
my $entry; @{$entry}{@fields} = unpack $format, $$raw;
- &$f($entry)
+ &$f($entry)
and $$raw = pack $format, @{$entry}{@fields};
}
$directory;
@@ -56,7 +56,7 @@ sub traverse_all($$) {
&$f($entry);
- resize_fat::dir_entry::is_directory($entry)
+ resize_fat::dir_entry::is_directory($entry)
and traverse($fs, resize_fat::io::read_file($fs, resize_fat::dir_entry::get_cluster($entry)), $traverse_all);
undef; #- no need to write back (cf traverse)
diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm
index 5c0b259b4..e6039077a 100644
--- a/perl-install/resize_fat/fat.pm
+++ b/perl-install/resize_fat/fat.pm
@@ -124,7 +124,7 @@ sub next($$) {
endianness(vec($fs->{fat}, $cluster, $fs->{fs_type_size}), $fs->{fs_type_size});
}
-sub set_next($$$) {
+sub set_next($$$) {
my ($fs, $cluster, $new_v) = @_;
$cluster > $fs->{nb_clusters} + 2 and die "fat::set_next: cluster $cluster outside filesystem";
vec($fs->{fat}, $cluster, $fs->{fs_type_size}) = endianness($new_v, $fs->{fs_type_size});
diff --git a/perl-install/resize_fat/io.pm b/perl-install/resize_fat/io.pm
index 4d1a37158..48309db91 100644
--- a/perl-install/resize_fat/io.pm
+++ b/perl-install/resize_fat/io.pm
@@ -26,7 +26,7 @@ sub read_cluster($$) {
my $buf;
eval {
- $buf = &read($fs,
+ $buf = &read($fs,
$fs->{cluster_offset} + $cluster * $fs->{cluster_size},
$fs->{cluster_size});
}; @$ and die "reading cluster #$cluster failed on device $fs->{fs_name}";
@@ -36,9 +36,9 @@ sub write_cluster($$$) {
my ($fs, $cluster, $buf) = @_;
eval {
- &write($fs,
+ &write($fs,
$fs->{cluster_offset} + $cluster * $fs->{cluster_size},
- $fs->{cluster_size},
+ $fs->{cluster_size},
$buf);
}; @$ and die "writing cluster #$cluster failed on device $fs->{fs_name}";
}
diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm
index 692ade0cb..1e5ac62be 100644
--- a/perl-install/resize_fat/main.pm
+++ b/perl-install/resize_fat/main.pm
@@ -57,8 +57,8 @@ sub new($$$) {
sub copy_clusters {
my ($fs, $cluster) = @_;
my @buffer;
- my $flush = sub {
- while (@buffer) {
+ my $flush = sub {
+ while (@buffer) {
my $cluster = shift @buffer;
resize_fat::io::write_cluster($fs, $cluster, shift @buffer);
}
@@ -75,7 +75,7 @@ sub copy_clusters {
sub construct_dir_tree {
my ($fs) = @_;
- if ($resize_fat::isFAT32) {
+ if ($resize_fat::isFAT32) {
#- fat32's root must remain in the first 64k clusters
#- so don't set it as DIRECTORY, it will be specially handled
$fs->{fat_flag_map}[$fs->{fat32_root_dir_cluster}] = $resize_fat::any::FREE;
@@ -84,8 +84,8 @@ sub construct_dir_tree {
for (my $cluster = 2; $cluster < $fs->{nb_clusters} + 2; $cluster++) {
$fs->{fat_flag_map}[$cluster] == $resize_fat::any::DIRECTORY or next;
- resize_fat::io::write_cluster($fs,
- $fs->{fat_remap}[$cluster],
+ resize_fat::io::write_cluster($fs,
+ $fs->{fat_remap}[$cluster],
resize_fat::directory::remap($fs, resize_fat::io::read_cluster($fs, $cluster)));
}
@@ -100,8 +100,8 @@ sub construct_dir_tree {
if ($resize_fat::isFAT32) {
my $cluster = $fs->{fat32_root_dir_cluster};
- resize_fat::io::write_cluster($fs,
- $fs->{fat_remap}[$cluster],
+ resize_fat::io::write_cluster($fs,
+ $fs->{fat_remap}[$cluster],
resize_fat::directory::remap($fs, resize_fat::io::read_cluster($fs, $cluster)));
} else {
resize_fat::io::write($fs, $fs->{root_dir_offset}, $fs->{root_dir_size},
@@ -114,7 +114,7 @@ sub max_size($) { &resize_fat::any::max_size }
#- resize
#- - size is in sectors
-#- - checks boundaries before starting
+#- - checks boundaries before starting
#- - copies all data beyond new_cluster_count behind the frontier
sub resize {
my ($fs, $size) = @_;
@@ -135,7 +135,7 @@ sub resize {
log::l("resize_fat: Allocating new clusters");
resize_fat::fat::allocate_remap($fs, $new_nb_clusters);
- log::l("resize_fat: Copying files");
+ log::l("resize_fat: Copying files");
copy_clusters($fs, $new_nb_clusters);
log::l("resize_fat: Copying directories");
@@ -147,7 +147,7 @@ sub resize {
$fs->{nb_sectors} = $size;
$fs->{nb_clusters} = $new_nb_clusters;
- $fs->{clusters}{count}->{free} =
+ $fs->{clusters}{count}->{free} =
$fs->{nb_clusters} - $fs->{clusters}{count}->{used} - $fs->{clusters}->{count}->{bad} - 2;
$fs->{system_id} = 'was here!';
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index b36c8744b..0f0d70eeb 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -45,5 +45,5 @@ sub rooted {
}
}
-
+
}
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
index bf8f608ed..4e32749b0 100644
--- a/perl-install/swap.pm
+++ b/perl-install/swap.pm
@@ -17,7 +17,7 @@ my $signature_page = "\0" x $pagesize;
# the architectures can actually store into the page tables
# and on 32bit architectures it is limited to 2GB at the
# same time.
-# Old swap format keeps the limit of 8*pagesize*(pagesize - 10)
+# Old swap format keeps the limit of 8*pagesize*(pagesize - 10)
my $V0_MAX_PAGES = 8 * $pagesize - 10;
my $V1_OLD_MAX_PAGES = int 0x7fffffff / $pagesize - 1;
@@ -39,7 +39,7 @@ sub check_blocks {
my $badpages_field_v1 = \substr($signature_page, psizeof($signature_format_v1));
for (my $i = 0; $i < $nbpages; $i++) {
-
+
$last_read_ok || sysseek($fd, $i * $pagesize, 0) or die "seek failed";
unless ($last_read_ok = sysread($fd, $buffer, $pagesize)) {
@@ -53,7 +53,7 @@ sub check_blocks {
}
#- TODO: add interface
-
+
$badpages and log::l("$badpages bad pages\n");
return $badpages;
}
@@ -96,7 +96,7 @@ sub make($;$) {
} elsif ($version == 0) {
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";
vec($signature_page, 0, 1) = 0;
@@ -106,7 +106,7 @@ sub make($;$) {
$goodpages > 0 or die "all blocks are bad";
log::l("Setting up swapspace on $devicename version $version, size = " . $goodpages * $pagesize . " bytes");
-
+
strcpy($signature_page, $version == 0 ? "SWAP-SPACE" : "SWAPSPACE2", $pagesize - 10);
my $offset = ($version == 0) ? 0 : 1024;
@@ -129,5 +129,5 @@ sub swapon($) {
syscall_('swapon', devices::make($_[0]), 0) or die "swapon($_[0]) failed: $!";
}
sub swapoff($) {
- syscall_('swapoff', devices::make($_[0])) or die "swapoff($_[0]) failed: $!";
+ syscall_('swapoff', devices::make($_[0])) or die "swapoff($_[0]) failed: $!";
}
diff --git a/perl-install/unused/cdrom.pm b/perl-install/unused/cdrom.pm
index 6ba5f5152..b9b6ea699 100644
--- a/perl-install/unused/cdrom.pm
+++ b/perl-install/unused/cdrom.pm
@@ -34,7 +34,7 @@ sub setupCDdevice {
}
sub removeCDmodule {
- #- this wil fail silently if no CD module has been loaded
+ #- this wil fail silently if no CD module has been loaded
removeDeviceDriver('cdrom');
1;
}
diff --git a/perl-install/unused/dns.pm b/perl-install/unused/dns.pm
index baad57f9e..5e6bb5f5b 100644
--- a/perl-install/unused/dns.pm
+++ b/perl-install/unused/dns.pm
@@ -1,7 +1,7 @@
use diagnostics;
use strict;
-# This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so
+# This is dumb, but glibc doesn't like to do hostname lookups w/o libc.so
#TODO TODO
@@ -10,7 +10,7 @@ sub doQuery {
#
# _res.retry = 2;
#
-# len = res_search(query, C_IN, queryType, (void *) &response,
+# len = res_search(query, C_IN, queryType, (void *) &response,
# sizeof(response));
# if (len <= 0) return -1;
#
@@ -20,44 +20,44 @@ sub doQuery {
#
# data = response.buf + sizeof(HEADER);
# end = response.buf + len;
-#
-# # skip the question
+#
+# # skip the question
# data += dn_skipname(data, end) + QFIXEDSZ;
#
-# # parse the answer(s)
+# # parse the answer(s)
# while (--ancount >= 0 && data < end) {
#
-# # skip the domain name portion of the RR record
+# # skip the domain name portion of the RR record
# data += dn_skipname(data, end);
#
-# # get RR information
+# # get RR information
# GETSHORT(type, data);
-# data += INT16SZ; # skipp class
-# data += INT32SZ; # skipp TTL
+# data += INT16SZ; # skipp class
+# data += INT32SZ; # skipp TTL
# GETSHORT(len, data);
#
# if (type == T_PTR) {
-# # we got a pointer
+# # we got a pointer
# len = dn_expand(response.buf, end, data, name, sizeof(name));
# if (len <= 0) return -1;
# if (queryType == T_PTR && domainName) {
-# # we wanted a pointer
+# # we wanted a pointer
# *domainName = malloc(strlen(name) + 1);
# strcpy(*domainName, name);
# return 0;
# }
# } else if (type == T_A) {
-# # we got an address
+# # we got an address
# if (queryType == T_A && ipNum) {
-# # we wanted an address
+# # we wanted an address
# memcpy(ipNum, data, sizeof(*ipNum));
# return 0;
# }
# }
#
-# # move ahead to next RR
+# # move ahead to next RR
# data += len;
-# }
+# }
#
# return -1;
}
diff --git a/perl-install/unused/otherinsmod.pm b/perl-install/unused/otherinsmod.pm
index fb62ff945..1a8eee9ff 100644
--- a/perl-install/unused/otherinsmod.pm
+++ b/perl-install/unused/otherinsmod.pm
@@ -18,7 +18,7 @@ sub insmod {
}
my $rc = insmod_main($tmpname || $file, @_);
-
+
unlink($tmpname);
return $rc;
diff --git a/perl-install/unused/scsi.pm b/perl-install/unused/scsi.pm
index 1b185a8ad..b92185d46 100644
--- a/perl-install/unused/scsi.pm
+++ b/perl-install/unused/scsi.pm
@@ -58,7 +58,7 @@ sub ideGetDevices {
-r "/proc/ide" or die "sorry, /proc/ide not available, seems like you have a pre-2.2 kernel\n => not handled yet :(";
- #- Great. 2.2 kernel, things are much easier and less error prone.
+ #- Great. 2.2 kernel, things are much easier and less error prone.
foreach my $d (glob_('/proc/ide/hd*')) {
my ($t) = chop_(cat_("$d/media"));
my $type = $ {{disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd'}}{$t} or next;
@@ -94,10 +94,10 @@ sub dac960GetDevices {
open F, $file or die "Failed to open $file: $!";
#- We are looking for lines of this format:DAC960#0:
- #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
+ #- /dev/rd/c0d0: RAID-7, Online, 17928192 blocks, Write Thru0123456790123456789012
foreach (<F>) {
my ($devicename, $info) = m|/dev/rd/(.*?): (.*?),| or next;
- push @idi, { info => $info, type => 'hd', devicename => $devicename };
+ push @idi, { info => $info, type => 'hd', devicename => $devicename };
log::l("DAC960: $devicename: $info");
}
[ @idi ];