Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286738 - net-fs/samba-3.3.17 init script won't start individual packages
Summary: net-fs/samba-3.3.17 init script won't start individual packages
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
: 253796 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-28 09:39 UTC by David Williams
Modified: 2016-10-10 19:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams 2009-09-28 09:39:12 UTC
By creating links to the samba init script called samba.smbd, samba.nmbd or samba.winbindd you should be able to start the daemons individually but it doesn't work.

Reproducible: Always

Steps to Reproduce:
1. cd /etc/init.d
2. ln -s samba samba.nmbd
3. /etc/init.d/samba.nmbd start

Actual Results:  
nmbd doesn't start

Expected Results:  
nmbd should start!!!

The problem is that the linked scripts are attempting to read /etc/conf.d/<linkname> (in this cate /etc/conf.d/samba.nmbd) for their environment info and it doesn't exist. To resolve this replace this section in the script:

DAEMONNAME="${SVCNAME##samba.}"
[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}

with:

DAEMONNAME="${SVCNAME##samba.}"
[ "${DAEMONNAME}" != "samba" ] && source /etc/conf.d/samba
[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}

or perhaps something far more elegant and clever:) as this may an example of a general problem with links to scripts.
Comment 1 Patrick Lauer gentoo-dev 2009-11-05 21:52:05 UTC
*** Bug 253796 has been marked as a duplicate of this bug. ***
Comment 2 Tomás Touceda (RETIRED) gentoo-dev 2009-11-05 22:46:59 UTC
I've tried to reproduce this.

I've added TEST="some var" to /etc/conf.d/samba
Then I've made the symlink to samba.nmbd, and at the beginning of the start phase I've put:

start() {
         einfo ${TEST}
         ...
}

And then running:

# /etc/init.d/samba.nmbd start
* Caching service dependencies...                                                   [ ok ]
* some var
...

The same happened with a dummy script.
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2016-10-10 19:58:49 UTC
No longer applies, samba 4 init scripts are way different