This is Solaris-10 x86. I am not able to start cron service, configured in FMRI. It is in maintenance and when I clear it, it seems like calling and failing on /etc/init.d/tcs-rtm script. I am not able to figure out, why cron is calling that script, if this failure is because of that. Cron should be independent of any custom script. And from where, I can get rid of this dependency ?
# svcs -p cron
STATE STIME FMRI
maintenance 16:08:03 svc:/system/cron:default
# svcadm clear svc:/system/cron:default
# cd /var/svc/log
# tail -f system-cron:default.log
[ Oct 18 16:09:00 Executing start method ("/etc/init.d/tcs-rtm start") ]
/export/home/routadm/sms911/cfg/sms911.smsiot-tpcapp1.rtmgr.sh
su: Sorry
[ Oct 18 16:09:04 Method "start" exited with status 0 ]
[ Oct 18 16:09:04 Stopping because all processes in service exited. ]
[ Oct 18 16:09:04 Executing stop method ("/etc/init.d/tcs-rtm stop") ]
This feature is not implemented
[ Oct 18 16:09:04 Method "stop" exited with status 0 ]
[ Oct 18 16:09:04 Executing start method ("/etc/init.d/tcs-rtm start") ]
/export/home/routadm/sms911/cfg/sms911.smsiot-tpcapp1.rtmgr.sh
su: Sorry
[ Oct 18 16:09:08 Method "start" exited with status 0 ]
[ Oct 18 16:09:08 Stopping because all processes in service exited. ]
[ Oct 18 16:09:08 Executing stop method ("/etc/init.d/tcs-rtm stop") ]
This feature is not implemented
[ Oct 18 16:09:08 Method "stop" exited with status 0 ]
[ Oct 18 16:09:08 Restarting too quickly, changing state to maintenance ]
# svcs -p cron
STATE STIME FMRI
maintenance 16:09:08 svc:/system/cron:default
#
# cat /etc/init.d/tcs-rtm <-------------------And this is the script
#!/bin/sh
####
# Copyright (c) 2008 XXXXXXXXXXX, Inc
# All Rights Reserved
#
# Name: /etc/init.d/tcs-rtm
# File: $Id$
# Build: $Date$
#
# Purpose: Startup Run Time Manager
####
TCS_USER="routadm"
TCS_APP_DIR="sms911"
TCS_APP_CFG=/export/home/${TCS_USER}/${TCS_APP_DIR}/cfg
_myhost=`uname -n`
TCS_SCRIPT=`ls $TCS_APP_CFG/*${_myhost}.rtmgr.sh | tail -1`
case "$1" in
start)
if [ -x ${TCS_SCRIPT} ]; then
echo ${TCS_SCRIPT}
su - routadm -c "${TCS_SCRIPT}"
else
echo "$TCS_SCRIPT not found..."
exit 1
fi
exit 0
;;
stop)
echo "This feature is not implemented"
;;
*)
echo "Usage: $0 [ start | stop ]" >&2
exit 1
;;
esac
###
# End
###
#