mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-18 00:07:08 +00:00
🐛 Fix the cleanup of ssh users (#38)
This commit is contained in:
parent
2ed54a0d2d
commit
b55e3e0800
@ -128,6 +128,7 @@ func detectDevice() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func InteractiveInstall(debug, spawnShell bool) error {
|
func InteractiveInstall(debug, spawnShell bool) error {
|
||||||
|
var sshUsers []string
|
||||||
bus.Manager.Initialize()
|
bus.Manager.Initialize()
|
||||||
|
|
||||||
cmd.PrintBranding(DefaultBanner)
|
cmd.PrintBranding(DefaultBanner)
|
||||||
@ -188,7 +189,9 @@ func InteractiveInstall(debug, spawnShell bool) error {
|
|||||||
if users == "github:someuser,github:someuser2" {
|
if users == "github:someuser,github:someuser2" {
|
||||||
users = ""
|
users = ""
|
||||||
}
|
}
|
||||||
sshUsers := strings.Split(users, ",")
|
if users != "" {
|
||||||
|
sshUsers = strings.Split(users, ",")
|
||||||
|
}
|
||||||
|
|
||||||
// Prompt the user by prompts defined by the provider
|
// Prompt the user by prompts defined by the provider
|
||||||
r := []events.YAMLPrompt{}
|
r := []events.YAMLPrompt{}
|
||||||
@ -246,7 +249,7 @@ func InteractiveInstall(debug, spawnShell bool) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we got no ssh keys, we don't need network, do the user as soon as possible
|
// If we got no ssh keys, we don't need network, do the user as soon as possible
|
||||||
if len(user.SSHAuthorizedKeys) == 0 {
|
if len(sshUsers) == 0 {
|
||||||
stage = config.InitramfsStage.String()
|
stage = config.InitramfsStage.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user