summaryrefslogtreecommitdiffstats
path: root/network/keepalived
diff options
context:
space:
mode:
Diffstat (limited to 'network/keepalived')
-rw-r--r--network/keepalived/doinst.sh2
-rw-r--r--network/keepalived/keepalived.SlackBuild41
-rw-r--r--network/keepalived/keepalived.info8
-rw-r--r--network/keepalived/rc.keepalived58
4 files changed, 48 insertions, 61 deletions
diff --git a/network/keepalived/doinst.sh b/network/keepalived/doinst.sh
index 7062d561a6..4c107ecd23 100644
--- a/network/keepalived/doinst.sh
+++ b/network/keepalived/doinst.sh
@@ -17,7 +17,7 @@ if [ -e etc/rc.d/rc.keepalived ]; then
mv etc/rc.d/rc.keepalived.new.incoming etc/rc.d/rc.keepalived.new
fi
-config etc/keepalived/keepalived.new
+config etc/default/keepalived.new
config etc/keepalived/keepalived.conf.new
config etc/rc.d/rc.keepalived.new
diff --git a/network/keepalived/keepalived.SlackBuild b/network/keepalived/keepalived.SlackBuild
index ba30febaa0..60f0426e58 100644
--- a/network/keepalived/keepalived.SlackBuild
+++ b/network/keepalived/keepalived.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for keepalived
# Copyright 2010,2011 Nilton Moura, Rio de Janeiro, RJ, Brasil
+# Copyright 2020 Marek Wodzinski <majek@w7i.pl>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,26 +23,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=keepalived
-VERSION=${VERSION:-1.2.19}
+VERSION=${VERSION:-2.2.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -90,15 +101,19 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHOR ChangeLog CONTRIBUTORS COPYING INSTALL README TODO VERSION \
+ AUTHOR ChangeLog CONTRIBUTORS COPYING INSTALL README README.md TODO doc/NOTE_vrrp_vmac.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cp -a $PKG/etc/rc.d/init.d/keepalived $PKG/usr/doc/$PRGNAM-$VERSION/init.keepalived
-mv $PKG/etc/sysconfig/keepalived $PKG/etc/keepalived/keepalived.new
-mv $PKG/etc/keepalived/keepalived.conf $PKG/etc/keepalived/keepalived.conf.new
-install -m755 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
-rm $PKG/etc/rc.d/init.d/keepalived
+mkdir -p $PKG/usr/share/snmp/mibs
+cp -a \
+ doc/KEEPALIVED-MIB.txt doc/VRRP-MIB.txt doc/VRRPv3-MIB.txt \
+ $PKG/usr/share/snmp/mibs
+
+mkdir -p $PKG/etc/default
+mv $PKG/etc/sysconfig/keepalived $PKG/etc/default/keepalived.new
+mv $PKG/etc/keepalived/keepalived.conf.sample $PKG/etc/keepalived/keepalived.conf.new
+install -m755 -D $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
rmdir $PKG/etc/sysconfig
mkdir -p $PKG/install
@@ -106,4 +121,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/network/keepalived/keepalived.info b/network/keepalived/keepalived.info
index a52db5cee0..5c3c527b13 100644
--- a/network/keepalived/keepalived.info
+++ b/network/keepalived/keepalived.info
@@ -1,8 +1,8 @@
PRGNAM="keepalived"
-VERSION="1.2.19"
-HOMEPAGE="http://www.keepalived.org/"
-DOWNLOAD="http://www.keepalived.org/software/keepalived-1.2.19.tar.gz"
-MD5SUM="5c98b06639dd50a6bff76901b53febb6"
+VERSION="2.2.8"
+HOMEPAGE="https://www.keepalived.org/"
+DOWNLOAD="https://www.keepalived.org/software/keepalived-2.2.8.tar.gz"
+MD5SUM="8c26f75a8767e5341d82696e1e717115"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/network/keepalived/rc.keepalived b/network/keepalived/rc.keepalived
index 8e214e651a..fc063fa1fe 100644
--- a/network/keepalived/rc.keepalived
+++ b/network/keepalived/rc.keepalived
@@ -3,48 +3,31 @@
# Startup script for the Keepalived daemon
#
# This is the modified version from the original for the
-# Slackware. The only thing that differs from the original
-# is the path of the Source configuration file. Before was
-# /etc/sysconfig and now is /etc/keepalived, and the header
-# for the update-rc.d of Debian was removed.
-#
-# The original file was copied to
-# /usr/doc/keepalived-1.2.2/init.keepalived
+# Slackware.
#
-# This version was modified by Nilton Moura, the author of
-# the SlackBuild Script for keepalived.
-
-# Source function library
-. /etc/rc.d/init.d/functions
+# This version was modified in 2010 by Nilton Moura,
+# the original author of the SlackBuild Script for keepalived.
+#
+# Sript simplified, removed dependency of optional sysvinit-functions
+# package and moved daemon options to /etc/default
+# in 2020 by Marek Wodzinski <majek@w7i.pl>
# Source configuration file (we set KEEPALIVED_OPTIONS there)
-. /etc/keepalived/keepalived
-
-RETVAL=0
-
-prog="keepalived"
+. /etc/default/keepalived
start() {
- echo -n $"Starting $prog: "
- daemon keepalived ${KEEPALIVED_OPTIONS}
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ echo "Starting keepalived"
+ /usr/sbin/keepalived ${KEEPALIVED_OPTIONS}
}
stop() {
- echo -n $"Stopping $prog: "
- killproc keepalived
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+ echo "Stopping keepalived "
+ pkill -TERM keepalived 1>/dev/null 2>/dev/null
}
reload() {
- echo -n $"Reloading $prog: "
- killproc keepalived -1
- RETVAL=$?
- echo
+ echo "Reloading keepalived"
+ pkill -1 keepalived
}
# See how we were called.
@@ -62,18 +45,7 @@ case "$1" in
stop
start
;;
- condrestart)
- if [ -f /var/lock/subsys/$prog ]; then
- stop
- start
- fi
- ;;
- status)
- status keepalived
- ;;
*)
- echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"
+ echo "Usage: $0 {start|stop|reload|restart}"
exit 1
esac
-
-exit $RETVAL