>>> Dejan Muhamedagic <de...@suse.de> 2012-12-13 下午 17:33 >>>
>This might be a bit better: > ># set default options >local opts="-f -v" > ># add option for notify_retry_time, if set >if [ -n "$OCF_RESKEY_nfs_notify_retry_time" ]; then > if ! ocf_is_decimal "$OCF_RESKEY_nfs_notify_retry_time"; then > ocf_log err "Invalid OCF_RESKEY_nfs_notify_retry_time > [$OCF_RESKEY_nfs_notify_retry_time]" > return $OCF_ERR_CONFIGURED > fi > opts="$opts -m $OCF_RESKEY_nfs_notify_retry_time" >fi > ># run in foreground, if requested >if ocf_is_true "$OCF_RESKEY_nfs_notify_foreground"; then > opts="$opts -d" >fi >What do you say? You are right, the default value of retry_time should be "". A little adjustment, please see the code 229 line of nfsserver: ${OCF_RESKEY_nfs_notify_cmd} $opts $ip -P /var/lib/nfs/sm.ha $ip is the optarg of -v, so the code may be: # set default options local opts="-f -v" # add option for notify_retry_time, if set if [ -n "$OCF_RESKEY_nfs_notify_retry_time" ]; then if ! ocf_is_decimal "$OCF_RESKEY_nfs_notify_retry_time"; then ocf_log err "Invalid OCF_RESKEY_nfs_notify_retry_time [$OCF_RESKEY_nfs_notify_retry_time]" return $OCF_ERR_CONFIGURED fi opts="-m $OCF_RESKEY_nfs_notify_retry_time $opts" fi # run in foreground, if requested if ocf_is_true "$OCF_RESKEY_nfs_notify_foreground"; then opts="-d $opts" fi Best regards, John
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/