rcrun.sh
Joris Giovannangeli
joris at giovannangeli.fr
Fri Jan 31 13:40:32 PST 2014
Hi
I hitted an issue running rcstart smtpd, to start opensmtpd installed
from dports.
rcstart smtpd
smtpd depends on mail, current state: stopped
Here are the provide smtpd metada :
# PROVIDE: smtpd mail
# REQUIRE: LOGIN
# KEYWORD: shutdown
Actually, it fails in dostart function from sbin/rcrun/rcrun.sh
The functions does that :
buildrclist $i
for j in $rclist; do
need=1
for k in `rcorder -p $j`; do
if [ $k = $i ]; then
need=0
else
state=`varsym -s -q rcng_$k`
case X$state in
Xrunning*|Xconfigured*|Xirrelevant*|Xdisabled*)
;;
*)
echo "$i depends on $k, current state: $state"
_return=1
;;
esac
fi
done
done
rclist is the topological sorting of the dependency graph of the service
to start (in $i).
Hence, for each dependency, the script iterates the provide list
(rcorder -p) and check the status of the services in this list which are
not the service to start.
I see why you want to test if the dependency is running, but why testing
each provided service ?
regards,
joris
More information about the Users
mailing list