mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-25 03:34:58 +00:00
Merge pull request #332 from justincormack/quietdb
only try to mount db for desktop editions
This commit is contained in:
commit
2b5b709600
@ -15,23 +15,25 @@ fi
|
|||||||
if [ ! -d /Database ]
|
if [ ! -d /Database ]
|
||||||
then
|
then
|
||||||
mkdir -p /Database
|
mkdir -p /Database
|
||||||
if [ -d /sys/bus/vmbus ]; then
|
BASE="/Database"
|
||||||
# Running on a Hyper-V hypervisor
|
case "$(mobyconfig)" in
|
||||||
/sbin/9pmount-vsock listen db /Database
|
windows)
|
||||||
else
|
/sbin/9pmount-vsock listen db /Database
|
||||||
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
|
||||||
fi
|
DATABASE="com.docker.driver.amd64-linux"
|
||||||
if [ $? -ne 0 ]
|
BASE="/Database/branch/master/ro/${DATABASE}"
|
||||||
then
|
;;
|
||||||
rm -rf /Database
|
mac)
|
||||||
printf "Could not mount configuration database\n" 1>&2
|
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 db /Database
|
||||||
exit 1
|
[ $? -ne 0 ] && rm -rf /Database && printf "Could not mount configuration database\n" 1>&2 && exit 1
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
DATABASE="com.docker.driver.amd64-linux"
|
|
||||||
BASE="/Database/branch/master/ro/${DATABASE}"
|
|
||||||
|
|
||||||
KEY=$(echo $2 | sed 's@^/@@')
|
KEY=$(echo $2 | sed 's@^/@@')
|
||||||
|
|
||||||
if [ $1 == "exists" ]
|
if [ $1 == "exists" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user