diff mbox series

ksmbd-tools: fix unit file

Message ID 20211103162030.183975-1-casta@xwing.info (mailing list archive)
State New, archived
Headers show
Series ksmbd-tools: fix unit file | expand

Commit Message

Guillaume Castagnino Nov. 3, 2021, 4:20 p.m. UTC
Signed-off-by: Guillaume Castagnino <casta@xwing.info>
---
 ksmbd.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Namjae Jeon Nov. 3, 2021, 11:20 p.m. UTC | #1
2021-11-04 1:20 GMT+09:00, Guillaume Castagnino <casta@xwing.info>:
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."

> Signed-off-by: Guillaume Castagnino <casta@xwing.info>
I will apply this patch, Enzo, Let me know if you have other opinion.

Thanks!
> ---
>  ksmbd.service | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ksmbd.service b/ksmbd.service
> index 5717177..3309fa9 100644
> --- a/ksmbd.service
> +++ b/ksmbd.service
> @@ -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
>
>
Enzo Matsumiya Nov. 5, 2021, 7 p.m. UTC | #2
On 11/04, Namjae Jeon wrote:
>2021-11-04 1:20 GMT+09:00, Guillaume Castagnino <casta@xwing.info>:
>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."
>
>> Signed-off-by: Guillaume Castagnino <casta@xwing.info>
>I will apply this patch, Enzo, Let me know if you have other opinion.

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

>Thanks!
>> ---
>>  ksmbd.service | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ksmbd.service b/ksmbd.service
>> index 5717177..3309fa9 100644
>> --- a/ksmbd.service
>> +++ b/ksmbd.service
>> @@ -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

Cheers,

Enzo
diff mbox series

Patch

diff --git a/ksmbd.service b/ksmbd.service
index 5717177..3309fa9 100644
--- a/ksmbd.service
+++ b/ksmbd.service
@@ -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]