diff options
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-x | iurt_root_command | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/iurt_root_command b/iurt_root_command index 9db3404..8a27a39 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -203,12 +203,9 @@ sub modprobe { plog("ERROR: unauthorized module $module"); return 0; } - open my $modules, '/proc/modules'; - while (my $m = <$modules>) { - if ($m =~ /unionfs/) { - return 1; - } - } + + return 1 if grep { /^$module\b/ } read_file("/proc/modules"); + system("/sbin/depmod", "-a"); !system("/sbin/modprobe", "-f", $module); } |