overlay/sys-apps/micro-evtd/files/micro_evtd-boot.initd
Mario Fetka 48d86b63b3 sys-apps/micro-evtd: correct system detect
(Portage version: 2.2.0_alpha78/git/Linux x86_64, unsigned Manifest commit)
2011-12-21 21:18:46 +01:00

53 lines
1.3 KiB
Plaintext

#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
description="Linkstation/Kurobox/Terastation micro controller daemon"
depend() {
need localmount
use logger
}
start() {
# micro_evtd doesn't start properly from s-s-d, need to investigate
ebegin "Starting ${description}"
device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
head -n1 | sed "s/^[^:]*: //")
case $device in
"Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
deamon=micro-evtd.pro
;;
"Buffalo TeraStation Pro/Live" )
deamon=micro-evtd.tera
;;
*)
eerror "micro-evtd error: device is not supported"
;;
esac
#start-stop-daemon --start --exec /usr/sbin/micro-evtd
/usr/sbin/$deamon
eend $?
}
stop() {
ebegin "Stopping ${description}"
device=$(grep "Hardware[[:space:]]*:" /proc/cpuinfo 2>/dev/null | \
head -n1 | sed "s/^[^:]*: //")
case $device in
"Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
deamon=micro-evtd.pro
;;
"Buffalo TeraStation Pro/Live" )
deamon=micro-evtd.tera
;;
*)
eerror "micro-evtd error: device is not supported"
;;
esac
start-stop-daemon --stop --exec /usr/sbin/$deamon
eend $?
}