From 1acdd8020a1acdc161ebc56ac1a0809ecf8b95fc Mon Sep 17 00:00:00 2001
From: Erik von Reis <evonreis@caltech.edu>
Date: Tue, 23 Nov 2021 13:45:47 -0800
Subject: [PATCH] rtcds Remove unneeded checks for starting and stopping
 models.

If models are already started when requested to start, there's no need to check. Systemd won't mind another request to start.
Removing these checks allows the user to specify a list of models to start, stop or restart, and not have to worry if some of them are already
in the requested state.
---
 NEWS                 | 1 +
 support/bin/rtcds.in | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index c39ca8fa7..ab4215e56 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Changes for NEXT
 - Fixed virtualIOP parameter.  Virtual IOPs now build and run.
 - Fixed bug that leads to incorrect ordering of calculations, adding unneeded latency.
 - 'rtcds restart --all' fixed to also restart IOP model.
+- rtcds will now start every model listed on the command line even if some models are already started
 ==================================================================================================
 Changes for 4.2.3
 ==================================================================================================
diff --git a/support/bin/rtcds.in b/support/bin/rtcds.in
index fe88cd898..15f87731f 100755
--- a/support/bin/rtcds.in
+++ b/support/bin/rtcds.in
@@ -632,7 +632,6 @@ case $cmd in
 	if [[ -n $ALL_FLAG ]] ; then
 	    start_sys $(list_host_sys)
 	elif [[ $1 ]] ; then
-	    check_host_sys_inactive $@
 	    start_sys $@
 	else
 	    log "You must specify at least one system to start (or '--all')."
@@ -645,7 +644,6 @@ case $cmd in
 	    stop_sys $(list_host_sys | tac)
 	    start_sys $(list_host_sys)
 	elif [[ $1 ]] ; then
-	    check_host_sys_active $@
 	    stop_sys $@
 	    start_sys $@
 	else
@@ -658,7 +656,6 @@ case $cmd in
 	    # we do this in reverse so the IOP is stopped last
 	    stop_sys $(list_host_sys | tac)
 	elif [[ $1 ]] ; then
-	    check_host_sys_active $@
 	    stop_sys $@
 	else
 	    log "You must specify at least one system to stop (or '--all')."
-- 
GitLab