Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/camViewer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is checking for the console machines still sufficient? Don't we need to include the XBDO machine in 901 in this list? Ideally, we'd check for the network interfaces instead of listing machines, but that could be an improvement pull request for later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, this could do a little more without much extra effort

Let's include just the xbdo machine for now since that one definitely doesn't need an ssh, putting in another name is trivial, and it will have immediate helpful impact.

Later we can check our interface list as you say- this would mostly be for running camViewer on ioc machines at this point, but it would future-proof us for certain configuration changes/additional consoles

Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ if [ "$CAMNUM" -eq 0 ]; then
CAMNAME=GigE_Questar1
elif [ "$hutch" = "lfe" ]; then
CAMNAME=xrt_spec
elif [ "$hutch" = "xrt" ]; then
CAMNAME=xrt_spec
elif [ "$hutch" = "ued" ]; then
CAMNAME=ued-gige-01
else
Expand Down Expand Up @@ -385,13 +387,14 @@ else
fi

if [[ -z "$IS_REMOTE_SSH" ]]; then
if [ "$hutch" == "kfe" ]; then
current_host="$(hostname)"
if [[ "$hutch" == "kfe" && "$current_host" != "kfe-console" && "$current_host" != "xbdo-control" ]]; then
echo "Not in SSH, connecting to kfe-console..." >&2
ssh -t kfe-console "IS_REMOTE_SSH=1 $EXE --camerapv '$CAMPVFULL' --instrument '$hutch' --pvlist '$PVLIST' --rate '$RATE' ; bash"
exit_status=$?
echo "SSH exit status: $exit_status" >&2
exit $exit_status
elif [ "$hutch" == "lfe" ]; then
elif [[ ("$hutch" == "lfe" || "$hutch" == "xrt") && "$current_host" != "lfe-console" && "$current_host" != "xbdo-control" ]]; then
echo "Not in SSH, connecting to lfe-console..." >&2
ssh -t lfe-console "IS_REMOTE_SSH=1 $EXE --camerapv '$CAMPVFULL' --instrument '$hutch' --pvlist '$PVLIST' --rate '$RATE' ; bash"
exit_status=$?
Expand Down
2 changes: 1 addition & 1 deletion scripts/verify-hutch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ ($1 == "--help") || ($1 == "-h") ]]; then
fi

hutch=${1,,}
for i in "tmo" "txi" "rix" "xpp" "xcs" "mfx" "cxi" "mec" "ued" "ued" "det" "lfe" "kfe" "tst" "las" "hpl"; do
for i in "tmo" "txi" "rix" "xpp" "xcs" "mfx" "cxi" "mec" "ued" "ued" "det" "lfe" "kfe" "xrt" "tst" "las" "hpl"; do
if [[ $hutch == "$i" ]]; then
exit 0
fi
Expand Down