Radicalz38
|
2010-12-01
, 03:21
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#411
|
|
2010-12-07
, 17:18
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#412
|
#!/bin/sh
#
# chkconfig: 12345 01 99
# description: N900 watchdog kicker
#
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/sbin/wd_keepalive ] || exit 0
RETVAL=0
prog=wd_keepalive
pidfile=/var/run/wd_keepalive.pid
lockfile=/var/lock/subsys/n900_wd
start() {
echo -n $"Starting $prog: "
/usr/sbin/${prog} -c /etc/watchdog-omap.conf
RETVAL=$?
[ $RETVAL -ne 0 ] && (echo_failure; echo; return $RETVAL)
/usr/sbin/${prog} -c /etc/watchdog-twl4030.conf
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
[ $RETVAL -eq 0 ] && echo_success
[ $RETVAL -ne 0 ] && echo_failure
echo
return $RETVAL
}
stop() {
rm -f $lockfile $pidfile
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|status}"
exit 1
esac
watchdog-device = /dev/twl4030_wdt
interval = 10
realtime = yes
priority = 1
watchdog-device = /dev/watchdog
interval = 10
realtime = yes
priority = 1
usr/sbin/wd_keepalive
/etc/rc.d/init.d/functions
The Following User Says Thank You to Radicalz38 For This Useful Post: | ||
|
2010-12-07
, 18:18
|
Posts: 256 |
Thanked: 92 times |
Joined on Oct 2010
|
#413
|
|
2010-12-07
, 18:38
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#414
|
|
2010-12-07
, 18:54
|
Posts: 256 |
Thanked: 92 times |
Joined on Oct 2010
|
#415
|
cp -s /etc/init.d/yourscript /etc/rc1.d/S01yourscript
That is the problem... It isn't initiated on bootup
So I guess i'm on the wrong directory then... I've put mine on /etc/init.d/wd_n900. I thought it would still get initiated there.
The Following User Says Thank You to lunat For This Useful Post: | ||
|
2010-12-07
, 19:03
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#416
|
first off i do not understand why you don't just use the ubuntu script that comes with the wtchdog. but not my business...
putting something in /etc/init.d does not cause it to be called. you need the links in the runlevels. (alternatively convert the script to a upstart script)
so you have to link it in. eg:
to call it in runlevel 1 you might want to have it called in (all)other runlevels and/or have the priority behind the S adjusted.Code:cp -s /etc/init.d/yourscript /etc/rc1.d/S01yourscript
and if that doesn't work something with your booting is wrong and the /etc/event.d/rcX (rsp. /etc/init.d/rc ) doesn't get called.
|
2010-12-07
, 19:56
|
Posts: 256 |
Thanked: 92 times |
Joined on Oct 2010
|
#417
|
cp -s SOME.SCRIPT.WHEREEVER.IT.IS /etc/rcX.d/S01FANCYNAME
Well in the first place i'm not a linux guru so I really am not that familiar with the filesystem. I just read it here that there's a script which could communicate with watchdog so it won't reboot itself. And that got my interest and look at it and tested it
Also I didn't know there is already a script for watchdog that comes with maemo...
The Following User Says Thank You to lunat For This Useful Post: | ||
|
2010-12-07
, 20:09
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#418
|
|
2010-12-07
, 20:39
|
Posts: 256 |
Thanked: 92 times |
Joined on Oct 2010
|
#419
|
Actually I wasn't mad or anything you just misinterpretted it
Yes I understood already the problem and your explanation, actually I already got it working now
I just explained why I used another watchdog script. So the simple answer is that I didn't know there is one already. Someone just referred me to that script when I asked so that's the one I used.
And ok might wanna try that default script now... So all I have to do is edit the watchdog.conf and all should be fine? Would that mean I wouldn't need the watchdog-omap.conf & watchdog-twl4030.conf to go around watchdog? Again thanks for the time!
Oh btw you can explain simplier... I know linux... It's just I don't bother to dwell deeper on it until now of course
|
2010-12-07
, 20:45
|
Posts: 1,042 |
Thanked: 430 times |
Joined on May 2010
|
#420
|