View Single Post
b-man's Avatar
Posts: 549 | Thanked: 502 times | Joined on Feb 2008 @ Bowling Green Ohio (united states)
#10
Btw, here is my highly modified /etc/init.d/n900_wd script that is supposed to launch the watchdog daemon; do any of you that are good at init scripts/runlevels see a fault in this?

Code:
#!/bin/sh
#/etc/init.d/n900_wd: start rx51 hw watchdog service.

### BEGIN INIT INFO
# Provides:          n900_wd
# Short-Description: Start rx51 hw watchdog service.
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# X-Start-Before:    $all
# Default-Start:     2 3 4 5
# Default-Stop:      
### END INIT INFO

[ -x /usr/sbin/wd_keepalive ] || exit 0

RETVAL=0
PROG=wd_keepalive
PIDFILE=/var/run/wd_keepalive.pid
LOCKFILE=/var/lock/subsys/n900_wd

return_failure(){
  echo -n "Starting ${0} failed"
}

return_sucsess(){
  echo -n "Starting ${0} sucseeded"
}

start(){
  echo -n "Starting ${PROG}..."
  /usr/sbin/${PROG} -c /etc/watchdog-omap.conf
  RETVAL=$?
  [ ${RETVAL} -ne 0 ] && (return_failure; echo; exit ${RETVAL})
  /usr/sbin/${PROG} -c /etc/watchdog-twl4030.conf
  RETVAL=$?
  [ ${RETVAL} -eq 0 ] && touch ${LOCKFILE}
  [ ${RETVAL} -eq 0 ] && return_sucsess
  [ ${RETVAL} -ne 0 ] && return_failure
  echo
  exit ${RETVAL}
}

stop(){
  rm -rf ${LOCKFILE} ${PIDFILE}
}

restart(){
  stop
  start
}

case ${1} in
start)
  start
;;
stop)
  stop
;;
restart)
  restart
;;
*)
  echo "Usage: ${0} {start|stop|restart}"
  exit 1
;;
esac
heres my runlevle setup:

Code:
update-rc.d n900_wd start 09 2 3 4 5 .
/etc/watchdog-twl4030.conf:

Code:
watchdog-device		= /dev/twl4030_wdt
interval		= 10
realtime		= yes
priority		= 1
/etc/watchdog-omap.conf:

Code:
watchdog-device		= /dev/watchdog
interval		= 10
realtime		= yes
priority		= 1
__________________
I'm an advanced user and a bit of a modder.
----------------------------------------------
I am involved with Mer, Deblet, and NITdroid.
My ports/creations/hacks: GNOME (for Deblet), Cdeb2», Ubuntu, playable flash games in the "Get Started" app, DBS, ect...


enhanced fedora port has been canceled in favor of NITDebian (TBA)

Last edited by b-man; 2010-04-27 at 01:26.
 

The Following 2 Users Say Thank You to b-man For This Useful Post: