Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14381 - A change to samba's init script
Summary: A change to samba's init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-22 12:09 UTC by Dror Levin (RETIRED)
Modified: 2004-07-30 05:44 UTC (History)
1 user (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 Dror Levin (RETIRED) gentoo-dev 2003-01-22 12:09:39 UTC
When samba is turned off (during shutdown) the script says it cannot close
proccess xxxx (some number). By changing a few lines in the script I was able to
fix this.
Those lines are: (in the function stop)
Before:
start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid
and
start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid
I changed to:
start-stop-daemon --start --quiet --exec /usr/sbin/smbd
and
start-stop-daemon --start --quiet --exec /usr/sbin/nmbd

Doing this fixed the problem and samba nows starts and stopps normally.
Comment 1 Donny Davies (RETIRED) gentoo-dev 2003-01-22 12:54:52 UTC
_why_ is it not working on your system is the question.

it works fine here.  killing by PID is "more" correct.

im not accepting this.  you need to figure out why it's
not working for you, because it should be.
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-01-22 12:58:35 UTC
could be a new issue with sys-apps/baselayout-1.8.5.8
nice and some init script are not working property with this version
Comment 3 Donny Davies (RETIRED) gentoo-dev 2003-01-27 22:12:04 UTC
looks like this is FIXED on CVS in rc-scripts.
Comment 4 Guillaume Baudot 2004-07-30 05:44:53 UTC
I realized I could not start SAMBA no more yesterday: in fact, samba started without error, but there were no smbd/nmbd daemons running.
I did a modif to /etc/conf.d/samba too, but not the same.

Changed lines:
smbd_start="start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- ${smbd_start_options}"
nmbd_start="start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
To:
smbd_start="start-stop-daemon --start --verbose --exec /usr/sbin/smbd --make-pidfile \
--pidfile /var/run/samba/smbd.pid -- ${smbd_start_options}"
nmbd_start="start-stop-daemon --start --verbose --exec /usr/sbin/nmbd --make-pidfile \
--pidfile /var/run/samba/smbd.pid -- ${nmbd_start_options}"

And now that I created this /var/run/samba directory, everything works fine, /etc/init.d/samba start/stop run smoothly.