diff options
author | Mystery Man <unknown@mandriva.org> | 2002-09-12 12:24:47 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-09-12 12:24:47 +0000 |
commit | 2698beeee4d2c230775e8b4be7c3f0e01c8c793c (patch) | |
tree | ea3f388c9f82fc84f9c75830731a3522fd4e6feb /rescue/tree/sbin/modprobe | |
parent | 6939560e011ed8fa48bfd9595bb00ccbf5b32276 (diff) | |
download | drakx-2698beeee4d2c230775e8b4be7c3f0e01c8c793c.tar drakx-2698beeee4d2c230775e8b4be7c3f0e01c8c793c.tar.gz drakx-2698beeee4d2c230775e8b4be7c3f0e01c8c793c.tar.bz2 drakx-2698beeee4d2c230775e8b4be7c3f0e01c8c793c.tar.xz drakx-2698beeee4d2c230775e8b4be7c3f0e01c8c793c.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_9_45mdk'.V1_1_9_45mdk
Diffstat (limited to 'rescue/tree/sbin/modprobe')
-rwxr-xr-x | rescue/tree/sbin/modprobe | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe deleted file mode 100755 index 811c75111..000000000 --- a/rescue/tree/sbin/modprobe +++ /dev/null @@ -1,40 +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"); $? and die("insmod $name failed"); - system("rm /tmp/$name.o"); -} - -!@ARGV || $ARGV[0] =~ /-h/ and die "usage: modprobe <module> [<options...>]\n"; - -read_already_loaded(); -load_deps("/modules/modules.dep"); -load(@ARGV); |