summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Makefile1
-rw-r--r--net/cvsup-mirror/Makefile48
-rw-r--r--net/cvsup-mirror/files/cvsupd.in65
-rw-r--r--net/cvsup-mirror/files/refuse.self6
-rw-r--r--net/cvsup-mirror/files/supfile9
-rw-r--r--net/cvsup-mirror/files/update.sh.in59
-rw-r--r--net/cvsup-mirror/pkg-deinstall110
-rw-r--r--net/cvsup-mirror/pkg-descr17
-rw-r--r--net/cvsup-mirror/pkg-install255
-rw-r--r--net/cvsup-mirror/pkg-plist5
-rw-r--r--net/cvsup-mirror/scripts/configure192
11 files changed, 0 insertions, 767 deletions
diff --git a/net/Makefile b/net/Makefile
index 5b950d305c14..188c83a2190f 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -84,7 +84,6 @@
SUBDIR += ct
SUBDIR += ctrace
SUBDIR += cvsup
- SUBDIR += cvsup-mirror
SUBDIR += cvsup-without-gui
SUBDIR += cvsupchk
SUBDIR += cvsync
diff --git a/net/cvsup-mirror/Makefile b/net/cvsup-mirror/Makefile
deleted file mode 100644
index 0f524eafa6f8..000000000000
--- a/net/cvsup-mirror/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-# Created by: jdp
-# $FreeBSD$
-
-PORTNAME= cvsup-mirror
-PORTVERSION= 1.3
-PORTREVISION= 8
-CATEGORIES= net
-DISTFILES=
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= A kit for easily setting up a FreeBSD mirror site using CVSup
-
-RUN_DEPENDS= ${LOCALBASE}/sbin/cvsupd:${PORTSDIR}/net/cvsup-without-gui
-
-DEPRECATED= all repos gone
-EXPIRATION_DATE= 2014-05-26
-
-NO_WRKSUBDIR= true
-NO_BUILD= true
-IS_INTERACTIVE= true
-NO_PACKAGE= too interactive
-
-USE_RC_SUBR= cvsupd
-SUB_FILES= update.sh
-
-base=${PREFIX}/etc/cvsup
-distrib=${base}/sup.client/distrib
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
-
-do-extract:
- @test -d ${WRKSRC} || ${MKDIR} ${WRKSRC}
-
-do-install:
- @${ECHO_MSG} "Installing files"
- @test -d ${distrib} || ${MKDIR} ${distrib}
- @${INSTALL_DATA} ${WRKSRC}/config.sh ${base}
- @${INSTALL_DATA} ${WRKSRC}/cvsupd.access ${base}
- @${INSTALL_SCRIPT} ${WRKSRC}/update.sh ${base}
- @${INSTALL_DATA} ${FILESDIR}/supfile ${base}
- @${INSTALL_DATA} ${FILESDIR}/refuse.self ${distrib}
- @${CP} /dev/null ${base}/.start_server
-
-post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-
-.include <bsd.port.post.mk>
diff --git a/net/cvsup-mirror/files/cvsupd.in b/net/cvsup-mirror/files/cvsupd.in
deleted file mode 100644
index 60d080b4b6ff..000000000000
--- a/net/cvsup-mirror/files/cvsupd.in
+++ /dev/null
@@ -1,65 +0,0 @@
-#! /bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: cvsupd
-# REQUIRE: DAEMON
-# KEYWORD: shutdown
-
-#
-# Add the following lines to /etc/rc.conf to enable cvsupd:
-#
-#cvsupd_enable="YES"
-
-#
-# Flag settings are now able to be overridden in /etc/rc.conf. The order
-# of priority is:
-#
-# Settings found in /etc/rc.conf are used (cvsupd_flags)
-# If nothing is found in /etc/rc.conf then settings found in
-# %%PREFIX%%/etc/cvsup/config.sh are used.
-# If nothing is found in %%PREFIX%%/etc/cvsup/config.sh
-# then the hardcoded values below are used.
-#
-#cvsupd_flags="-e -C 8 -l @daemon -b /home/ncvs -s sup.client"
-#
-# Note that answering the questions during the install will setup
-# %%PREFIX%%/etc/cvsup/config.sh for you.
-
-. /etc/rc.subr
-
-name="cvsupd"
-rcvar=cvsupd_enable
-
-load_rc_config $name
-
-# Load defaults from cvsupd config file
-base="%%PREFIX%%/etc/cvsup"
-if [ ! -r "${base}/config.sh" ]; then
- err 1 "${base}/config.sh is not readable."
-fi
-. ${base}/config.sh
-
-# Set defaults
-: ${cvsupd_enable:=NO}
-: ${cvsupd_outfile=/var/run/${name}.out}
-: ${cvsupd_user:=${user:-cvsup}}
-: ${cvsupd_flags:="-e -C ${maxclients:-8} -l @${facility:-daemon} \
- -b ${base:-/home/ncvs} -s sup.client"}
-
-command="%%PREFIX%%/sbin/cvsupd"
-stop_cmd="cvsupd_stop"
-
-cvsupd_stop() {
- if [ -z "$rc_pid" ]; then
- echo "${name} not running?"
- exit 1
- fi
- echo "Stopping ${name}."
- killall $name
- _return=$?
- [ "$_return" -ne 0 ] && [ -z "$rc_force" ] && return 1
-}
-
-run_rc_command "$1"
diff --git a/net/cvsup-mirror/files/refuse.self b/net/cvsup-mirror/files/refuse.self
deleted file mode 100644
index a69dfec5c2a8..000000000000
--- a/net/cvsup-mirror/files/refuse.self
+++ /dev/null
@@ -1,6 +0,0 @@
-*.sh
-cvsupd.access
-cvsupd.passwd
-prefixes
-sup.client
-supfile*
diff --git a/net/cvsup-mirror/files/supfile b/net/cvsup-mirror/files/supfile
deleted file mode 100644
index facf0d0fd274..000000000000
--- a/net/cvsup-mirror/files/supfile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Standard supfile for CVSup FreeBSD mirrors.
-#
-*default delete use-rel-suffix umask=002
-cvs-all release=cvs prefix=prefixes/FreeBSD.cvs
-gnats release=current prefix=prefixes/FreeBSD-gnats.current
-www release=current prefix=prefixes/FreeBSD-www.current
-mail-archive release=current prefix=prefixes/FreeBSD-mail.current
-distrib release=self prefix=prefixes/distrib.self
diff --git a/net/cvsup-mirror/files/update.sh.in b/net/cvsup-mirror/files/update.sh.in
deleted file mode 100644
index 965ab0df9437..000000000000
--- a/net/cvsup-mirror/files/update.sh.in
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/cvsup/update\.sh\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-export PREFIX
-export CVSUP_ARGS="$*"
-export PATH=/bin:/usr/bin:${PREFIX}/bin
-
-lock=/var/spool/lock/cvsup.lock
-log=/var/log/cvsup.log
-
-umask 22
-
-exec >>${log} 2>&1
-
-# Do the update
-
-date "+CVSup update begins at %Y-%m-%d %T"
-
-# The rest of this is executed while holding the lock file, to ensure that
-# multiple instances won't collide with one another.
-
-lockf -t 0 ${lock} /bin/sh << 'E*O*F'
-
-base=${PREFIX}/etc/cvsup
-rundir=/var/tmp
-cd ${rundir} || exit
-. ${base}/config.sh || exit
-
-colldir=sup.client
-startup=${PREFIX}/etc/rc.d
-eval chome=~${cuser}
-cmd="exec env HOME=${chome} cvsup"
-options="-1gL 1 -b ${base} -c ${colldir} ${CVSUP_ARGS}"
-
-umask 2
-ok=yes
-
-echo "Updating from ${host}"
-su -f -m ${cuser} -c \
- "${cmd} ${options} -h ${host} ${base}/supfile" || ok=no
-
-if [ ${ok} = yes ]; then
- if [ -f ${base}/.start_server ]; then
- if [ -x ${startup}/cvsupd ]; then
- echo -n "Starting the server:"
- /bin/sh ${startup}/cvsupd start
- echo "."
- fi
- rm -f ${base}/.start_server
- fi
-fi
-
-E*O*F
-
-date "+CVSup update ends at %Y-%m-%d %T"
diff --git a/net/cvsup-mirror/pkg-deinstall b/net/cvsup-mirror/pkg-deinstall
deleted file mode 100644
index 695b7874751e..000000000000
--- a/net/cvsup-mirror/pkg-deinstall
+++ /dev/null
@@ -1,110 +0,0 @@
-#! /bin/sh
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-delete_account() {
- local u g home
-
- u=$1
- g=$2
- if yesno "Do you want me to remove group \"${g}\"" y; then
- pw groupdel -n ${g}
- echo "Done."
- fi
- if yesno "Do you want me to remove user \"${u}\"" y; then
- eval home=~${u}
- pw userdel -n ${u}
- echo "Done."
- if [ -d "${home}" ]; then
- echo "Please remember to remove the home directory \"${home}\" as"
- echo "well as the mirrored files."
- fi
- fi
-}
-
-if [ x$2 != xDEINSTALL ]; then
- exit
-fi
-
-export PATH=/bin:/usr/bin:/usr/sbin
-
-base=${PKG_PREFIX}/etc/cvsup
-
-. ${base}/config.sh || exit
-
-if ps -axc | grep -q cvsupd; then
- if yesno "There are some cvsupd processes running. Shall I kill them" y
- then
- killall cvsupd
- sleep 2
- else
- echo "OK ... I hope you know what you are doing."
- fi
-fi
-
-tmp="/etc/#cvsma$$"
-trap "rm -f ${tmp}" 0 1 2 3 15
-
-rm -rf ${base}/prefixes
-rm -f ${base}/.start_server
-
-if yesno "Do you want me to remove scheduled updates from \"/etc/crontab\"" y
-then
- sed "/\/etc\/cvsup\/update\.sh/d" /etc/crontab >${tmp} || exit
- chmod 644 ${tmp}
- mv ${tmp} /etc/crontab || exit
- echo "Done."
-fi
-
-if yesno \
- "Do you want me to remove the cvsupd logging from \"/etc/syslog.conf\"" y
-then
- sed "/^!cvsupd/,/cvsupd\.log\$/d" /etc/syslog.conf >${tmp} || exit
- chmod 644 ${tmp}
- mv ${tmp} /etc/syslog.conf || exit
-
- if [ -f /var/run/syslog.pid ]; then
- echo "Giving syslogd a kick in the pants."
- kill -HUP $(cat /var/run/syslog.pid)
- fi
- echo "Done."
-fi
-
-if yesno "Do you want me to remove the cvsup and cvsupd log entries from \
-\"/etc/newsyslog.conf\"" y; then
- sed "/cvsup\.log/d
- /cvsupd\.log/d" /etc/newsyslog.conf >${tmp} || exit
- chmod 644 ${tmp}
- mv ${tmp} /etc/newsyslog.conf || exit
- echo "Done."
-fi
-
-delete_account ${user} ${group}
-delete_account ${cuser} ${cgroup}
diff --git a/net/cvsup-mirror/pkg-descr b/net/cvsup-mirror/pkg-descr
deleted file mode 100644
index 24600fdacc6c..000000000000
--- a/net/cvsup-mirror/pkg-descr
+++ /dev/null
@@ -1,17 +0,0 @@
-This is the CVSup Mirror Kit, an easy way to set up a FreeBSD mirror
-site. When you type "make", it asks you a few questions about
-which files you want to mirror, where you want to put them on your
-disks, where you want to update them from, etc. After a "make
-install" your system will then be running as a nearly self-maintaining
-FreeBSD mirror site. It will even update its own configuration
-files from the master site automatically.
-
-This kit is not for people who just want to keep their own files
-up to date with CVSup. It is for people who wish to run servers
-that distribute the FreeBSD sources to others.
-
-This port requires CVSup version 15.3 or later.
-
-WWW: http://www.cvsup.org/
-
-jdp@FreeBSD.org
diff --git a/net/cvsup-mirror/pkg-install b/net/cvsup-mirror/pkg-install
deleted file mode 100644
index 04830c62afe2..000000000000
--- a/net/cvsup-mirror/pkg-install
+++ /dev/null
@@ -1,255 +0,0 @@
-#! /bin/sh
-
-base=${PREFIX}/etc/cvsup
-prefixes=${base}/prefixes
-
-chmods_done=" "
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-install_links() {
- local link dir subdir path
-
- while [ $# -ge 3 ]; do
- link=$1
- dir=$2
- subdir=$3
- echo " Linking ${link} -> ${dir}"
- ln -sf ${dir} ${prefixes}/${link} || exit
- if [ "x${dir}" != "xSKIP" -a "x${dir}" != "x.." ]; then
- if [ "x${subdir}" = "x." ]; then
- path=${dir}
- else
- path=${dir}/${subdir}
- fi
- ( cd ${prefixes} || exit
- if [ "x${subdir}" != "x." -a -h ${path} ]; then
- cat <<EOF
-"${subdir}" must be a true subdirectory of "${dir}", not a symbolic link.
-Please remove the symbolic link and/or configure again using the true
-directory path to "${subdir}".
-EOF
- exit 1
- fi
- test -d ${path} || mkdir -p ${path} || exit ) || exit
- if ! expr "${chmods_done}" : ".* ${path} " >/dev/null 2>&1; then
- echo -n " Fixing ownerships and modes in ${path} ..."
- ( chdir ${prefixes} && \
- chown -R ${cuser}:${cgroup} ${path} && \
- chmod -R a+rX ${path} ) || exit
- echo " done."
- chmods_done="${chmods_done}${path} "
- fi
- fi
- shift 3
- done
-}
-
-make_account() {
- local u g gcos homeopt home
-
- u=$1
- g=$2
- gcos=$3
- homeopt=${4:+"-d $4"}
-
- if pw group show "${g}" >/dev/null 2>&1; then
- echo "You already have a group \"${g}\", so I will use it."
- else
- echo "You need a group \"${g}\"."
- if which -s pw && yesno "Would you like me to create it" y; then
- pw groupadd ${g} || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- if ! grep -q "^${u}:" /etc/passwd; then
- echo "While you're at it, please create a user \"${u}\" too,"
- echo "with a default group of \"${g}\"."
- fi
- exit 1
- fi
- fi
-
- if pw user show "${u}" >/dev/null 2>&1; then
- echo "You already have a user \"${u}\", so I will use it."
- else
- echo "You need a user \"${u}\"."
- if which -s pw && yesno "Would you like me to create it" y; then
- pw useradd ${u} -g ${g} -h - ${homeopt} \
- -s /nonexistent -c "${gcos}" || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
- fi
-
- if [ x"$homeopt" = x ]; then
- eval home=~${u}
- if [ ! -d "${home}" ]; then
- if yesno \
- "Would you like me to create ${u}'s home directory (${home})" y
- then
- mkdir -p ${home}/.cvsup || exit
- touch ${home}/.cvsup/auth || exit
- chown -R ${u}:${g} ${home} || exit
- chmod -R go= ${home} || exit
- else
- echo "Please create it, and try again."
- exit 1
- fi
- fi
- fi
-}
-
-case $2 in
-
-POST-INSTALL)
- . ${base}/config.sh || exit
-
- if which -s pw && which -s lockf; then
- :
- else
- cat <<EOF
-
-This system looks like a pre-2.2 version of FreeBSD. I see that it
-is missing the "lockf" and/or "pw" utilities. I need these utilities.
-Please get them and install them, and try again. You can get the
-sources from:
-
- ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.bin/lockf.tar.gz
- ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz
-
-EOF
- exit 1
- fi
-
- echo ""
- make_account ${user} ${group} "CVSup Daemon" "/nonexistent"
- make_account ${cuser} ${cgroup} "CVSup Client"
-
- echo "Fixing ownerships and modes in \"${base}\"."
- chown -R root:wheel ${base}
- test -d ${base}/sup || mkdir -p ${base}/sup
- test -d ${base}/sup.client || mkdir -p ${base}/sup.client
- chown -R ${cuser}:${cgroup} ${base}/sup ${base}/sup.client
- chmod -R go=u-w ${base}
-
- echo "Setting up links and directories for distributions."
- test -d ${prefixes} || mkdir ${prefixes} || exit
- install_links ${distribs}
-
- echo ""
- if grep -q "^[^#]*${facility}.*/var/log/cvsupd.log" /etc/syslog.conf; then
- echo -n "It looks like you already have some logging set up, so I "
- echo "will use it."
- else
- if yesno "Would you like me to set up the syslog logging" y; then
- echo "Setting up server logging in \"/etc/syslog.conf\"."
- cat <<EOF >>/etc/syslog.conf
-!cvsupd
-${facility}.info /var/log/cvsupd.log
-EOF
-
- if [ ! -f /var/log/cvsupd.log ]; then
- echo "Creating \"/var/log/cvsupd.log\"."
- cp /dev/null /var/log/cvsupd.log
- fi
-
- if [ -f /var/run/syslog.pid ]; then
- echo "Giving syslogd a kick in the pants."
- kill -HUP $(cat /var/run/syslog.pid)
- fi
-
- echo "Adding cvsup and cvsupd log entry to \"/etc/newsyslog.conf\"."
- cat <<EOF >>/etc/newsyslog.conf
-/var/log/cvsup.log 664 7 * 24 -
-/var/log/cvsupd.log 664 7 * 24 Z
-EOF
- echo "Done."
- else
- cat <<EOF
-OK, please remember to do it yourself. You should log "${facility}.info"
-to "/var/log/cvsupd.log". Don't forget to add an entry to
-"/etc/newsyslog.conf".
-EOF
- fi
- fi
-
- echo ""
- if grep -q "^[^#]*${base}/update\.sh" /etc/crontab; then
- echo "It looks like your crontab is already set up, so I'll use that."
- else
- if [ ${interval} -eq 1 ]; then
- updstr="hourly updates"
- else
- updstr="updates every ${interval} hours"
- fi
- if yesno "Would you like me to set up your crontab for ${updstr}" y
- then
- echo "Scheduling ${updstr} in \"/etc/crontab\"."
- delay=5
- now=$(date "+%s")
- start=$((${now} + ${delay}*60))
- hh=$(date -r ${start} "+%H")
- mm=$(date -r ${start} "+%M")
- h=$((${hh}))
- m=$((${mm}))
- if [ ${interval} -eq 1 ]; then
- hstr="*"
- else
- h0=$((${h} % ${interval}))
- if [ ${interval} -eq 24 ]; then
- hstr=${h0}
- else
- h1=$((${h0} + 24 - ${interval}))
- hstr=${h0}-${h1}/${interval}
- fi
- fi
- cat <<EOF >>/etc/crontab
-${m} ${hstr} * * * root ${base}/update.sh
-EOF
- cat <<EOF
-Done. The first update will be ${delay} minutes from now, at ${hh}:${mm}.
-The cvsupd server will be started automatically after the first update,
-and whenever you reboot.
-EOF
- else
- cat <<EOF
-OK, please remember to do it yourself. The crontab entry should run
-"${base}/update.sh" as root.
-EOF
- fi
- fi
-
- echo ""
- echo "You are now a FreeBSD mirror site."
- ;;
-esac
diff --git a/net/cvsup-mirror/pkg-plist b/net/cvsup-mirror/pkg-plist
deleted file mode 100644
index 9b745f477ec4..000000000000
--- a/net/cvsup-mirror/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-etc/cvsup/config.sh
-etc/cvsup/cvsupd.access
-etc/cvsup/sup.client/distrib/refuse.self
-etc/cvsup/supfile
-etc/cvsup/update.sh
diff --git a/net/cvsup-mirror/scripts/configure b/net/cvsup-mirror/scripts/configure
deleted file mode 100644
index 12d6cf1a12b9..000000000000
--- a/net/cvsup-mirror/scripts/configure
+++ /dev/null
@@ -1,192 +0,0 @@
-#! /bin/sh
-
-base=${PREFIX}/etc/cvsup
-variables="user group cuser cgroup host interval \
- maxclients facility distribs"
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-ask_distrib() {
- local desc dflt link dir subdir
-
- link=$1
- dflt=$2
- subdir=$3
- desc=$4
- if yesno "Do you wish to mirror the ${desc}" y; then
- if [ "${subdir}" != "." ]; then
- cat <<EOF
-Note: the location for this must match "*/${subdir}", and
-"${subdir}" must be a true subdirectory, not a symbolic link.
-EOF
- fi
- while :; do
- dir=$(ask "Where would you like to put it" ${dflt})
- case ${dir} in
- /*) ;;
- *) echo "Please specify an absolute pathname."
- continue;;
- esac
- if [ "${subdir}" = "." ]; then
- break
- fi
- dir=$(expr "${dir}" : "\(.*\)/${subdir}\$")
- if [ "x${dir}" != x ]; then
- break
- fi
- echo "The location must match \"*/${subdir}\""
- done
- distribs="${distribs} ${link} ${dir} ${subdir}"
- return 0
- else
- distribs="${distribs} ${link} SKIP ${subdir}"
- return 1
- fi
-}
-
-canonicalize() {
- echo $1 | tr "[:upper:]" "[:lower:]"
-}
-
-#------------------------------------------------------------------------------
-
-cat <<EOF
-I am going to ask you a few questions so that I can set up your
-FreeBSD mirror configuration. Every question has a [default]
-answer. To accept the default, just press ENTER.
-
-At this point, I am just gathering information. I will not touch
-your system until you type "make install".
-
-EOF
-
-host=$(ask "Master site for your updates" cvsup-master.freebsd.org)
-
-host=$(canonicalize ${host})
-
-while :; do
- interval=$(ask "How many hours between updates of your files" 1)
- case ${interval} in
- 1|2|3|4|6|8|12|24) break;;
- esac
- echo "Please answer 1, 2, 3, 4, 6, 8, 12, or 24"
-done
-
-cat <<EOF
-
-Now you must decide which sets of files you wish to make available
-from your mirror site. You can choose any combination, and you
-can put each set anywhere you want to on your disks. Although each
-set is optional, we strongly encourage every mirror site to carry
-at least the main source repository.
-
-EOF
-
-distribs="distrib.self .. ."
-ask_distrib FreeBSD.cvs /home/ncvs . \
- "main source repository"
-ask_distrib FreeBSD-www.current /usr/local/www . \
- "installed World Wide Web data"
-ask_distrib FreeBSD-gnats.current /home/gnats gnats \
- "GNATS bug tracking database"
-ask_distrib FreeBSD-mail.current /home/mail . \
- "mailing list archive"
-
-cat <<EOF
-
-Now, a few questions so that I can set up your CVSup server properly.
-
-For security reasons, both the CVSup client and server should run
-under their own unique user and group IDs. These IDs should have no
-special access privileges. Normally, the user:group "cvsupin:cvsupin"
-is used for the client and "cvsup:cvsup" is used for the server, but
-you can choose other names if you wish. At "make install" time, I
-will create the users and groups, if they don't already exist.
-
-Use unique user and group IDs for these. Do not use "nobody",
-"nonroot", or "nogroup".
-
-EOF
-
-cuser=$(ask "Unique unprivileged user ID for running the client" cvsupin)
-cgroup=$(ask "Unique unprivileged group ID for running the client" cvsupin)
-user=$(ask "Unique unprivileged user ID for running the server" cvsup)
-group=$(ask "Unique unprivileged group ID for running the server" cvsup)
-
-cat <<EOF
-
-The CVSup server does its logging via syslog. At "make install"
-time, I will set up the logging for you, if necessary. I will use
-the "!program" feature of syslog to keep your CVSup log messages
-separate from the messages of your other daemons.
-
-EOF
-
-while :; do
- facility=$(ask "Syslog facility for the server log" daemon)
- case ${facility} in
- daemon|local[0-7]|ftp|user) break;;
- esac
- echo "Please answer daemon, local0-local7, ftp, or user"
-done
-
-cat <<EOF
-
-You can control the load on your machine by limiting the number of
-clients that the CVSup server will serve at once. CVSup won't load
-your network especially heavily, but it is more CPU and disk
-intensive than most other file server software.
-
-EOF
-
-while :; do
- maxclients=$(ask "Maximum simultaneous client connections" 8)
- if expr "${maxclients}" : "[0-9][0-9]*\$" >/dev/null 2>&1; then
- break
- fi
- echo "Please answer with a number"
-done
-
-#------------------------------------------------------------------------------
-
-echo ""
-echo -n "Building the \"config.sh\" file ... "
-for var in ${variables}; do
- eval echo ${var}=\\\"\${${var}}\\\"
-done > ${WRKSRC}/config.sh
-echo "Done."
-
-echo -n "Building the \"cvsupd.access\" file ... "
-cat <<EOF > ${WRKSRC}/cvsupd.access
--0.0.0.0/0 ${maxclients} # Limit total connections
--0.0.0.0/0/32 1 # Allow only 1 connection from each host
-+0.0.0.0/0 # If we reach this rule, we let the client in
-EOF
-echo "Done."