[leaf-commits] src/bering-uclibc4/source/ipvsadm buildtool.cfg, NONE, 1.1 buildtool.mk, NONE, 1.1 ipvsadm-1.25.tar.gz, NONE, 1.1 ipvsadm.default, NONE, 1.1 ipvsadm.init, NONE, 1.1 ipvsadm.rules, NONE, 1.1

david M brooke <[email protected]>
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/ipvsadm
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13641

Added Files:
	buildtool.cfg buildtool.mk ipvsadm-1.25.tar.gz ipvsadm.default 
	ipvsadm.init ipvsadm.rules 
Log Message:
Updated to latest upstream for 2.6 kernel

--- NEW FILE: ipvsadm.default ---
# ipvsadm

# daemon method (none|master|backup)
DAEMON="none"

# use interface (eth0,eth1...)
IFACE="eth0"	

--- NEW FILE: ipvsadm.init ---
#!/bin/sh

RCDLINKS="0,K20 1,K20 2,S20 3,S20 4,S20 5,S20 6,K20"

IPVSADM="/sbin/ipvsadm"
IPVSADM_RULES="/etc/ipvsadm.rules"
IPVSADM_CONFIG="/etc/default/ipvsadm"

AUTO="false"
DAEMON="none"		# none|master|backup
IFACE="eth0"

start () {
    case $DAEMON in
	master|backup)
	    echo -n "Starting IPVS Connection Synchronization Daemon ($DAEMON): "
	    $IPVSADM --start-daemon $DAEMON --mcast-interface $IFACE
	    echo "Done."
	    ;;
    esac
}

stop () {
    case $DAEMON in
	master|backup)
	    echo -n "Stopping IPVS Connection Synchronization Daemon ($DAEMON): "
	    $IPVSADM --stop-daemon 
	    echo "Done."
	    ;;
    esac
}

flush () {
    echo -n "Clearing the current IPVS table: " 
    ipvsadm -C
    echo "Done."
}

load () {
    echo -n "Loading IPVS configuration: "
    grep -v "^#" $IPVSADM_RULES | $IPVSADM -R
    echo "Done."
}

save () {
    echo -n "Saving IPVS configuration: "
    echo "# ipvsadm.rules" > $IPVSADM_RULES 
    $IPVSADM -S -n >> $IPVSADM_RULES 
    echo "Done."
}

if [ -f $IPVSADM_CONFIG ]; then
    . $IPVSADM_CONFIG
fi

if [ ! -x $IPVSADM ]; then
    exit 0
fi

if [ ! -f "/proc/net/ip_vs_conn" ]; then
    echo "Kernel does not support IPVS!"
    exit 0
fi

if [ ! -f $IPVSADM_RULES ]; then
    echo "# ipvsadm.rules" > $IPVSADM_RULES
fi

case "$1" in
    start)
	if [ "$AUTO" = "true" ]; then
	    flush
	    load
	fi
	start
        ;;
    stop)
	stop
	if [ "$AUTO" = "true" ]; then
	    save
	    flush
	fi
	;;
    restart)
	stop
	if [ "$AUTO" = "true" ]; then
	    flush
	    load
	fi
	start
	;;
    reload|force-reload)
	if [ "$AUTO" = "true" ]; then
	    flush
	    load
	fi
	;;
    status)
	ipvsadm -L -n
	;;
    rate)
	ipvsadm -L --rate -n
	;;
    load)
	flush
	load
	;;
    save)
	save
	;;
    *)
	echo "Usage: $0
	  {start|stop|restart|status|rate|load|save|reload|force-reload}"
	exit 1
	;;
esac

exit 0

--- NEW FILE: ipvsadm.rules ---
# ipvsadm.rules

--- NEW FILE: buildtool.mk ---
#############################################################
#
# ipvsadm
#
#############################################################

include $(MASTERMAKEFILE)

IPVSADM_DIR:=$(shell $(BT_TGZ_GETDIRNAME) $(IPVSADM_SOURCE) 2>/dev/null )
ifeq ($(IPVSADM_DIR),)
IPVSADM_DIR:=$(shell cat DIRNAME)
endif
IPVSADM_TARGET_DIR:=$(BT_BUILD_DIR)/ipvsadm

CFLAGS = $(BT_COPT_FLAGS) -Wall -Wunused -Wstrict-prototypes -g
KERNELSOURCE = $(BT_LINUX_DIR) 

