#!/bin/ksh
#
# script2uls
#
# script2uls startet script und sorgt per named-pipe dafr, dass
# die Datei nich gendert werden kann.
#
# Aufruf:
# script2uls <filename> <hostname> <Section> <Teststep> <Detail> <date time>
#################################################################
#
if [ $# -ne 6 ]
 then
  echo "usage: $0 <filename> <hostname> <Section> <Teststep> <Detail> <date time>"
  exit 1
fi
#
mkfifo -m 600 /tmp/$1.$$.fifo
#
sudo -u root /usr/local/bin/send_script2uls /tmp/$1.$$ "$2" "$3" "$4" "$5" "$6" &
#
echo
echo "****************************************************"
echo "* Alle Aktionen werden aufgezeichnet und gesichert *"
echo "****************************************************"
echo
/usr/bin/script -a /tmp/$1.$$.fifo
rm -f /tmp/$1.$$.fifo
