summaryrefslogtreecommitdiffstats
path: root/rescue/tree/sbin/modprobe
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-05-19 14:55:45 +0000
committerMystery Man <unknown@mandriva.org>2003-05-19 14:55:45 +0000
commit7994644e1353db36673c5125ca86b3a6683110f5 (patch)
treeeb390d9388c306c4a05d2d62b9715aca30563628 /rescue/tree/sbin/modprobe
parentbfb5c11017c5a7a76c860d3e01c70ce562231b3f (diff)
downloaddrakx-9_1_38mdk.tar
drakx-9_1_38mdk.tar.gz
drakx-9_1_38mdk.tar.bz2
drakx-9_1_38mdk.tar.xz
drakx-9_1_38mdk.zip
This commit was manufactured by cvs2svn to create tag 'V9_1_38mdk'.V9_1_38mdk
Diffstat (limited to 'rescue/tree/sbin/modprobe')
-rwxr-xr-xrescue/tree/sbin/modprobe42
1 files changed, 0 insertions, 42 deletions
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
deleted file mode 100755
index 84de032e2..000000000
--- a/rescue/tree/sbin/modprobe
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-
-sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l }
-
-sub read_already_loaded() {
- foreach (cat_("/proc/modules")) {
- my ($name) = split;
- $conf{$name}{loaded} = 1;
- }
-}
-
-sub load_deps($) {
- my ($file) = @_;
-
- local *F;
- open F, $file or log::l("error opening $file: $!"), return 0;
- foreach (<F>) {
- my ($f, $deps) = split ':';
- push @{$deps{$f}}, split ' ', $deps;
- }
-}
-
-sub load {
- my ($name, @options) = @_;
- $name =~ s/\.o//;
-
- $conf{$name}{loaded} and return;
- eval { load($_, 'prereq') } foreach @{$deps{$name}};
-
- system("packdrake -x /modules/modules.cz* /tmp $name.o");
- -r "/tmp/$name.o" or die "can't find module $name\n";
- system("/sbin/insmod /tmp/$name.o");
- my $retval = $?;
- system("rm /tmp/$name.o");
- $retval and die("insmod $name failed");
-}
-
-!@ARGV || $ARGV[0] =~ /-h/ and die "usage: modprobe <module> [<options...>]\n";
-
-read_already_loaded();
-load_deps("/modules/modules.dep");
-load(@ARGV);