Message ID | 20240229140937.15643-1-adolf.belka@ipfire.org |
---|---|
State | Superseded |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4TltQN5xsRz3wmD for <patchwork@web04.haj.ipfire.org>; Thu, 29 Feb 2024 14:09:48 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4TltQK5NBpzkH; Thu, 29 Feb 2024 14:09:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4TltQK2yPlz32pk; Thu, 29 Feb 2024 14:09:45 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4TltQH5rxGz32gy for <development@lists.ipfire.org>; Thu, 29 Feb 2024 14:09:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4TltQG6SK1zZ6; Thu, 29 Feb 2024 14:09:42 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1709215783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AtBhQr7FmhanuzWboymHIeEbJr2jIDVgSgwTo8sTZ+Y=; b=KdHOK+Ta1BNaCO1DMxrGyY5lMObvyCDGVdN4X9TgS7aTKv6thNOy92uFgZWyxjbr08dlVL EN8p6blO5srv3wAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1709215783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AtBhQr7FmhanuzWboymHIeEbJr2jIDVgSgwTo8sTZ+Y=; b=LKr0UPMbZSbmOOBLb6dyH63P0aaiLXHUv6JSpPjlk0ySSQK+3vGYKpiqGwAjV+XHBI9aTi v+rOfi0z1JoLGDnero+IBrerE4JQ5SGwD1OeUoaGSXUaISxq4XO2zMJasflLu5hYNHj19D 6zfhZG5FAqeSo/SjdD+FcB2JL2rT6/W5dB1fpAQQiJBfLEgmbjGIqi3qohbF2B+aLKaGwS +KvzM1EycO/i18vCM52OalDRmrq2EO7PHwheltMuO9VQFT331jHhCW0OXksFQyHWFgFOvN 49B/zMwx7KALSrs8fvp1Q6KxQJu1qAcOpjCvnAytBJ69M9fchJiKo5KSrbDNjw== From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] samba: wsdd started and stopped when samba started or stopped Date: Thu, 29 Feb 2024 15:09:37 +0100 Message-ID: <20240229140937.15643-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: IXAPJ5UA62EKO455QS3I3HTJO5K2ZL2Q X-Message-ID-Hash: IXAPJ5UA62EKO455QS3I3HTJO5K2ZL2Q X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> Archived-At: <https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/message/IXAPJ5UA62EKO455QS3I3HTJO5K2ZL2Q/> List-Archive: <https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Owner: <mailto:development-owner@lists.ipfire.org> List-Post: <mailto:development@lists.ipfire.org> List-Subscribe: <mailto:development-join@lists.ipfire.org> List-Unsubscribe: <mailto:development-leave@lists.ipfire.org> |
Series |
samba: wsdd started and stopped when samba started or stopped
|
|
Commit Message
Adolf Belka
Feb. 29, 2024, 2:09 p.m. UTC
- Add wsdd as a dependency to samba so it will be installed together with samba - Add the starting and stopping of wsdd into the samba initscript Tested-by: Adolf Belka <adolf.belka@ipfire.org> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> --- lfs/samba | 4 ++-- src/initscripts/packages/samba | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
Comments
Hello, Hmm, I am not sure whether this change is too confusing… We normally don’t call one initscript from another one (at least I am not aware). Would it not be better if we have a check in the wsdd initscript and skip launching the daemon if samba isn’t running? Or should we simply throw away the wsdd initscript and launch the daemon in the samba initscript? Those options feel slightly cleaner to me. But since I lost the ball on this so badly, maybe I am overlooking the reason why you solved it this way. -Michael > On 29 Feb 2024, at 15:09, Adolf Belka <adolf.belka@ipfire.org> wrote: > > - Add wsdd as a dependency to samba so it will be installed together with samba > - Add the starting and stopping of wsdd into the samba initscript > > Tested-by: Adolf Belka <adolf.belka@ipfire.org> > Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> > --- > lfs/samba | 4 ++-- > src/initscripts/packages/samba | 6 +++++- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/lfs/samba b/lfs/samba > index 76088abfa..df7811313 100644 > --- a/lfs/samba > +++ b/lfs/samba > @@ -33,9 +33,9 @@ DL_FROM = $(URL_IPFIRE) > DIR_APP = $(DIR_SRC)/$(THISAPP) > TARGET = $(DIR_INFO)/$(THISAPP) > PROG = samba > -PAK_VER = 99 > +PAK_VER = 100 > > -DEPS = avahi cups perl-Parse-Yapp perl-JSON > +DEPS = avahi cups perl-Parse-Yapp perl-JSON wsdd > > SERVICES = samba > > diff --git a/src/initscripts/packages/samba b/src/initscripts/packages/samba > index 93f14cd29..99b9929cf 100644 > --- a/src/initscripts/packages/samba > +++ b/src/initscripts/packages/samba > @@ -42,6 +42,8 @@ case "$1" in > > boot_mesg "Starting winbind..." > loadproc /usr/sbin/winbindd > + > + /etc/rc.d/init.d/wsdd start > ;; > > stop) > @@ -53,7 +55,9 @@ case "$1" in > > boot_mesg "Stopping winbind..." > killproc /usr/sbin/winbindd > - ;; > + > + /etc/rc.d/init.d/wsdd stop > + ;; > > reload) > boot_mesg "Reloading smbd..." > -- > 2.44.0 >
Hi Michael, On 01/03/2024 17:17, Michael Tremer wrote: > Hello, > > Hmm, I am not sure whether this change is too confusing… > > We normally don’t call one initscript from another one (at least I am not aware). > > Would it not be better if we have a check in the wsdd initscript and skip launching the daemon if samba isn’t running? Or should we simply throw away the wsdd initscript and launch the daemon in the samba initscript? > > Those options feel slightly cleaner to me. But since I lost the ball on this so badly, maybe I am overlooking the reason why you solved it this way. I did think about putting the wsdd initscript start, stop & status options into the samba initscript but thought that would make the samba initscript much more complicated and if samba ends up adding the wsdd functionality into itself then we would have to clear it out of the samba initscript. However, I also thought it was a bit clunky to call an initscript from another initscript. I think the first option of skipping launching the wsdd daemon if samba isn't running wouldn't work so well if samba was then restarted because wsdd would then be stopped and would not get started. Daniel was looking at the situation of stopping the samba daemon and then modifying the workgroup name and then restarting samba. If wsdd is not also re-started then it will still have the old workgroup name and will not function correctly until it is also restarted. I think after your feedback, and thinking more about it, that adding the wsdd start, stop & status functions directly into the samba initscript, together with the ARGs etc functions, makes the most sense. I would also remove the service option from wsdd lfs file so that it does not get shown in the Addon Services page as it will no longer have its own initscript. So you would only ever see the samba service as being running or not. wsdd would be similar to I will do a v2 version of the change and re-submit. Regards, Adolf. > > -Michael > >> On 29 Feb 2024, at 15:09, Adolf Belka <adolf.belka@ipfire.org> wrote: >> >> - Add wsdd as a dependency to samba so it will be installed together with samba >> - Add the starting and stopping of wsdd into the samba initscript >> >> Tested-by: Adolf Belka <adolf.belka@ipfire.org> >> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >> --- >> lfs/samba | 4 ++-- >> src/initscripts/packages/samba | 6 +++++- >> 2 files changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/lfs/samba b/lfs/samba >> index 76088abfa..df7811313 100644 >> --- a/lfs/samba >> +++ b/lfs/samba >> @@ -33,9 +33,9 @@ DL_FROM = $(URL_IPFIRE) >> DIR_APP = $(DIR_SRC)/$(THISAPP) >> TARGET = $(DIR_INFO)/$(THISAPP) >> PROG = samba >> -PAK_VER = 99 >> +PAK_VER = 100 >> >> -DEPS = avahi cups perl-Parse-Yapp perl-JSON >> +DEPS = avahi cups perl-Parse-Yapp perl-JSON wsdd >> >> SERVICES = samba >> >> diff --git a/src/initscripts/packages/samba b/src/initscripts/packages/samba >> index 93f14cd29..99b9929cf 100644 >> --- a/src/initscripts/packages/samba >> +++ b/src/initscripts/packages/samba >> @@ -42,6 +42,8 @@ case "$1" in >> >> boot_mesg "Starting winbind..." >> loadproc /usr/sbin/winbindd >> + >> + /etc/rc.d/init.d/wsdd start >> ;; >> >> stop) >> @@ -53,7 +55,9 @@ case "$1" in >> >> boot_mesg "Stopping winbind..." >> killproc /usr/sbin/winbindd >> - ;; >> + >> + /etc/rc.d/init.d/wsdd stop >> + ;; >> >> reload) >> boot_mesg "Reloading smbd..." >> -- >> 2.44.0 >> >
diff --git a/lfs/samba b/lfs/samba index 76088abfa..df7811313 100644 --- a/lfs/samba +++ b/lfs/samba @@ -33,9 +33,9 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = samba -PAK_VER = 99 +PAK_VER = 100 -DEPS = avahi cups perl-Parse-Yapp perl-JSON +DEPS = avahi cups perl-Parse-Yapp perl-JSON wsdd SERVICES = samba diff --git a/src/initscripts/packages/samba b/src/initscripts/packages/samba index 93f14cd29..99b9929cf 100644 --- a/src/initscripts/packages/samba +++ b/src/initscripts/packages/samba @@ -42,6 +42,8 @@ case "$1" in boot_mesg "Starting winbind..." loadproc /usr/sbin/winbindd + + /etc/rc.d/init.d/wsdd start ;; stop) @@ -53,7 +55,9 @@ case "$1" in boot_mesg "Stopping winbind..." killproc /usr/sbin/winbindd - ;; + + /etc/rc.d/init.d/wsdd stop + ;; reload) boot_mesg "Reloading smbd..."