mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-08 05:57:53 +00:00
Replaces https://github.com/docker/moby/pull/282 Use mobyplatform=xxx to specify platform in boot command Signed-off-by: Justin Cormack <justin.cormack@docker.com>
20 lines
341 B
Bash
Executable File
20 lines
341 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Returns the platform we are running on
|
|
|
|
# return the value matching the kvpair in the command line
|
|
kvpair()
|
|
{
|
|
awk -v flag=$1 '{
|
|
for(i = 1; i <= NF; i++) {
|
|
split($i, kvpair, "=");
|
|
if(kvpair[1] == flag) {
|
|
printf kvpair[2];
|
|
break;
|
|
}
|
|
}
|
|
}' /proc/cmdline
|
|
}
|
|
|
|
kvpair mobyplatform
|