Commit 7968172
committed
Drop the separate Alpine bootstrap, install.func already covers it
Alpine had its own in-container bootstrap, lxc/alpine-install.func: 266 lines
holding thinner copies of eleven functions install.func also defines. Both
backends picked between them on var_os, so install.func's own Alpine support
-- detect_os setting apk and openrc, seven apk branches, the OpenRC service
and inittab handling -- was written, maintained and never executed for LXC.
Two copies of the same eight functions is not free. The hostname -I failure
on BusyBox came out of it, and the /dev/tty prompt fix earlier today had to
be written twice into two copies of network_check. Deleting the thin one
means Alpine now gets what everything else gets: the conditional testing
banner instead of a hardcoded "DEV Repository (ProxmoxVED)" that every
Alpine container on ProxmoxVE was shown, the IPv6 leg of network_check, the
proxy and telemetry handling, and mirror fallback that shuffles.
Two things really were only in the Alpine copy and are ported rather than
lost:
- util-linux. Alpine ships BusyBox getty, not agetty, and the inittab rewrite
names /sbin/agetty explicitly. The host installs bash, curl and friends
into Alpine containers but not util-linux, so without this the new inittab
line would point at a binary that does not exist and the console would not
come back. The rewrite is now skipped entirely if agetty is still missing.
- The bootstrap probe. alpine-install.func checked each download before
sourcing it; install.func used `source <(...)`, which hides the exit code,
so a failed fetch sourced an empty script and surfaced as "command not
found" somewhere later. _bootstrap_source now names the file that could not
be fetched, and catches a truncated response that parses but is missing
what we asked for.
The apk mirror loop also shuffles with shuf, which BusyBox may not provide.
It now falls back to the fixed order -- an empty list there would have
reported "all mirrors failed" without trying a single one.
Not ported: the /etc/local.d/autologin.start boot hook. install.func writes
the same change directly to /etc/inittab, which persists, and reloads it more
thoroughly (telinit q plus a targeted pkill) than the kill -HUP 1 it replaces.
Checked locally: every engine file parses, both prefetch lists still cover
the tree, and the three loader API snapshots are unchanged. The inittab
regexes were run against real Alpine and Gentoo inittab formats -- both
rewrite tty1 and console and leave tty2 alone. What this cannot cover is a
real Alpine container; those code paths go from dead to load-bearing here.1 parent 259d326 commit 7968172
7 files changed
Lines changed: 62 additions & 298 deletions
File tree
- core
- docs
- incus
- lxc
- pve
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
32 | 27 | | |
33 | 28 | | |
34 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
206 | 204 | | |
207 | 205 | | |
208 | 206 | | |
| |||
This file was deleted.
0 commit comments