mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 03:10:30 +01:00
Never ask questions on Debian
This commit is contained in:
@@ -10,6 +10,7 @@ sub update_system_install
|
||||
{
|
||||
local (@rv, @newpacks);
|
||||
local $update = $_[0] || $in{'update'};
|
||||
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
|
||||
local $cmd = $apt_get_command eq "apt-get" ?
|
||||
"$apt_get_command -y --force-yes -f install $update" :
|
||||
"$apt_get_command -y -f install $update";
|
||||
|
||||
@@ -165,6 +165,7 @@ local $args = ($in->{'depends'} ? " --force-depends" : "").
|
||||
($in->{'overwrite'} ? " --force-overwrite" : "").
|
||||
($in->{'downgrade'} ? " --force-downgrade" : "");
|
||||
local $qm = quotemeta($_[0]);
|
||||
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
|
||||
local $out = &backquote_logged("dpkg --install $args $qm 2>&1 </dev/null");
|
||||
if ($?) {
|
||||
return "<pre>$out</pre>";
|
||||
@@ -177,6 +178,7 @@ return undef;
|
||||
sub delete_package
|
||||
{
|
||||
local $qm = quotemeta($_[0]);
|
||||
$ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
|
||||
local $out = &backquote_logged("dpkg --remove $qm 2>&1 </dev/null");
|
||||
if ($? || $out =~ /which isn.t installed/i) {
|
||||
return "<pre>$out</pre>";
|
||||
|
||||
Reference in New Issue
Block a user