Permalink
Browse files

Fixes #3237: add support for named pipes to init

Signed-off-by: Tomas Knappek <tomas.knappek@gmail.com>
  • Loading branch information...
kppk committed Nov 27, 2018
1 parent ed57c3d commit b7697def45d0c61a5bc66ffbba7d7ddc41fd73ed
Showing with 3 additions and 2 deletions.
  1. +3 −2 pkg/init/cmd/init/init.go
@@ -136,8 +136,9 @@ func copyFS(newRoot string) error {
return err
}
case (info.Mode() & os.ModeNamedPipe) == os.ModeNamedPipe:
// TODO support named pipes, although no real use case
return errors.New("Unsupported named pipe on rootfs")
if err := unix.Mkfifo(dest, uint32(info.Mode())); err != nil {
return err
}
case (info.Mode() & os.ModeSocket) == os.ModeSocket:
// TODO support sockets, although no real use case
return errors.New("Unsupported socket on rootfs")

0 comments on commit b7697de

Please sign in to comment.