Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restarting too quickly, changing state to maintenance

807559Feb 15 2005 — edited Sep 18 2005
I'm trying to add a new resource to stop/start at reboot time. It's a single process that needs to be started, but everytime I enable the resource it keeps stopping and starting it until eventually it goes into maintenance saying "Restarting too quickly, changing state to maintenance".

I have the following in the /lib/svc/method (start) file :
#!/sbin/sh -xv
#
# Start method script for the xcom service

. /lib/svc/share/smf_include.sh

case "$1" in
'start')
if [ `pgrep xcomd` ]
then
echo "$0: XCOM is already running..."
exit $SMF_EXIT_ERR_NOSMF
fi

if [ -x /etc/xcomd ]
then
echo "Starting XCOM..."
/etc/xcomd
else
echo "XCOM is not installed or not executable..."
exit $SMF_EXIT_ERR_NOSMF
fi
;;

'stop')
if [ `pgrep xcomd` ]
then
echo "Stopping XCOM..."
/etc/xcomd -s
else
echo "XCOM is not running..."
fi
;;

esac

exit $SMF_EXIT_OK

And the following in /var/svc/manifest/application/xcom.xml :
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='application/xcomd' type='service' version='0'>
<create_default_instance enabled='true'/>
<single_instance/>
<dependency name='usr' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='/system/filesystem/minimal'/>
</dependency>
<exec_method name='start' type='method' exec='/lib/svc/method/xcomd %m' timeout_seconds='60'>
<method_context/>
</exec_method>
<exec_method name='stop' type='method' exec='/lib/svc/method/xcomd %m' timeout_seconds='60'>
<method_context/>
</exec_method>
<stability value='Unstable'/>
<template>
<common_name>
<loctext xml:lang='C'>XCOM file transfer program</loctext>
</common_name>
<documentation>
<manpage title='xcomd' section='8'/>
<manpage title='xcomcfg' section='8'/>
</documentation>
</template>
</service>
</service_bundle>

Any ideas where this is going wrong??? I've pulled the manifest file togeher looking at other things so I'm not surprised if there's errors in there. Any help greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2005
Added on Feb 15 2005
6 comments
6,038 views