Skip to content

camViewer iocInfo function doesn't always set ioc correctly #289

@KaushikMalapati

Description

@KaushikMalapati

This function (and iocfpv) is only used for enabling and disabling iocs

iocfpv() {
grep_pv "$1" | sed -n 's/\/reg\/d\/iocData\/\(\S*\)\/iocInfo/\1/p'
}
iocinfo() {
for ioc in $(iocfpv "$CAMPVFULL:IMAGE1"); do
INFO=$(grep_ioc "$ioc" all | grep "id:'$ioc'")
if [ -n "$INFO" ]; then
iochutch=$(echo "$INFO" | cut -d'/' -f7)
fi
done
}

The loop variable is used as the ioc name for imgr, which will always be the last value in the loop. It should probably be set at the same time as iochutch for consistency and return early.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions