View Single Post
Siggen's Avatar
Posts: 204 | Thanked: 75 times | Joined on Jan 2010 @ Norway
#15
Originally Posted by b-man View Post
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'll be honest, I read the script and I'm just guessing its the script that reports that everything succeeds or fails when you start linux without a fancy picture above this info, and did not fully understand the syntax used, but some of it i understand. What might help is some questions I have that I'm wondering about.

*Is this is the same script that worked booting fedora, or is it modified? If not have you tried that script?
*How does MER tackle this?
*What is the outcome of running this current script thats faulty? and under what circumstances should that happend? (skip that last question if you can write a book on it)

Thanks for making progress on this field I'll ask around some friends that might or might not understand whats wrong
 

The Following User Says Thank You to Siggen For This Useful Post: