diff options
author | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
commit | 530a16ec071db0e24e6e949e265a96848864967c (patch) | |
tree | fe40cacd28d67b98186754c551b7fd339ebc7e17 /perl-install/unused/otherinsmod.pm | |
download | drakx-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.pm | 26 |
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 } |