#!/bin/sh
set -e
# compute OLR from FSLO FLA FLG
if [ $# -ne 5 ] ; then
  echo "Error in $0: invalid number of arguments $#"
  exit 1
fi

pfx=$1
fla=$2
fslo=$3
flg=$4
olr=$5

release fslo fla flg
access  fslo ${pfx}_${fslo}
access  fla  ${pfx}_${fla}
access  flg  ${pfx}_${flg}

add fla flg flag
sub fslo flag ${pfx}_${olr}

release fslo fla flg flag
