From: Koen Kooi <koen@dominion.thruhere.net>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-networking][PATCH 15/17] samba: start on boot with systemd
Date: Wed, 30 Nov 2016 14:37:47 +0100 [thread overview]
Message-ID: <o1mkn6$rfm$1@blaine.gmane.org> (raw)
In-Reply-To: <1c186b85-ef2f-df75-edfd-b0f15198d43c@opendreambox.org>
Op 30-11-16 om 13:53 schreef Andreas Oberritter:
> On 30.11.2016 13:24, Koen Kooi wrote:
>> Op 30-11-16 om 13:04 schreef Andreas Oberritter:
>>> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>>> ---
>>> meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
>>> index c2bbb97..b781f7c 100644
>>> --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
>>> +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
>>> @@ -36,6 +36,10 @@ SYSVINITTYPE = "sysv"
>>> INITSCRIPT_NAME = "samba"
>>> INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ."
>>>
>>> +SYSTEMD_PACKAGES = "${PN}-base winbind"
>>> +SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service"
>>> +SYSTEMD_SERVICE_winbind = "winbind.service"
>>
>> Do these actually work nowadays? When I tried it recently I had to change the
>> units into this to actually start:
>
> Yes, it works for me.
Great!
>
>> # cat /lib/systemd/system/smb.service
>> [Unit]
>> Description=Samba SMB Daemon
>> After=syslog.target network.target nmb.service winbind.service
>>
>> [Service]
>> Type=simple
>> LimitNOFILE=16384
>> EnvironmentFile=-/etc/sysconfig/samba
>> ExecStart=/usr/sbin/smbd $SMBDOPTIONS
>> ExecReload=/bin/kill -HUP $MAINPID
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> And worse, samba fails to start if there's no network interface up, so I start
>> smb.service using this timer to avoid races:
>>
>> # cat /lib/systemd/system/smb.timer
>> [Unit]
>> Description=Samba timer
>>
>> [Timer]
>> # Time to wait after booting before we run first time
>> OnBootSec=2min
>> Unit=smb.service
>>
>> [Install]
>> WantedBy=multi-user.target
>
> I can reproduce this. It would be easier to depend on network-online.target.
That thought crossed me mind as well, but I haven't tried it yet.
regards,
Koen
next prev parent reply other threads:[~2016-11-30 13:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 12:03 [meta-networking][PATCH 01/17] samba: use default packaging rules for -dbg and -dev packages Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 02/17] samba: remove unneeded conditionals for sysvinit and systemd Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 03/17] samba: use systemd_system_unitdir variable Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 04/17] samba: remove superflous listing of pam_smbpass.so Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 05/17] samba: install all systemd unit files Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 06/17] samba: rename initscript from 'samba.sh' to more common 'samba' Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 07/17] samba: install systemd units and initscripts unconditionally Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 08/17] samba: remove unused variable DISABLE_STATIC Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 09/17] samba: add smbclient package Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 10/17] samba: install manpages Andreas Oberritter
2016-11-30 12:03 ` [meta-networking][PATCH 11/17] samba: simplify files list for samba-python Andreas Oberritter
2016-11-30 12:04 ` [meta-networking][PATCH 12/17] samba: split libraries into their own packages Andreas Oberritter
2016-11-30 12:04 ` [meta-networking][PATCH 13/17] samba: add packages samba-dsdb-modules, samba-testsuite and registry-tools Andreas Oberritter
2016-11-30 12:04 ` [meta-networking][PATCH 14/17] samba: move /etc/sysconfig to more common /etc/default, package tmpfiles.d in samba-common Andreas Oberritter
2016-11-30 12:04 ` [meta-networking][PATCH 15/17] samba: start on boot with systemd Andreas Oberritter
2016-11-30 12:24 ` Koen Kooi
2016-11-30 12:53 ` Andreas Oberritter
2016-11-30 13:37 ` Koen Kooi [this message]
2016-11-30 12:04 ` [meta-networking][PATCH 16/17] samba: simplify LSB handling Andreas Oberritter
2016-11-30 12:04 ` [meta-networking][PATCH 17/17] Revert "samba: blacklist, fails to build with new binutils-2.27" Andreas Oberritter
2016-11-30 12:22 ` Andreas Müller
2016-11-30 12:37 ` Andreas Oberritter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='o1mkn6$rfm$1@blaine.gmane.org' \
--to=koen@dominion.thruhere.net \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox