Changeset 20017


Ignore:
Timestamp:
2010-03-06T18:03:32+01:00 (7 years ago)
Author:
swalker
Message:

[packages] ucarp: update to 1.5.2, add missing libpcap depends, select the ip addr symbols needed by the init script, cleanup the init script

Location:
packages/net/ucarp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • packages/net/ucarp/Makefile

    r19787 r20017  
    99 
    1010PKG_NAME:=ucarp 
    11 PKG_VERSION:=1.5.1 
     11PKG_VERSION:=1.5.2 
    1212PKG_RELEASE:=1 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    1515PKG_SOURCE_URL:=http://download.pureftpd.org/pub/ucarp 
    16 PKG_MD5SUM:=9219ea8214198e8af751353a132087bb 
     16PKG_MD5SUM:=723636dbf79fc6abd329a71ec4ddf79d 
     17 
     18PKG_INSTALL:=1 
    1719 
    1820include $(INCLUDE_DIR)/package.mk 
     
    2224  CATEGORY:=Network 
    2325  TITLE:=Lets several hosts share one IP 
     26  DEPENDS:=+libpcap 
    2427  URL:=http://www.ucarp.org/project/ucarp 
    2528endef 
     
    3134endef 
    3235 
     36define Package/ucarp/conffiles 
     37/etc/ucarp.conf 
     38endef 
     39 
     40define Package/ucarp/config 
     41  select BUSYBOX_CONFIG_IP 
     42  select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS 
     43endef 
     44 
    3345define Package/ucarp/install 
    34         $(INSTALL_DIR) $(1)/sbin 
    35         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ucarp $(1)/sbin/ 
     46        $(INSTALL_DIR) $(1)/etc 
     47        $(INSTALL_CONF) ./files/ucarp.conf $(1)/etc/ 
     48        $(INSTALL_DIR) $(1)/etc/init.d 
     49        $(INSTALL_BIN) ./files/ucarp.init $(1)/etc/init.d/ucarp 
     50        $(INSTALL_DIR) $(1)/usr/sbin 
     51        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ucarp $(1)/usr/sbin/ 
    3652endef 
    3753 
  • packages/net/ucarp/files/ucarp.conf

    r19773 r20017  
    1 # Usage for AirOS:  
    2 # 1) Edit this file and copy it to /etc/persistent/ucarp.conf 
    3 # 2) Run: ucarp.init test 
    4 # 3) Run: cfgmtd -w -p /etc/ && reboot 
     1# Run in background 
     2BACKGROUND=1 
    53 
    64# Interface to run CARP on 
  • packages/net/ucarp/files/ucarp.init

    r19773 r20017  
    1 #!/bin/sh 
     1#!/bin/sh /etc/rc.common 
    22 
    3 CONF=/etc/persistent/ucarp.conf 
    4 MODE="$1" 
     3START=50 
     4CONF=/etc/ucarp.conf 
    55 
    6 if [ "${MODE}" = "stop" ] 
    7 then 
    8     echo "Killing them all and letting init sort them out" 
    9     killall ucarp 
    10     exit 0 
    11 fi 
     6start() { 
     7        . ${CONF} 
    128 
    13 if [ -f "${CONF}" ] 
    14 then 
    15     
    16    if [ "${MODE}" = "test" ] 
    17    then 
    18        daemon="" 
    19    else 
    20        echo "Starting UCARP using ${CONF} as a daemon, use test parameter to run in foreground" 
    21        daemon="--daemonize" 
    22    fi 
     9        [ ${BACKGROUND} = 1 ] && daemon="--daemonize" 
    2310 
    24    . ${CONF} 
    25     
    26    cat > /var/run/ucarp-vip-up <<EOF 
     11        cat > /var/run/ucarp-vip-up <<EOF 
    2712#!/bin/sh 
    2813 
     
    3015 
    3116EOF 
    32    for ip in ${PINGIP} 
    33    do 
     17        for ip in ${PINGIP} 
     18        do 
    3419        cat >> /var/run/ucarp-vip-up <<EOF 
    35 ${arping}/bin/arping -c 2 -I ${IF} -s ${VIP} ${ip} 
     20/usr/bin/arping -c 2 -I ${IF} -s ${VIP} ${ip} 
    3621EOF 
    37    done 
     22        done 
     23        chmod a+x /var/run/ucarp-vip-up 
    3824 
    39  
    40    chmod a+x /var/run/ucarp-vip-up 
    41  
    42    cat > /var/run/ucarp-vip-down <<EOF 
     25        cat > /var/run/ucarp-vip-down <<EOF 
    4326#!/bin/sh 
    4427 
     
    4629 
    4730EOF 
    48    chmod a+x /var/run/ucarp-vip-down 
     31        chmod a+x /var/run/ucarp-vip-down 
    4932 
    50    /sbin/ucarp --interface=${IF} --srcip=${MYIP} --vhid=1 --pass=${PASSWORD} \ 
    51          --addr=${VIP} --nomcast $daemon \ 
    52          --upscript=/var/run/ucarp-vip-up --downscript=/var/run/ucarp-vip-down 
     33        /usr/sbin/ucarp --interface=${IF} --srcip=${MYIP} --vhid=1 --pass=${PASSWORD} \ 
     34                        --addr=${VIP} --nomcast $daemon \ 
     35                        --upscript=/var/run/ucarp-vip-up --downscript=/var/run/ucarp-vip-down 
     36} 
    5337 
    54    if [ "${MODE}" = "test" ] 
    55    then 
    56        echo "UCARP has exited." 
    57    else 
    58        echo "UCARP has been started." 
    59    fi 
    60  
    61 else  
    62    echo "UCARP is not enabled" 
    63    exit 0 
    64 fi 
     38stop() { 
     39        killall ucarp 
     40} 
  • packages/net/ucarp/patches/100-configure-cross-compilation.patch

    r19773 r20017  
    1 Only in ucarp-1.5.1: autom4te.cache 
    2 diff -ur ucarp-1.5.1.clean/configure ucarp-1.5.1/configure 
    3 --- ucarp-1.5.1.clean/configure 2010-01-30 00:03:55.000000000 +0100 
    4 +++ ucarp-1.5.1/configure       2010-01-30 00:36:06.000000000 +0100 
    5 @@ -30117,174 +30117,11 @@ 
     1--- a/configure 
     2+++ b/configure 
     3@@ -30129,174 +30129,11 @@ _ACEOF 
    64  
    75 fi 
Note: See TracChangeset for help on using the changeset viewer.