diff options
Diffstat (limited to 'abs/mv-core/runit-scripts-mv')
62 files changed, 527 insertions, 0 deletions
diff --git a/abs/mv-core/runit-scripts-mv/PKGBUILD b/abs/mv-core/runit-scripts-mv/PKGBUILD new file mode 100755 index 0000000..89848c9 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/PKGBUILD @@ -0,0 +1,28 @@ +pkgname=runit-scripts-mv +pkgver=1.8.0 +pkgrel=1 +pkgdesc="collection of startup scripts for runit MythVantage styel" +url="http://smarden.org/runit/" +license="BSD" +depends=('glibc' 'util-linux' 'initscripts' 'runit' ) +makedepends=() +conflicts=() +replaces=() +backup=() +install=runit.install +source=() +arch=('i686') + +build() { + rsync -a --exclude=.svn $startdir/runitscripts $startdir/src + cd $startdir/src/runitscripts + install -d $startdir/pkg/etc/ + install -d $startdir/pkg/etc/runit/ + install -d $startdir/pkg/var/service + install -d $startdir/pkg/etc/sv + install -d $startdir/pkg/sbin + install -m0700 1 2 3 ctrlaltdel $startdir/pkg/etc/runit + + install -m0755 reboot-runit halt-runit logger $startdir/pkg/sbin + rsync -a --exclude=.svn services/* $startdir/pkg/etc/sv +} diff --git a/abs/mv-core/runit-scripts-mv/runit.install b/abs/mv-core/runit-scripts-mv/runit.install new file mode 100755 index 0000000..4652368 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runit.install @@ -0,0 +1,57 @@ +# arg 1: the new package version + +pre_install () { +if [ ! -f /sbin/halt-init ] +then + mv /sbin/halt /sbin/halt-init + rm -f /sbin/reboot + rm -f /sbin/poweroff +fi + +} + +pre_upgrade () { +if [ ! -f /sbin/halt-init ] +then + mv /sbin/halt /sbin/halt-init + rm -f /sbin/reboot + rm -f /sbin/poweroff +fi + +} + +post_install () { + + mkdir /var/service + ln -s /etc/sv/tty* /var/service + servicelist="acpid cron frontend lircd ntpd alsa-utils avahi dbus portmap sshd" + for i in $servicelist + do + ln -s /etc/sv/$i /var/service/$i + done + + ln -s /sbin/halt.script /sbin/halt + ln -s /sbin/reboot.script /sbin/reboot + ln -s /sbin/poweroff.script /sbin/poweroff + ln -s /sbin/halt-init /sbin/reboot.init + ln -s /sbin/halt-init /sbin/poweroff.init + + +} + +# arg 1: the new package version +# arg 2: the old package version + +post_upgrade(){ + ln -s /sbin/halt.script /sbin/halt + ln -s /sbin/reboot.script /sbin/reboot + ln -s /sbin/poweroff.script /sbin/poweroff + ln -s /sbin/halt-init /sbin/reboot.init + ln -s /sbin/halt-init /sbin/poweroff.init + +} + +op=$1 +shift + +$op $* diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/1 b/abs/mv-core/runit-scripts-mv/runitscripts/1 new file mode 100755 index 0000000..748930f --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/1 @@ -0,0 +1,14 @@ +#!/bin/bash +/etc/rc.sysinit +hostname `cat /etc/hostname` +/sbin/sysctl -p 2>/dev/null >/dev/null +#/usr/bin/load-modules-mythvantage.sh +rm /etc/dhcpc/dhcpcd*.pid 2>/dev/null +rm -f /etc/sv/frontend/.runtime/* 2>/dev/null +rm -f /etc/runit/reboot 2>/dev/null +/etc/net/scripts/network.init start 2>/var/log/network.init.error >/var/log/network.init +/usr/sbin/ethtool -s eth0 wol g 2>/dev/null +/usr/sbin/ethtool -s eth1 wol g 2>/dev/null +/usr/sbin/ethtool -s eth2 wol g 2>/dev/null + +#/bin/su mythtv -c /usr/bin/grabkey.py 2>/dev/null 1>/devn/null & diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/2 b/abs/mv-core/runit-scripts-mv/runitscripts/2 new file mode 100755 index 0000000..079b644 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/2 @@ -0,0 +1,8 @@ +#!/bin/sh + +PATH=/bin:/sbin:/usr/bin:/usr/sbin + +#runsvchdir default >/dev/null + +exec env - PATH=$PATH \ +runsvdir -P /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/3 b/abs/mv-core/runit-scripts-mv/runitscripts/3 new file mode 100755 index 0000000..0fa3abc --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/3 @@ -0,0 +1,4 @@ +#!/bin/sh +# +export PREVLEVEL=3 +/etc/rc.shutdown diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/ctrlaltdel b/abs/mv-core/runit-scripts-mv/runitscripts/ctrlaltdel new file mode 100755 index 0000000..2550d3c --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/ctrlaltdel @@ -0,0 +1,9 @@ +#!/bin/sh + +PATH=/bin:/usr/bin +MSG="System is going down in 10 seconds..." + +# echo 'disabled.' ; exit +touch /etc/runit/stopit +chmod 100 /etc/runit/stopit && echo "$MSG" | wall +/bin/sleep 10 diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/halt-runit b/abs/mv-core/runit-scripts-mv/runitscripts/halt-runit new file mode 100755 index 0000000..7c07b05 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/halt-runit @@ -0,0 +1,2 @@ +#!/bin/sh +runit-init 0 diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/logger b/abs/mv-core/runit-scripts-mv/runitscripts/logger new file mode 100755 index 0000000..6888f6f --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/logger @@ -0,0 +1,11 @@ +#!/bin/sh + +svname=$( cd .. && basename $( pwd ) ) +if [ ! -d /var/log/$svname ] +then + mkdir /var/log/$svname + chown root.root /var/log/$svname + chmod 700 /var/log/$svname +fi + +exec /sbin/svlogd -tt /var/log/$svname diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/reboot-runit b/abs/mv-core/runit-scripts-mv/runitscripts/reboot-runit new file mode 100755 index 0000000..be831ec --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/reboot-runit @@ -0,0 +1,2 @@ +#!/bin/sh +runit-init 6 diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/finish new file mode 100755 index 0000000..14cd831 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/finish @@ -0,0 +1,12 @@ +#!/bin/bash +. /etc/profile +VIRTUAL_DISPLAY=":50" +Xvfb_parm="$VIRTUAL_DISPLAY -screen 0 800x600x16" +pid=`ps -eaf | grep Xvfb | grep $VIRTUAL_DISPLAY | awk '{print $2}'` + if [ $pid ] + then + kill -9 $pid +# echo $pid +fi +rm -f /tmp/.X${VIRTUAL_DISPLAY}-lock + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run new file mode 100755 index 0000000..823916d --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run @@ -0,0 +1,5 @@ +#!/bin/bash +. /etc/profile +VIRTUAL_DISPLAY=":50" +Xvfb_parm="$VIRTUAL_DISPLAY -screen 0 800x600x16" +Xvfb $Xvfb_parm diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/pid b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/pid new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/pid diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/stat b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/stat new file mode 100644 index 0000000..eb0e904 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/stat @@ -0,0 +1 @@ +down diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/status b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/status Binary files differnew file mode 100644 index 0000000..2254c38 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/status diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run new file mode 100755 index 0000000..daf9859 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/acpid -f -c /etc/acpi/events 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/finish new file mode 100755 index 0000000..d6f3897 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/finish @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +sv down alsa-utils diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run new file mode 100755 index 0000000..0a97cfa --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /etc/rc.d/alsa-utils start all diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run new file mode 100755 index 0000000..130d870 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/local/apache/bin/httpd -DNO_DETACH diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run new file mode 100755 index 0000000..323d242 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/avahi-daemon >/dev/null 2>/dev/null + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/certmaster/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/certmaster/run new file mode 100755 index 0000000..745b1b3 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/certmaster/run @@ -0,0 +1,2 @@ +#!/bin/bash +exec /usr/bin/certmaster diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run new file mode 100755 index 0000000..99dc014 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/crond -f >/dev/null 2>/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run new file mode 100755 index 0000000..872ca77 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/bin/dbus-daemon --system --nofork 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run new file mode 100755 index 0000000..451dda4 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/dnsmasq -k >/dev/null 2>/dev/null + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/finish new file mode 100755 index 0000000..0dd33de --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/finish @@ -0,0 +1,4 @@ +#!/bin/bash +. /etc/profile +DISPLAY=localhost:50 evrouter -q +rm -rf /tmp/.evrouter* diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run new file mode 100755 index 0000000..1d7389a --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run @@ -0,0 +1,5 @@ +#!/bin/bash +. /etc/profile +sv start Xvfb +su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*" + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/lock b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/lock new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/lock diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/pid b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/pid new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/pid diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/stat b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/stat new file mode 100644 index 0000000..eb0e904 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/stat @@ -0,0 +1 @@ +down diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/status b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/status Binary files differnew file mode 100644 index 0000000..742989c --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/supervise/status diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish new file mode 100755 index 0000000..3bbd374 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish @@ -0,0 +1,24 @@ +#!/bin/bash +exec 2>&1 +grep -q noautologin /proc/cmdline +STATUS=$? + if [ $STATUS = 0 ] + then + chvt 2 +else + +chvt 1 +touch /etc/sv/frontend/.runtime/`date +%s` +sleep 0.5 +ps -ef |grep "xinit /etc/X11/Sessions/STB"|grep -v grep|awk ' { print $2 } '|xargs kill 2> /dev/null +cdate=`date` +#numfiles=`/usr/bin/fbd -d "$cdate" -a 10s /etc/sv/frontend/.runtime 2>/dev/null |wc -l` +numfiles=`/usr/bin/file_time_offset.py -s10 -d/etc/sv/frontend/.runtime` + +if [ $numfiles -gt 2 ] +then + sv stop frontend + rm -f /etc/sv/frontend/.runtime/* + echo "Frontend is not able to start, disabling it" +fi +fi diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/log/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/log/run new file mode 100755 index 0000000..463045f --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/log/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +. /etc/systemconfig + /usr/bin/logger -p local6.info -t mythfrontend + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run new file mode 100755 index 0000000..3b43b4f --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run @@ -0,0 +1,13 @@ +#!/bin/sh +exec 2>&1 + grep -q noautologin /proc/cmdline + STATUS=$? + if [ $STATUS = 0 ] + then + sv down frontend + exit 0 + fi + +#exec /usr/bin/openvt -fec 7 -- /bin/su - mythtv -l -c STB-start +exec /bin/su - mythtv -l -c STB-start + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run new file mode 100755 index 0000000..f807822 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run @@ -0,0 +1,2 @@ +#!/bin/bash +exec /usr/bin/funcd diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run new file mode 100755 index 0000000..fbe8ba0 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +DISPLAY=localhost:0.0 exec /usr/bin/osdServer.pl 5000 diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run new file mode 100755 index 0000000..361fc43 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +. /etc/sysconfig/mouse +exec gpm -D -m $MDEVICE -t $PROTOCOL diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run new file mode 100755 index 0000000..f1362b2 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +sv waitup dbus 2>/dev/null 1>/dev/null +exec /usr/sbin/hald --daemon=no --use-syslog 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run new file mode 100755 index 0000000..e45173d --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run @@ -0,0 +1,68 @@ +#!/bin/sh +#----------------------------------------------------------------------------# +# Hobbit client bootup script. # +# # +# This invokes hobbitlaunch, which in turn runs the Hobbit client and any # +# extensions configured. # +# # +# Copyright (C) 2005-2006 Henrik Storner <henrik@hswn.dk> # +# "status" section (C) Scott Smith 2006 # +# # +# This program is released under the GNU General Public License (GPL), # +# version 2. See the file "COPYING" for details. # +# # +#----------------------------------------------------------------------------# +# +# $Id: runclient.sh,v 1.13 2006/07/14 21:25:19 henrik Rel $ + +# Default settings for this client +MACHINEDOTS="`uname -n`" # This systems hostname +BBOSTYPE="`uname -s | tr '[A-Z]' '[a-z]'`" # This systems operating system in lowercase +BBOSSCRIPT="hobbitclient-$BBOSTYPE.sh" + +# Commandline mods for the defaults +while test "$1" != "" +do + case "$1" in + --hostname=*) + MACHINEDOTS="`echo $1 | sed -e 's/--hostname=//'`" + ;; + --os=*) + BBOSTYPE="`echo $1 | sed -e 's/--os=//' | tr '[A-Z]' '[a-z]'`" + ;; + --class=*) + CONFIGCLASS="`echo $1 | sed -e 's/--class=//' | tr '[A-Z]' '[a-z]'`" + ;; + --help) + echo "Usage: $0 [--hostname=CLIENTNAME] [--os=rhel3|linux22] [--class=CLASSNAME] start|stop" + exit 0 + ;; + start) + CMD=$1 + ;; + stop) + CMD=$1 + ;; + restart) + CMD=$1 + ;; + status) + CMD=$1 + ;; + esac + + shift +done + +OLDDIR="`pwd`" +cd "`dirname $0`" +HOBBITCLIENTHOME="/data/srv/hobbit/client" +cd "$OLDDIR" + +MACHINE="`echo $MACHINEDOTS | sed -e 's/\./,/g'`" + +export MACHINE MACHINEDOTS BBOSTYPE BBOSSCRIPT HOBBITCLIENTHOME CONFIGCLASS + + +su nobody -c "$HOBBITCLIENTHOME/bin/hobbitlaunch --config=$HOBBITCLIENTHOME/etc/clientlaunch.cfg --log=$HOBBITCLIENTHOME/logs/clientlaunch.log --pidfile=$HOBBITCLIENTHOME/logs/clientlaunch.$MACHINEDOTS.pid --no-daemon" + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run new file mode 100755 index 0000000..24ad9fe --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec su nobody -c "/data/srv/hobbit/server/bin/hobbitlaunch --config=/data/srv/hobbit/server/etc/hobbitlaunch.cfg --env=/data/srv/hobbit/server/etc/hobbitserver.cfg --log=/var/log/hobbit/hobbitlaunch.log --pidfile=/var/log/hobbit/hobbitlaunch.pid --no-daemon" diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run new file mode 100755 index 0000000..df71bf8 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run @@ -0,0 +1,9 @@ +#!/bin/sh +. /etc/systemconfig +exec 2>&1 +if [ x$LCDtype = xxosd ] +then + DISPLAY=127.0.0.1:0 /usr/sbin/LCDd -f -c /etc/LCDd.conf 2>/dev/null >/dev/null +else + exec /usr/sbin/LCDd -f -c /etc/LCDd.conf 2>/dev/null >/dev/null +fi diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run new file mode 100755 index 0000000..70cb0a5 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run @@ -0,0 +1,2 @@ +#!/bin/bash +exec /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish new file mode 100755 index 0000000..3545b07 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish @@ -0,0 +1,12 @@ +#!/bin/bash +killall -9 lircd +rm -f /var/run/lirc*.pid +touch /etc/sv/lircd/.runtime/`date +%s` +numfiles=`/usr/bin/file_time_offset.py -s4 -d/etc/sv/lircd/.runtime ` +if [ $numfiles -gt 3 ] +then + rm -f /etc/sv/lircd/.runtime/* + ls -la /etc/sv/lircd/.runtime/* + sv stop lircd + echo "lircd is not able to start, disabling it" +fi diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run new file mode 100755 index 0000000..4457b37 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run @@ -0,0 +1,39 @@ +#!/bin/bash +exec 2>&1 +run_lircd2=false +. /etc/systemconfig +function imon_detect { +if [ -e /dev/lirc_imon ] +then +lircd2_cmd="/usr/sbin/lircd -d /dev/lirc_imon --output=/dev/lircd --pidfile=/var/run/lircd2.pid --connect=localhost:8765" +run_lircd2=true +fi +} + + + +case $ReceiverType in + Serial) + /usr/bin/setserial /dev/$ReceiverSerialport uart none + /sbin/modprobe lirc_serial + DEVICE=`ls /dev/lirc[0-9] 2>/dev/null |sort |sed '/./,$!d'|head -n 1 ` + imon_detect + ;; + Usb-imon) + DEVICE=/dev/lirc_imon + ;; + + *) + + DEVICE=`ls /dev/lirc[0-9] 2>/dev/null |sort |sed '/./,$!d'|head -n 1 ` + imon_detect + ;; +esac + +if [ "$run_lircd2" = "true" ] +then + $lircd2_cmd 2>/dev/null 1>/dev/null + exec /usr/sbin/lircd -n -d $DEVICE --output /dev/lircd1 --listen 2>/dev/null 1>/dev/null +else + exec /usr/sbin/lircd -n -d $DEVICE 2>/dev/null 1>/dev/null +fi diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run new file mode 100755 index 0000000..569230e --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run @@ -0,0 +1,29 @@ +#!/bin/bash +exec 2>&1 + +MYSQLD_ROOT="/data/srv/mysql" +# source application-specific settings +[ -f /etc/conf.d/mysqld ] && . /etc/conf.d/mysqld +if [ ! `egrep '^mysql:' /etc/group` ]; then + stat_busy "Adding mysql group" + groupadd -g 89 mysql + stat_done +fi +if [ ! `egrep '^mysql:' /etc/passwd` ]; then + stat_busy "Adding mysql user" + useradd -u 89 -g mysql -d $MYSQLD_ROOT -s /bin/false mysql + [ -d $MYSQLD_ROOT ] && chown -R mysql.mysql $MYSQLD_ROOT + stat_done +fi + +if [ ! -d $MYSQLD_ROOT ]; then + mkdir $MYSQLD_ROOT + /usr/bin/mysql_install_db --datadir=$MYSQLD_ROOT --user=mysql + chown -R mysql.mysql $MYSQLD_ROOT +fi + +if [ ! -e /var/log/mysqld.log ]; then + touch /var/log/mysqld.log + chown mysql /var/log/mysqld.log +fi +exec /usr/sbin/mysqld -u mysql 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/log/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/log/run new file mode 100755 index 0000000..6ed5184 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/log/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 + /usr/bin/logger -p local7.info -t mythbackend + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run new file mode 100755 index 0000000..1315006 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run @@ -0,0 +1,25 @@ +#!/bin/sh +exec 2>&1 +. /etc/profile +. /etc/systemconfig +export HOME=/root +if [ ! x$SystemType = xSlave_backend ] +then + sv start mysql > /dev/null 2>/dev/null + #run mythfilldatabase + /usr/MythVantage/bin/initial_db_run & +fi +mkfifo /tmp/mbefifo >/dev/null 2>/dev/null +echo "Starting mythbackend" + if [ -f /tmp/debug ] + then + echo "using gbd/debug" + gdb /usr/local/bin/mythbackend -x $MV_ROOT/mbegdbcommands.txt + bash -c "osdClient.pl localhost 5000 'Restart gdb mbe :::SYS' "& + mv gdb.txt /data/home/mythtv/gdb.txt.mythbackend + chown mythtv:mythtv /data/home/mythtv/gdb.txt.mythbackend + sleep 10 + + else + exec /usr/local/bin/mythbackend + fi diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run new file mode 100755 index 0000000..8a90707 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +sv start ncidd +exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333 + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run new file mode 100755 index 0000000..6b032db --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/ncidd -D 2>&1 diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/finish new file mode 100755 index 0000000..43be94c --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/finish @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +sv down netfs diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run new file mode 100755 index 0000000..f2c0813 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +sv start portmap +/etc/rc.d/netfs start + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run new file mode 100755 index 0000000..6610fe9 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run @@ -0,0 +1,22 @@ +#!/bin/bash +exec 2>&1 + +# Make sure the statd daemon is up +# (the statd service must ensure portmap is running first) +svwaitup /var/service/nfslock >/dev/null 2>/dev/null + +source /etc/conf.d/nfsd + +# Re-export all directories in /etc/exports +/usr/sbin/exportfs -ra > /dev/null 2>/dev/null + +# start some nfsd threads +/usr/sbin/rpc.nfsd -p ${NFSD_OPTS} >/dev/null 2>/dev/null + +# since we are running kernel 2.6 we should also +# mount the nfsd virtual filesystem +/bin/mount -t nfsd none /proc/fs/nfsd >/dev/null 2>/dev/null + +# Start the rpc.mountd daemon +exec /usr/sbin/rpc.mountd --foreground >/dev/null 2>/dev/null + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run new file mode 100755 index 0000000..0ec6f75 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run @@ -0,0 +1,4 @@ +#!/bin/bash +exec 2>&1 +sv start portmap >/dev/null 2>/dev/null +/usr/sbin/rpc.statd -F >/dev/null 2>/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run new file mode 100755 index 0000000..9aa27ec --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec nmbd -F -S -d1 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run new file mode 100755 index 0000000..97302f1 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +ntpdate pool.ntp.org +exec ntpd -n -p /var/run/ntpd.pid diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/finish new file mode 100755 index 0000000..f929f39 --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/finish @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +sv down oss + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run new file mode 100755 index 0000000..687de8f --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1 +rm -f /usr/lib/oss/starting +#exec /etc/rc.d/alsa-utils start all +exec /usr/sbin/soundon + diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run new file mode 100755 index 0000000..561d65b --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /sbin/portmap -d >/dev/null 2>/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run new file mode 100755 index 0000000..af77dcb --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec smbd -F -S -d3 2>/dev/null >/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run new file mode 100755 index 0000000..a019e5d --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run @@ -0,0 +1,20 @@ +#!/bin/bash +exec 2>&1 +nobodydir=/data/srv/.nobody_ssh + +[ -f /etc/ssh/ssh_host_key ] || { /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key >/dev/null; } + [ -f /etc/ssh/ssh_host_rsa_key ] || { /usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key >/dev/null; } + [ -f /etc/ssh/ssh_host_dsa_key ] || { /usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key >/dev/null; } + +if [ ! -f $nobodydir/id_dsa.pub ] +then + mkdir -p $nobodydir + ssh-keygen -t dsa -N '' -f $nobodydir/id_dsa + mkdir -p /data/home/mythtv/.ssh + cp $nobodydir/id_dsa.pub /data/home/mythtv/.ssh/authorized_keys + chmod 700 /data/home/mythtv/.ssh/ + chown -R mythtv:mythtv /data/home/mythtv/.ssh/ +fi +chown -R nobody:nobody $nobodydir +chmod 700 $nobodydir +exec /usr/sbin/sshd -D >/dev/null 2>/dev/null diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run new file mode 100755 index 0000000..eb56ace --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec /usr/sbin/syslog-ng -F diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run new file mode 100755 index 0000000..3782aed --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /sbin/agetty 38400 vc/2 linux diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run new file mode 100755 index 0000000..ce66b0d --- /dev/null +++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /sbin/agetty 38400 vc/3 linux |