name => 'update_database',
path => 'update',
method => 'POST',
- description => "This is used to resynchronize the package index files from their sources (apt update).",
+ description => "This is used to resynchronize the package index files from their sources (apt-get update).",
permissions => {
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
},
my $aptcfn = "/etc/apt/apt.conf.d/76pveproxy";
PVE::Tools::file_set_contents($aptcfn, $aptconf);
- my $cmd = ['apt', 'update'];
+ my $cmd = ['apt-get', 'update'];
- print "starting apt update\n" if !$param->{quiet};
+ print "starting apt-get update\n" if !$param->{quiet};
if ($param->{quiet}) {
PVE::Tools::run_command($cmd, outfunc => sub {}, errfunc => sub {});
node => get_standard_option('pve-node'),
upgrade => {
type => 'boolean',
- description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
+ description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
optional => 1,
default => 0,
},
node => get_standard_option('pve-node'),
upgrade => {
type => 'boolean',
- description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
+ description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
optional => 1,
default => 0,
},
proxy => get_standard_option('spice-proxy', { optional => 1 }),
upgrade => {
type => 'boolean',
- description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.",
+ description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
optional => 1,
default => 0,
},
local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
print "update available package list\n";
- eval { run_command(['apt', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
+ eval { run_command(['apt-get', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) };
- my @apt_install = qw(apt --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
+ my @apt_install = qw(apt-get --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
my @ceph_packages = qw(
ceph
ceph-common
} else {
- my $cmdstr = 'apt dist-upgrade';
+ my $cmdstr = 'apt-get dist-upgrade';
- print "Starting system upgrade: apt dist-upgrade\n";
+ print "Starting system upgrade: apt-get dist-upgrade\n";
my $oldlist = PVE::API2::APT->list_updates({ node => $nodename});
- system('apt', 'dist-upgrade');
+ system('apt-get', 'dist-upgrade');
my $pkglist = PVE::API2::APT->list_updates({ node => $nodename});
=head1 NAME
-pveupgrade - wrapper arournd "apt dist-upgrade"
+pveupgrade - wrapper arournd "apt-get dist-upgrade"
=head1 SYNOPSIS
=head1 DESCRIPTION
-This is a small wrapper around "apt dist-upgrade". We use this to
+This is a small wrapper around "apt-get dist-upgrade". We use this to
print additional information (kernel restart required?), and
optionally run an interactive shell after the update (--shell)