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

Replaced "systemctl suspend" with "loginctl suspend" #402

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

ANSI-D
Copy link

@ANSI-D ANSI-D commented Sep 19, 2023

Changed "systemctl suspend" to "loginctl suspend" in order to make it work on non-systemd distributions (such as Artix, Devuan etc.). As far as my knowledge goes, this should keep working normally on systemd distros and non-systemd distros by installing the elogind dependency

If this isn't an acceptable solution I understand, but support for other init systems is important.

Note: The betterlockscreen.service file will not run on systemd-free distros anyway, since it requires systemd in the first place.

Description

Please include a summary of the changes and if applicable which issue it fixes. Please also include relevant motivation and context. If there are changes to the dependencies/min. version-constraints please mention them.

Fixes # (issue)

systemd-free linux distributions can now run this program to suspend the system.

How Has This Been Tested?

I modified the /usr/bin/betterlockscreen file on Artix (kernel version 6.1.6-artix1-1), afterwards I also ran the "betterlockscreen -l" command several times to confirm.
I also ran a ShellCheck test.

Please describe the tests that you ran to verify your changes.

I ran the "betterlockscreen -l" command.

Checklist:

  • I have performed a self-review of my own code/checked that ShellCheck succeeds
  • I have made corresponding changes to the documentation (if applicable) [Didn't really see a need to put "runs without systemd" as a feature)

Changed "systemctl suspend" to "loginctl suspend" in order to make it work on non-systemd distributions (such as Artix, Devuan etc.). 
As far as my knowledge goes, this should keep working normally on systemd distros and will work with non-systemd distros by installing the elogind dependency
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.

None yet

1 participant