Permalink
Browse files
Do not emit cloud-init.disabled; cloud-init only runs if datasource i…
Loading branch information...
Showing
2 changed files
with
1 addition
and
7 deletions .
+0
−3
image/image.go
+1
−4
image/image_test.go
@@ -232,9 +232,6 @@ func installCloudConfig(gadgetDir string) error {
if osutil.FileExists (cloudConfig) {
dst := filepath.Join (cloudDir, " cloud.cfg" )
err = osutil.CopyFile (cloudConfig, dst, osutil.CopyFlagOverwrite )
- } else {
- dst := filepath.Join (cloudDir, " cloud-init.disabled" )
- err = osutil.AtomicWriteFile (dst, nil , 0644 , 0 )
}
return err
}
@@ -551,9 +551,6 @@ func (s *imageSuite) TestBootstrapToRootDirLocalCoreBrandKernel(c *C) {
c.Assert (err, IsNil)
c.Check (m[" snap_core" ], Equals, " core_x1.snap" )
- // check that cloud-init is setup correctly
- c.Check (osutil.FileExists (filepath.Join (rootdir, " etc/cloud/cloud-init.disabled" )), Equals, true )
-
c.Check (s.stderr .String (), Equals, " WARNING: \" core\" , \" required-snap1\" were installed from local snaps disconnected from a store and cannot be refreshed subsequently!\n " )
}
@@ -662,7 +659,7 @@ func (s *imageSuite) TestInstallCloudConfigNoConfig(c *C) {
dirs.SetRootDir (targetDir)
err := image.InstallCloudConfig (emptyGadgetDir)
c.Assert (err, IsNil)
- c.Check (osutil.FileExists (filepath.Join (targetDir, " etc/cloud/cloud-init.disabled " )), Equals, true )
+ c.Check (osutil.FileExists (filepath.Join (targetDir, " etc/cloud" )), Equals, true )
}
func (s *imageSuite ) TestInstallCloudConfigWithCloudConfig (c *C ) {
Toggle all file notes
0 comments on commit
3e83b3a