aboutsummaryrefslogtreecommitdiff
path: root/network/host-sflow
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-20 03:22:02 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-06-23 07:48:05 +0700
commitbd81ae28fbb4afb302db384a67405b9161dae07f (patch)
tree5eba615f975935c4ff4ec0d7bb55cfd4e9dad899 /network/host-sflow
parent80f89d05435c338cbcc98bf0cea4e57a6ca74201 (diff)
network/host-sflow: Fix init scrupt and doinst.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/host-sflow')
-rw-r--r--network/host-sflow/README7
-rw-r--r--network/host-sflow/doinst.sh2
-rw-r--r--network/host-sflow/host-sflow.SlackBuild16
3 files changed, 18 insertions, 7 deletions
diff --git a/network/host-sflow/README b/network/host-sflow/README
index 1426537c5875e..a805696a06b34 100644
--- a/network/host-sflow/README
+++ b/network/host-sflow/README
@@ -2,3 +2,10 @@ The Host sFlow agent exports physical and virtual server performance
metrics using the sFlow protocol. The agent provides scalable,
multi-vendor, multi-OS performance monitoring with minimal impact on
the systems being monitored.
+
+To start hsflowd at boot, add something like this to your
+/etc/rc.d/rc.local:
+
+if [ -x /etc/rc.d/rc.hsflowd ]; then
+ /etc/rc.d/rc.hsflowd start
+fi
diff --git a/network/host-sflow/doinst.sh b/network/host-sflow/doinst.sh
index 00c3dd9dfa761..83420b7d7c441 100644
--- a/network/host-sflow/doinst.sh
+++ b/network/host-sflow/doinst.sh
@@ -22,5 +22,5 @@ preserve_perms() {
config $NEW
}
-preserve_perms etc/init.d/hsflowd
+preserve_perms etc/rc.d/rc.hsflowd.new
config etc/hsflowd.conf.new
diff --git a/network/host-sflow/host-sflow.SlackBuild b/network/host-sflow/host-sflow.SlackBuild
index 60827f87b1e97..7c017930ce060 100644
--- a/network/host-sflow/host-sflow.SlackBuild
+++ b/network/host-sflow/host-sflow.SlackBuild
@@ -22,13 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230620 bkw: modified by SlackBuilds.org, BUILD=2:
+# - Install init script in Slackware standard location, and make it
+# a proper .new config file.
+# - Mention the init script in README.
+
# 02/Apr/2018 * First version
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=host-sflow
VERSION=${VERSION:-2.0.15}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -40,9 +45,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -77,9 +79,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Soft-link in tarball causes x bit to be set below; nuke it
rm -f $PRGNAM-$VERSION/README
@@ -108,6 +110,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mv $PKG/etc/hsflowd.conf $PKG/etc/hsflowd.conf.new
+mv $PKG/etc/init.d $PKG/etc/rc.d
+mv $PKG/etc/rc.d/hsflowd $PKG/etc/rc.d/rc.hsflowd.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION