# HG changeset patch
# User Vadym Chepkov <[email protected]>
# Date 1278256091 14400
# Node ID 392124a558d694e9be9cc56112f10bf132207cd3
# Parent  3d7764fb2d80cf3c095333cfd11103e6c1f91c47
local_start_script parameter

Filesystem RA doesn't support quotas. I assume it's to keep it generic enough
I suggest adding another parameter, local_start_script, to be run after 
filesystem was mounted.
This would allow to enable quotas, create some custom symbolic links, etc.

diff -r 3d7764fb2d80 -r 392124a558d6 heartbeat/Filesystem
--- a/heartbeat/Filesystem      Thu Jul 01 22:22:29 2010 +0200
+++ b/heartbeat/Filesystem      Sun Jul 04 11:08:11 2010 -0400
@@ -17,6 +17,7 @@
 #              OCF_RESKEY_options
 #              OCF_RESKEY_statusfile_prefix
 #              OCF_RESKEY_run_fsck
+#              OCF_RESKEY_local_start_script
 #
 #OCF_RESKEY_device    : name of block device for the filesystem. e.g. 
/dev/sda1, /dev/md0
 #                      Or a -U or -L option for mount, or an NFS mount 
specification
@@ -25,6 +26,7 @@
 #OCF_RESKEY_options   : options to be given to the mount command via -o
 #OCF_RESKEY_statusfile_prefix : the prefix used for a status file for 
monitoring
 #OCF_RESKEY_run_fsck  : fsck execution mode: auto(default)/force/no
+#OCF_RESKEY_local_start_script : a script to run after filesystem was mounted
 #
 #
 # This assumes you want to manage a filesystem on a shared (SCSI) bus,
@@ -165,6 +167,14 @@
 <content type="string" default="auto" />
 </parameter>
 
+<parameter name="local_start_script">
+<longdesc lang="en">
+A script to execute after filesystem was mounted
+</longdesc>
+<shortdesc lang="en">local_start_script</shortdesc>
+<content type="string" default="" />
+</parameter>
+
 </parameters>
 
 <actions>
@@ -502,6 +512,16 @@
                fi
                return $OCF_ERR_GENERIC
        fi
+
+       if [ -n "${OCF_RESKEY_local_start_script}" ]; then
+               script_output="$(${OCF_RESKEY_local_start_script} 2>&1)"
+               script_rc=$?
+               if [ $script_rc -ne $OCF_SUCCESS ]; then
+                       ocf_log err "Local start script 
${OCF_RESKEY_local_start_script} for $MOUNTPOINT returned $script_rc with 
output: ${script_output}"
+                       return $OCF_ERR_GENERIC
+               fi
+       fi
+       
        return $OCF_SUCCESS
 }
 # end of Filesystem_start
@@ -888,6 +908,10 @@
                # file monitoring.
        fi
 
+        if [ -n "${OCF_RESKEY_local_start_script}" ]; then
+               check_binary ${OCF_RESKEY_local_start_script}
+       fi
+
        #TODO: How to check the $options ?
        return $OCF_SUCCESS
 }
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to