Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow lima-guestagent to start on older systemd #2384

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Jun 2, 2024

I was trying to install Ubuntu 15.04, as part of the Kubernetes anniversary (14.04 did not use systemd at all)

But it was getting systemctl syntax errors, when it comes to starting the lima-guestagent after installation...

systemctl: unrecognized option '--now'

It seemed harmless enough, to use the traditional method of using two commands? Even if it is obsolete.


Here is the workaround, meanwhile:

- mode: boot
  script: |
   printf '#!/bin/sh\nif [ "$2" = "enable" -a "$3" = "--now" ]; then /bin/systemctl $1 enable $4; /bin/systemctl $1 start $4; else /bin/systemctl "$@"; fi\n' >/usr/local/bin/systemctl
   chmod 755 /usr/local/bin/systemctl

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@AkihiroSuda AkihiroSuda added this to the v0.23.0 (tentative) milestone Jun 2, 2024
@AkihiroSuda AkihiroSuda merged commit 8fd6989 into lima-vm:master Jun 4, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants