network/openntpd: Miscellaneous cleanups.

This commit is contained in:
Robby Workman 2010-05-19 12:59:14 -05:00
parent 46ad2866ea
commit 2840cc6b1f
4 changed files with 34 additions and 22 deletions

View File

@ -12,6 +12,5 @@ for uid and gid recommendations.
This package conflicts with the "ntp" package included with Slackware,
so only one of them should be installed at any given time.
The /etc/rc.d/rc.ntpd script in Slackware 12.1 will not work with
OpenNTPD; be sure to move the /etc/rc.d/rc.ntpd.new over if you want
it to work.
The /etc/rc.d/rc.ntpd script in Slackware will not work with OpenNTPD;
be sure to move the /etc/rc.d/rc.ntpd.new over if you want it to work.

View File

@ -11,13 +11,17 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.ntpd.new:
if [ -e etc/rc.d/rc.ntpd ]; then
cp -a etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new.incoming
cat etc/rc.d/rc.ntpd.new > etc/rc.d/rc.ntpd.new.incoming
mv etc/rc.d/rc.ntpd.new.incoming etc/rc.d/rc.ntpd.new
fi
preserve_perms() {
NEW="$1"
OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
if [ -e ${OLD} ]; then
cp -a ${OLD} ${NEW}.incoming
cat ${NEW} > ${NEW}.incoming
mv ${NEW}.incoming ${NEW}
fi
config ${NEW}
}
config etc/rc.d/rc.ntpd.new
preserve_perms etc/rc.d/rc.ntpd.new
config etc/ntpd.conf.new

View File

@ -2,7 +2,7 @@
# Slackware build script for openntpd
# Copyright 2006-2009 Robby Workman, Northport, Alabama, USA
# Copyright 2006,2008,2009,2010 Robby Workman, Northport, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,16 +24,25 @@
PRGNAM=openntpd
VERSION=3.9p1
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
make_user() {
check_user() {
printf " You must have a _ntp user and group to use this package.
\t# groupadd -g 217 _ntp
\t# useradd -u 217 -d /var/empty -s /bin/false -g _ntp _ntp \n\n"
@ -41,9 +50,9 @@ make_user() {
}
if ! grep -q ^_ntp: /etc/passwd ; then
make_user
check_user
elif ! grep -q ^_ntp: /etc/group ; then
make_user
check_user
fi
if [ "$ARCH" = "i486" ]; then
@ -55,6 +64,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
@ -82,10 +94,7 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
find $PKG/usr/man -type f -exec gzip -9 {} \;
# Don't clobber config file
mv $PKG/etc/ntpd.conf $PKG/etc/ntpd.conf.new

View File

@ -7,13 +7,13 @@
|-----handy-ruler------------------------------------------------------|
openntpd: OpenNTPD (Network Time Protocol client/server)
openntpd:
openntpd:
openntpd: OpenNTPD is a FREE, easy to use implementation of the Network Time
openntpd: Protocol. It provides the ability to sync the local clock to remote
openntpd: NTP servers and can act as NTP server itself, redistributing the
openntpd: local clock. OpenNTPD is primarily developed by Henning Brauer as
openntpd: part of the OpenBSD Project. The portable version is made by Darren
openntpd: Tucker.
openntpd:
openntpd:
openntpd: Homepage: http://www.openntpd.org
openntpd:
openntpd: