From 6d24584c7de68e18ee12672940859ce6bb7313fa Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 3 Sep 2026 14:06:54 -0400 Subject: [PATCH] Use simple type and -nofork in nbd@ systemd service As of eac55e0b06f, when persist mode is active, `nbd-client` doesn't exit. By changing the systemd service to simple type and passing `nofork` to `nbd-client` , behavior is consistent between persist and non-persist, allowing the service to work as expected for both configurations. --- systemd/nbd@.service.sh.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/systemd/nbd@.service.sh.in b/systemd/nbd@.service.sh.in index b1f68f04..7d5f88a4 100644 --- a/systemd/nbd@.service.sh.in +++ b/systemd/nbd@.service.sh.in @@ -14,9 +14,8 @@ After=network-online.target Conflicts=shutdown.target DefaultDependencies=no [Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=@sbindir@/nbd-client %i +Type=simple +ExecStart=@sbindir@/nbd-client -nofork %i ExecStop=@sbindir@/nbd-client -d %i [Install] RequiredBy=dev-%i.device