[NTLUG:Discuss] script hang

Kyle Davenport Kyle_Davenport at compusa.com
Wed Mar 9 10:28:18 CST 2005


*** Authentication Certificate ***

I got a cool hack working that allows me to record almost all the channels
off my Comcast HD Digital Cable box (the Motorola DCT 6200) over firewire
to my linux HTPC.   It works for most of the HD channels too.

It's tricky now because it involves fooling the 6200 into seeing a DVHS on
the firewire bus.  Step 1 is "modprobe raw1394".  Then start a loop in the
background of "dvcont record" which retries on failure until it succeeds.
While that's running I run "ddr1394".  The trick is that the ddr1394 more
often then not fails and loops spewing an error condition.  If I cntl-C it,
and retry the "ddr1394", it will usually start working in 2-5 times.

Since I've been scripting for some 25 years now, I thought, fine, I will
just duplicate that whole process with a script.  I tried

while :; do
      eval 'ddr1394 >out 2>err &'
      pid=$!
      sleep 3
      if errorstring in err; then
            kill $pid
      else
            break
      fi
done
until killed ; do keep on recording; done


somehow this doesn't work at all!  I don't understand why this doesn't
duplicate what I'm doing manually.   Instead, when I try to kill it, the
ddr1394 locks the bus, and the only way out is a reboot.

Any clues?
Kyle

P.S. Do not bore me with comments about "stealing copyrighted material".
It is a legal requirement that cable companies provide firewire output that
can be recorded by DVHS's.  If your box does not have firewire output, the
cable companies are required to provide you one that does for free (when
you ask them for it).







More information about the Discuss mailing list