path: sanlock_4.2.0-1/init.d/fence_sanlockd fi PID=$(pidofproc -p $runfile $prog) # We have to use SIGHUP to mean stop because sanlock path: sanlock_4.2.0-1/README.rst a shared lease (SH) on the second resource. # export P=`pidof sleep` # sanlock client acquire -r test:RA:/dev/leases:1048576 -p $P # sanlock client acquire -r test:RB:/dev/leases:2097152:SH -p $P path: sanlock_4.2.0-1/README.rst ond resource will succeed. # export P=`pidof sleep` # sanlock client acquire -r test:RA:/dev/leases:1048576 -p $P # sanlock client acquire -r test:RB:/dev/leases:2097152:SH -p $P path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in # make sure fence_sanlockd is alive [ -z "$(pidof fence_sanlockd)" ] && { logger -t $prog "on fence_sanlockd stopped running" return 1 path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in read_leader || return 1 [ -z "$(pidof fence_sanlockd)" ] && { logger -t $prog "on fence_sanlockd is not running" return 1 path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in loop=$(($loop+1)) tmp_pid="$(pidof fence_sanlockd)" [ -z "$tmp_pid" ] && { logger -t $prog "fence_sanlockd not running" path: sanlock_4.2.0-1/fence_sanlock/fence_sanlock.in } pid="$(pidof fence_sanlockd)" [ -z "$pid" ] && { logger -t $prog "Unable to determine fence_sanlockd pid" path: sanlock_4.2.0-1/init.d/sanlock stop() { PID=$(pidofproc -p $runfile $prog) echo -n $"Sending stop signal $prog ($PID): "