-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21161 from cgwalters/machine-autologin-console
machine: Enable console autologin by default
- Loading branch information
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,14 @@ func (ign *DynamicIgnition) GenerateIgnitionConfig() error { | |
ignStorage.Links = append(ignStorage.Links, tzLink) | ||
} | ||
|
||
// Enables automatic login on the console; | ||
// there's no security concerns here, and this makes debugging easier. | ||
// xref https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-autologin/ | ||
var autologinDropin = `[Service] | ||
ExecStart= | ||
ExecStart=-/usr/sbin/agetty --autologin root --noclear %I $TERM | ||
` | ||
|
||
deMoby := parser.NewUnitFile() | ||
deMoby.Add("Unit", "Description", "Remove moby-engine") | ||
deMoby.Add("Unit", "After", "systemd-machine-id-commit.service") | ||
|
@@ -220,7 +228,26 @@ func (ign *DynamicIgnition) GenerateIgnitionConfig() error { | |
Enabled: BoolToPtr(false), | ||
Name: "zincati.service", | ||
}, | ||
}} | ||
{ | ||
Name: "[email protected]", | ||
Dropins: []Dropin{ | ||
{ | ||
Name: "10-autologin.conf", | ||
Contents: &autologinDropin, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Name: "[email protected]", | ||
Dropins: []Dropin{ | ||
{ | ||
Name: "10-autologin.conf", | ||
Contents: &autologinDropin, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
// Only qemu has the qemu firmware environment setting | ||
if ign.VMType == define.QemuVirt { | ||
|