-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(install): use systemV mechanism to install the demo as fallback. #327
Conversation
5be4c10
to
06180da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I have checked what the Debian packages do and I was wrong. The auto-generated code is set so that either installs/enable/starts the systemd service or does nothing at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@merlin-northern What are the next steps? Are we going to demo, review it, ... or?
I choose " ... or?". The next step I would pick the 3SP task next or this sprint and make this production grade as per the comments in the ticket. there are two things to consider (apart from the rc.local way which is a bit hacky): the bash disown and the case where there is no sysV, which means there is nothing :)
We already agreed on small post su demo 😘 Feel free to review, this is ready with the mentioned comments. notice the hard-coded runlevel 3 -- I went for the easiest way. |
Thank you for the post-SU demo - it was great. I think now that this is the way to go 🚀 |
it was a pleasure amigo. |
77afad6
to
62e969a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps change the ticket in the commit to the one in the sprint (MEN-7734)?
Feel free to ignore my comments, looks good to me 🚀
chmod 755 /etc/init.d/mender-demo-artifact | ||
|
||
# r=`runlevel` | ||
# ${r#"${r%?}"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep these comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops. sorry leftovers. thanks for catching that.
fi | ||
fi | ||
|
||
if test "$HAVE_SYSTEMD" = "yes"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if test "$HAVE_SYSTEMD" = "yes"; then | |
if test -d /lib/systemd/system && which systemctl 2>/dev/null >&2 && pidof systemd; then |
Perhaps it would simply it if you removed the HAVE_SYSTEMD
variable and did something like this? You only really check the variable here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. I removed the HAVE_SYSTEMD
variable, and retested under mendersoftware/mender-client-docker-addons
and rpi4.
If systemd is not present or not running we fall back to a /etc/init.d mechanism. Changelog: Make /etc/init.d a fallback for the systems where systemd is not present or not running Ticket: MEN-7694 Signed-off-by: Peter Grzybowski <peter@northern.tech>
62e969a
to
a6a8200
Compare
Merging these commits will result in the following changelog entries: Changelogsmender-demo-artifact (men_7694_feasability_of_running_mender_demo_artifact_in_virtual_device_for_app_updates_)New changes in mender-demo-artifact since master: Features
|
feat(install): use systemV mechanism to install the demo as fallback.
If systemd is not present or not running we fall back to a /etc/init.d
mechanism.
Changelog: Make /etc/init.d a fallback for the systems where systemd is not present or not running
Ticket: MEN-7694
Signed-off-by: Peter Grzybowski peter@northern.tech