Does anyone know of a way to script this?
The idea being that using raspbmc / hdmi to TV / Tv USB to Pi mini USB (with a battery for buffer)...
You could have your Pi running off the tv's usb. When the TV powers down the pi uses the battery, detects the lack of power or lack of hdmi output and shuts itself down.
Ideas?