Minor improvements to all stages and documentation.

This commit is contained in:
Jens Schweikhardt 2004-01-21 19:39:26 +00:00
parent 829da6853b
commit 978f249f2c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=19774
6 changed files with 181 additions and 73 deletions

View file

@ -181,7 +181,8 @@
you have to consider the downtime caused by stage two. The ports you have to consider the downtime caused by stage two. The ports
compiled by <filename>stage_2.conf.default</filename> below require compiled by <filename>stage_2.conf.default</filename> below require
about 4 hours to build on an AMD1800+ SCSI system with 10krpm disks about 4 hours to build on an AMD1800+ SCSI system with 10krpm disks
and 1GB of RAM.</para> and 1GB of RAM. If you prefer to install packages instead of ports,
you can significantly reduce the downtime to about 10 minutes.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@ -248,7 +249,7 @@
<filename>stage_1.conf.default</filename> and write a log to <filename>stage_1.conf.default</filename> and write a log to
<filename>stage_1.log.default</filename>.</para> <filename>stage_1.log.default</filename>.</para>
<para>The following is my <filename>stage_1.conf.default</filename>. <para>Further below you find my <filename>stage_1.conf.default</filename>.
You need to customize it in various places to match your idea of the You need to customize it in various places to match your idea of the
<quote>perfect system</quote>. I have tried to extensively comment <quote>perfect system</quote>. I have tried to extensively comment
the places you should adapt. The configuration script must provide the places you should adapt. The configuration script must provide
@ -286,15 +287,16 @@
<para>What you want immediately after booting the new system and <para>What you want immediately after booting the new system and
even before starting stage two. The reason for not simply even before starting stage two. The reason for not simply
installing all my beloved ports during stage one is that in chrooting to the new system during stage one and installing
theory and in practice there are bootstrap and consistency all my beloved ports is that in theory and in practice there
issues: stage one has your old kernel running, but the chrooted are bootstrap and consistency issues: stage one has your old
environment consists of new binaries and headers. If the new kernel running, but the chrooted environment consists of new
system for example supports a new system call (according to its binaries and headers. If the new binaries use a new system
headers), some configure-type script might try to use it and get call, these binaries will die with <literal>SIGSYS, Bad
killed because it executes on the old kernel. I have seen other system call</literal>, because the old kernel does not have
issues when I tried building <filename that system call. I have seen other issues when I tried
role="package">lang/perl5</filename>.</para> building <filename role="package">lang/perl5</filename>.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@ -568,10 +570,24 @@ Creating bzip'd tar ball in '/usr/ports/editors/staroffice52/staroffice-5.2_1.tb
is only available for base system files, not for anything installed is only available for base system files, not for anything installed
by ports. Some third party software seems to be especially designed by ports. Some third party software seems to be especially designed
to keep me on my toes by changing the config file format every to keep me on my toes by changing the config file format every
fortnight. All you can do is be alert, especially when the major fortnight. To detect such silent changes, I keep a copy of the
version number bumps. In the past I had to tweak or rewrite files modified config files in the same place where I keep
for web servers, news servers and readers. All software actively <filename>stage_3.mk</filename> and compare the result with a
maintained is a prime candidate for config file scrutiny.</para> <application>make</application> rule, e.g. for
<application>apache</application>'s <filename>httpd.conf</filename>
in target <command>config_apache</command> with</para>
<programlisting>
@if ! cmp -s /usr/local/etc/apache2/httpd.conf httpd.conf; then \
echo "ATTENTION: the httpd.conf has changed. Please examine if"; \
echo "the modifications are still correct. Here is the diff:"; \
diff -u /usr/local/etc/apache2/httpd.conf httpd.conf; \
fi
</programlisting>
<para>If the diff is innocuous I can make the message go away with
<command>cp /usr/local/etc/apache2/httpd.conf
httpd.conf</command>.</para>
<para>I have used &scratch.ap; several times to update a <para>I have used &scratch.ap; several times to update a
<literal>5-CURRENT</literal> to <literal>5-CURRENT</literal>, i.e. <literal>5-CURRENT</literal> to <literal>5-CURRENT</literal>, i.e.

View file

@ -1,6 +1,6 @@
# This file: stage_1.conf.default, sourced by stage_1.sh. # This file: stage_1.conf.default, sourced by stage_1.sh.
# #
# $Id: stage_1.conf.default,v 1.1 2004-01-03 15:46:31 schweikh Exp $ # $Id: stage_1.conf.default,v 1.2 2004-01-21 19:39:26 schweikh Exp $
# $FreeBSD$ # $FreeBSD$
# Root mount point where you create the new system. Because it is only # Root mount point where you create the new system. Because it is only
@ -26,25 +26,22 @@ create_file_systems () {
# Change DEVICE names or risk foot shooting. # Change DEVICE names or risk foot shooting.
# You must use newfs -O 1 for the root fs if you want to boot it from grub. # You must use newfs -O 1 for the root fs if you want to boot it from grub.
DEVICE=/dev/da0s1a DEVICE=/dev/da0s1a
mkdir -p ${DESTDIR} mkdir -m 755 -p ${DESTDIR}
chown root:wheel ${DESTDIR} chown root:wheel ${DESTDIR}
newfs -O 1 ${DEVICE} newfs -U -O 1 ${DEVICE}
tunefs -n enable ${DEVICE}
mount -o noatime ${DEVICE} ${DESTDIR} mount -o noatime ${DEVICE} ${DESTDIR}
# Additional file systems and initial mount points. Optional. # Additional file systems and initial mount points. Optional.
DEVICE=/dev/da0s1e DEVICE=/dev/da0s1e
newfs ${DEVICE} mkdir -m 755 -p ${DESTDIR}/var
tunefs -n enable ${DEVICE}
mkdir -m 755 ${DESTDIR}/var
chown root:wheel ${DESTDIR}/var chown root:wheel ${DESTDIR}/var
newfs -U ${DEVICE}
mount -o noatime ${DEVICE} ${DESTDIR}/var mount -o noatime ${DEVICE} ${DESTDIR}/var
DEVICE=/dev/da2s1e DEVICE=/dev/da2s1e
newfs ${DEVICE} mkdir -m 755 -p ${DESTDIR}/usr
tunefs -n enable ${DEVICE}
mkdir -m 755 ${DESTDIR}/usr
chown root:wheel ${DESTDIR}/usr chown root:wheel ${DESTDIR}/usr
newfs -U ${DEVICE}
mount -o noatime ${DEVICE} ${DESTDIR}/usr mount -o noatime ${DEVICE} ${DESTDIR}/usr
} }
@ -67,7 +64,7 @@ create_etc_fstab () {
/dev/vinum/ncvs /home/ncvs ufs rw,noatime 0 2 /dev/vinum/ncvs /home/ncvs ufs rw,noatime 0 2
/dev/vinum/ports /usr/ports ufs rw,noatime 0 2 /dev/vinum/ports /usr/ports ufs rw,noatime 0 2
/dev/ad0s1 /2k ntfs ro,noauto 0 0 /dev/ad0s1 /2k ntfs ro,noauto 0 0
/dev/ad0s6 /linux ext2fs ro 0 0 /dev/ad0s6 /linux ext2fs ro,noauto 0 0
# #
/dev/cd0 /cdrom cd9660 ro,noauto 0 0 /dev/cd0 /cdrom cd9660 ro,noauto 0 0
/dev/cd1 /dvd cd9660 ro,noauto 0 0 /dev/cd1 /dvd cd9660 ro,noauto 0 0
@ -162,13 +159,21 @@ all_remaining_customization () {
# 'vinum makedev' can only create devices in /dev, thus use cpio. # 'vinum makedev' can only create devices in /dev, thus use cpio.
cd /dev; find vinum -print | cpio -pv ${DESTDIR}/dev cd /dev; find vinum -print | cpio -pv ${DESTDIR}/dev
fi fi
# Make the floppy group wheel writable.
chown root:wheel ${DESTDIR}/dev/fd0*
chmod g+w ${DESTDIR}/dev/fd0*
;; ;;
5.*) 5.*)
# Starting with FreeBSD 5.x, perl lives in /usr/local/bin but many scripts # Make the floppy group wheel writable.
# use a hardcoded #!/usr/bin/perl; use a symlink to make them work. printf '%s\n' 'own fd0 root:wheel' >> ${DESTDIR}/etc/devfs.conf
# Effectively mandatory. printf '%s\n' 'perm fd0 0660' >> ${DESTDIR}/etc/devfs.conf
cd ${DESTDIR}/usr/bin; ln -s ../local/bin/perl ;;
*)
printf '%s\n' "REVISION ${REVISION} not supported"
exit 1
;; ;;
esac esac

