Deploy: make LXC installer's cosmetic post-install steps non-fatal
ci / build-test (push) Successful in 1m8s
ci / build-test (push) Successful in 1m8s
The framework's motd_ssh runs 'chmod -x /etc/update-motd.d/*', which returns 'Operation not permitted' in some unprivileged LXCs. Under the community-scripts ERR trap that aborted an already-successful install right before /usr/bin/update was written. Write the update command first, then run motd_ssh/customize/cleanup best-effort (motd_ssh now guarded like customize already was). Claude-Session: https://claude.ai/code/session_01Kib2MniVFbD95fkgLgBBnB
This commit is contained in:
@@ -235,9 +235,12 @@ main() {
|
|||||||
systemctl daemon-reload 2>/dev/null || true
|
systemctl daemon-reload 2>/dev/null || true
|
||||||
systemctl_enable_now_best_effort metervault
|
systemctl_enable_now_best_effort metervault
|
||||||
|
|
||||||
motd_ssh
|
# Write the important post-install artifact first, then run cosmetic framework steps best-effort.
|
||||||
customize 2>/dev/null || true
|
# motd_ssh's `chmod -x /etc/update-motd.d/*` returns "Operation not permitted" in some unprivileged
|
||||||
|
# LXCs; under the framework's ERR trap that would otherwise abort an already-successful install.
|
||||||
write_update_command
|
write_update_command
|
||||||
|
motd_ssh 2>/dev/null || true
|
||||||
|
customize 2>/dev/null || true
|
||||||
cleanup_lxc 2>/dev/null || true
|
cleanup_lxc 2>/dev/null || true
|
||||||
|
|
||||||
local ip
|
local ip
|
||||||
|
|||||||
Reference in New Issue
Block a user