From d045eb449ba248b7f1ebf66f35ca72467ac099c2 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 25 Jul 2016 14:03:03 +0100 Subject: [PATCH] Fix up mobyconfig startup code Signed-off-by: Justin Cormack --- alpine/packages/mobyconfig/mobyconfig | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/alpine/packages/mobyconfig/mobyconfig b/alpine/packages/mobyconfig/mobyconfig index 4be7d7e95..5208f9916 100755 --- a/alpine/packages/mobyconfig/mobyconfig +++ b/alpine/packages/mobyconfig/mobyconfig @@ -15,25 +15,29 @@ fi if [ ! -d /Database ] then mkdir -p /Database - BASE="/Database" case "$(mobyplatform)" in windows) /sbin/9pmount-vsock listen db /Database [ $? -ne 0 ] && rm -rf /Database && printf "Could not mount configuration database\n" 1>&2 && exit 1 - DATABASE="com.docker.driver.amd64-linux" - BASE="/Database/branch/master/ro/${DATABASE}" ;; mac) mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 db /Database [ $? -ne 0 ] && rm -rf /Database && printf "Could not mount configuration database\n" 1>&2 && exit 1 - DATABASE="com.docker.driver.amd64-linux" - BASE="/Database/branch/master/ro/${DATABASE}" ;; - # For other editions, currently all database keys will be reported as empty. - # Later they will build a tree from other sources. esac fi +case "$(mobyplatform)" in + windows|mac) + DATABASE="com.docker.driver.amd64-linux" + BASE="/Database/branch/master/ro/${DATABASE}" + ;; + *) + # For other editions, currently all database keys will be reported as empty. + # Later they will build a tree from other sources. + BASE="/Database" +esac + KEY=$(echo $2 | sed 's@^/@@') if [ $1 == "exists" ]