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:
parent
fbd10e04e7
commit
732b693f14
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user