summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/commands.pm29
-rw-r--r--perl-install/install2.pm7
-rw-r--r--perl-install/install_steps.pm2
-rw-r--r--perl-install/modules.pm1
4 files changed, 35 insertions, 4 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index e2c5ba97b..bd511c850 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -249,12 +249,12 @@ sub cp {
}
sub ps {
+
@_ and die "usage: ps\n";
my ($pid, $cpu, $cmd);
- my $uptime = int first(cat_("/proc/uptime"));
+ my ($uptime) = split ' ', first(cat_("/proc/uptime"));
my $hertz = 100;
- local (*STDOUT_TOP);
format STDOUT_TOP =
PID CMD
.
@@ -268,7 +268,7 @@ $pid, $cpu, $cmd
$cpu = sprintf "%2.1f", max(0, min(99, ($l[13] + $l[14]) * 100 / $hertz / ($uptime - $l[21] / $hertz)));
(($cmd) = cat_("/proc/$pid/cmdline")) =~ s/\0/ /g;
$cmd ||= (split ' ', (cat_("/proc/$pid/stat"))[0])[1];
- write STDOUT;
+ write;
}
}
@@ -397,3 +397,26 @@ sub insmod {
run_program::run("insmod_", $f, @_) or die("insmod $name failed");
unlink $f;
}
+
+sub route {
+ @ARGV and die "usage: route\nsorry, no modification handled\n";
+ my ($titles, @l) = cat_("/proc/net/route");
+ my @titles = split ' ', $titles;
+ my %l;
+ local *ROUTE = *STDOUT;
+ format ROUTE_TOP =
+Destination Gateway Mask Iface
+.
+ format ROUTE =
+@<<<<<<<<<<<< @<<<<<<<<<<<< @<<<<<<<<<<<< @<<<<<<<
+$l{Destination}, $l{Gateway}, $l{Mask}, $l{Iface}
+.
+ foreach (@l) {
+ /^\s*$/ and next;
+ @l{@titles} = split;
+ $_ = join ".", reverse map { hex } unpack "a2a2a2a2", $_ foreach @l{qw(Destination Gateway Mask)};
+ $l{Destination} = 'default' if $l{Destination} eq "0.0.0.0";
+ $l{Gateway} = '*' if $l{Gateway} eq "0.0.0.0";
+ write ROUTE;
+ }
+}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 2c082a6b4..5636f0c99 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -233,7 +233,7 @@ $o = $::o = {
# user => { name => 'foo', password => 'bar', home => '/home/foo', shell => '/bin/bash', realname => 'really, it is foo' },
# superuser => { password => 'a', shell => '/bin/bash', realname => 'God' },
- base => [ qw(basesystem initscripts console-tools mkbootdisk linuxconf anacron linux_logo rhs-hwdiag utempter ldconfig chkconfig ntsysv mktemp setup setuptool filesystem MAKEDEV SysVinit ash at authconfig bash bdflush binutils console-tools crontabs dev e2fsprogs ed etcskel file fileutils findutils getty_ps gpm 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) ],
+ base => [ qw(basesystem initscripts console-tools mkbootdisk linuxconf anacron linux_logo rhs-hwdiag utempter ldconfig chkconfig ntsysv mktemp setup setuptool filesystem MAKEDEV SysVinit ash at authconfig bash bdflush binutils console-tools crontabs dev e2fsprogs ed etcskel file fileutils findutils getty_ps gpm 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) ],
};
@@ -391,7 +391,12 @@ sub main {
local $^W = 0;
*install_any::getFile = \&ftp::getFile;
}
+ } elsif (/--step/) {
+ $o->{steps}{first} = shift;
+ } elsif (/--expert/) {
+ $::expert = 1;
}
+
}
my $clicked = 0;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 8e086f70d..622d14dc9 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -212,6 +212,8 @@ sub addUser($) {
$u{password} = crypt_($u{password}) if $u{password};
+ return if $::testing;
+
local *F;
open F, ">> $p/etc/passwd" or die "can't append to passwd file: $!";
print F join(':', @u{@etc_pass_fields}), "\n";
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 4118fec29..b84401f72 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -139,6 +139,7 @@ my @drivers_by_category = (
"AM53C974" => "AMD SCSI",
"megaraid" => "AMI MegaRAID",
"BusLogic" => "BusLogic Adapters",
+ "cpqarray" => "Compaq Smart Array controller",
"dtc" => "DTC 3180/3280",
"eata_dma" => "EATA DMA Adapters",
"eata_pio" => "EATA PIO Adapters",