$(IPVSADM_DIR)/.source:
	tar xvzf $(IPVSADM_SOURCE)
	echo $(IPVSADM_DIR) > DIRNAME
	touch $(IPVSADM_DIR)/.source

source: $(IPVSADM_DIR)/.source
                        
$(IPVSADM_DIR)/.build: $(IPVSADM_DIR)/.source
	mkdir -p $(IPVSADM_TARGET_DIR)
	mkdir -p $(IPVSADM_TARGET_DIR)/etc/
	mkdir -p $(IPVSADM_TARGET_DIR)/etc/init.d
	mkdir -p $(IPVSADM_TARGET_DIR)/etc/default
	mkdir -p $(IPVSADM_TARGET_DIR)/sbin
	make -C $(IPVSADM_DIR) LIB_SEARCH="$(BT_STAGING_DIR)/usr/lib $(BT_STAGING_DIR)/lib" CFLAGS="$(CFLAGS)" KERNELSOURCE=$(KERNELSOURCE) all
	-$(BT_STRIP) $(BT_STRIP_BINOPTS) $(IPVSADM_DIR)/ipvsadm
	cp -a $(IPVSADM_DIR)/ipvsadm $(IPVSADM_TARGET_DIR)/sbin
	cp -a ipvsadm.default $(IPVSADM_TARGET_DIR)/etc/default/ipvsadm
	cp -a ipvsadm.rules $(IPVSADM_TARGET_DIR)/etc
	cp -a ipvsadm.init $(IPVSADM_TARGET_DIR)/etc/init.d/ipvsadm
	cp -a $(IPVSADM_TARGET_DIR)/* $(BT_STAGING_DIR)
	touch $(IPVSADM_DIR)/.build

build: $(IPVSADM_DIR)/.build
                                                                                         
clean:
	make -C $(IPVSADM_DIR) clean
	rm -rf $(IPVSADM_DIR)/.build
	rm -rf $(IPVSADM_DIR)/.configured
                                                                                                                 
srcclean: clean
	rm -rf $(IPVSADM_DIR)


--- NEW FILE: ipvsadm-1.25.tar.gz ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: buildtool.cfg ---
<File buildtool.mk>
  Server = cvs4-sourceforge
  Revision = HEAD
  Directory = ipvsadm
</File>

<File ipvsadm-1.25.tar.gz>
  Server = cvs4-sourceforge
  Revision = HEAD
  Envname = IPVSADM_SOURCE
  Directory = ipvsadm
</File>

<File ipvsadm.init>
  Server = cvs-sourceforge
  Revision = HEAD
  Directory = ipvsadm
</File>

<File ipvsadm.default>
  Server = cvs-sourceforge
  Revision = HEAD
  Directory = ipvsadm
</File>

<File ipvsadm.rules>
  Server = cvs-sourceforge
  Revision = HEAD
  Directory = ipvsadm
</File>

<Package>
	<ipvsadm>
		Version = 1.25
		Revision = 1

		Help <<EOF
		IP Virtual Server admin package
		Homepage: http://www.linuxvirtualserver.org/
		Requires: libnl.lrp, libpopt.lrp, libm.lrp
		LEAF package by __PACKAGER__, __BUILDDATE__
		EOF
		
		<Permissions>
			Files = 644
			Directories = 755
		</Permissions>

		<Owner>
			Files = root:root
			Directories = root:root
		</Owner>
		<Contents>
			<File>          
				Filename        = etc/ipvsadm.rules
				Source    	= etc/ipvsadm.rules
				Description	= rules file
				Type		= binary
				Type		= local
				Type		= conf
				Permissions = 664
			</File>                 
			<File>          
				Filename        = etc/default/ipvsadm
				Source    	= etc/default/ipvsadm
				Description	= startup defaults
				Type		= binary
				Type		= local
				Type		= conf
				Permissions = 664
			</File>                 
			<File>          
				Filename        = etc/init.d/ipvsadm
				Source    	= etc/init.d/ipvsadm
				Type		= binary
				Permissions = 755
			</File>                 
			<File>          
				Filename        = sbin/ipvsadm
				Source    	= sbin/ipvsadm
				Type		= binary
				Permissions = 755
			</File>                 

		</Contents>			
	</ipvsadm>
</Package>


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.