[oe] [meta-networking][PATCH][jethro] samba: fix smbd and nmbd paths in sysv initscript
Joshua G Lock
joshua.g.lock at linux.intel.com
Thu Apr 28 12:52:24 UTC 2016
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 at 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
>
More information about the Openembedded-devel
mailing list