<?xml version="1.0"?>
<resource-agent version="rgmanager 2.0" name="samba">
    <version>1.0</version>

    <longdesc lang="en">
    	Dynamic smbd/nmbd resource agent
    </longdesc>
    <shortdesc lang="en">
    	Dynamic smbd/nmbd resource agent
    </shortdesc>

    <parameters>
        <parameter name="name" unique="1" primary="1">
            <longdesc lang="en">
                Samba Symbolic Name.
            </longdesc>
            <shortdesc lang="en">
                Samba Name
            </shortdesc>
	    <content type="string"/>
        </parameter>

        <parameter name="config_file">
            <longdesc lang="en">
                Define absolute path to configuration file
            </longdesc>
            <shortdesc lang="en">
                Config File
            </shortdesc>
	    <content type="string" default="/etc/samba/smb.conf"/>
        </parameter>

	<parameter name="smbd_options">
		<longdesc lang="en">
			Other command-line options for smbd
		</longdesc>
		<shortdesc lang="en">
			Other command-line options for smbd
		</shortdesc>
		<content type="string" />
	</parameter>

	<parameter name="nmbd_options">
		<longdesc lang="en">
			Other command-line options for nmbd
		</longdesc>
		<shortdesc lang="en">
			Other command-line options for nmbd
		</shortdesc>
		<content type="string" />
	</parameter>

	<parameter name="shutdown_wait">
		<longdesc lang="en">
			Wait X seconds for correct end of service shutdown
		</longdesc>
		<shortdesc lang="en">
			Wait X seconds for correct end of service shutdown
		</shortdesc>
		<content type="integer" />
	</parameter>

        <parameter name="service_name" inherit="service%name">
            <longdesc lang="en">
	    	Inherit the service name.  We need to know
		the service name in order to determine file
		systems and IPs for this smb service.
            </longdesc>
            <shortdesc lang="en">
	    	Inherit the service name.
            </shortdesc>
	    <content type="string"/>
        </parameter>
    </parameters>

    <actions>
        <action name="start" timeout="0"/>
        <action name="stop" timeout="0"/>

	<!-- This is just a wrapper for LSB init scripts, so monitor
	     and status can't have a timeout, nor do they do any extra
	     work regardless of the depth -->
        <action name="status" interval="30s" timeout="0"/>
        <action name="monitor" interval="30s" timeout="0"/>

        <action name="meta-data" timeout="0"/>
        <action name="validate-all" timeout="0"/>
    </actions>
</resource-agent>
