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