|
From: Serge L. <sma...@us...> - 2008-05-20 09:39:20
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv19474/scripts Added Files: flow-tools Log Message: - added flow-tools (netflow collector) - updated software --- NEW FILE: flow-tools --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/flow-tools,v $ # $Revision: 1.1 $ # $Date: 2008/05/20 09:39:13 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: flow-tools # Required-Start: $basebuildtools $libs perl # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: package for collecting and processing NetFlow data ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings case $1 in build ) if [ "$CONFIG_FLOWTOOLS" = "y" ]; then if [ "$CONFIG_OPENSSL_BIN" = "y" ]; then OPTIONS="$OPTIONS --with-openssl" fi if [ "$CONFIG_MYSQL_CLIENT" = "y" ]; then OPTIONS="$OPTIONS --with-mysql" fi if [ "$CONFIG_POSTGRESQL_CLIENT" = "y" ]; then OPTIONS="$OPTIONS --with-pgsql" fi ./configure --prefix=/usr --sysconfdir=/etc/flow-tools --disable-nls --enable-lfs $OPTIONS || exit 1 make $PMAKE || exit 1 if [ "$CONFIG_PERL" = "y" ]; then pushd contrib/ > /dev/null || exit 1 tar vfxz Cflow-*.tar.gz && cd Cflow-* || exit 1 perl Makefile.PL || exit 1 popd > /dev/null fi strip_debug fi ;; install ) if [ "$CONFIG_FLOWTOOLS" = "y" ]; then rm -rf $TMPDIR || exit 1 mkdir -p $TMPDIR || exit 1 make install DESTDIR=$TMPDIR || exit 1 if [ "$CONFIG_PERL" = "y" ]; then pushd contrib/Cflow-* > /dev/null || exit 1 make install DESTDIR=$TMPDIR || exit 1 popd > /dev/null fi rm -f $TMPDIR/usr/lib/*a || exit 1 rm -rf $TMPDIR/usr/include || exit 1 cp -dpvR $TMPDIR/etc/* $ETCDIR/etc/ || exit 1 rm -rf $TMPDIR/etc || exit 1 cp -dpR $TMPDIR/* $CDDIR/ || exit 1 rm -rf $TMPDIR || exit 1 fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac |