Fix hibernate command on OpenBSD

This commit is contained in:
kikadf 2022-11-07 06:05:07 -08:00 committed by Gitea
parent 9882110357
commit 1b6d81a352
1 changed files with 6 additions and 2 deletions

View File

@ -90,9 +90,12 @@ _power_suspend_init(void)
static void static void
_power_hibernate_init(void) _power_hibernate_init(void)
{ {
#if defined (__FreeBSD__) || defined (__OpenBSD__) #if defined (__FreeBSD__)
if (ecore_file_app_installed("acpiconf")) if (ecore_file_app_installed("acpiconf"))
_cmd_hibernate = strdup("acpiconf -s4"); _cmd_hibernate = strdup("acpiconf -s4");
#elif defined (__OpenBSD__)
if (ecore_file_app_installed("ZZZ"))
_cmd_suspend = strdup("ZZZ");
#else #else
if (ecore_file_app_installed("systemctl")) if (ecore_file_app_installed("systemctl"))
_cmd_hibernate = strdup("systemctl hibernate"); _cmd_hibernate = strdup("systemctl hibernate");
@ -106,7 +109,8 @@ _power_hibernate_init(void)
_cmd_hibernate = strdup("/etc/acpi/pm-hibernate"); _cmd_hibernate = strdup("/etc/acpi/pm-hibernate");
#endif #endif
// linux systemd: PATH/systemctl hibernate // linux systemd: PATH/systemctl hibernate
// bsd: acpiconf -s4 // FreeBSD: acpiconf -s4
// OpenBSD: ZZZ
// if exist: // if exist:
// PATH/hibernate.sh // PATH/hibernate.sh
// /etc/acpi/hibernate.sh force // /etc/acpi/hibernate.sh force