summaryrefslogtreecommitdiffstats
path: root/abs/mv-core
diff options
context:
space:
mode:
authorGreg Frost <gregfrost1@bigpond.com>2009-08-28 09:08:13 (GMT)
committerGreg Frost <gregfrost1@bigpond.com>2009-08-28 09:08:13 (GMT)
commit428e5178d79eb900bbe515665b2d6c6a4b0d0f89 (patch)
tree5cf7c10428f1d0afe62eeee70105bd447ea69b99 /abs/mv-core
parentf6276f03790fc2302054a8242339def7b6792557 (diff)
parent568da1387066e54f0eceb57fd8f53bd0eba87974 (diff)
downloadlinhes_pkgbuild-428e5178d79eb900bbe515665b2d6c6a4b0d0f89.zip
linhes_pkgbuild-428e5178d79eb900bbe515665b2d6c6a4b0d0f89.tar.gz
linhes_pkgbuild-428e5178d79eb900bbe515665b2d6c6a4b0d0f89.tar.bz2
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/mv-core')
-rwxr-xr-xabs/mv-core/MythVantage-config/PKGBUILD2
-rwxr-xr-xabs/mv-core/MythVantage-config/install_functions.sh2
-rw-r--r--abs/mv-core/mythvantage-live/PKGBUILD2
-rw-r--r--abs/mv-core/mythvantage-live/etc/live-shutdown66
-rw-r--r--abs/mv-core/mythvantage-live/etc/live-sysinit21
-rwxr-xr-xabs/mv-core/mythvantage-live/etc/rc.shutdown-live1
-rwxr-xr-xabs/mv-core/mythvantage-live/etc/rc.sysinit-live7
-rw-r--r--abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch34
-rwxr-xr-xabs/mv-core/runit-scripts-mv/PKGBUILD2
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/116
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/1.local3
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run6
-rw-r--r--abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock0
-rw-r--r--abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/pid0
-rw-r--r--abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/stat1
-rw-r--r--abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/statusbin20 -> 0 bytes
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/acpid/log/run8
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run2
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/apache/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/cron/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/dhcpd/run8
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run7
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish13
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run16
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run4
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run4
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/hal/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run5
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run4
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/igdaemon/run9
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run169
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/mdadm/finish17
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/mdadm/run19
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run19
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run4
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run9
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run1
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run7
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run11
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/oss/run3
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run4
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/smartd/finish9
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/smartd/run13
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run6
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run17
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run7
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/tatir/run9
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/tftpd/run8
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run5
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run4
61 files changed, 534 insertions, 104 deletions
diff --git a/abs/mv-core/MythVantage-config/PKGBUILD b/abs/mv-core/MythVantage-config/PKGBUILD
index 8d6766e..ce01f18 100755
--- a/abs/mv-core/MythVantage-config/PKGBUILD
+++ b/abs/mv-core/MythVantage-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=MythVantage-config
pkgver=3.2
-pkgrel=163
+pkgrel=165
pkgdesc="The Gui-installer"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted
diff --git a/abs/mv-core/MythVantage-config/install_functions.sh b/abs/mv-core/MythVantage-config/install_functions.sh
index 0bc0591..72023bd 100755
--- a/abs/mv-core/MythVantage-config/install_functions.sh
+++ b/abs/mv-core/MythVantage-config/install_functions.sh
@@ -283,7 +283,7 @@ function request_dhcp(){
if [ $status -eq 1 ]
then
#interface is down, lets see if dhcp responds
- dhcpcd -Td -t2 $ndev -h "" > /tmp/dhcpinfo.$ndev
+ dhcpcd -Td -t2 $ndev -h "" > /tmp/dhcpinfo.$ndev 2>/dev/null
#check for hostname here
TEMPVAR=`grep new_ip_address /tmp/dhcpinfo.$ndev |cut -d\= -f2`
diff --git a/abs/mv-core/mythvantage-live/PKGBUILD b/abs/mv-core/mythvantage-live/PKGBUILD
index d23d8e7..1039b71 100644
--- a/abs/mv-core/mythvantage-live/PKGBUILD
+++ b/abs/mv-core/mythvantage-live/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mythvantage-live
pkgver=5.3.3
-pkgrel=8
+pkgrel=10
provides="linhes-live"
pkgdesc="components for the Live System."
diff --git a/abs/mv-core/mythvantage-live/etc/live-shutdown b/abs/mv-core/mythvantage-live/etc/live-shutdown
index 99c4c10..75c540d 100644
--- a/abs/mv-core/mythvantage-live/etc/live-shutdown
+++ b/abs/mv-core/mythvantage-live/etc/live-shutdown
@@ -9,12 +9,12 @@ f_saveclock ()
f_swapoff ()
{
############################# Include session saving functions
- . /opt/mythvantage-live/session-save/shutdown2
- if [ -f /tmp/checkse ]; then
- . /tmp/checkse
- else
- checkse
- fi
+# . /opt/mythvantage-live/session-save/shutdown2
+# if [ -f /tmp/checkse ]; then
+# . /tmp/checkse
+# else
+# checkse
+# fi
if [ -n "${saving}" ] && ! session_save; then
echo
@@ -37,14 +37,54 @@ f_swapoff ()
f_remountro ()
{
- if [ -n "${ejectdev}" ]; then
- echo "Ejecting live CD"
- eject ${ejectdev}
- echo "========================================"
- echo "It's safe to switch the computer off now"
- echo -ne "Press Enter to continue"
- read junk
+ bootdev=`cat /.livesys/bootdevice`
+ echo "Boot device was $bootdev"
+ #bootdev=`basename $bootdev`
+ for i in `ls /dev/cd/*`
+ do
+ cdrom=`readlink -f $i`
+ if [ x$cdrom = x$bootdev ]
+ then
+ ejectdev=$cdrom
+ break
+ fi
+
+ done
+ lspci |grep -q VMware
+ if [ ! $? = 0 ]
+ then
+ if [ -n "${ejectdev}" ]
+ then
+ echo "Ejecting CD $ejectdev"
+ eject ${ejectdev}
+ echo "========================================"
+ echo "Tray will retract after 10 seconds"
+ for timer in `seq -w 10 -1 0`
+ do
+ #echo -n $timer '\x08'
+ echo -ne "\t"$timer '\010\010\010\010'
+ sleep 1
+ done
+ echo
+ echo "========================================"
+ eject -t ${ejectdev}
+ echo
+ echo "It's safe to switch the computer off now"
+ #echo -ne "Press Enter to continue"
+ #read junk
+ else
+ echo "Boot device is not a cdrom, no need to eject"
+ fi
+ else
+ echo "VMWARE detected, not ejecting the CD"
fi
}
+#Preloads these commands so we can eject the CD.
+#
+seq --help >/dev/null 2>&1
+eject --help >/dev/null 2>&1
+halt --help >/dev/null 2>&1
+poweroff --help >/dev/null 2>&1
+reboot --help >/dev/null 2>&1
# End
diff --git a/abs/mv-core/mythvantage-live/etc/live-sysinit b/abs/mv-core/mythvantage-live/etc/live-sysinit
index 8e2813b..4cf36f2 100644
--- a/abs/mv-core/mythvantage-live/etc/live-sysinit
+++ b/abs/mv-core/mythvantage-live/etc/live-sysinit
@@ -6,7 +6,7 @@ f_header ()
cR='\e[31m' cY='\e[1;33m' cN='\e[0m' cW='\e[1;37m'
echo " "
printsep
- printf " ${cR}MythVantage ${cY}Installation${cN}/${cY}Live${cW}. "
+ printf " ${cR}MythVantage ${cY}Installation${cN}/${cY}Live${cW} CDROM${cN}. "
printsep
echo " "
}
@@ -52,3 +52,22 @@ f_swapon ()
status "Activating Swap" /sbin/swapon -a
fi
}
+f_loadmodules()
+{
+ CMDLINE=$(cat /proc/cmdline)
+ echo $CMDLINE | grep -q modules
+ if [ $? -eq 0 ]
+ then
+ TEMPVAR=${CMDLINE#* modules=}
+ CMDMODULES=${TEMPVAR%% *}
+ mymod=`echo $CMDMODULES|/bin/sed 's|-|_|g' |/bin/sed 's|,| |g'`
+ stat_busy "Loading CMD module"
+ for mod in $mymod
+ do
+ /sbin/modprobe $mod
+ done
+ stat_done
+ fi
+
+
+}
diff --git a/abs/mv-core/mythvantage-live/etc/rc.shutdown-live b/abs/mv-core/mythvantage-live/etc/rc.shutdown-live
index bba263c..58988f3 100755
--- a/abs/mv-core/mythvantage-live/etc/rc.shutdown-live
+++ b/abs/mv-core/mythvantage-live/etc/rc.shutdown-live
@@ -149,6 +149,7 @@ fi
#F Remount / ro
f_remountro
+#Eject the CD
# Power off or reboot
if [ "$RUNLEVEL" = "0" ]; then
diff --git a/abs/mv-core/mythvantage-live/etc/rc.sysinit-live b/abs/mv-core/mythvantage-live/etc/rc.sysinit-live
index 3f72a50..b3b91de 100755
--- a/abs/mv-core/mythvantage-live/etc/rc.sysinit-live
+++ b/abs/mv-core/mythvantage-live/etc/rc.sysinit-live
@@ -12,7 +12,7 @@
###############################################################
### These functions have been separated out, so that they can be
-### replaced in linhes live systems.
+### replaced in mythvantage live systems.
f_header ()
{
@@ -98,7 +98,7 @@ f_swapon ()
###############################################################
-### Override above functions if running linhes live system
+### Override above functions if running mythvantage live system
[ -f /etc/live-sysinit ] && . /etc/live-sysinit
#F Print header
@@ -176,6 +176,9 @@ fi
# Load modules from the MODULES array defined in rc.conf
if ! [ "$load_modules" = "off" ]; then
if [ -f /proc/modules ]; then
+############Added by jm to load modules from /proc/cmdline
+ f_loadmodules
+##############
stat_busy "Loading Modules"
for mod in "${MODULES[@]}"; do
if [ "$mod" = "${mod#!}" ]; then
diff --git a/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3 b/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3
index 47be81a..b301aa9 100644
--- a/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3
+++ b/abs/mv-core/mythvantage-live/lib/initcpio/hooks/larch3
@@ -96,6 +96,8 @@ run_hook ()
msg_ ":: Mounting squashed images"
/bin/mkdir /tfs/system
+ #added sleep for 3 seconds, because well i don't know but it seems to fix things
+ sleep 3
# The klibc mount command doesn't support '-o loop'
/bin/losetup /dev/loop0 ${sysSqf}
/bin/mount -r -t squashfs /dev/loop0 /tfs/system
@@ -107,11 +109,13 @@ run_hook ()
export LD_LIBRARY_PATH=/tfs/system/lib:/tfs/system/usr/lib
/bin/mkdir /tfs/mods
+
# The klibc mount command doesn't support '-o loop'
/bin/losetup /dev/loop1 ${modsSqf}
/bin/mount -r -t squashfs /dev/loop1 /tfs/mods
# Unpack the overlay
+
msg_ ":: Initializing writable layer for union (overlay)"
/tfs/system/usr/bin/lzop -d < ${overlay} | \
/tfs/system/bin/tar -C /tfs -xf -
diff --git a/abs/mv-core/runit-scripts-mv/PKGBUILD b/abs/mv-core/runit-scripts-mv/PKGBUILD
index ae85623..04b2c92 100755
--- a/abs/mv-core/runit-scripts-mv/PKGBUILD
+++ b/abs/mv-core/runit-scripts-mv/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=runit-scripts-mv
pkgver=1.8.0
-pkgrel=4
+pkgrel=7
pkgdesc="collection of startup scripts for runit MythVantage styel"
url="http://smarden.org/runit/"
license="BSD"
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/1 b/abs/mv-core/runit-scripts-mv/runitscripts/1
index 748930f..6e4425d 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/1
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/1
@@ -1,14 +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
-#/usr/bin/load-modules-mythvantage.sh
+#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
-#/bin/su mythtv -c /usr/bin/grabkey.py 2>/dev/null 1>/devn/null &
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/1.local b/abs/mv-core/runit-scripts-mv/runitscripts/1.local
new file mode 100755
index 0000000..f79a0c6
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/1.local
@@ -0,0 +1,3 @@
+#!/bin/bash
+#local user startup script, run at the end of runit 1
+
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run
index 823916d..71ffedd 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/run
@@ -1,5 +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/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock b/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock
deleted file mode 100644
index e69de29..0000000
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/lock
+++ /dev/null
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
deleted file mode 100644
index e69de29..0000000
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/pid
+++ /dev/null
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
deleted file mode 100644
index eb0e904..0000000
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/stat
+++ /dev/null
@@ -1 +0,0 @@
-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
deleted file mode 100644
index 2254c38..0000000
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/Xvfb/supervise/status
+++ /dev/null
Binary files differ
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/log/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/log/run
new file mode 100755
index 0000000..20c892e
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/acpid/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run
index daf9859..80cc65a 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/acpid/run
@@ -1,3 +1,7 @@
#!/bin/sh
exec 2>&1
-exec /usr/sbin/acpid -f -c /etc/acpi/events 2>/dev/null >/dev/null
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting acpid"
+exec /usr/sbin/acpid -f -c /etc/acpi/events >2 /dev/null 1>/dev/null
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
index 0a97cfa..17f5f99 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/alsa-utils/run
@@ -1,3 +1,3 @@
#!/bin/sh
exec 2>&1
-exec /etc/rc.d/alsa-utils start all
+exec /etc/rc.d/alsa start
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run
index 130d870..95d5cc4 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/apache/run
@@ -1,2 +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/mv-core/runit-scripts-mv/runitscripts/services/avahi/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run
index 323d242..b9b4905 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/avahi/run
@@ -1,4 +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/mv-core/runit-scripts-mv/runitscripts/services/cron/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run
index 99dc014..0894236 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/cron/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/dbus/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run
index 872ca77..a9af150 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/dbus/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/dhcpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/dhcpd/run
new file mode 100755
index 0000000..38ae40a
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run
index 451dda4..f14c51a 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/dnsmasq/run
@@ -1,4 +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/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run
index 5697f6f..56f7ae6 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/evrouter/run
@@ -1,13 +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/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish
index 3bbd374..4836b44 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/finish
@@ -1,12 +1,15 @@
#!/bin/bash
exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
grep -q noautologin /proc/cmdline
STATUS=$?
- if [ $STATUS = 0 ]
- then
- chvt 2
+if [ $STATUS = 0 ]
+then
+ chvt 2
else
-
chvt 1
touch /etc/sv/frontend/.runtime/`date +%s`
sleep 0.5
@@ -19,6 +22,6 @@ if [ $numfiles -gt 2 ]
then
sv stop frontend
rm -f /etc/sv/frontend/.runtime/*
- echo "Frontend is not able to start, disabling it"
+ printhl " Frontend is not able to start, disabling it."
fi
fi
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run
index 35d97d0..0c75b96 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/frontend/run
@@ -1,15 +1,17 @@
#!/bin/sh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
exec 2>&1
sv start dbus
sv start hal
- grep -q noautologin /proc/cmdline
- STATUS=$?
- if [ $STATUS = 0 ]
- then
+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
+fi
+stat_runit "Starting MythVantage frontend"
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
index f807822..8d364db 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/funcd/run
@@ -1,2 +1,6 @@
#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting func"
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
index fbe8ba0..faf4d59 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ghosd/run
@@ -1,3 +1,7 @@
#!/bin/sh
exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting ghosd"
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
index 361fc43..c347c77 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/gpm/run
@@ -1,4 +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/mv-core/runit-scripts-mv/runitscripts/services/hal/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run
index f1362b2..a6d5c0e 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hal/run
@@ -1,4 +1,8 @@
#!/bin/sh
exec 2>&1
-sv waitup dbus 2>/dev/null 1>/dev/null
+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/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run
index e45173d..520f720 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit-client/run
@@ -14,7 +14,10 @@
#----------------------------------------------------------------------------#
#
# $Id: runclient.sh,v 1.13 2006/07/14 21:25:19 henrik Rel $
-
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting hobbit client"
# 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
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run
index 24ad9fe..19b8194 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/hobbit/run
@@ -1,3 +1,7 @@
#!/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/mv-core/runit-scripts-mv/runitscripts/services/igdaemon/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/igdaemon/run
new file mode 100755
index 0000000..ea4f33b
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run
index df71bf8..da2258b 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lcdd/run
@@ -1,5 +1,11 @@
#!/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
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run
index 70cb0a5..798690c 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lighttpd/run
@@ -1,2 +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/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish
index 754bca1..1afc41c 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/finish
@@ -1,4 +1,8 @@
#!/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
@@ -8,5 +12,5 @@ if [ $numfiles -gt 3 ]
then
rm -f /etc/sv/lircd/.runtime/* 2>/dev/null
sv stop lircd
- echo "lircd is not able to start, disabling it"
+ printhl " 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
index ceda8db..0a398ac 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/lircd/run
@@ -1,53 +1,138 @@
#!/bin/bash
+
exec 2>&1
-run_lircd2=false
-. /etc/systemconfig
-[ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime
+export TERM=linux
-function dvico_detect {
+. /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
- if [ x$Remotetype = "xdvico" ]
- then
- DEVICE="/dev/usb/hiddev0"
- fi
-}
+LOG=/tmp/lirc.log
-function imon_detect {
-if [ -e /dev/lirc_imon ]
+if [ -f $LOG ]
then
-lircd2_cmd="/usr/sbin/lircd -d /dev/lirc_imon --output=/dev/lircd --pidfile=/var/run/lircd2.pid --connect=localhost:8765"
-run_lircd2=true
+ rm -f $LOG
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
- ;;
- Hauppauge)
- DEVICE=/dev/lirc3
- ;;
- *)
-
- DEVICE=`ls /dev/lirc[0-9] 2>/dev/null |sort |sed '/./,$!d'|head -n 1 `
- imon_detect
- dvico_detect
- ;;
-esac
-
-if [ "$run_lircd2" = "true" ]
+
+if [ -f /etc/runit/lirc.sh ]
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
+ #program must not terminate.
+
+ stat_runit "Starting lirc"
+
+ /etc/runit/lirc.sh
else
- exec /usr/sbin/lircd -n -d $DEVICE 2>/dev/null 1>/dev/null
+ . /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/mv-core/runit-scripts-mv/runitscripts/services/mdadm/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/mdadm/finish
new file mode 100755
index 0000000..92782ba
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/mdadm/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mdadm/run
new file mode 100755
index 0000000..0ab432e
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/mysql/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run
index 569230e..6b2f95a 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/mysql/run
@@ -1,24 +1,28 @@
#!/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_busy "Adding mysql group"
+ stat_runit "Adding mysql group"
groupadd -g 89 mysql
- stat_done
+
fi
if [ ! `egrep '^mysql:' /etc/passwd` ]; then
- stat_busy "Adding mysql user"
+ 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
- stat_done
+
fi
if [ ! -d $MYSQLD_ROOT ]; then
- mkdir $MYSQLD_ROOT
- /usr/bin/mysql_install_db --datadir=$MYSQLD_ROOT --user=mysql
+ 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
@@ -26,4 +30,5 @@ 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
+
+exec /usr/sbin/mysqld --skip-name-resolve -u mysql 2>/dev/null >/dev/null
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run
index 0868a01..692e7db 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/mythbackend/run
@@ -2,6 +2,10 @@
exec 2>&1
. /etc/profile
. /etc/systemconfig
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+
export HOME=/root
if [ ! x$SystemType = xSlave_backend ]
then
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run
index 7dbc8ba..44154c7 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncid/run
@@ -1,12 +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/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run
index f1c710a..6fff089 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ncidd/run
@@ -1,7 +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/mv-core/runit-scripts-mv/runitscripts/services/netfs/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run
index f2c0813..28388b9 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/netfs/run
@@ -1,5 +1,6 @@
#!/bin/sh
exec 2>&1
sv start portmap
+sv start nfslock
/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
index d8435a6..3b63077 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfsd/run
@@ -1,5 +1,9 @@
#!/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)
@@ -11,12 +15,15 @@ source /etc/conf.d/nfs
/usr/sbin/exportfs -ra > /dev/null 2>/dev/null
# start some nfsd threads
+printhl " Using ${NFSD_OPTS} "
/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
+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/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run
index 0ec6f75..8d627ad 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nfslock/run
@@ -1,4 +1,8 @@
#!/bin/bash
exec 2>&1
-sv start portmap >/dev/null 2>/dev/null
+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/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run
index 9aa27ec..9ed032b 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/nmbd/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run
index 65e551c..146c4e0 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/ntpd/run
@@ -1,3 +1,10 @@
#!/bin/sh
-/usr/bin/ntpdate pool.ntp.org
-exec /usr/bin/ntpd -n -p /var/run/ntpd.pid
+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/mv-core/runit-scripts-mv/runitscripts/services/oss/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run
index 687de8f..fe26e3f 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/oss/run
@@ -1,5 +1,8 @@
#!/bin/sh
exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
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
index 561d65b..9e708e6 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/portmap/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/smartd/finish b/abs/mv-core/runit-scripts-mv/runitscripts/services/smartd/finish
new file mode 100755
index 0000000..7b77994
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/smartd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/smartd/run
new file mode 100755
index 0000000..15ed769
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/smbd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run
index af77dcb..b4a545b 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/smbd/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/sshd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
index a019e5d..fc22e3b 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
@@ -1,20 +1,13 @@
#!/bin/bash
exec 2>&1
-nobodydir=/data/srv/.nobody_ssh
+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; }
-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
index eb56ace..8633a77 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/syslog-ng/run
@@ -1,3 +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/mv-core/runit-scripts-mv/runitscripts/services/tatir/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tatir/run
new file mode 100755
index 0000000..d6fc863
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/tftpd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tftpd/run
new file mode 100755
index 0000000..8f742ca
--- /dev/null
+++ b/abs/mv-core/runit-scripts-mv/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/mv-core/runit-scripts-mv/runitscripts/services/tty2/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run
index 3782aed..8db2924 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty2/run
@@ -1,2 +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/mv-core/runit-scripts-mv/runitscripts/services/tty3/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run
index ce66b0d..bdbec66 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/tty3/run
@@ -1,2 +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