diff options
author | sergei <sergei@FreeBSD.org> | 2003-11-12 05:01:09 +0800 |
---|---|---|
committer | sergei <sergei@FreeBSD.org> | 2003-11-12 05:01:09 +0800 |
commit | 24e11c45cd3516febb301589cf4f66b3922d4f7b (patch) | |
tree | 91b701e54ee4755fadaab27becef398a92d1641c /sysutils/clockspeed-conf/files | |
parent | db83be69a7803db765a6fbacb106c9571e83de47 (diff) | |
download | freebsd-ports-gnome-24e11c45cd3516febb301589cf4f66b3922d4f7b.tar.gz freebsd-ports-gnome-24e11c45cd3516febb301589cf4f66b3922d4f7b.tar.zst freebsd-ports-gnome-24e11c45cd3516febb301589cf4f66b3922d4f7b.zip |
Add clockspeed-conf 0.4.5:
The clockspeed-conf package provides configuration
scripts to set up a clockspeed client and/or a taiclockd
server using Dan Bernstein's daemontools for supervision
and his clockspeed package for time synchronisation.
Author: Patrick Atamaniuk <atamaniuk at frobs.net>
WWW: http://foo42.de/devel/sysutils/clockspeed-conf/
PR: 51036
Submitted by: Patrick Atamaniuk <atamaniuk at frobs.net>
Diffstat (limited to 'sysutils/clockspeed-conf/files')
-rw-r--r-- | sysutils/clockspeed-conf/files/create_ids.sh | 40 | ||||
-rw-r--r-- | sysutils/clockspeed-conf/files/patch-clockspeed-conf | 10 |
2 files changed, 50 insertions, 0 deletions
diff --git a/sysutils/clockspeed-conf/files/create_ids.sh b/sysutils/clockspeed-conf/files/create_ids.sh new file mode 100644 index 000000000000..b6c77585cecc --- /dev/null +++ b/sysutils/clockspeed-conf/files/create_ids.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# $FreeBSD$ + +PATH=/bin:/usr/sbin:/usr/bin:/bin + +make_user() { + USER=$1 + UID=$2 + COMMENT="$3" + USER_HOME=/nonexistent + GROUP=${USER} + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + while pw user show ${UID}; do + UID=`expr ${UID} + 1` + done + GID=${UID} + + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d ${USER_HOME} -s /sbin/nologin -c "${COMMENT}" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi +} + +make_user clockspeed 801 "clockspeed adjust service" +make_user taiclock 802 "taiclockd daemon" +make_user log 803 "djb service log" diff --git a/sysutils/clockspeed-conf/files/patch-clockspeed-conf b/sysutils/clockspeed-conf/files/patch-clockspeed-conf new file mode 100644 index 000000000000..4d5bc6c1b868 --- /dev/null +++ b/sysutils/clockspeed-conf/files/patch-clockspeed-conf @@ -0,0 +1,10 @@ +--- clockspeed-conf.orig Mon Apr 14 14:55:45 2003 ++++ clockspeed-conf Mon Apr 14 14:55:54 2003 +@@ -12,7 +12,7 @@ + # and optionally ATTOFILE if not ETCDIR/atto + # + # +-[ -z "${CLOCKSPEED_INSTALLATION}" ] && CLOCKSPEED_INSTALLATION="DJB" ++[ -z "${CLOCKSPEED_INSTALLATION}" ] && CLOCKSPEED_INSTALLATION="FreeBSD_PORT" + + PATH=/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/command:${PATH} |