samba: fix the hardcoded path in init script
PATCH 1/1 samba: fix the hardcoded path in init script
From: Jackie Huang <[email protected]>
Replace the hardcoded path with base_bindir in init
script to fix the error:/etc/init.d/samba.sh: line 15: /usr/bin/ps: No such file or directory /etc/init.d/samba.sh: line 17: /usr/bin/sed: No such file or directory /etc/init.d/samba.sh: line 16: /usr/bin/grep: No such file or directory
--- meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 1 + 1 file changed, 1 insertion(+)
meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +1 -0
@@ -111,6 +111,7 @@ do_install_append() { -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \ -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \ -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \ + -e 's,/usr/bin,${base_bindir},g' \ -i ${D}${sysconfdir}/init.d/samba.sh fi
Signature · 1 line
1.9.1
Op 24-11-16 om 06:57 schreef [email protected]:
Quoted 13 lines
From: Jackie Huang <[email protected]>
Replace the hardcoded path with
base_bindirin init script to fix the
error:/etc/init.d/samba.sh: line 15:/usr/bin/ps: No such file or directory/etc/init.d/samba.sh: line 17:/usr/bin/sed: No such file or directory/etc/init.d/samba.sh: line 16:/usr/bin/grep: No such file or directorySigned-off-by Jackie Huang <[email protected]> ---meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 1 + 1 file changed, 1 insertion(+)
(quoted diff) +0
-0
Quoted 10 lines
b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb index e9694d4..6c1e3ef 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb @@ -111,6 +111,7 @@
do_install_append(){ -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \ -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \ -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \ + -e 's,/usr/bin,${base_bindir},g' \ -i${D}${sysconfdir}/init.d/samba.shfi
Wouldn't it be better to completely remove the absolute paths?
Quoted 22 lines
-----Original Message-----
From: [email protected] [mailto:openembedded-devel- [email protected]] On Behalf Of Koen Kooi
Sent: Thursday, November 24, 2016 6:40 PM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH] samba: fix the hardcoded path in init scriptOp 24-11-16 om 06:57 schreef [email protected]:
Quoted 12 lines
From: Jackie Huang <[email protected]>
Replace the hardcoded path with
base_bindirin init script to fix the
error:/etc/init.d/samba.sh: line 15:/usr/bin/ps: No such file or directory/etc/init.d/samba.sh: line 17:/usr/bin/sed: No such file or directory/etc/init.d/samba.sh: line 16:/usr/bin/grep: No such file or directorySigned-off-by Jackie Huang <[email protected]> ---meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 1 + 1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 11 lines
(quoted diff) +0
-0b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb index e9694d4..6c1e3ef 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb @@ -111,6 +111,7 @@
do_install_append(){ -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \ -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \ -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \ + -e 's,/usr/bin,${base_bindir},g' \ -i${D}${sysconfdir}/init.d/samba.shfiWouldn't it be better to completely remove the absolute paths?
Yeah, the absolute paths don't seem to be necessary, and I think this check in the init script is not needed as well:
if [ ! -d /usr/bin ]
then # /usr not mounted
exit
fi
I will make a path to remove them if you're agree.
Thanks,
Jackie
Quoted 6 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Op 26-11-16 om 07:26 schreef Huang, Jie (Jackie):
Quoted 39 lines
Quoted 22 lines
-----Original Message-----
From: [email protected] [mailto:openembedded-devel- [email protected]] On Behalf Of Koen Kooi
Sent: Thursday, November 24, 2016 6:40 PM
To: [email protected]
Subject: Re: [oe] [meta-networking][PATCH] samba: fix the hardcoded path in init scriptOp 24-11-16 om 06:57 schreef [email protected]:
Quoted 12 lines
From: Jackie Huang <[email protected]>
Replace the hardcoded path with
base_bindirin init script to fix the
error:/etc/init.d/samba.sh: line 15:/usr/bin/ps: No such file or directory/etc/init.d/samba.sh: line 17:/usr/bin/sed: No such file or directory/etc/init.d/samba.sh: line 16:/usr/bin/grep: No such file or directorySigned-off-by Jackie Huang <[email protected]> ---meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 1 + 1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 11 lines
(quoted diff) +0
-0b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb index e9694d4..6c1e3ef 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb @@ -111,6 +111,7 @@
do_install_append(){ -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \ -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \ -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba.sh,g' \ + -e 's,/usr/bin,${base_bindir},g' \ -i${D}${sysconfdir}/init.d/samba.shfiWouldn't it be better to completely remove the absolute paths?
Yeah, the absolute paths don't seem to be necessary, and I think this check in the init script is not needed as well:
Quoted 6 lines
if [ ! -d
/usr/bin]
then # /usr not mounted
exit
fiI will make a path to remove them if you're agree.
Yes, agree. Thanks for looking into this.