Changeset 29090


Ignore:
Timestamp:
2011-11-14T03:38:32+01:00 (6 years ago)
Author:
nico
Message:

packages/lsm: use new service functions, pass proper CFLAGS, cleanup

Location:
packages/net/lsm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/lsm/Makefile

    r24872 r29090  
    11#  
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2010-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=lsm 
    1111PKG_VERSION:=0.60 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     
    1616PKG_MD5SUM:=f4748308c0a1caa98d7e756778954116 
    1717 
     18PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) 
     19 
    1820include $(INCLUDE_DIR)/package.mk 
    19  
    20 PKG_UNPACK += && rmdir $(PKG_BUILD_DIR) && mv $(BUILD_DIR)/lsm $(PKG_BUILD_DIR) 
    2121 
    2222define Package/lsm 
     
    3838 
    3939define Build/Compile 
    40         $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" 
     40        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     41                CC="$(TARGET_CC)" \ 
     42                CFLAGS="$(TARGET_CFLAGS)" 
    4143endef 
    4244 
  • packages/net/lsm/files/lsm.init

    r23422 r29090  
    11#!/bin/sh /etc/rc.common 
    2 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 
    3 NAME=lsm 
    4 PROG=/usr/sbin/$NAME 
    5 DESC="Link State Monitor" 
    6 PIDFILE=/var/run/lsm.pid 
     2# Copyright (C) 2010-2011 OpenWrt.org 
     3 
    74START=45 
    85 
    9 test -x $PROG || exit 0 
    10 set -e 
     6SERVICE_USE_PID=1 
     7SERVICE_PID_FILE=/var/run/lsm.pid 
    118 
    129start() { 
    13         echo -n "Starting $DESC: $NAME" 
    14         start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE 
    15  
    16         echo "." 
     10        service_start /usr/sbin/lsm /etc/lsm/lsm.conf $SERVICE_PID_FILE 
    1711} 
    1812 
    1913stop() { 
    20         echo -n "Stopping $DESC: $NAME" 
    21         start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE 
    22         echo "." 
    23 } 
    24  
    25 restart() { 
    26         echo -n "Restarting $DESC: $NAME... " 
    27         start-stop-daemon -q -K -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE 
    28         sleep 1 
    29         start-stop-daemon -q -S -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE 
    30         echo "done." 
     14        service_stop /usr/sbin/lsm 
    3115} 
    3216 
    3317reload() { 
    34         # 
    35         #       If the daemon can reload its config files on the fly 
    36         #       for example by sending it SIGHUP, do it here. 
    37         # 
    38         #       If the daemon responds to changes in its config file 
    39         #       directly anyway, make this a do-nothing entry. 
    40         # 
    41         echo -n "Reloading $DESC configuration... " 
    42         start-stop-daemon -q -K -s HUP -p $PIDFILE -x $PROG -- /etc/lsm/lsm.conf $PIDFILE 
    43         echo "done." 
     18        service_reload /usr/sbin/lsm 
    4419} 
Note: See TracChangeset for help on using the changeset viewer.