mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
clean up 9p virtio init to check which drivers are available
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
8db1056b36
commit
c809a196b3
@ -3,11 +3,26 @@
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "Mounting 9p sockets"
|
ebegin "Mounting 9p sockets"
|
||||||
mkdir -p /Socket
|
|
||||||
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 socket /Socket
|
for virtio in $(find /sys/bus/virtio/drivers/9pnet_virtio -name 'virtio*')
|
||||||
mkdir -p /Mac
|
do
|
||||||
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000.u plan9 /Mac
|
TAG=$(cat $virtio/mount_tag)
|
||||||
mkdir -p /Transfuse
|
case $TAG in
|
||||||
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 fuse /Transfuse
|
"socket")
|
||||||
|
mkdir -p /Socket
|
||||||
|
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 socket /Socket
|
||||||
|
;;
|
||||||
|
"plan9")
|
||||||
|
mkdir -p /Mac
|
||||||
|
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000.u plan9 /Mac
|
||||||
|
;;
|
||||||
|
"fuse")
|
||||||
|
mkdir -p /Transfuse
|
||||||
|
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 fuse /Transfuse
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
eend 0
|
eend 0
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,9 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[ -d /Socket ] || exit 0
|
||||||
|
|
||||||
ebegin "Starting docker socket passthrough"
|
ebegin "Starting docker socket passthrough"
|
||||||
|
|
||||||
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudc.pid
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudc.pid
|
||||||
@ -24,6 +27,8 @@ start()
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
|
[ -d /Socket ] || exit 0
|
||||||
|
|
||||||
ebegin "Stopping docker socket passthrough"
|
ebegin "Stopping docker socket passthrough"
|
||||||
|
|
||||||
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudc.pid
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudc.pid
|
||||||
|
@ -9,6 +9,8 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
[ -d /Transfuse ] || exit 0
|
||||||
|
|
||||||
ebegin "Starting FUSE socket passthrough"
|
ebegin "Starting FUSE socket passthrough"
|
||||||
|
|
||||||
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudfuse.pid
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudfuse.pid
|
||||||
@ -23,6 +25,8 @@ start()
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
|
[ -d /Transfuse ] || exit 0
|
||||||
|
|
||||||
ebegin "Stopping FUSE socket passthrough"
|
ebegin "Stopping FUSE socket passthrough"
|
||||||
|
|
||||||
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudfuse.pid
|
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/9pudfuse.pid
|
||||||
|
Loading…
Reference in New Issue
Block a user