mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-17 13:47:05 +00:00
Re-enable longer RW_PATHS
Looks like the problem comes from the custom mounts overriding this values Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
parent
97478bd8ac
commit
9a480df901
@ -3,9 +3,8 @@ package constants
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
func DefaultRWPaths() []string {
|
func DefaultRWPaths() []string {
|
||||||
// Default RW_PATHS to mount
|
// Default RW_PATHS to mount if not overriden by the cos-layout.env file
|
||||||
// If none defined, your system wont even boot probably
|
return []string{"/etc", "/root", "/home", "/opt", "/srv", "/usr/local", "/var"}
|
||||||
return []string{"/var", "/etc", "/srv"}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var ErrAlreadyMounted = errors.New("already mounted")
|
var ErrAlreadyMounted = errors.New("already mounted")
|
||||||
|
@ -120,9 +120,11 @@ func (s *State) LoadEnvLayoutDagStep(g *herd.Graph) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// populate from env here
|
// populate from env here
|
||||||
s.OverlayDirs = strings.Split(env["RW_PATHS"], " ")
|
s.OverlayDirs = internalUtils.CleanupSlice(strings.Split(env["RW_PATHS"], " "))
|
||||||
// Append default RW_Paths
|
// Append default RW_Paths if list is empty, otherwise we won't boot properly
|
||||||
s.OverlayDirs = append(s.OverlayDirs, cnst.DefaultRWPaths()...)
|
if len(s.OverlayDirs) == 0 {
|
||||||
|
s.OverlayDirs = cnst.DefaultRWPaths()
|
||||||
|
}
|
||||||
|
|
||||||
// Remove any duplicates
|
// Remove any duplicates
|
||||||
s.OverlayDirs = internalUtils.UniqueSlice(internalUtils.CleanupSlice(s.OverlayDirs))
|
s.OverlayDirs = internalUtils.UniqueSlice(internalUtils.CleanupSlice(s.OverlayDirs))
|
||||||
|
Loading…
Reference in New Issue
Block a user