@@ -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)
}
@@ -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
// LCOW initialization
- if os.Getenv("LCOW_SUPPORTED") != "" {
+ if experimental && os.Getenv("LCOW_SUPPORTED") != "" {
lcowSupported = true