#!/bin/sh

if [ $UID = 0 ]; then
        CHECK='./check'
else
        CHECK='sudo ./check'
fi

cat <<-EOF

This example shows how you can use RTAI to install an interrupt
handler to simulate a higher tick for a Linux process
communicating with RTAI by using full two way rtai system
requests. 

Type <return> to install modules"
EOF
read junk
sync

../../scripts/rt_modprobe ex_sysreq.o

echo "Now start the application"
echo "To stop the application type Ctrl-C"
echo "Type <return> to continue"
read junk

$CHECK

echo " "
echo "Type <return> to remove modules"
read junk

../../scripts/rt_rmmod ex_sysreq

