summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/runit-scripts
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/runit-scripts')
-rwxr-xr-xabs/core/runit-scripts/PKGBUILD31
-rwxr-xr-xabs/core/runit-scripts/fbsplash-runit.sh27
-rwxr-xr-xabs/core/runit-scripts/runit.install56
-rwxr-xr-xabs/core/runit-scripts/runitscripts/126
-rwxr-xr-xabs/core/runit-scripts/runitscripts/1.local3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/28
-rwxr-xr-xabs/core/runit-scripts/runitscripts/312
-rwxr-xr-xabs/core/runit-scripts/runitscripts/ctrlaltdel4
-rwxr-xr-xabs/core/runit-scripts/runitscripts/ctrlaltdel.off9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/halt-runit3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/logger11
-rwxr-xr-xabs/core/runit-scripts/runitscripts/reboot-runit3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/Xvfb/finish12
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/Xvfb/run11
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/acpid/log/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/acpid/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/alsa-utils/finish3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/alsa-utils/run3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/apache/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/avahi/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/cron/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/dbus/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/dhcpd/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/dnsmasq/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/evrouter/finish10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/evrouter/run20
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/finish28
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/log/run5
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/frontend/run21
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/gpm/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/hal/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/hobbit-client/run74
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/hobbit/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/igdaemon/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lcdd/run15
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lighttpd/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lircd/finish16
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lircd/run138
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mdadm/finish17
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mdadm/run19
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mysql/run34
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythbackend/log/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mythbackend/run31
-rw-r--r--abs/core/runit-scripts/runitscripts/services/ncid/finish9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/ncid/run21
-rw-r--r--abs/core/runit-scripts/runitscripts/services/ncidd/finish9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/ncidd/run13
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/netfs/finish3
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/netfs/run6
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/nfsd/run29
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/nfslock/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/nmbd/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/ntpd/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/oss/finish4
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/oss/run12
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/portmap/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/smartd/finish9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/smartd/run13
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/smbd/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/sshd/run13
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/syslog-ng/run10
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/tatir/run9
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/tftpd/run8
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/tty2/run7
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/tty3/run6
65 files changed, 995 insertions, 0 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD
new file mode 100755
index 0000000..1615994
--- /dev/null
+++ b/abs/core/runit-scripts/PKGBUILD
@@ -0,0 +1,31 @@
+pkgname=runit-scripts
+pkgver=1.8.0
+pkgrel=95
+pkgdesc="collection of startup scripts for runit"
+url="http://smarden.org/runit/"
+license="BSD"
+depends=('glibc' 'util-linux' 'initscripts' 'runit' )
+makedepends=('rsync')
+conflicts=()
+replaces=()
+backup=(etc/runit/1.local)
+install=runit.install
+source=(fbsplash-runit.sh)
+arch=('i686')
+
+build() {
+ rsync -a --exclude=.svn --exclude=*~ $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 -d $startdir/pkg/etc/rc.d/functions.d
+
+ install -m0700 1 2 3 1.local ctrlaltdel $startdir/pkg/etc/runit
+ install -m755 $startdir/src/fbsplash-runit.sh $startdir/pkg/etc/rc.d/functions.d/fbsplash-runit.sh
+ install -m0755 reboot-runit halt-runit logger $startdir/pkg/sbin
+ rsync -a --exclude=.svn services/* $startdir/pkg/etc/sv
+}
+md5sums=('c6cbd6af3657783bd1ce8f75f574d72f')
diff --git a/abs/core/runit-scripts/fbsplash-runit.sh b/abs/core/runit-scripts/fbsplash-runit.sh
new file mode 100755
index 0000000..aa391b0
--- /dev/null
+++ b/abs/core/runit-scripts/fbsplash-runit.sh
@@ -0,0 +1,27 @@
+# fbsplash function.d script #
+# Author: Greg Helton <gt@fallendusk.org> #
+
+# Who is calling? #
+CALLER=$0
+
+# splash stuff #
+. /etc/conf.d/fbsplash.conf
+. /sbin/splash-functions.sh
+
+# Redefine the stat functions #
+
+stat_runit() {
+ printf "${C_OTHER}${PREFIX_REG} ${C_MAIN}${1}${C_CLEAR} "
+ printf "${SAVE_POSITION}"
+ deltext
+ printf " ${C_OTHER}[${C_BUSY}BKGD${C_OTHER}]${C_CLEAR} "
+ # Load variables #
+ var_load STEP_NR MAX_STEPS RC_MULTI RC_SYSINIT RC_SHUTDOWN
+ # Only update the splash progress if we're in sysinit, multi, or shutdown. #
+ ((SPLASH_STEP_NR++))
+ SPLASH_PROGRESS=$((100*${SPLASH_STEP_NR}/${SPLASH_MAX_STEPS}))
+ SPLASH_CURRENT_PROGRESS=${SPLASH_PROGRESS}
+ splash_update_progress ${SPLASH_PROGRESS}
+ var_save STEP_NR CURRENT_PROGRESS
+
+}
diff --git a/abs/core/runit-scripts/runit.install b/abs/core/runit-scripts/runit.install
new file mode 100755
index 0000000..1e3f619
--- /dev/null
+++ b/abs/core/runit-scripts/runit.install
@@ -0,0 +1,56 @@
+# 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
+ servicelist="acpid cron frontend lircd ntpd alsa-utils avahi dbus portmap sshd syslog-ng tty2 tty3"
+ for i in $servicelist
+ do
+ ln -s /etc/sv/$i /var/service/$i
+ done
+
+ [ -e /sbin/halt ] || ln -s /sbin/halt.script /sbin/halt
+ [ -e /sbin/reboot ] || ln -s /sbin/reboot.script /sbin/reboot
+ [ -e /sbin/poweroff ] || ln -s /sbin/poweroff.script /sbin/poweroff
+ [ -e /sbin/reboot.init ] || ln -s /sbin/halt-init /sbin/reboot.init
+ [ -e /sbin/poweroff.init ] || ln -s /sbin/halt-init /sbin/poweroff.init
+
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+
+post_upgrade(){
+
+ [ -e /sbin/halt ] || ln -s /sbin/halt.script /sbin/halt
+ [ -e /sbin/reboot ] || ln -s /sbin/reboot.script /sbin/reboot
+ [ -e /sbin/poweroff ] || ln -s /sbin/poweroff.script /sbin/poweroff
+ [ -e /sbin/reboot.init ] || ln -s /sbin/halt-init /sbin/reboot.init
+ [ -e /sbin/poweroff.init ] || ln -s /sbin/halt-init /sbin/poweroff.init
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/abs/core/runit-scripts/runitscripts/1 b/abs/core/runit-scripts/runitscripts/1
new file mode 100755
index 0000000..6e4425d
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/1
@@ -0,0 +1,26 @@
+#!/bin/bash
+/etc/rc.sysinit
+. /etc/rc.conf
+. /etc/rc.d/functions
+hostname `cat /etc/hostname`
+/sbin/sysctl -p 2>/dev/null >/dev/null
+#yes it's needed the 2nd time
+/usr/LH/bin/load-modules-mythvantage.sh >/dev/null
+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
+stat_busy "Starting network"
+/etc/net/scripts/network.init start 2>/var/log/network.init.error >/var/log/network.init
+stat_done
+/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
+#user added stuff for level 1 of runit
+if [ -e /etc/runit/1.local ]
+then
+ #exec the file
+ stat_busy /etc/runit/1.local
+ /etc/runit/1.local
+ stat_done
+fi
+
diff --git a/abs/core/runit-scripts/runitscripts/1.local b/abs/core/runit-scripts/runitscripts/1.local
new file mode 100755
index 0000000..f79a0c6
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/1.local
@@ -0,0 +1,3 @@
+#!/bin/bash
+#local user startup script, run at the end of runit 1
+
diff --git a/abs/core/runit-scripts/runitscripts/2 b/abs/core/runit-scripts/runitscripts/2
new file mode 100755
index 0000000..079b644
--- /dev/null
+++ b/abs/core/runit-scripts/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/core/runit-scripts/runitscripts/3 b/abs/core/runit-scripts/runitscripts/3
new file mode 100755
index 0000000..50b3e92
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/3
@@ -0,0 +1,12 @@
+#!/bin/sh
+for i in `seq 30`
+do
+ echo " " > /dev/tty1
+done
+if [ -f /lib/splash/cache/daemon.pid ]
+then
+ pid=`cat /lib/splash/cache/daemon.pid`
+ kill -9 $pid 2>/dev/null
+fi
+export PREVLEVEL=3
+/etc/rc.shutdown
diff --git a/abs/core/runit-scripts/runitscripts/ctrlaltdel b/abs/core/runit-scripts/runitscripts/ctrlaltdel
new file mode 100755
index 0000000..30c317b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/ctrlaltdel
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin
+/sbin/reboot
diff --git a/abs/core/runit-scripts/runitscripts/ctrlaltdel.off b/abs/core/runit-scripts/runitscripts/ctrlaltdel.off
new file mode 100755
index 0000000..2550d3c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/ctrlaltdel.off
@@ -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/core/runit-scripts/runitscripts/halt-runit b/abs/core/runit-scripts/runitscripts/halt-runit
new file mode 100755
index 0000000..b7d9a95
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/halt-runit
@@ -0,0 +1,3 @@
+#!/bin/sh
+wall "System will shutdown NOW"
+runit-init 0
diff --git a/abs/core/runit-scripts/runitscripts/logger b/abs/core/runit-scripts/runitscripts/logger
new file mode 100755
index 0000000..6888f6f
--- /dev/null
+++ b/abs/core/runit-scripts/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/core/runit-scripts/runitscripts/reboot-runit b/abs/core/runit-scripts/runitscripts/reboot-runit
new file mode 100755
index 0000000..0d3d9d4
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/reboot-runit
@@ -0,0 +1,3 @@
+#!/bin/sh
+wall "System will reboot NOW"
+runit-init 6
diff --git a/abs/core/runit-scripts/runitscripts/services/Xvfb/finish b/abs/core/runit-scripts/runitscripts/services/Xvfb/finish
new file mode 100755
index 0000000..14cd831
--- /dev/null
+++ b/abs/core/runit-scripts/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/core/runit-scripts/runitscripts/services/Xvfb/run b/abs/core/runit-scripts/runitscripts/services/Xvfb/run
new file mode 100755
index 0000000..71ffedd
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/Xvfb/run
@@ -0,0 +1,11 @@
+#!/bin/bash
+. /etc/profile
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting XVFB"
+
+
+VIRTUAL_DISPLAY=":50"
+Xvfb_parm="$VIRTUAL_DISPLAY -screen 0 800x600x16"
+Xvfb $Xvfb_parm
diff --git a/abs/core/runit-scripts/runitscripts/services/acpid/log/run b/abs/core/runit-scripts/runitscripts/services/acpid/log/run
new file mode 100755
index 0000000..20c892e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/acpid/log/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+exec 2>&1
+#export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+#stat_runit "Starting MythBackend logger"
+/usr/bin/logger -p info -t acpid
+
diff --git a/abs/core/runit-scripts/runitscripts/services/acpid/run b/abs/core/runit-scripts/runitscripts/services/acpid/run
new file mode 100755
index 0000000..bffb564
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/acpid/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting acpid"
+exec /usr/sbin/acpid -f -c /etc/acpi/events
diff --git a/abs/core/runit-scripts/runitscripts/services/alsa-utils/finish b/abs/core/runit-scripts/runitscripts/services/alsa-utils/finish
new file mode 100755
index 0000000..d6f3897
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/alsa-utils/finish
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+sv down alsa-utils
diff --git a/abs/core/runit-scripts/runitscripts/services/alsa-utils/run b/abs/core/runit-scripts/runitscripts/services/alsa-utils/run
new file mode 100755
index 0000000..17f5f99
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/alsa-utils/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /etc/rc.d/alsa start
diff --git a/abs/core/runit-scripts/runitscripts/services/apache/run b/abs/core/runit-scripts/runitscripts/services/apache/run
new file mode 100755
index 0000000..95d5cc4
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/apache/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Apache"
+
+
+exec /usr/local/apache/bin/httpd -DNO_DETACH
diff --git a/abs/core/runit-scripts/runitscripts/services/avahi/run b/abs/core/runit-scripts/runitscripts/services/avahi/run
new file mode 100755
index 0000000..b9b4905
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/avahi/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Avahi"
+
+
+exec /usr/sbin/avahi-daemon >/dev/null 2>/dev/null
+
diff --git a/abs/core/runit-scripts/runitscripts/services/cron/run b/abs/core/runit-scripts/runitscripts/services/cron/run
new file mode 100755
index 0000000..0894236
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/cron/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Cron"
+
+
+exec 2>&1
+exec /usr/sbin/crond -f >/dev/null 2>/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/dbus/run b/abs/core/runit-scripts/runitscripts/services/dbus/run
new file mode 100755
index 0000000..a9af150
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/dbus/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting dbus"
+
+
+exec /usr/bin/dbus-daemon --system --nofork 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/dhcpd/run b/abs/core/runit-scripts/runitscripts/services/dhcpd/run
new file mode 100755
index 0000000..38ae40a
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/dhcpd/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting dhcpd"
+
+
+exec /usr/sbin/dhcpd -f &> /var/log/dhcpd.log
diff --git a/abs/core/runit-scripts/runitscripts/services/dnsmasq/run b/abs/core/runit-scripts/runitscripts/services/dnsmasq/run
new file mode 100755
index 0000000..f14c51a
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/dnsmasq/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting dns services"
+
+
+exec /usr/sbin/dnsmasq -k >/dev/null 2>/dev/null
+
diff --git a/abs/core/runit-scripts/runitscripts/services/evrouter/finish b/abs/core/runit-scripts/runitscripts/services/evrouter/finish
new file mode 100755
index 0000000..5ebda4c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/evrouter/finish
@@ -0,0 +1,10 @@
+#!/bin/bash
+. /etc/profile
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ DISPLAY=localhost:50 evrouter -q
+ rm -rf /tmp/.evrouter*
+else
+ sv down evrouter
+fi \ No newline at end of file
diff --git a/abs/core/runit-scripts/runitscripts/services/evrouter/run b/abs/core/runit-scripts/runitscripts/services/evrouter/run
new file mode 100755
index 0000000..56f7ae6
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/evrouter/run
@@ -0,0 +1,20 @@
+#!/bin/bash
+. /etc/profile
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+which evrouter >/dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+
+ stat_runit "Starting evrouter"
+ ps -ef |grep -v grep|grep -q "Xvfb :50"
+ if [ ! $? = 0 ]
+ then
+ sv start Xvfb
+ fi
+
+ su mythtv -c "DISPLAY=localhost:50 evrouter -c /etc/evrouter.cfg -f /dev/input/event*"
+fi
+
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/finish b/abs/core/runit-scripts/runitscripts/services/frontend/finish
new file mode 100755
index 0000000..5b0bd5b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/finish
@@ -0,0 +1,28 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+grep -q nox /proc/cmdline
+STATUS=$?
+ if [ $STATUS = 0 ]
+ then
+ chvt 2
+else
+ if [ ! -d /etc/sv/frontend/.runtime ]
+ then
+ mkdir -p /etc/sv/frontend/.runtime
+ fi
+ touch /etc/sv/frontend/.runtime/`date +%s`
+ sleep 0.2
+ ps -U mythtv -ef |grep "/bin/sh /usr/bin/startx"|grep -v grep|awk ' { print $2 } '|xargs kill -9 2> /dev/null
+ cdate=`date`
+ 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/*
+ printhl " Frontend is not able to start, disabling it."
+ fi
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/log/run b/abs/core/runit-scripts/runitscripts/services/frontend/log/run
new file mode 100755
index 0000000..463045f
--- /dev/null
+++ b/abs/core/runit-scripts/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/core/runit-scripts/runitscripts/services/frontend/run b/abs/core/runit-scripts/runitscripts/services/frontend/run
new file mode 100755
index 0000000..c1e2f2d
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/frontend/run
@@ -0,0 +1,21 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+exec 2>&1
+ grep -qi nox /proc/cmdline
+ STATUS=$?
+ if [ $STATUS = 0 ]
+ then
+ sv down frontend
+ exit 0
+ fi
+touch /var/log/fluxbox.log
+chown mythtv:mythtv /var/log/fluxbox.log
+
+stat_runit "Starting LinHES frontend"
+
+#echo "Starting LinHES frontend" >/dev/tty1
+exec /bin/su - mythtv -l -c /usr/LH/bin/LinHES-start
+
diff --git a/abs/core/runit-scripts/runitscripts/services/gpm/run b/abs/core/runit-scripts/runitscripts/services/gpm/run
new file mode 100755
index 0000000..c347c77
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/gpm/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting GPM"
+
+
+. /etc/sysconfig/mouse
+exec gpm -D -m $MDEVICE -t $PROTOCOL
diff --git a/abs/core/runit-scripts/runitscripts/services/hal/run b/abs/core/runit-scripts/runitscripts/services/hal/run
new file mode 100755
index 0000000..a6d5c0e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/hal/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+svwaitup dbus 2>/dev/null 1>/dev/null
+stat_runit "Starting Hal"
+exec /usr/sbin/hald --daemon=no --use-syslog 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/hobbit-client/run b/abs/core/runit-scripts/runitscripts/services/hobbit-client/run
new file mode 100755
index 0000000..a28c6f8
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/hobbit-client/run
@@ -0,0 +1,74 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting hobbit client"
+
+#----------------------------------------------------------------------------#
+# 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/core/runit-scripts/runitscripts/services/hobbit/run b/abs/core/runit-scripts/runitscripts/services/hobbit/run
new file mode 100755
index 0000000..d36243b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/hobbit/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting hobbit server"
+
+
+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/core/runit-scripts/runitscripts/services/igdaemon/run b/abs/core/runit-scripts/runitscripts/services/igdaemon/run
new file mode 100755
index 0000000..ea4f33b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/igdaemon/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting IguanaWorks IR daemon"
+
+
+exec /usr/bin/igdaemon --no-ids -n -l /var/log/igdaemon.log
diff --git a/abs/core/runit-scripts/runitscripts/services/lcdd/run b/abs/core/runit-scripts/runitscripts/services/lcdd/run
new file mode 100755
index 0000000..da2258b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/lcdd/run
@@ -0,0 +1,15 @@
+#!/bin/sh
+. /etc/systemconfig
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting lcdproc"
+
+
+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/core/runit-scripts/runitscripts/services/lighttpd/run b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
new file mode 100755
index 0000000..798690c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting lighttpd"
+
+
+exec /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
diff --git a/abs/core/runit-scripts/runitscripts/services/lircd/finish b/abs/core/runit-scripts/runitscripts/services/lircd/finish
new file mode 100755
index 0000000..1afc41c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/lircd/finish
@@ -0,0 +1,16 @@
+#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+killall -9 lircd 2>/dev/null
+rm -f /var/run/lirc*.pid
+[ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime
+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/* 2>/dev/null
+ sv stop lircd
+ printhl " lircd is not able to start, disabling it"
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/lircd/run b/abs/core/runit-scripts/runitscripts/services/lircd/run
new file mode 100755
index 0000000..0a398ac
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/lircd/run
@@ -0,0 +1,138 @@
+#!/bin/bash
+
+exec 2>&1
+export TERM=linux
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+#since what we do may not be enough
+#if your one of those people, this is where you place your stuff
+
+LOG=/tmp/lirc.log
+
+if [ -f $LOG ]
+then
+ rm -f $LOG
+fi
+
+if [ -f /etc/runit/lirc.sh ]
+then
+ #program must not terminate.
+
+ stat_runit "Starting lirc"
+
+ /etc/runit/lirc.sh
+else
+ . /etc/systemconfig
+ stat_runit "Starting lirc"
+
+ [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime
+
+ function dvico_detect {
+ if [ x$Remotetype = "xdvico" ] || [ x$Remotetype = "xDvico-Dual-Digital4-rev2" ]
+ then
+ RunDvico=true
+ else
+ RunDvico=false
+ fi
+ }
+
+ num_lirc=`ls -la /dev/lirc[0-9] 2>/dev/null |wc -l `
+ num_lirc=$((num_lirc-1))
+
+ serial_port=""
+
+ if [ x$ReceiverType = xSerial ]
+ then
+ serial_port=$ReceiverSerialport
+ elif [ x$HostBlasterType = xSerial ]
+ then
+ serial_port=$HostSerialPort_blasterlirc
+ fi
+
+ if [ -n "$serial_port" ]
+ then
+ #/dev/ttyS0 (COM1), port 0x3f8, irq 4
+ #/dev/ttyS1 (COM2), port 0x2f8, irq 3
+ #/dev/ttyS2 (COM3), port 0x3e8, irq 4
+ #/dev/ttyS3 (COM4), port 0x2e8, irq 3
+
+ case $serial_port in
+ ttyS0)
+ FLAGS="io=0x3f8 irq=4"
+ ;;
+ ttyS1)
+ FLAGS="io=0x2f8 irq=3"
+ ;;
+ ttyS2)
+ FLAGS="io=0x3e8 irq=4"
+ ;;
+ ttyS3)
+ FLAGS="io=0x2e8 irq=3"
+ ;;
+ esac
+ /usr/bin/setserial /dev/serial_port uart none
+ sleep 0.5
+ /sbin/modprobe lirc_serial $FLAGS
+ sleep 0.5
+ fi
+
+ dvico_detect
+
+ if [ x$HostBlasterType = xCommandIR -o x$ReceiverType = xCommandIR ]
+ then
+ CMD="/usr/sbin/lircd -n --driver=commandir"
+ printhl " Using commandir"
+ $CMD >>$LOG 2>>$LOG
+#echo $CMD
+ elif [ x$HostBlasterType = xiguanaIR-usb -o x$ReceiverType = xiguanaIR-usb ]
+ then
+ sv start igdaemon
+ CMD="/usr/sbin/lircd -n --driver=iguanaIR"
+ printhl " Using iguanaIR usb"
+#echo $CMD
+ $CMD >>$LOG 2>>$LOG
+ else
+ LASTCMD=""
+
+ for i in `seq 1 $num_lirc`
+ do
+ CMD="/usr/sbin/lircd -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
+ printhl " Device $i"
+#echo $CMD
+ $CMD >>$LOG 2>>$LOG
+ LASTCMD="--connect=localhost:876$i $LASTCMD "
+ done
+
+ if [ $RunDvico = "true" ]
+ then
+ if [ x$Remotetype = "xdvico" ]
+ then
+ LCMD="/usr/sbin/lircd -n -d /dev/usb/dvicoIR --driver=dvico --output /dev/lircd"
+ else
+ LCMD="/usr/sbin/lircd -n -d /dev/input/irremote --driver=devinput --output /dev/lircd"
+ fi
+
+ if [ $num_lirc -lt 0 ]
+ then
+ # Only run Dvico
+ printhl " Device $Remotetype"
+#echo $LCMD
+ exec $LCMD >>$LOG 2>>$LOG
+ elif [ $num_lirc -gt -1 ]
+ then
+ i=$((i+1))
+ CMD="$LCMD --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i"
+ $CMD >> $LOG
+ LASTCMD="--connect=localhost:876$i $LASTCMD "
+ printhl " Device Dvico"
+ /usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD >>$LOG 2>>$LOG
+ fi
+ else
+ LCMD="/usr/sbin/lircd -n -d /dev/lirc0 --output /dev/lircd $LASTCMD"
+#echo $LCMD
+ exec $LCMD >>$LOG 2>>$LOG
+ fi
+ fi
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/mdadm/finish b/abs/core/runit-scripts/runitscripts/services/mdadm/finish
new file mode 100755
index 0000000..92782ba
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mdadm/finish
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Stop Monitoring software raid arrays
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+ stat_runit "Stopping mdadm RAID Monitor"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mdadm
+ stat_done
+ fi
diff --git a/abs/core/runit-scripts/runitscripts/services/mdadm/run b/abs/core/runit-scripts/runitscripts/services/mdadm/run
new file mode 100755
index 0000000..0ab432e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mdadm/run
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Start Monitoring software raid arrays
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+ stat_runit "Starting mdadm RAID Monitor"
+ if [ -z "$PID" ]; then
+ /sbin/mdadm -F -s
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mdadm
+ stat_done
+ fi
diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run
new file mode 100755
index 0000000..6b2f95a
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mysql/run
@@ -0,0 +1,34 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Mysql"
+
+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_runit "Adding mysql group"
+ groupadd -g 89 mysql
+
+fi
+if [ ! `egrep '^mysql:' /etc/passwd` ]; then
+ stat_runit "Adding mysql user"
+ useradd -u 89 -g mysql -d $MYSQLD_ROOT -s /bin/false mysql
+ [ -d $MYSQLD_ROOT ] && chown -R mysql.mysql $MYSQLD_ROOT
+
+fi
+
+if [ ! -d $MYSQLD_ROOT ]; then
+ mkdir -p $MYSQLD_ROOT
+ /usr/bin/mysql_install_db --datadir=$MYSQLD_ROOT --user=mysql 2>/dev/null 1>/dev/null
+ 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 --skip-name-resolve -u mysql 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/mythbackend/log/run b/abs/core/runit-scripts/runitscripts/services/mythbackend/log/run
new file mode 100755
index 0000000..17692a7
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythbackend/log/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+exec 2>&1
+#export TERM=linux
+#. /etc/rc.conf
+#. /etc/rc.d/functions
+#stat_runit "Starting MythBackend logger"
+/usr/bin/logger -p local7.info -t mythbackend
+
diff --git a/abs/core/runit-scripts/runitscripts/services/mythbackend/run b/abs/core/runit-scripts/runitscripts/services/mythbackend/run
new file mode 100755
index 0000000..48c68d3
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/mythbackend/run
@@ -0,0 +1,31 @@
+#!/bin/sh
+exec 2>&1
+. /etc/profile
+. /etc/systemconfig
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+stat_runit "Starting MythBackend"
+export HOME=/root
+if [ ! x$SystemType = xSlave_backend ]
+then
+ sv start mysql > /dev/null 2>/dev/null
+ #run mythfilldatabase
+ printhl " Running 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/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 su mythtv -c "/usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log"
+# fi
diff --git a/abs/core/runit-scripts/runitscripts/services/ncid/finish b/abs/core/runit-scripts/runitscripts/services/ncid/finish
new file mode 100644
index 0000000..953a4a1
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ncid/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+exec 2>&1
+which ncid 2>/dev/null >/dev/null
+if [ ! $? = 0 ]
+then
+ sv down ncid
+fi
+
+
diff --git a/abs/core/runit-scripts/runitscripts/services/ncid/run b/abs/core/runit-scripts/runitscripts/services/ncid/run
new file mode 100755
index 0000000..44154c7
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ncid/run
@@ -0,0 +1,21 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+
+which ncid 2>/dev/null >/dev/null
+
+if [ $? = 0 ]
+then
+ if [ -f /var/service/ncidd/run ]
+ then
+ sv start ncidd
+ fi
+
+ stat_runit "Starting callerid client"
+
+ exec /usr/bin/ncid --no-gui --all --call-prog --program /usr/bin/ncid.py 127.0.0.1 3333
+fi
+
diff --git a/abs/core/runit-scripts/runitscripts/services/ncidd/finish b/abs/core/runit-scripts/runitscripts/services/ncidd/finish
new file mode 100644
index 0000000..ab39d39
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ncidd/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+exec 2>&1
+which ncidd 2>/dev/null >/dev/null
+if [ ! $? = 0 ]
+then
+ sv down ncid
+fi
+
+
diff --git a/abs/core/runit-scripts/runitscripts/services/ncidd/run b/abs/core/runit-scripts/runitscripts/services/ncidd/run
new file mode 100755
index 0000000..6fff089
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ncidd/run
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+which ncidd > /dev/null 2>/dev/null
+if [ $? = 0 ]
+then
+ stat_runit "Starting CallerID"
+
+ exec /usr/sbin/ncidd -D 2>&1
+fi
diff --git a/abs/core/runit-scripts/runitscripts/services/netfs/finish b/abs/core/runit-scripts/runitscripts/services/netfs/finish
new file mode 100755
index 0000000..43be94c
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/netfs/finish
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+sv down netfs
diff --git a/abs/core/runit-scripts/runitscripts/services/netfs/run b/abs/core/runit-scripts/runitscripts/services/netfs/run
new file mode 100755
index 0000000..28388b9
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/netfs/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+exec 2>&1
+sv start portmap
+sv start nfslock
+/etc/rc.d/netfs start
+
diff --git a/abs/core/runit-scripts/runitscripts/services/nfsd/run b/abs/core/runit-scripts/runitscripts/services/nfsd/run
new file mode 100755
index 0000000..207d7cd
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/nfsd/run
@@ -0,0 +1,29 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting NFSD"
+
+# 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/nfs
+
+# Re-export all directories in /etc/exports
+/usr/sbin/exportfs -ra > /dev/null 2>/dev/null
+
+# start some nfsd threads
+printhl " Using ${NFSD_OPTS} "
+/usr/sbin/rpc.nfsd ${NFSD_OPTS} >/dev/null 2>/dev/null
+
+# since we are running kernel 2.6 we should also
+# mount the nfsd virtual filesystem
+printhl " mount nfsd"
+/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/core/runit-scripts/runitscripts/services/nfslock/run b/abs/core/runit-scripts/runitscripts/services/nfslock/run
new file mode 100755
index 0000000..8d627ad
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/nfslock/run
@@ -0,0 +1,8 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting NFSlock"
+svwaitup portmap >/dev/null 2>/dev/null
+/usr/sbin/rpc.statd -F >/dev/null 2>/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/nmbd/run b/abs/core/runit-scripts/runitscripts/services/nmbd/run
new file mode 100755
index 0000000..9ed032b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/nmbd/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting NMBD"
+
+
+exec nmbd -F -S -d1 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/ntpd/run b/abs/core/runit-scripts/runitscripts/services/ntpd/run
new file mode 100755
index 0000000..146c4e0
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/ntpd/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting NTPD"
+printhl " Fetching time"
+msg=`/usr/bin/ntpdate pool.ntp.org `
+printhl " $msg"
+
+exec /usr/bin/ntpd -n -p /var/run/ntpd.pid 2>/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/oss/finish b/abs/core/runit-scripts/runitscripts/services/oss/finish
new file mode 100755
index 0000000..f929f39
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/oss/finish
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+sv down oss
+
diff --git a/abs/core/runit-scripts/runitscripts/services/oss/run b/abs/core/runit-scripts/runitscripts/services/oss/run
new file mode 100755
index 0000000..815a34e
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/oss/run
@@ -0,0 +1,12 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting OSS"
+
+
+rm -f /usr/lib/oss/starting
+#exec /etc/rc.d/alsa-utils start all
+exec /usr/sbin/soundon
+
diff --git a/abs/core/runit-scripts/runitscripts/services/portmap/run b/abs/core/runit-scripts/runitscripts/services/portmap/run
new file mode 100755
index 0000000..9e708e6
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/portmap/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting portmap"
+exec /sbin/portmap -d >/dev/null 2>/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/smartd/finish b/abs/core/runit-scripts/runitscripts/services/smartd/finish
new file mode 100755
index 0000000..7b77994
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/smartd/finish
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+ . /etc/rc.conf
+ . /etc/rc.d/functions
+
+ stat_runit "Stopping smartd"
+ kill -9 `pidof /usr/sbin/smartd` &>/dev/null
+ rm_daemon smartd
+ stat_done
diff --git a/abs/core/runit-scripts/runitscripts/services/smartd/run b/abs/core/runit-scripts/runitscripts/services/smartd/run
new file mode 100755
index 0000000..15ed769
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/smartd/run
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+ . /etc/rc.conf
+ . /etc/rc.d/functions
+
+ stat_runit "Starting smartd"
+ /usr/sbin/smartd -n -c /etc/smartd.conf -q never &>/dev/null
+ if [ $? -ne 0 ]; then
+ stat_fail
+ else
+ add_daemon smartd
+ stat_done
+ fi
diff --git a/abs/core/runit-scripts/runitscripts/services/smbd/run b/abs/core/runit-scripts/runitscripts/services/smbd/run
new file mode 100755
index 0000000..b4a545b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/smbd/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Samba"
+
+
+exec smbd -F -S -d3 2>/dev/null >/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/sshd/run b/abs/core/runit-scripts/runitscripts/services/sshd/run
new file mode 100755
index 0000000..fc22e3b
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/sshd/run
@@ -0,0 +1,13 @@
+#!/bin/bash
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting 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; }
+
+
+exec /usr/sbin/sshd -D >/dev/null 2>/dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/syslog-ng/run b/abs/core/runit-scripts/runitscripts/services/syslog-ng/run
new file mode 100755
index 0000000..8633a77
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/syslog-ng/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting syslog"
+
+
+exec /usr/sbin/syslog-ng -F
+
diff --git a/abs/core/runit-scripts/runitscripts/services/tatir/run b/abs/core/runit-scripts/runitscripts/services/tatir/run
new file mode 100755
index 0000000..d6fc863
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/tatir/run
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting tatir"
+
+
+exec /usr/bin/PyroUsb.py > /dev/null
diff --git a/abs/core/runit-scripts/runitscripts/services/tftpd/run b/abs/core/runit-scripts/runitscripts/services/tftpd/run
new file mode 100755
index 0000000..8f742ca
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/tftpd/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting tftpd"
+
+
+exec /usr/sbin/in.tftpd --foreground -s /tftpboot
diff --git a/abs/core/runit-scripts/runitscripts/services/tty2/run b/abs/core/runit-scripts/runitscripts/services/tty2/run
new file mode 100755
index 0000000..8db2924
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/tty2/run
@@ -0,0 +1,7 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Agetty 2"
+
+exec /sbin/agetty 38400 vc/2 linux
diff --git a/abs/core/runit-scripts/runitscripts/services/tty3/run b/abs/core/runit-scripts/runitscripts/services/tty3/run
new file mode 100755
index 0000000..bdbec66
--- /dev/null
+++ b/abs/core/runit-scripts/runitscripts/services/tty3/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Agetty 3"
+exec /sbin/agetty 38400 vc/3 linux