redigest
This commit is contained in:
54
sys-apps/micro-evtd/files/micro-evtd-boot.initd
Normal file
54
sys-apps/micro-evtd/files/micro-evtd-boot.initd
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/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
|
||||
ln -sf $deamon /usr/sbin/micro-evtd
|
||||
;;
|
||||
"Buffalo TeraStation Pro/Live" )
|
||||
deamon=micro-evtd.tera
|
||||
ln -sf $deamon /usr/sbin/micro-evtd
|
||||
;;
|
||||
*)
|
||||
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 $?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user