Files
linuxkit/alpine/packages/mobyplatform/mobyplatform
Justin Cormack 3d3b67d0c3 Add conditional services based on mobyplatform
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>
2016-07-18 12:39:14 +01:00

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