Skip to content

Commit 8706606

Browse files
committed
Run eos-firstboot a second time on existing installs
In new dual-boot installs of 6.0.0, eos-firstboot did not correctly grow the filesystem due to the bug fixed in commit 56aea35. We now want to run it a second time. Ideally we would only trigger it on affected dual-boot systems; but it is harder to detect that case than to run eos-firstboot again and have resize2fs gracefully do nothing. While we could easily run a unit only on dual-boot systems with: ConditionKernelCommandLine=endless.image.device ConditionKernelCommandLine=!endless.live_boot to do this only once requires a second unit with its own new flag file. So rather than introducing a second flag file, let's harmlessly re-run this unit once on all systems, and take the opportunity to move the flag file out of the top-level of /var to /var/lib/eos-firstboot. https://phabricator.endlessm.com/T35432
1 parent fb07157 commit 8706606

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

eos-firstboot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ root_part=$(findmnt -rvnf -o SOURCE /)
66

77
resize2fs "${root_part}"
88

9-
> /var/eos-booted
9+
> /var/lib/eos-firstboot
1010
exit 0

eos-firstboot.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ Description=Endless Boot Helper
55
DefaultDependencies=no
66
After=sysinit.target local-fs.target
77
Before=basic.target
8-
ConditionPathExists=!/var/eos-booted
8+
ConditionPathExists=!/var/lib/%N
99
ConditionKernelCommandLine=!endless.live_boot
1010

1111
[Service]
1212
ExecStart=/usr/sbin/eos-firstboot
13+
ExecStartPost=-rm -f /var/eos-booted
1314
StandardOutput=journal+console
1415

1516
[Install]

0 commit comments

Comments
 (0)