View file

@ -5,7 +5,8 @@
# will read ./stage_1.conf.profile # will read ./stage_1.conf.profile
# and write ./stage_1.log.profile # and write ./stage_1.log.profile
# #
# $Id: stage_1.sh,v 1.3 2004-01-03 15:46:31 schweikh Exp $ # Author: Jens Schweikhardt
# $Id: stage_1.sh,v 1.4 2004-01-21 19:39:26 schweikh Exp $
# $FreeBSD$ # $FreeBSD$
PATH=/bin:/usr/bin:/sbin:/usr/sbin PATH=/bin:/usr/bin:/sbin:/usr/sbin
@ -45,6 +46,7 @@ step_two () {
chflags -R 0 ${TEMPROOT} chflags -R 0 ${TEMPROOT}
rm -rf ${TEMPROOT} rm -rf ${TEMPROOT}
fi fi
export MAKEDEVPATH="/bin:/sbin:/usr/bin"
mergemaster -i -m ${SRC}/etc -t ${TEMPROOT} -D ${DESTDIR} mergemaster -i -m ${SRC}/etc -t ${TEMPROOT} -D ${DESTDIR}
cap_mkdb ${DESTDIR}/etc/login.conf cap_mkdb ${DESTDIR}/etc/login.conf
pwd_mkdb -d ${DESTDIR}/etc -p ${DESTDIR}/etc/master.passwd pwd_mkdb -d ${DESTDIR}/etc -p ${DESTDIR}/etc/master.passwd
@ -123,6 +125,7 @@ do_steps () {
echo "TYPE=${TYPE}" echo "TYPE=${TYPE}"
echo "REVISION=${REVISION}" echo "REVISION=${REVISION}"
echo "BRANCH=${BRANCH}" echo "BRANCH=${BRANCH}"
echo "RELDATE=${RELDATE}"
step_one step_one
step_two step_two
step_three step_three
@ -141,14 +144,21 @@ set -x -e -u # Stop for any error or use of an undefined variable.
# Determine a few variables from the sources that were used to make the # Determine a few variables from the sources that were used to make the
# world. The variables can be used to modify actions, e.g. depending on # world. The variables can be used to modify actions, e.g. depending on
# whether we install a 4.x or 5.x system. The result of the eval will be # whether we install a 4.x or 5.x system. The __FreeBSD_version numbers
# something like # for RELDATE are documented in the Porter's Handbook,
# doc/en_US.ISO8859-1/books/porters-handbook/freebsd-versions.html.
# Scheme is: <major><two digit minor><0 if release branch, otherwise 1>xx
# The result will be something like
# #
# TYPE="FreeBSD" # TYPE="FreeBSD"
# REVISION="4.9" # REVISION="4.9"
# BRANCH="RC" # BRANCH="RC" { "CURRENT", "STABLE", "RELEASE" }
# RELDATE="502101"
# #
eval $(awk '/^(TYPE|REVISION|BRANCH)=/' ${SRC}/sys/conf/newvers.sh) eval $(awk '/^(TYPE|REVISION|BRANCH)=/' ${SRC}/sys/conf/newvers.sh)
RELDATE=$(awk '/^[ \t]*#[ \t]*define[ \t][ \t]*__FreeBSD_version[ \t]/ {
print $3
}' ${SRC}/sys/sys/param.h)
echo "=> Logging to stage_1.log.${PROFILE}" echo "=> Logging to stage_1.log.${PROFILE}"
do_steps 2>&1 | tee stage_1.log.${PROFILE} do_steps 2>&1 | tee stage_1.log.${PROFILE}

View file

@ -1,5 +1,5 @@
# vim: syntax=sh # vim: syntax=sh
# $Id: stage_2.conf.default,v 1.1 2004-01-03 15:46:31 schweikh Exp $ # $Id: stage_2.conf.default,v 1.2 2004-01-21 19:39:26 schweikh Exp $
# $FreeBSD$ # $FreeBSD$
shells zsh shells zsh
lang perl5 make install; use.perl port lang perl5 make install; use.perl port
@ -8,8 +8,8 @@ archivers zip
security sudo security sudo
x11-servers XFree86-4-Server x11-servers XFree86-4-Server
x11 wrapper x11 wrapper
x11 XFree86-4-libraries
x11 XFree86-4-clients x11 XFree86-4-clients
x11 XFree86-4-documents
x11-fonts XFree86-4-font75dpi x11-fonts XFree86-4-font75dpi
x11-fonts XFree86-4-font100dpi x11-fonts XFree86-4-font100dpi
x11-fonts XFree86-4-fontScalable x11-fonts XFree86-4-fontScalable
@ -49,6 +49,7 @@ news tin
net freebsd-uucp net freebsd-uucp
net cvsup-without-gui net cvsup-without-gui
net pathchar make NO_CHECKSUM=yes install net pathchar make NO_CHECKSUM=yes install
net smokeping
ftp wget ftp wget
ftp ncftp3 ftp ncftp3
textproc ispell textproc ispell
@ -76,3 +77,5 @@ textproc gmat
security gpa security gpa
mail spamoracle mail spamoracle
multimedia mplayer make WITHOUT_RUNTIME_CPUDETECTION=yes WITH_GUI=yes BATCH=yes install multimedia mplayer make WITHOUT_RUNTIME_CPUDETECTION=yes WITH_GUI=yes BATCH=yes install
multimedia mplayer-fonts
audio wavplay

View file

@ -1,30 +1,28 @@
#!/bin/sh #!/bin/sh
# #
# stage_2.sh - FreeBSD From Scratch, Stage 2: Ports Installation. # stage_2.sh - FreeBSD From Scratch, Stage 2: Ports Installation.
# Usage: ./stage_2.sh {configname} # Usage: ./stage_2.sh [-hnp] configname
# #
# $Id: stage_2.sh,v 1.2 2004-01-03 15:46:31 schweikh Exp $ # Author: Jens Schweikhardt
# $Id: stage_2.sh,v 1.3 2004-01-21 19:39:26 schweikh Exp $
# $FreeBSD$ # $FreeBSD$
DBDIR="/var/db/pkg" DBDIR="/var/db/pkg"
PORTS="/usr/ports" PORTS="/usr/ports"
: ${PACKAGES:=${PORTS}/packages}
LOGDIR="/home/root/setup/ports.log"; mkdir -p ${LOGDIR} LOGDIR="/home/root/setup/ports.log"; mkdir -p ${LOGDIR}
PKG_PATH="/cdrom/packages/All:/dvd/packages/All"
# The linprocfs appears to be required for certain java/jdk* ports. PKG=
if mount | grep '^linprocfs'; then
: # linprocfs already mounted.
else
mount /compat/linux/proc
fi
MYNAME="$(basename $0)" MYNAME="$(basename $0)"
usage () { usage () {
exec >&2 exec >&2
echo "usage: ${MYNAME} [-hn] configname" echo "usage: ${MYNAME} [-hnp] configname"
echo "" echo ""
echo " Options:" echo " Options:"
echo " -h Print this help text." echo " -h Print this help text."
echo " -n Dryrun: just show what would be done." echo " -n Dryrun: just show what would be done."
echo " -p Install a precompiled package if one can be found."
echo "" echo ""
echo " The config file (stage_2.conf.configname) is a list of" echo " The config file (stage_2.conf.configname) is a list of"
echo " ports to install with one entry per line. Each line" echo " ports to install with one entry per line. Each line"
@ -34,15 +32,38 @@ usage () {
exit 1 exit 1
} }
args=`getopt hn $*` # Look for a package in these locations in sequence.
# Returns as soon as the first is found. Result on stdout.
#
# ${PORTS}/${CATEGORY}/${NAME}
# ${PACKAGES}/All
# ${PACKAGES}/${CATEGORY}
# ${PKG_PATH}
#
find_package () {
echo "${PORTS}/${CATEGORY}/${NAME}:${PACKAGES}/All:${PACKAGES}/${CATEGORY}:${PKG_PATH}" |
tr : '\n' |
while read d; do
test -d "${d}" || continue
PKG=$(ls ${d}/${PKGNAME}.* 2>/dev/null)
test $? -eq 0 && echo "${PKG}" && return
done
}
#
# Parse command line arguments.
#
args=`getopt hnp $*`
if test $? != 0; then if test $? != 0; then
usage usage
fi fi
set -- $args set -- $args
DRYRUN= DRYRUN=
CHKPKG=
for i; do for i; do
case "$i" in case "$i" in
-n) DRYRUN="yes"; shift;; -n) DRYRUN="yes"; shift;;
-p) CHKPKG="yes"; shift;;
--) shift; break;; --) shift; break;;
*) usage;; *) usage;;
esac esac
@ -53,6 +74,9 @@ else
usage usage
fi fi
#
# Loop over the ports list.
#
while read CATEGORY NAME CMD; do while read CATEGORY NAME CMD; do
case "${CATEGORY}" in case "${CATEGORY}" in
\#*) continue;; \#*) continue;;
@ -65,16 +89,21 @@ while read CATEGORY NAME CMD; do
fi fi
cd ${DIR} cd ${DIR}
PKGNAME=`make -V PKGNAME` PKGNAME=`make -V PKGNAME`
if test -n "${CHKPKG}"; then
PKG=$(find_package)
else
PKG=""
fi
if test -d "${DBDIR}/${PKGNAME}"; then if test -d "${DBDIR}/${PKGNAME}"; then
echo "${CATEGORY}/${NAME} already installed as ${PKGNAME}" echo "${CATEGORY}/${NAME} already installed as ${PKGNAME}"
continue continue
fi fi
LOG="${LOGDIR}/${CATEGORY}+${NAME}" LOG="${LOGDIR}/${CATEGORY}+${NAME}"
echo "===> Installing ${CATEGORY}/${NAME}; logging to ${LOG}" echo "===> Installing ${CATEGORY}/${NAME}; logging to ${LOG}"
test -n "${CMD}" || CMD="make install < /dev/null" test -n "${CMD}" || CMD="make package-recursive < /dev/null"
if test -n "${DRYRUN}"; then if test -n "${DRYRUN}"; then
if ls ${PKGNAME}.* >/dev/null 2>&1; then if test -n "${PKG}"; then
echo pkg_add -v ${PKGNAME}.* echo pkg_add -v ${PKG}
else else
echo "${CMD}" echo "${CMD}"
fi fi
@ -82,12 +111,12 @@ while read CATEGORY NAME CMD; do
fi fi
date "++++ Started %v %T +++" > ${LOG} date "++++ Started %v %T +++" > ${LOG}
STARTED=$(date +%s) STARTED=$(date +%s)
echo "CMD: ${CMD}" >> ${LOG}
( (
if ls ${PKGNAME}.* >/dev/null 2>&1; then if test -n "${PKG}"; then
echo "Found package" ${PKGNAME}.* echo "Found package ${PKG}"
pkg_add -v ${PKGNAME}.* pkg_add -v ${PKG}
else else
echo "CMD: ${CMD}"
make clean make clean
eval "${CMD}" eval "${CMD}"
make clean # Uncomment if diskspace is tight under ${PORTS}. make clean # Uncomment if diskspace is tight under ${PORTS}.

View file

@ -2,10 +2,12 @@
# Usage: make -f stage_3.mk all (config everything) # Usage: make -f stage_3.mk all (config everything)
# or make -f stage_3.mk target (to just config target) # or make -f stage_3.mk target (to just config target)
# #
# Author: Jens Schweikhardt
#
# It is a good idea to make sure any target can be made more than # It is a good idea to make sure any target can be made more than
# once without ill effect. # once without ill effect.
# #
# $Id: stage_3.mk,v 1.2 2004-01-03 15:46:31 schweikh Exp $ # $Id: stage_3.mk,v 1.3 2004-01-21 19:39:26 schweikh Exp $
# $FreeBSD$ # $FreeBSD$
.POSIX: .POSIX:
@ -19,6 +21,7 @@ message:
@echo "config_nullplugin" @echo "config_nullplugin"
@echo "config_privoxy" @echo "config_privoxy"
@echo "config_sgml" @echo "config_sgml"
@echo "config_smokeping"
@echo "config_sudo" @echo "config_sudo"
@echo "config_TeX" @echo "config_TeX"
@echo "config_tin" @echo "config_tin"
@ -34,6 +37,7 @@ all: \
config_nullplugin \ config_nullplugin \
config_privoxy \ config_privoxy \
config_sgml \ config_sgml \
config_smokeping \
config_sudo \ config_sudo \
config_TeX \ config_TeX \
config_tin \ config_tin \
@ -42,15 +46,27 @@ all: \
config_apache: config_apache:
# 1. Modify httpd.conf. # 1. Modify httpd.conf.
perl -pi \ perl -pi \
-e 's/#ServerName new.host.name/ServerName hal9000.s.shuttle.de/;' \ -e 's/^\s*ServerAdmin.*/ServerAdmin schweikh\@schweikhardt.net/;' \
-e 's/^ServerAdmin.*/ServerAdmin schweikh\@schweikhardt.net/;' \ -e 's/^\s*Listen.*/Listen 127.0.0.1:80/;' \
-e 's/^Listen.*/Listen 127.0.0.1:80/;' \ -e 's/^\s*StartServers.*/StartServers 2/;' \
-e 's/^\s*MinSpareServers.*/MinSpareServers 2/;' \
-e 's,/usr/local/www/cgi-bin/,/home/opt/www/cgi-bin/,;' \ -e 's,/usr/local/www/cgi-bin/,/home/opt/www/cgi-bin/,;' \
/usr/local/etc/apache2/httpd.conf /usr/local/etc/apache2/httpd.conf
# 2. Restore symlinks to web pages. # 2. Restore symlinks to web pages.
cd /usr/local/www/data; \ cd /usr/local/www/data; \
ln -fs /home/schweikh/prj/homepage schweikhardt.net; \ ln -fs /home/schweikh/prj/homepage schweikhardt.net; \
ln -fs /home/opt/www/test . ln -fs /home/opt/www/test .
# Test if the httpd.conf has changed.
@if ! cmp -s /usr/local/etc/apache2/httpd.conf httpd.conf; then \
echo "ATTENTION: the httpd.conf has changed. Please examine if"; \
echo "the modifications are still correct. Here is the diff:"; \
diff -u /usr/local/etc/apache2/httpd.conf httpd.conf; \
fi
if test -f /var/run/httpd.pid; then \
/usr/local/etc/rc.d/apache2.sh restart; \
else \
/usr/local/etc/rc.d/apache2.sh start; \
fi
config_firebird: config_firebird:
# Make this group wheel writable to allow extensions being installed. # Make this group wheel writable to allow extensions being installed.
@ -94,15 +110,15 @@ config_inn:
"shuttle/news2.shuttle.de:!junk,!control:B32768/512,Tf,Wfb:" \ "shuttle/news2.shuttle.de:!junk,!control:B32768/512,Tf,Wfb:" \
>/usr/local/news/etc/newsfeeds >/usr/local/news/etc/newsfeeds
# Configure inn.conf. # Configure inn.conf.
perl -pi \ perl -pi \
-e 's/^(organization:\s*).*/$$1 "An Open Pod Bay Door"/;' \ -e 's/^#*\s*(organization:\s*).*/$$1"An Open Pod Bay Door"/;' \
-e 's/^(pathhost:\s*).*/$$1 hal9000.schweikhardt.net/;' \ -e 's/^#*\s*(pathhost:\s*).*/$$1hal9000.schweikhardt.net/;' \
-e 's/^(server:).*/$$1 localhost/;' \ -e 's/^#*\s*(server:).*/$$1 localhost/;' \
-e 's/^(domain:).*/$$1 schweikhardt.net/;' \ -e 's/^#*\s*(domain:).*/$$1 schweikhardt.net/;' \
-e 's/^(fromhost:).*/$$1 schweikhardt.net/;' \ -e 's/^#*\s*(fromhost:).*/$$1 schweikhardt.net/;' \
-e 's,^(moderatormailer:).*,$$1 \%s\@moderators.isc.org,;' \ -e 's,^#*\s*(moderatormailer:).*,$$1 \%s\@moderators.isc.org,;' \
-e 's,^(pathdb:\s*).*,$$1/share/news/db,;' \ -e 's,^#*\s*(pathdb:\s*).*,$$1/share/news/db,;' \
-e 's,/usr/local/news/spool,/share/news/spool,;' \ -e 's,/usr/local/news/spool,/share/news/spool,;' \
/usr/local/news/etc/inn.conf /usr/local/news/etc/inn.conf
# Create empty history, if none there. # Create empty history, if none there.
# See post-install in /usr/ports/news/inn-stable/Makefile. # See post-install in /usr/ports/news/inn-stable/Makefile.
@ -116,11 +132,22 @@ config_inn:
mv history.n.$${s} history.$${s}; \ mv history.n.$${s} history.$${s}; \
done; \ done; \
fi fi
# Configure send-uucp.
echo shuttle:shuttle >/usr/local/news/etc/send-uucp.cf
# Satisfy inncheck: # Satisfy inncheck:
cd /usr/local/news/etc; \ cd /usr/local/news/etc; \
chown news:news *; \ chown news:news *; \
chmod 640 control.ctl expire.ctl nntpsend.ctl readers.conf chmod 640 control.ctl expire.ctl nntpsend.ctl readers.conf
/usr/local/news/bin/inncheck /usr/local/news/bin/inncheck
# Test if the inn.conf has changed.
@if ! cmp -s /usr/local/news/etc/inn.conf inn.conf; then \
echo "ATTENTION: the inn.conf has changed. Please examine if"; \
echo "the modifications are still correct. Here is the diff:"; \
diff -u /usr/local/news/etc/inn.conf inn.conf; \
fi
if ! test -f /usr/local/news/run/innd.pid; then \
/usr/local/etc/rc.d/innd.sh start; \
fi
config_javaplugin: config_javaplugin:
# Mozilla Firebird: # Mozilla Firebird:
@ -135,6 +162,7 @@ config_javaplugin:
# this suppresses popup dialogs for unavailable plugins (flash, shockwave, ...) # this suppresses popup dialogs for unavailable plugins (flash, shockwave, ...)
NULLPLUGINS = /usr/X11R6/lib/mozilla/libnullplugin.so \ NULLPLUGINS = /usr/X11R6/lib/mozilla/libnullplugin.so \
/usr/X11R6/lib/mozilla/plugins/libnullplugin.so /usr/X11R6/lib/mozilla/plugins/libnullplugin.so
config_nullplugin: config_nullplugin:
for p in $(NULLPLUGINS); do \ for p in $(NULLPLUGINS); do \
if test -r $$p; then \ if test -r $$p; then \
@ -143,13 +171,22 @@ config_nullplugin:
done done
config_privoxy: config_privoxy:
install -C -o root -g wheel -m 644 config /usr/local/etc/privoxy install -C -o root -g wheel -m 644 conf/privoxy/config \
install -C -o root -g wheel -m 755 privoxy.sh /usr/local/etc/rc.d /usr/local/etc/privoxy
install -C -o root -g wheel -m 755 conf/privoxy/privoxy.sh \
/usr/local/etc/rc.d
/usr/local/etc/rc.d/privoxy.sh restart
config_sgml: config_sgml:
cp -p /usr/local/share/gmat/sgml/ISO_8879-1986/entities/* \ cp -p /usr/local/share/gmat/sgml/ISO_8879-1986/entities/* \
/usr/local/share/sgml/docbook/4.1 /usr/local/share/sgml/docbook/4.1
config_smokeping:
cp conf/smokeping/config conf/smokeping/basepage.html \
/usr/local/etc/smokeping
/usr/local/etc/rc.d/smokeping.sh stop
/usr/local/etc/rc.d/smokeping.sh start
config_sudo: config_sudo:
if ! grep -q schweikh /usr/local/etc/sudoers; then \ if ! grep -q schweikh /usr/local/etc/sudoers; then \
echo 'schweikh ALL = (ALL) NOPASSWD: ALL' >> /usr/local/etc/sudoers; \ echo 'schweikh ALL = (ALL) NOPASSWD: ALL' >> /usr/local/etc/sudoers; \
@ -160,11 +197,17 @@ config_TeX:
# change the following settings to the listed values: # change the following settings to the listed values:
perl -pi \ perl -pi \
-e 's/^% original texmf.cnf/% texmf.cnf/;' \ -e 's/^% original texmf.cnf/% texmf.cnf/;' \
-e 's/^(hash_extra\s*=).*/$$1 60000/;' \ -e 's/^(hash_extra\s*=).*/$${1}60000/;' \
-e 's/^(pool_size\s*=).*/$$1 1000000/;' \ -e 's/^(pool_size\s*=).*/$${1}1000000/;' \
-e 's/^(max_strings\s*=).*/$$1 70000/;' \ -e 's/^(max_strings\s*=).*/$${1}70000/;' \
-e 's/^(save_size\s*=).*/$$1 10000/;' \ -e 's/^(save_size\s*=).*/$${1}10000/;' \
/usr/local/share/texmf/web2c/texmf.cnf /usr/local/share/texmf/web2c/texmf.cnf
# Test if the texmf.cnf has changed.
@if ! cmp -s /usr/local/share/texmf/web2c/texmf.cnf texmf.cnf; then \
echo "ATTENTION: the texmf.cnf has changed. Please examine if"; \
echo "the modifications are still correct. Here is the diff:"; \
diff -u /usr/local/share/texmf/web2c/texmf.cnf texmf.cnf; \
fi
config_tin: config_tin:
# Point tin to our files. # Point tin to our files.
@ -176,6 +219,8 @@ config_tin:
config_uucp: config_uucp:
cd /etc/mail; make install SENDMAIL_MC=/etc/mail/hal9000.mc cd /etc/mail; make install SENDMAIL_MC=/etc/mail/hal9000.mc
# Make the uucp user's shell the correct uucico, so su(1) works.
chpass -s /usr/local/libexec/uucp/uucico uucp
# UUCP expects to find /usr/bin/rnews. # UUCP expects to find /usr/bin/rnews.
cd /usr/bin; ln -fs ../local/news/bin/rnews . cd /usr/bin; ln -fs ../local/news/bin/rnews .
# Actual UUCP configuration. # Actual UUCP configuration.