Internally opensafd creates a lock file during start/stop to avoid parallel execution. To allow others to query the state this ticket will use the opensafd lockfile to report the status of start/stop when requested with "opensafd status" --- src/nid/opensafd.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/nid/opensafd.in b/src/nid/opensafd.in index e7683bd7e..c93cca7e1 100644 --- a/src/nid/opensafd.in +++ b/src/nid/opensafd.in @@ -326,8 +326,14 @@ forcereload() { } status() { + amfpid=`pidofproc -p $amfnd_pid $amfnd_bin` - if [ -n "$amfpid" ]; then + + if [ -e "$lockfile_inprogress" ]; then + echo "Lockfile taken, OpenSAF start/stop is in progress" + # LSB defines 150-199 as application reserved exit codes + RETVAL=150 + elif [ -n "$amfpid" ]; then amf-state siass ha RETVAL=$? else -- 2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel