Skip to content

Commit

Permalink
fix report
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Davidsaver committed Feb 24, 2012
1 parent 7637bba commit dd9fc01
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manage-iocs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ reportone() {
conserver) # no header
;;
*)
printf "%-15s| %-15s| %-15s|%5s | %s\n" BASE IOC USER PORT EXEC
printf "%-15s| %-15s| %-15s| %5s | %s\n" BASE IOC USER PORT EXEC
;;
esac
export HEADER=1
Expand All @@ -55,6 +55,7 @@ reportone() {
unset EXEC USER HOST
PORT=0
local INSTBASE="$1"
CHDIR="$1"
. "$1/config"
USER="${USER:-${IOC}}"
EXEC="${EXEC:-${INSTBASE}/st.cmd}"
Expand All @@ -68,12 +69,12 @@ reportone() {
;;
all)
[ -n "$HOST" ] || HOST="<anywhere>"
printf "%-15s| %-15s| %-15s| %-15s|%5s | %s\n" $BASE $HOST $IOC $USER $PORT $EXEC
printf "%-15s| %-15s| %-15s| %-15s| %5s | %s\n" $BASE $HOST $IOC $USER $PORT $EXEC
;;
*)
[ "$HOST" != "$(hostname -s)" -a "$HOST" != "$(hostname -f)" -a -n "$HOST" ] && return 0
[ -n "$HOST" ] || HOST="<anywhere>"
printf "%-15s| %-15s| %-15s|%5s | %s\n" $BASE $IOC $USER $PORT $EXEC
printf "%-15s| %-15s| %-15s| %5s | %s\n" $BASE $IOC $USER $PORT $EXEC
;;
esac
}
Expand Down

0 comments on commit dd9fc01

Please sign in to comment.