Skip to content

Commit

Permalink
Support coreos.first_boot for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pothos committed Feb 12, 2020
1 parent 5f4cf63 commit b7f1dbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dracut/30ignition/ignition-generator
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ add_requires() {
# This can't be done with ConditionKernelCommandLine because that always
# starts the unit's dependencies. We want to start networkd only on first
# boot.
if $(cmdline_bool flatcar.first_boot 0); then
if $(cmdline_bool flatcar.first_boot 0) || $(cmdline_bool coreos.first_boot 0); then
add_requires ignition-disks.service
add_requires ignition-files.service
# Only try to mount the ESP if GRUB detected a first_boot file
Expand Down
2 changes: 1 addition & 1 deletion dracut/35torcx/torcx-profile-populate-generator
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ add_requires() {
# This can't be done with ConditionKernelCommandLine because that always
# starts the unit's dependencies. We want to start networkd only on first
# boot.
if $(cmdline_bool flatcar.first_boot 0); then
if $(cmdline_bool flatcar.first_boot 0) || $(cmdline_bool coreos.first_boot 0); then
add_requires torcx-profile-populate.service
fi
5 changes: 5 additions & 0 deletions dracut/99start-root/65-start-root.rules
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ SUBSYSTEM!="block", GOTO="start_root_end"
# Ignition may want to clobber partitions used in a raid array, so
# skip assembling them when Ignition is going to run.
IMPORT{cmdline}="flatcar.first_boot"
IMPORT{cmdline}="coreos.first_boot"
# Possible values for not running Ignition from 30ignition/ignition-generator
ENV{flatcar.first_boot}=="", GOTO="start_root"
ENV{flatcar.first_boot}=="0", GOTO="start_root"
ENV{flatcar.first_boot}=="no", GOTO="start_root"
ENV{flatcar.first_boot}=="off", GOTO="start_root"
ENV{coreos.first_boot}=="", GOTO="start_root"
ENV{coreos.first_boot}=="0", GOTO="start_root"
ENV{coreos.first_boot}=="no", GOTO="start_root"
ENV{coreos.first_boot}=="off", GOTO="start_root"
GOTO="start_root_end"

LABEL="start_root"
Expand Down

0 comments on commit b7f1dbc

Please sign in to comment.