All pastes #19119 Raw Edit

Unnamed

public text v1 · immutable
#19119 ·published 2005-08-02 19:16 UTC
rendered paste body


 From rc.local -

if [ -x /etc/rc.d/rc.pvr ]; then
  if ! grep nopvr /proc/cmdline 1> /dev/null 2> /dev/null ; then
    . /etc/rc.d/rc.pvr start
  fi
fi



--- rc.pvr ----

mythtv@woop:/etc/rc.d$ cat rc.pvr
#!/bin/sh
# Don't load ivtv if 'noivtv' was given at boot.
if [ -x /etc/rc.d/rc.ivtv ]; then
  if ! grep noivtv /proc/cmdline 1> /dev/null 2> /dev/null ; then
    . /etc/rc.d/rc.ivtv start
  fi
fi

# Don't load mythtv if 'nomythtv' was given at boot.
if [ -x /etc/rc.d/rc.mythtv ]; then
  if ! grep nomyth /proc/cmdline 1> /dev/null 2> /dev/null ; then
    . /etc/rc.d/rc.mythtv start
  fi
fi
#
# Don't load the dxr3 if 'nodxr3' was given at boot.
#if [ -x /etc/rc.d/rc.dxr3 ]; then
#  if ! grep nodxr3 /proc/cmdline 1> /dev/null 2> /dev/null ; then
#    . /etc/rc.d/rc.dxr3 start
#  fi
#fi

if ! grep noautologin /proc/cmdline 1> /dev/null 2> /dev/null ; then
  echo "Launching XWindows"
  su - mythtv -c "bash -l startx -- -dpi 100" &
fi



-- rc.ivtv ---

mythtv@woop:/etc/rc.d$ cat rc.ivtv 
#!/bin/sh
#
# /etc/rc.d/rc.ivtv
#
# Start/stop/restart the ivtv device driver modules.
#

ivtv_load() {
   echo "Loading IVTV Driver Modules"
   echo -n "tuner..."
   /sbin/modprobe tuner type=2
   echo -n "msp3400..."
   /sbin/modprobe msp3400
   echo -n "saa7115..."
   /sbin/modprobe saa7115
   echo -n "ivtv..."
   /sbin/modprobe ivtv
   echo "Done!"
 
   echo "Setting PVR to NTSC - 720x480"
   /usr/local/bin/ivtvctl -u 0x3000
   /usr/local/bin/ivtvctl -p 4
   /usr/local/bin/ivtvctl -f width=720,height=480
   /usr/local/bin/ivtvctl -c dnr_mode=0,dnr_temporal=4,dnr_spatial=4
   /usr/local/bin/ivtvctl -d /dev/video1 -u 0x3000
   /usr/local/bin/ivtvctl -d /dev/video1 -p 4
   /usr/local/bin/ivtvctl -d /dev/video1 -f width=720,height=480
   /usr/local/bin/ivtvctl -d /dev/video1 -c dnr_mode=0,dnr_temporal=4,dnr_spatial=4

}

ivtv_unload() {
   echo "Unloading IVTV Driver Modules"
   echo -n "saa7115..."
   rmmod saa7115
   echo -n "ivtv..."
   rmmod ivtv
   echo -n "msp3400..."
   rmmod msp3400
   echo -n "tuner..."
   rmmod tuner
   echo -n "tveeprom..."
   rmmod tveeprom
   echo "Done!"
}

ivtv_reload() {
  ivtv_unload
  sleep 2
  ivtv_load
}

case "$1" in
'start')
  ivtv_load
  ;;
'stop')
  ivtv_unload
  ;;
'restart')
  ivtv_reload
  ;;
'reload')
  ivtv_reload
  ;;
*)
  # Default is "start", for backwards compatibility with previous
  # Slackware versions.  This may change to a 'usage' error someday.
  ivtv_load
esac


-- rc.mythtv --
mythtv@woop:/etc/rc.d$ cat rc.mythtv 
#!/bin/sh
#
# /etc/rc.d/rc.mythtv
#


LOGFILE="/var/log/mythtv.log"
PIDFILE="/var/run/mythbackend.pid"

mythtv_load() {
   if [ -x /usr/local/bin/mythbackend ]; then
     echo "Launching MythBackend"
     /usr/local/bin/mythbackend --logfile $LOGFILE --pidfile $PIDFILE -d
   fi
}

mythtv_unload() {
   echo "Shutting down MythBackend"
   kill `cat $PIDFILE`
}

mythtv_reload() {
  mythtv_unload
  sleep 1
  mythtv_load
}

case "$1" in
'start')
  mythtv_load
  ;;
'stop')
  mythtv_unload
  ;;
'restart')
  mythtv_reload
  ;;
'reload')
  mythtv_reload
  ;;
*)
  # Default is "start", for backwards compatibility with previous
  # Slackware versions.  This may change to a 'usage' error someday.
  mythtv_load
esac