Changeset 30237


Ignore:
Timestamp:
2012-02-05T16:53:36+01:00 (4 years ago)
Author:
jow
Message:

[packages_10.03.2] parprouted: merge r28915, r29213

Location:
branches/packages_10.03.2/net/parprouted
Files:
1 deleted
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/packages_10.03.2/net/parprouted/Makefile

    r26094 r30237  
    11# 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=parprouted 
    1111PKG_VERSION:=0.64 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=3 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     
    4444endef 
    4545 
    46 define Package/parprouted/install        
     46define Package/parprouted/install 
    4747        $(INSTALL_DIR) $(1)/usr/sbin 
    4848        $(INSTALL_BIN) $(PKG_BUILD_DIR)/parprouted $(1)/usr/sbin/ 
    49         $(INSTALL_DIR) $(1)/etc/default 
    50         $(INSTALL_BIN) ./files/parprouted.default $(1)/etc/default/parprouted 
     49        $(INSTALL_DIR) $(1)/etc/config 
     50        $(INSTALL_BIN) ./files/parprouted.config $(1)/etc/config/parprouted 
    5151        $(INSTALL_DIR) $(1)/etc/init.d 
    5252        $(INSTALL_BIN) ./files/parprouted.init $(1)/etc/init.d/parprouted 
    5353endef 
    5454 
     55define Package/parprouted/conffiles 
     56/etc/config/parprouted 
     57endef 
     58 
    5559$(eval $(call BuildPackage,parprouted)) 
  • branches/packages_10.03.2/net/parprouted/files/parprouted.init

    r15247 r30237  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
     3 
    34START=50 
    45 
    5 BIN=parprouted 
    6 DEFAULT=/etc/default/$BIN 
     6section_enabled() { 
     7        local enabled 
     8        config_get_bool enabled "$1" 'enabled' 0 
     9        [ $enabled -gt 0 ] 
     10} 
     11 
     12append_interface() { 
     13        local name="$1" 
     14        local interface 
     15        config_get interface "$name" 'ifname' "$name" 
     16        append args "$interface" 
     17} 
     18 
     19start_instance() { 
     20        local section="$1" 
     21        local permanent 
     22        local interfaces 
     23        local args="" 
     24 
     25        section_enabled "$section" || return 1 
     26 
     27        config_get_bool permanent "$section" 'permanent' 0 
     28        [ $permanent -eq 0 ] || append args "-p" 
     29 
     30        config_list_foreach "$section" 'interfaces' append_interface 
     31 
     32        service_start /usr/sbin/parprouted $args 
     33} 
    734 
    835start() { 
    9         [ -f $DEFAULT ] && . $DEFAULT 
    10         $BIN $OPTIONS 
     36        include /lib/network 
     37        scan_interfaces 
     38        config_load 'parprouted' 
     39        config_foreach start_instance 'parprouted' 
    1140} 
    1241 
    1342stop() { 
    14         killall $BIN 
     43        service_stop /usr/sbin/parprouted 
    1544} 
Note: See TracChangeset for help on using the changeset viewer.