#!/bin/bash exit 0 LOG=/var/tmp/emit.log echo "emit_cards_up.sh: `date` - starting" >> $LOG while [ 1 ]; do # return 0 if adapter1 dir exists / cards have all finished loading test -d /dev/dvb/adapter1 if [ $? == 0 ]; then echo "emit_cards_up.sh: `date` - all tuners up (time to emit)" >> $LOG sudo initctl emit cards_up echo "emit_cards_up.sh: `date` - done" >> $LOG exit 0 fi sleep 1 done