summaryrefslogtreecommitdiffstats
path: root/perl-install/unused/otherinsmod.pm
blob: fb62ff9450dcd0e721d0b5b0e2eb79bece8a7fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 }