summaryrefslogtreecommitdiffstats
path: root/rescue/tree
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-16 10:15:26 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-16 10:15:26 +0000
commitf12a9634c8df853a47daffd4c8ea0a0a7b52377d (patch)
tree196446b26b5b430bfaea9121f8362f3c0bced945 /rescue/tree
parent50df314fbf00fe0a4dee21f4d8328bb8d8176b5d (diff)
downloaddrakx-f12a9634c8df853a47daffd4c8ea0a0a7b52377d.tar
drakx-f12a9634c8df853a47daffd4c8ea0a0a7b52377d.tar.gz
drakx-f12a9634c8df853a47daffd4c8ea0a0a7b52377d.tar.bz2
drakx-f12a9634c8df853a47daffd4c8ea0a0a7b52377d.tar.xz
drakx-f12a9634c8df853a47daffd4c8ea0a0a7b52377d.zip
remove modules files even when modprobe fails
Diffstat (limited to 'rescue/tree')
-rwxr-xr-xrescue/tree/sbin/modprobe4
1 files changed, 3 insertions, 1 deletions
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
index 811c75111..84de032e2 100755
--- a/rescue/tree/sbin/modprobe
+++ b/rescue/tree/sbin/modprobe
@@ -29,8 +29,10 @@ sub load {
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("/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";