Changeset 73909b3 in freewrt


Ignore:
Timestamp:
Oct 14, 2006, 7:03:23 PM (19 years ago)
Author:
Waldemar Brodkorb <wbx@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
54848b1
Parents:
f8a4dc3
Message:

cleanup watchdog init script

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@909 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package/watchdog
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • package/watchdog/Makefile

    rf8a4dc3 r73909b3  
    99PKG_NAME:=              watchdog
    1010PKG_VERSION:=           5.2.4
    11 PKG_RELEASE:=           1
     11PKG_RELEASE:=           2
    1212PKG_MD5SUM:=            c6ac132d92110eb2c4670d4f684105c3
     13PKG_INIT:=              15
    1314
    1415PKG_SOURCE_URL:=        http://ftp.debian.org/debian/pool/main/w/watchdog
     
    6566        $(CP) $(WRKINST)/etc/watchdog.conf $(IDIR_WATCHDOG)/etc/
    6667        install -d -m0755 $(IDIR_WATCHDOG)/etc/init.d
    67         install -m0755 ./files/watchdog.init $(IDIR_WATCHDOG)/etc/init.d/watchdog
    68         ln -sf watchdog $(IDIR_WATCHDOG)/etc/init.d/S90watchdog
     68        install -m0755 ./files/watchdog.init \
     69                $(IDIR_WATCHDOG)/etc/init.d/S$(PKG_INIT)watchdog
    6970        install -d -m0755 $(IDIR_WATCHDOG)/usr/sbin
    7071        $(CP) $(WRKINST)/usr/sbin/watchdog $(IDIR_WATCHDOG)/usr/sbin/
  • package/watchdog/files/watchdog.init

    rf8a4dc3 r73909b3  
    11#!/bin/sh
    22
    3 RUN_D=/var/run
    4 PID_F=$RUN_D/watchdog.pid
     3. /etc/rc.conf
    54
    65case $1 in
    7 autostart|start)
    8   /usr/sbin/watchdog
    9   ;;
    10  stop)
    11   [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
    12   ;;
    13  *)
    14   echo "usage: $0 (start|stop)"
    15   exit 1
     6        autostart)
     7                test x"${watchdog:-NO}" = x"NO" && exit 0
     8                exec $0 start
     9                ;;
     10        start)
     11                /usr/sbin/watchdog
     12                ;;
     13        stop)
     14                killall watchdog
     15                ;;
     16        restart)
     17                $0 stop
     18                $0 start
     19                ;;
     20        *)
     21                echo "usage: $0 { start | stop | restart }"
     22                exit 1
    1623esac
    17 
    1824exit $?
Note: See TracChangeset for help on using the changeset viewer.