aboutsummaryrefslogtreecommitdiff
path: root/system/preload
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2012-09-07 15:32:57 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-09-07 15:32:57 -0500
commit2aaa31261b7997a3d62142cca8074578e0321d6d (patch)
treeb2ec2ee28d63301e468d7e9b5d9f047acbf835b9 /system/preload
parenta554826da499d9ea6c719369445c5f65ef30aa87 (diff)
system/preload: Miscellaneous cleanups and fixes
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/preload')
-rw-r--r--system/preload/preload.SlackBuild17
-rw-r--r--system/preload/rc.preload6
2 files changed, 8 insertions, 15 deletions
diff --git a/system/preload/preload.SlackBuild b/system/preload/preload.SlackBuild
index dd51886faa4c5..f6e5016f6ad64 100644
--- a/system/preload/preload.SlackBuild
+++ b/system/preload/preload.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for preload
-# Copyright 2008-2011 Robby Workman Northport, Alabama (USA)
+# Copyright 2008-2012 Robby Workman Northport, Alabama (USA)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=preload
-VERSION=0.6.4
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.6.4}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -79,11 +79,9 @@ CFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
-cp $CWD/preload.8 .
-
make pkgdocdir=/usr/doc/$PRGNAM-$VERSION || \
make pkgdocdir=/usr/doc/$PRGNAM-$VERSION
-# Yes, this is intentional
+# Yes, this is intentional; it sometimes fails on the first run ??
make install \
pkgdocdir=/usr/doc/$PRGNAM-$VERSION \
@@ -92,14 +90,9 @@ make install \
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Clobber the bad manpage (I thought the stuff above fixed it)
+# Clobber the bad manpage
gzip -9c $CWD/preload.8 > $PKG/usr/man/man8/preload.8.gz
-# Create the lockfile directory
-# We'll use /var/run/preload instead of /var/lock/subsys, so that a stale
-# lockfile hanging around won't keep preload from starting on boot
-mkdir -p $PKG/var/run/preload
-
# Let's not clobber things that might already exist
mv $PKG/etc/preload.conf $PKG/etc/preload.conf.new
mv $PKG/etc/logrotate.d/preload $PKG/etc/logrotate.d/preload.new
diff --git a/system/preload/rc.preload b/system/preload/rc.preload
index efe8802a2fa0b..b7e08b8936d73 100644
--- a/system/preload/rc.preload
+++ b/system/preload/rc.preload
@@ -10,10 +10,10 @@ free -m | awk '/Mem:/ {exit ($2 >= ('256'))?0:1}' || exit 1
start() {
if [ -x /usr/sbin/preload ]; then
- if [ ! -f /var/run/preload/preload.lock ]; then
+ if [ ! -f /var/run/preload.lock ]; then
echo "Starting preload daemon: /usr/sbin/preload "
/usr/sbin/preload $PRELOAD_OPTS && \
- touch /var/run/preload/preload.lock
+ touch /var/run/preload.lock
else
echo "/usr/sbin/preload is already running. Exiting."
exit 1
@@ -28,7 +28,7 @@ start() {
stop() {
echo "Stopping preload daemon... "
killall -9 preload
- rm -f /var/run/preload/preload.lock
+ rm -f /var/run/preload.lock
}
restart() {