nixpkgs/pkgs/os-specific/linux/systemd/0014-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
Florian Klink 16ee1b18a4 systemd: re-introduce hostnamed-localed-timedated-disable-methods-that-cha.patch
In NixOS, /etc is NOT read-only, and most things in /etc are symlinks
to /etc/static, which is a symlink into the nix store - so the upstream
systemd "/etc is read-only" detection doesn't work.

Fixes #224080.
2023-04-14 21:54:03 +02:00

23 lines
715 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nikolay Amiantov <ab@fmap.me>
Date: Thu, 25 Jul 2019 20:46:58 +0300
Subject: [PATCH] systemd-sleep: execute scripts in /etc/systemd/system-sleep
This is needed for NixOS to use such scripts as systemd directory is immutable.
---
src/sleep/sleep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 288fa4ae84..07deb19d7c 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -186,6 +186,7 @@ static int execute(
};
static const char* const dirs[] = {
SYSTEM_SLEEP_PATH,
+ "/etc/systemd/system-sleep",
NULL
};