From a9cc052efef51f705195da4d2402fd7ec40d742f Mon Sep 17 00:00:00 2001 From: Anthony Rabbito Date: Thu, 28 Oct 2021 20:35:41 -0400 Subject: [PATCH] src: mount pcsd inside toolbox container https://github.com/containers/toolbox/pull/907 Signed-off-by: Anthony Rabbito --- src/cmd/create.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cmd/create.go b/src/cmd/create.go index fafb35e..bac3402 100644 --- a/src/cmd/create.go +++ b/src/cmd/create.go @@ -289,6 +289,17 @@ func createContainer(container, image, release string, showCommandToEnter bool) kcmSocketMount = []string{"--volume", kcmSocketMountArg} } + var pcscSocketMount []string + + pcscSocket, err := getServiceSocket("pcsc", "pcscd.socket") + if err != nil { + logrus.Debug(err) + } + if pcscSocket != "" { + pcscSocketMountArg := pcscSocket + ":" + pcscSocket + pcscSocketMount = []string{"--volume", pcscSocketMountArg} + } + var mediaLink []string var mediaMount []string @@ -415,6 +426,7 @@ func createContainer(container, image, release string, showCommandToEnter bool) createArgs = append(createArgs, kcmSocketMount...) createArgs = append(createArgs, mediaMount...) createArgs = append(createArgs, mntMount...) + createArgs = append(createArgs, pcscSocketMount...) createArgs = append(createArgs, runMediaMount...) createArgs = append(createArgs, toolboxShMount...)