Hi, I made a modification to the samba script for stopping the daemon. Sometimes the nmbd is not started and then it is not possible to stop via init script even the process smbd. Fixed this in the script by reading the 'ps ax' and checking the pid-files, too. This is working fine. Would be great if this still works in future ebuids. Regards Sascha --- my modified stop() part ----------- stop() { ebegin "Stopping samba" ebegin " smbd" filepsid=$(cat /var/run/samba/smbd.pid) # echo "smbd should run on ps: $filepsid" psid=$(ps -p $filepsid | tail -1 | cut -d ' ' -f 2) # echo $psid if [ "$filepsid" = "$psid" ] ; then start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid result=$? else echo " ...was not running." echo "" > /var/run/samba/smbd.pid fi ebegin " nmbd" filepsid=$(cat /var/run/samba/nmbd.pid) # echo "nmbd should run on ps: $filepsid" psid=$(ps -p $filepsid | tail -1 | cut -d ' ' -f 2) # echo $psid if [ "$filepsid" = "$psid" ] ; then start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid result=$(( $result + $? )) else echo " ...was not running." echo "" > /var/run/samba/nmbd.pid fi eend $result }
Created attachment 17683 [details] full script with modified stop function
I dont like this. Why arent your daemons running I wonder?
i dont think theres a bug here!