5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-10 09:17:37 +03:00

new helper get_host_arch

This commit is contained in:
Dietmar Maurer 2018-09-20 06:21:55 +02:00
parent fbd10e04e7
commit 732b693f14

View File

@ -1613,4 +1613,18 @@ sub readline_nointr {
return $line;
}
sub get_host_arch {
my @uname = POSIX::uname();
my $machine = $uname[4];
if ($machine eq 'x86_64') {
return 'amd64';
} elsif ($machine eq 'aarch64') {
return 'arm64';
} else {
die "unsupported host architecture '$machine'\n";
}
}
1;