summaryrefslogtreecommitdiffstats
path: root/perl-install/install/commands.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install/commands.pm')
-rw-r--r--perl-install/install/commands.pm23
1 files changed, 8 insertions, 15 deletions
diff --git a/perl-install/install/commands.pm b/perl-install/install/commands.pm
index 55e1f103e..79f49b980 100644
--- a/perl-install/install/commands.pm
+++ b/perl-install/install/commands.pm
@@ -1,11 +1,11 @@
-package install::commands; # $Id: commands.pm 263616 2009-11-19 18:11:25Z blino $
+package install::commands;
#-########################################################################
#- This file implement many common shell commands:
-#- true, false, cat, which, dirname, basename, rmdir, lsmod, grep, tr,
+#- true, false, cat, which, dirname, basename, rmdir, grep, tr,
#- mount, mkdir, mknod, ln, rm, chmod, chown, swapon,
#- swapoff, ls, cp, ps, dd, head, tail, strings, hexdump, more,
-#- modprobe, route, df, kill, lspci, lssbus, dmesg, sort, du,
+#- route, df, kill, lspci, lssbus, dmesg, sort, du,
#-########################################################################
use diagnostics;
@@ -38,7 +38,6 @@ sub cat { @ARGV = @_; print while <> }
sub dirname_ { print dirname(@_), "\n" }
sub basename_ { print basename(@_), "\n" }
sub rmdir_ { foreach (@_) { rmdir $_ or die "rmdir: cannot remove $_\n" } }
-sub lsmod() { print "Module Size Used by\n"; cat("/proc/modules") }
sub which {
ARG: foreach (@_) { foreach my $c (split /:/, $ENV{PATH}) { -x "$c/$_" and print("$c/$_\n"), next ARG } }
}
@@ -276,7 +275,7 @@ sub hexdump {
sub more {
@ARGV = @_;
require devices;
- my $tty = devices::make('tty');
+ my $tty = '/dev/tty';
my $n = 0;
open(my $IN, $tty) or die "cannot open $tty\n";
local $_;
@@ -290,15 +289,6 @@ sub more {
}
}
-sub modprobe {
- my ($h) = getopts(\@_, qw(h));
- $h || @_ == 0 and die "usage: modprobe <module> [options]\n";
- my $name = shift;
- require modules;
- list_modules::load_default_moddeps();
- modules::load_with_options([ $name ], { $name => join(' ', @_) });
-}
-
sub route {
@_ == 0 or die "usage: route\nsorry, no modification handled\n";
my ($titles, @l) = cat_("/proc/net/route");
@@ -411,8 +401,11 @@ sub bug {
my $in = interactive::stdio->new;
require install::any;
+ my @devs = install::any::removable_media__early_in_install();
+ @devs or die "You need to plug a removable medium (USB key, floppy, ...)\n";
+
$part = $in->ask_from_listf('', "Which device?", \&partition_table::description,
- [ install::any::removable_media__early_in_install() ] ) or return;
+ \@devs) or return;
}
warn "putting file report.bug on $part->{device}\n";