Add LCOW behind experimental,
might not be the cleanest way, but it's definitly the way with the minimum code change. Signed-off-by: Victor Vieux <victorvieux@gmail.com> Upstream-commit: ff686743c50dc34b57f5627ba6fee38502bdd3ec Component: engine
This commit is contained in:
committed by
Akash Gupta
parent
cddfe04f6a
commit
a641c1b7f0
@ -99,6 +99,8 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
||||
FullTimestamp: true,
|
||||
})
|
||||
|
||||
system.InitLCOW(cli.Config.Experimental)
|
||||
|
||||
if err := setDefaultUmask(); err != nil {
|
||||
return fmt.Errorf("Failed to set umask: %v", err)
|
||||
}
|
||||
|
||||
7
components/engine/pkg/system/init_unix.go
Normal file
7
components/engine/pkg/system/init_unix.go
Normal file
@ -0,0 +1,7 @@
|
||||
// +build !windows
|
||||
|
||||
package system
|
||||
|
||||
// InitLCOW does nothing since LCOW is a windows only feature
|
||||
func InitLCOW(experimental bool) {
|
||||
}
|
||||
@ -8,9 +8,10 @@ import "os"
|
||||
// on build number. @jhowardmsft
|
||||
var lcowSupported = false
|
||||
|
||||
func init() {
|
||||
// InitLCOW sets whether LCOW is supported or not
|
||||
func InitLCOW(experimental bool) {
|
||||
// LCOW initialization
|
||||
if os.Getenv("LCOW_SUPPORTED") != "" {
|
||||
if experimental && os.Getenv("LCOW_SUPPORTED") != "" {
|
||||
lcowSupported = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user