mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Function to delete multiple packages at once
This commit is contained in:
@@ -285,6 +285,21 @@ if ($?) { return "<pre>$out</pre>"; }
|
||||
return undef;
|
||||
}
|
||||
|
||||
# delete_packages(&packages, &in, &versions)
|
||||
# Totally remove some list of packages
|
||||
sub delete_packages
|
||||
{
|
||||
local ($names, $in, $vers) = @_;
|
||||
local @qm;
|
||||
for(my $i=0; $i<@$names; $i++) {
|
||||
local $qm = quotemeta($names[$i].($vers[$i] ? '='.$vers[$i] : '>=0'));
|
||||
push(@qm, $qm);
|
||||
}
|
||||
local $out = &backquote_logged("pkg_delete ".join(" ", @qm)." 2>&1");
|
||||
if ($?) { return "<pre>$out</pre>"; }
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub package_system
|
||||
{
|
||||
return &text('bsd_manager', "FreeBSD");
|
||||
|
||||
Reference in New Issue
Block a user