|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] systemd: Add hooks to stop/start xen-watchdog on suspend/resume
On Thu, Jul 17, 2025 at 11:16:58PM +0300, Mykola Kvach wrote:
> diff --git a/m4/systemd.m4 b/m4/systemd.m4
> index ab12ea313d..ee684d3391 100644
> --- a/m4/systemd.m4
> +++ b/m4/systemd.m4
> @@ -28,6 +28,12 @@ AC_DEFUN([AX_SYSTEMD_OPTIONS], [
> [set directory for systemd modules load files
> [PREFIX/lib/modules-load.d/]]),
> [SYSTEMD_MODULES_LOAD="$withval"], [SYSTEMD_MODULES_LOAD=""])
> AC_SUBST(SYSTEMD_MODULES_LOAD)
> +
> + AC_ARG_WITH(systemd-sleep,
> + AS_HELP_STRING([--with-systemd-sleep=DIR],
> + [set directory for systemd sleep script files
> [PREFIX/lib/systemd/system-sleep/]]),
> + [SYSTEMD_SLEEP_DIR="$withval"], [SYSTEMD_SLEEP_DIR=""])
> + AC_SUBST(SYSTEMD_SLEEP_DIR)
> ])
>
> AC_DEFUN([AX_ENABLE_SYSTEMD_OPTS], [
> @@ -69,6 +75,14 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
> AS_IF([test "x$SYSTEMD_MODULES_LOAD" = x], [
> AC_MSG_ERROR([SYSTEMD_MODULES_LOAD is unset])
> ], [])
> +
> + AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
> + SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/"
While reading this change, and systemd.m4, I notice a comment about
using pkg-config, well it's a comment about using it for $SYSTEMD_DIR,
but I believe it applies here too. It looks like we can replace this
hard-coded path by:
PKG_CHECK_VAR([SYSTEMD_SLEEP_DIR], [systemd], [systemdsleepdir])
Which will query system-sleep path from the system. (This just run
`pkg-config --variable=systemdsleepdir systemd`, and store the result in
SYSTEMD_SLEEP_DIR) (The variable is now named "systemd_sleep_dir", but the
variable name without underscore is still available, and have been
available for longer.)
Is using PKG_CHECK_VAR would be fine with you?
> + ], [])
> +
> + AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
> + AC_MSG_ERROR([SYSTEMD_SLEEP_DIR is unset])
> + ], [])
After changing to use PKG_CHECK_VAR, I think this patch would be good to
go, so: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
I can make the change on commit if that's ok.
And I need to remember to run `./autogen.sh` to regen the configure
scripts.
Thanks,
--
Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |