Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Joshua G Lock <joshua.g.lock@linux.intel.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-networking][PATCH][jethro] samba: fix smbd and nmbd paths in sysv initscript
Date: Thu, 28 Apr 2016 13:52:24 +0100	[thread overview]
Message-ID: <1461847944.3302.20.camel@linux.intel.com> (raw)
In-Reply-To: <1461846639-9563-1-git-send-email-richard.leitner@skidata.com>

On Thu, 2016-04-28 at 14:30 +0200, Richard Leitner wrote:
> For the jethro branch.

Any idea whether this change is required in the master branch?

> The sysv initscript provided by samba assumes smbd and nmbd are
> installed in /opt/samba/bin/. In our case both binaries are installed
> to
> /usr/sbin/ by default. Therefore fix these paths.

Rather than hard-code these in a patch, which is equally broken for
people who don't use the default sbindir, it would make more sense to
sed ${sbindir} into the init file in a do_install_append ().

This is a fairly common pattern so you should be able to find several
examples, i.e. the bind recipe in OE-Core.

Regards,

Joshua

> 
> Furthermore fix the name of the initscript in its usage text.
> 
> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
> ---
>  .../samba-4.1.12/22-fix-sysv-init-script.patch     | 23
> ++++++++++++++++++++++
>  .../recipes-connectivity/samba/samba_4.1.12.bb     |  1 +
>  2 files changed, 24 insertions(+)
>  create mode 100644 meta-networking/recipes-connectivity/samba/samba-
> 4.1.12/22-fix-sysv-init-script.patch
> 
> diff --git a/meta-networking/recipes-connectivity/samba/samba-
> 4.1.12/22-fix-sysv-init-script.patch b/meta-networking/recipes-
> connectivity/samba/samba-4.1.12/22-fix-sysv-init-script.patch
> new file mode 100644
> index 0000000..aec3262
> --- /dev/null
> +++ b/meta-networking/recipes-connectivity/samba/samba-4.1.12/22-fix-
> sysv-init-script.patch
> @@ -0,0 +1,23 @@
> +--- a/packaging/sysv/samba.init
> ++++ b/packaging/sysv/samba.init
> +@@ -21,17 +21,14 @@
> + case "$1" in
> + 
> + 'start')
> +-#
> +-# Edit these lines to suit your installation (paths, workgroup,
> host)
> +-#
> +-   /opt/samba/bin/smbd -D -s/opt/samba/smb.conf
> +-   /opt/samba/bin/nmbd -D -l/opt/samba/log -s/opt/samba/smb.conf
> ++   /usr/sbin/smbd -D -s/etc/samba/smb.conf
> ++   /usr/sbin/nmbd -D -l/var/volatile/log/samba
> -s/etc/samba/smb.conf
> +    ;;
> + 'stop')
> +    killproc nmbd
> +    killproc smbd
> +    ;;
> + *)
> +-   echo "Usage: /etc/init.d/samba.server { start | stop }"
> ++   echo "Usage: /etc/init.d/samba.sh { start | stop }"
> +    ;;
> + esac
> diff --git a/meta-networking/recipes-
> connectivity/samba/samba_4.1.12.bb b/meta-networking/recipes-
> connectivity/samba/samba_4.1.12.bb
> index 863d783..a6c5935 100644
> --- a/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
> +++ b/meta-networking/recipes-connectivity/samba/samba_4.1.12.bb
> @@ -34,6 +34,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-
> ${PV}.tar.gz \
>             file://19-systemd-daemon-is-contained-by-libsystemd.patch 
> \
>             file://20-do-not-import-target-module-while-cross-
> compile.patch \
>             file://21-add-config-option-without-valgrind.patch \
> +           file://22-fix-sysv-init-script.patch \
>            "
>  
>  SRC_URI[md5sum] = "232016d7581a1ba11e991ec2674553c4"
> -- 
> 2.1.4
> 


  reply	other threads:[~2016-04-28 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 12:30 [meta-networking][PATCH][jethro] samba: fix smbd and nmbd paths in sysv initscript Richard Leitner
2016-04-28 12:52 ` Joshua G Lock [this message]
2016-04-28 13:59   ` Richard Leitner

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=1461847944.3302.20.camel@linux.intel.com \
    --to=joshua.g.lock@linux.intel.com \
    --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