diff options
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r-- | perl-install/commands.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm index 3c4c19a3e..e4510a22d 100644 --- a/perl-install/commands.pm +++ b/perl-install/commands.pm @@ -393,6 +393,8 @@ sub unpack_ { } sub insmod { + my ($h) = getopts(\@_, qw(h)); + $h || @_ == 0 and die "usage: insmod <module> [options]\n"; my $name = shift; my $f = "/tmp/$name.o"; require 'run_program.pm'; @@ -402,6 +404,15 @@ sub insmod { unlink $f; } +sub modprobe { + my ($h) = getopts(\@_, qw(h)); + $h || @_ == 0 and die "usage: modprobe <module> [options]\n"; + my $name = shift; + require 'modules.pm'; + modules::load_deps("/modules/modules.dep"); + modules::load($name, '', @_); +} + sub route { @_ == 0 or die "usage: route\nsorry, no modification handled\n"; my ($titles, @l) = cat_("/proc/net/route"); @@ -459,6 +470,18 @@ $dev, $size, $used, $free, $use, $mntpoint } } +sub kill { + my $signal = 15; + @_ or die "usage: kill [-<signal>] pids\n"; + $signal = (shift, $1)[1] if $_[0] =~ /^-(.*)/; + kill $signal, @_ or die "kill failed: $!\n"; +} + +sub lspci { + require 'pci_probing/main.pm'; + print join "\n", pci_probing::main::list (), ''; +} + #-###################################################################################### #- Wonderful perl :( #-###################################################################################### |