Stefan Priebe cc04752964 do not use -w switch as it breaks modules
-w enabled warnings for all modules - even when these modules comes from the OS and are not compatible
with warnings. This is the reason to NOT use -w and instead use "use warnings".
2013-10-01 10:36:47 +02:00

24 lines
481 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use warnings;
use PVE::Cluster;
use PVE::APLInfo;
if (scalar (@ARGV) != 1) {
print STDERR "usage: $0 CMD\n";
exit (-1);
}
my $cmd = shift;
if ($cmd eq 'update') {
my $dccfg = PVE::Cluster::cfs_read_file('datacenter.cfg');
exit (0) if PVE::APLInfo::update($dccfg->{http_proxy});
print STDERR "update failed - see /var/log/pveam.log for details\n";
exit (-1);
} else {
print STDERR "unknown CMD '$cmd'\n";
exit (-1);
}