Skip to contentSkip to conversation

ksmbd-tools: fix unit file

PATCH In review Guillaume Castagnino 3 participants 3 messages Nov 3, 2021 – Nov 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ksmbd-tools: fix unit file

---
 ksmbd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ksmbd.service +1 -1
index 5717177..3309fa9 100644
@@ -10,7 +10,7 @@ Group=root
 RemainAfterExit=yes
 ExecStartPre=-/sbin/modprobe ksmbd
 ExecStart=/sbin/ksmbd.mountd -s
-ExecReload=/sbin/ksmbd.control -s && /sbin/ksmbd.mountd
+ExecReload=/bin/sh -c '/sbin/ksmbd.control -s && /sbin/ksmbd.mountd -s'
 ExecStop=/sbin/ksmbd.control -s
 
 [Install]
Signature · 1 line
2.33.1
maintainer
#1 lore raw

2021-11-04 1:20 GMT+09:00, Guillaume Castagnino <[email protected]>:
Cc: Enzo.

I will add the below description in patch header.

"Shell logic must be enclosed in shell subprocess, systemd cannot handle it directly, so reload will fail."

Quoted 1 line

I will apply this patch, Enzo, Let me know if you have other opinion.

Thanks!

Quoted 21 lines
---
 ksmbd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ksmbd.service +1 -2
index 5717177..3309fa9 100644
@@ -10,7 +10,7 @@ Group=root
 RemainAfterExit=yes
 ExecStartPre=-/sbin/modprobe ksmbd
 ExecStart=/sbin/ksmbd.mountd -s
-ExecReload=/sbin/ksmbd.control -s && /sbin/ksmbd.mountd
+ExecReload=/bin/sh -c '/sbin/ksmbd.control -s && /sbin/ksmbd.mountd -s'
 ExecStop=/sbin/ksmbd.control -s
 
 [Install]
--

2.33.1

#2 lore raw
Quoted 10 lines · Namjae Jeon

2021-11-04 1:20 GMT+09:00, Guillaume Castagnino <[email protected]>:
Cc: Enzo.

I will add the below description in patch header.

"Shell logic must be enclosed in shell subprocess, systemd cannot handle it directly, so reload will fail."

Quoted 1 line

I will apply this patch, Enzo, Let me know if you have other opinion.

My bad, that's the right way. Please apply it.

Quoted 17 lines

Thanks!

Quoted 16 lines
---
 ksmbd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ksmbd.service +1 -1
index 5717177..3309fa9 100644
@@ -10,7 +10,7 @@ Group=root
 RemainAfterExit=yes
 ExecStartPre=-/sbin/modprobe ksmbd
 ExecStart=/sbin/ksmbd.mountd -s
-ExecReload=/sbin/ksmbd.control -s && /sbin/ksmbd.mountd
+ExecReload=/bin/sh -c '/sbin/ksmbd.control -s && /sbin/ksmbd.mountd -s'
 ExecStop=/sbin/ksmbd.control -s
 
Quoted 3 lines
Quoted 3 lines
ksmbd.service +0 -1
 [Install]
--

2.33.1

Cheers,

Enzo