| Submitter | Yury Polyanskiy |
|---|---|
| Date | 2010-05-03 03:47:45 |
| Message ID | <20100502234745.47537ef9@penta.localdomain> |
| Download | mbox | patch |
| Permalink | /patch/61/ |
| State | Accepted, archived |
| Delegated to: | Florian Fainelli |
| Headers | show |
Comments
On Monday 03 May 2010 05:47:45 Yury Polyanskiy wrote: > Dear all, > > Here is a simple patch to provide /etc/init.d/watchdog stop. Just in > case someone is interested. > > Index: package/base-files/files/etc/init.d/watchdog > =================================================================== > --- package/base-files/files/etc/init.d/watchdog (revision 21164) > +++ package/base-files/files/etc/init.d/watchdog (working copy) > @@ -6,3 +6,8 @@ > [ -c /dev/watchdog ] && [ -x /sbin/watchdog ] && \ > watchdog -t 5 /dev/watchdog > } > + > +stop() { > + killall -q watchdog > + [ -c /dev/watchdog ] && echo "V" > /dev/watchdog > +} Applied in r21334, thanks! -- Florian
On Mon, 3 May 2010 09:35:59 +0000 Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> wrote: > > + [ -c /dev/watchdog ] && echo "V" > /dev/watchdog > > Why is this needed? busybox watchdog applet writes the magic on shutdown. Ah, I didn't know it. Anyways, one line of code for extra-safety wouldn't hurt.
On 03.05.2010 15:59, Yury Polyanskiy wrote: > On Mon, 3 May 2010 09:35:59 +0000 > Vasilis Tsiligiannis<b_tsiligiannis@silverton.gr> wrote: > >>> + [ -c /dev/watchdog ]&& echo "V"> /dev/watchdog >> >> Why is this needed? busybox watchdog applet writes the magic on shutdown. > What is magic? In this context .. thanks ede
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The char "V" is the magic value to stop watchdog timers in linux (if implemented by the corresponding driver) ~ Jow -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkve3yEACgkQdputYINPTPNa9gCeM4mJScD1xTPusnD3CctVEmbj CqIAnRGNseggRygB81te3meg6oxKP5LH =cVs2 -----END PGP SIGNATURE-----
Patch
Index: package/base-files/files/etc/init.d/watchdog =================================================================== --- package/base-files/files/etc/init.d/watchdog (revision 21164) +++ package/base-files/files/etc/init.d/watchdog (working copy) @@ -6,3 +6,8 @@ [ -c /dev/watchdog ] && [ -x /sbin/watchdog ] && \ watchdog -t 5 /dev/watchdog } + +stop() { + killall -q watchdog + [ -c /dev/watchdog ] && echo "V" > /dev/watchdog +}