summaryrefslogtreecommitdiffstats
path: root/perl-install/unused/otherinsmod.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2011-01-19 10:44:49 +0000
committerAntoine Ginies <aginies@mandriva.com>2011-01-19 10:44:49 +0000
commit530a16ec071db0e24e6e949e265a96848864967c (patch)
treefe40cacd28d67b98186754c551b7fd339ebc7e17 /perl-install/unused/otherinsmod.pm
downloaddrakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar
drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.gz
drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.bz2
drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.xz
drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.zip
add mes5-2.6.33 branch
Diffstat (limited to 'perl-install/unused/otherinsmod.pm')
-rw-r--r--perl-install/unused/otherinsmod.pm26
1 files changed, 26 insertions, 0 deletions
diff --git a/perl-install/unused/otherinsmod.pm b/perl-install/unused/otherinsmod.pm
new file mode 100644
index 000000000..1a8eee9ff
--- /dev/null
+++ b/perl-install/unused/otherinsmod.pm
@@ -0,0 +1,26 @@
+use diagnostics;
+use strict;
+
+sub insmod {
+
+ @_ or die "usage: insmod <module>.o [params]\n";
+
+ my $file = shift;
+ my $tmpname;
+
+ unless (-r $file) {
+ local *F;
+ open F, "/modules/modules.cgz" or die "error opening /modules/modules.cgz";
+
+ $tmpname = "/tmp/" . basename($file);
+
+ installCpioFile(\*F, $file, $tmpname, 0) or die "error extracting file";
+ }
+
+ my $rc = insmod_main($tmpname || $file, @_);
+
+ unlink($tmpname);
+
+ return $rc;
+}
+sub modprobe { &insmod }