mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-27 11:21:44 +00:00
Allow skipping the users check via sentinel
Signed-off-by: Itxaka <itxaka@kairos.io>
(cherry picked from commit b45d95c256
)
This commit is contained in:
parent
2f50886ba2
commit
b2ced7173f
@ -213,6 +213,13 @@ func contains(s []string, str string) bool {
|
||||
func (c Config) CheckForUsers() (err error) {
|
||||
// If nousers is enabled we do not check for the validity of the users and such
|
||||
// At this point, the config should be fully parsed and the yip stages ready
|
||||
|
||||
// Check if the sentinel is present
|
||||
_, sentinel := c.Fs.Stat("/etc/kairos/.nousers")
|
||||
if sentinel == nil {
|
||||
c.Logger.Logger.Debug().Msg("Sentinel file found, skipping user check")
|
||||
return nil
|
||||
}
|
||||
if !c.Install.NoUsers {
|
||||
anyAdmin := false
|
||||
cc, _ := c.Config.String()
|
||||
|
Loading…
Reference in New Issue
Block a user