#!/bin/bash # mv the TiVo /etc/rc.d/rc.sysinit to rc.sysinit.original # place your custom rc.sysinit in /etc/rc.d/rc.sysinit.tivohack # symlink rc.sysinit with this script (rc.sysinit.menuboot) # change the TIVOHACK_DIR variable if you need to TIVOHACK_DIR=../../tivohack . $TIVOHACK_DIR/etc/tivohack.conf . $TIVOHACK_FUNCTIONS echo "Starting TiVoHack Boot on $SERIAL_DEV" DEFAULT=$MENUBOOT_DEFAULT TIMEOUT=$MENUBOOT_TIMEOUT $EXPECT $MENUBOOT_EXPECT > $SERIAL_DEV < $SERIAL_DEV case "$?" in 1) NEXT_RC=$RC_DIR/rc.sysinit.original . $RC_DIR/rc.sysinit.tivohack exit ;; 2) NEXT_RC=$RC_DIR/rc.sysinit.custom . $RC_DIR/rc.sysinit.custom exit ;; 3) . $RC_DIR/rc.sysinit.test exit ;; 4) # run original rc.sysinit . $RC_DIR/rc.sysinit.original exit ;; 9) # run bash on the serial port export PATH=/devbin:/bin:/sbin:/tvbin:/hack/bin $BASH <$SERIAL_DEV >& $SERIAL_DEV & exit ;; *) echo "Error Unknown Menu Choice... we should not be here!" > $SERIAL_DEV echo "Halting!!!" > $SERIAL_DEV exit ;; esac