48d86b63b3
(Portage version: 2.2.0_alpha78/git/Linux x86_64, unsigned Manifest commit)
53 lines
1.3 KiB
Plaintext
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 $?
|
|
}
|
|
|