github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/cmds/core/init/init_plan9.go (about)

     1  // Copyright 2018 the u-root Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build plan9
     6  
     7  package main
     8  
     9  import (
    10  	"os/exec"
    11  
    12  	"github.com/u-root/u-root/pkg/libinit"
    13  )
    14  
    15  func quiet() {
    16  }
    17  
    18  func osInitGo() *initCmds {
    19  	// TOOD: get kernel command line.
    20  	uinitArgs := libinit.WithArguments()
    21  
    22  	// namespace setup will have done bind mounts into /bin, so name things only once.
    23  	return &initCmds{
    24  		cmds: []*exec.Cmd{
    25  			// inito is (optionally) created by the u-root command when the
    26  			// u-root initramfs is merged with an existing initramfs that
    27  			// has a /init. The name inito means "original /init" There may
    28  			// be an inito if we are building on an existing initramfs. All
    29  			// initos need their own pid space.
    30  			libinit.Command("/inito"),
    31  			libinit.Command("/bin/uinit", uinitArgs),
    32  			libinit.Command("/bin/sh"),
    33  		},
    34  	}
    35  
    36  }