diff options
Diffstat (limited to 'etc')
188 files changed, 27841 insertions, 0 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV new file mode 100644 index 0000000..ef6fc8e --- /dev/null +++ b/etc/MAKEDEV @@ -0,0 +1,1731 @@ +#!/bin/sh - +# +# Copyright (c) 1990 The Regents of the University of California. +# All rights reserved. +# +# Written and contributed by W. Jolitz 12/90 +# +# Redistribution and use in source and binary forms are permitted provided +# that: (1) source distributions retain this entire copyright notice and +# comment, and (2) distributions including binaries display the following +# acknowledgement: ``This product includes software developed by the +# University of California, Berkeley and its contributors'' in the +# documentation or other materials provided with the distribution and in +# all advertising materials mentioning features or use of this software. +# Neither the name of the University nor the names of its contributors may +# be used to endorse or promote products derived from this software without +# specific prior written permission. +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90 +# $FreeBSD$ +# +# Device "make" file. Valid arguments: +# all makes all known devices, standard number of units (or close) +# std standard devices +# jail suitable for a jail(8) +# local configuration specific devices +# mach-4 mach4&lites+devices for Mach's XFree86 distribution +# (see http://www.cs.hut.fi/lites.html for more info on LITES) +# +# Tapes: +# wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape +# sa* SCSI Sequential Access Devices +# +# Disks: +# aac* Adaptec FSA RAID controllers +# aacd* Adaptec FSA RAID +# acd* ATAPI CD-ROM disks +# amrd* AMI MegaRAID +# cd* SCSI CD-ROM disks +# da* SCSI Direct Access Devices +# fd* floppy disk drives (3 1/2", 5 1/4") +# fla* M-Systems DiskOnChip +# idad* Compaq Smart-2 RAID arrays +# matcd* Matsushita (Panasonic) CD-ROM disks +# mcd* Mitsumi CD-ROM disks +# md* Memory (or malloc) disk +# mlx* Mylex DAC960 RAID controllers +# mlxd* Mylex DAC960 RAID disk volumes +# mly* Mylex RAID controllers (newer models) +# scd* Sony CD-ROM disks +# vn* vnode disks +# wd* "Winchester" disk drives (ST506,IDE,ESDI,RLL,...) +# wfd* IDE floppy disk drives (LS-120) +# +# Console ports: +# vty* virtual console devices for syscons/pcvt/codrv +# +# Pointing devices: +# mse* Logitech and ATI Inport bus mouse +# psm* PS/2 mouse +# jogdial Sony VAIO jog dial +# sysmouse Mousesystems mouse emulator for syscons +# +# Time devices: +# refclock-* serial ports used by xntpd parse refclocks +# +# Terminal ports: +# tty* general purpose serial ports +# cua* dialout serial ports +# ttyA* Specialix SI/XIO dialin ports ('*' = number of devices) +# cuaA* Specialix SI/XIO dialout ports +# ttyD* Digiboard - 16 dialin ports +# cuaD* Digiboard - 16 dialout ports +# ttyR* Rocketport dialin ports +# cuaR* Rocketport dialout ports +# +# Pseudo terminals: +# pty* set of 32 master and slave pseudo terminals +# vty* virtual terminals using syscons/pcvt/codrv console +# +# Parallel port: +# lpt* Printer +# ppi* Parallel port i/o +# pps* Pulse per second timing interface +# pcfclock* Parallel time sync interface +# +# I2C and SMBus: +# iic* I2C devices +# smb* SMBUS devices +# +# USB devices: +# usb* USB bus control device +# ugen* generic USB device +# uhid* Human Interface Device (HID) +# ulpt* printer +# umodem* modems +# ums* mouse +# urio* Diamond Rio 500 +# uscanner* USB scanners +# usio* USB serial devices +# +# SCSI devices (other than CD-ROM, tape and disk): +# ch* SCSI Media-Changer (juke box) driver +# worm* WORM driver +# pt* Processor Type (HP scanner, as one example) +# pass* CAM Passthrough device +# ses* SES (SCSI Environmental Services) and +# SAF-TE (Scsi Accessable Fault-Tolerant Enclosures) device +# +# PC-CARD (previously called PCMCIA) support +# card* PC-CARD slots +# +# ISDN devices: +# i4b isdnd call control device +# i4bctl debugging control device +# i4btrc* trace data interface(s), one per passive card +# i4btel* telephony interface(s) +# i4bteld* telephony dialout interface(s) +# i4brbch* raw b channel access device(s) +# +# Special purpose devices: +# acpi Advanced Configuration and Power Interface +# apm Advanced Power Management BIOS +# apmctl APM BIOS control device +# bpf* packet filter +# speaker pc speaker +# tw* xten power controller +# snd* various sound cards +# pcaudio PCM audio driver +# socksys iBCS2 socket system driver +# vat VAT compatibility audio driver (requires snd*) +# gsc Genius GS-4500 hand scanner +# joy pc joystick +# tun* Tunneling IP device +# tap* Ethernet Tunneling device +# snp* tty snoop devices +# spigot Video Spigot video acquisition card +# ctx* Cortex-I video acquisition card +# meteor* Matrox Meteor video acquisition card (pci) +# bktr* Bt848 based video acquisition card (pci) +# labpc* National Instrument's Lab-PC and LAB-PC+ +# perfmon CPU performance-monitoring counters +# pci PCI configuration-space access from user mode +# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth) +# kbd keyboard devices +# 3dfx* 3dfx voodoo device for glide (tdfx) (/dev/3dfx,3dfxN,voodoo) +# agpgart AGP interface +# + +if [ -n "$MAKEDEVPATH" ]; then + PATH="$MAKEDEVPATH" +else + PATH=/sbin:/bin +fi +umask 77 + +# Usage: die exitcode msg +die() { + echo $2 + exit $1 +} + +# Convert integer to partition name +dkitop() { + local p + + case $1 in + 0) p=a;; 1) p=b;; 2) p=c;; 3) p=d;; 4) p=e;; 5) p=f;; 6) p=g;; 7) p=h;; + *) p="?";; + esac + echo $p +} + +# Convert integer to slice name +dkitos() { + local s + + case $1 in + 0) s="";; + 1) s="";; + *) s=s$(($1-1));; + esac + echo $s +} + +# Convert disk (type, unit, slice, partition) to minor number +dkminor() +{ + echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4)) +} + +# Override mknod(2) to add extra handling to it. +mknod=/sbin/mknod +for i in `IFS=':'; echo $PATH`; do + if [ -x "${i}/mknod" ]; then + mknod="${i}/mknod" + break + fi +done +mknod() { + rm -f "$1" || exit 1 + case $# in + 4) "$mknod" "$@" root:wheel || die 2 "$mknod $@ failed";; + 5) "$mknod" "$@" || die 2 "$mknod $@ failed";; + *) die 2 "bad node: mknod $@";; + esac +} + +# Convert tape (ctrl, unit, mode, access) to minor number +saminor() +{ + echo $(($1 << 29 | ($2 / 16) << 16 | ($2 % 16) << 4 | $3 << 2 | $4)) +} + +# Convert the last character of a tty name to a minor number. +ttyminor() +{ + case $unit in + [0-9]) m=$unit;; + a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;; + h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;; + o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;; + v) m=31;; + *) m="?";; + esac + echo $m +} + +# Convert a unit number to a minor number. +unit2minor() +{ + echo $(((($1 >> 8) << 16) | ($1 % 256))) +} + +# Raw partition for disks +dkrawpart=2 + +# Compatibility slice for disks +dkcompatslice=0 + +# Raw slice for disks +dkrawslice=1 + +# Standard umasks +disk_umask=037 # allow group operator to read disks +tape_umask=017 # allow group operator to read/write tapes + +for i in $*; do +case $i in + +all) + sh MAKEDEV std # standard + sh MAKEDEV fd0 fd1 # bdev, floppy disk + sh MAKEDEV da0 da1 da2 da3 # bdev, SCSI disk + sh MAKEDEV ata # ATA control + sh MAKEDEV ad0 ad1 ad2 ad3 # bdev, ATA disk + sh MAKEDEV ar0 ar1 # bdev, ATA RAID disk + sh MAKEDEV acd0 acd0t afd0 ast0 # bdev, ATAPI devices + sh MAKEDEV wd0 wd1 wd2 wd3 # bdev, OLD disk + sh MAKEDEV wcd0 wfd0 wst0 # bdev, OLD ATAPI devs + sh MAKEDEV vn0 # bdev, virtual disk + sh MAKEDEV cd0 matcd0 mcd0 scd0 # bdev, cdrom + sh MAKEDEV sa0 wt0 # bdev, tape + sh MAKEDEV vty12 # cdev, virtual tty + sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty + sh MAKEDEV pty0 # cdev, pseudo tty + sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3 # cdev, serial tty + sh MAKEDEV kbd0 kbd1 # cdev, keyboard + sh MAKEDEV mse0 psm0 jogdial sysmouse # cdev, mouse + sh MAKEDEV pcaudio speaker # cdev, noise + sh MAKEDEV lpt0 lpt1 lpt2 # cdev, printer + sh MAKEDEV ppi0 ppi1 ppi2 # cdev, parallel port + sh MAKEDEV iic0 iic1 # cdev, I2C device + sh MAKEDEV smb0 smb1 # cdev, SMBus device + sh MAKEDEV usb usb0 uhid0 ums0 ulpt0 ugen0 # cdev, USB devices + sh MAKEDEV urio0 uscanner0 umodem0 # cdev, USB devices too + sh MAKEDEV bpf0 bpf1 bpf2 bpf3 # cdev, network + sh MAKEDEV ipl tun0 tun1 tun2 tun3 # cdev, network + sh MAKEDEV tap0 tap1 tap2 tap3 # cdev, network + sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous + sh MAKEDEV acpi # cdev, ACPI + sh MAKEDEV apm apmctl card0 card1 card2 card3 # cdev, laptop + sh MAKEDEV pass4 xpt2 # cdev, CAM + sh MAKEDEV i4b i4bctl i4btrc0 i4btrc1 # cdev, ISDN + sh MAKEDEV i4btel0 i4btel1 i4bteld0 i4bteld1 # cdev, ISDN + sh MAKEDEV i4brbch0 i4brbch1 # cdev, ISDN + sh MAKEDEV agpgart # cdev, AGP + ;; + +# a much restricted set of the above, to save precious i-nodes on the +# fixit floppy +fixit) + sh MAKEDEV std # standard + sh MAKEDEV fd0 # bdev, floppy disk + sh MAKEDEV da0 # bdev, SCSI disk + sh MAKEDEV ad0 # bdev, ATA disk + sh MAKEDEV acd0 afd0 ast0 # bdev, ATAPI devices + sh MAKEDEV wd0 # bdev, OLD disk + sh MAKEDEV wcd0 wfd0 wst0 # bdev, OLD ATAPI devs + sh MAKEDEV vn0 # bdev, virtual disk + sh MAKEDEV cd0 # bdev, cdrom + sh MAKEDEV sa0 # bdev, tape + sh MAKEDEV vty2 # cdev, virtual tty + sh MAKEDEV cuaa0 # cdev, serial tty + sh MAKEDEV pty0 # cdev, pseudo tty + sh MAKEDEV ttyd0 # cdev, serial tty + sh MAKEDEV kbd0 # cdev, keyboard + sh MAKEDEV mse0 psm0 jogdial sysmouse # cdev, mouse + sh MAKEDEV lpt0 # cdev, printer + sh MAKEDEV ppi0 # cdev, parallel port + sh MAKEDEV iic0 # cdev, I2C device + sh MAKEDEV smb0 # cdev, SMBus device + sh MAKEDEV ums0 # cdev, USB devices + sh MAKEDEV tun0 # cdev, network + sh MAKEDEV tap0 # cdev, network + sh MAKEDEV ch0 # cdev, miscellaneous + sh MAKEDEV acpi # cdev, ACPI + sh MAKEDEV apm apmctl card0 # cdev, laptop + sh MAKEDEV pass1 xpt1 # cdev, CAM + sh MAKEDEV i4b i4bctl i4btrc0 i4btrc1 # cdev, ISDN + sh MAKEDEV i4btel0 i4bteld0 # cdev, ISDN + sh MAKEDEV i4brbch0 # cdev, ISDN + rm -f fd/[1-9]? + ;; + +std) + mknod console c 0 0; chmod 600 console + mknod kmem c 2 1 root:kmem; chmod 640 kmem + mknod mem c 2 0 root:kmem; chmod 640 mem + mknod null c 2 2; chmod 666 null + mknod random c 2 3; chmod 666 random + ln -f random urandom + mknod zero c 2 12; chmod 666 zero + mknod io c 2 14; chmod 600 io + mknod tty c 1 0; chmod 666 tty + mknod klog c 7 0; chmod 600 klog + mknod pci c 78 0; chmod 644 pci + mknod mdctl c 95 0xffff00ff; chmod 600 mdctl + mkdir -p fd + (cd fd && i=0 && + while [ $i -lt 64 ]; do + mknod $i c 22 $i + i=$(($i + 1)) + done + ) + chmod 555 fd + chmod 666 fd/* + ln -sf fd/0 stdin + ln -sf fd/1 stdout + ln -sf fd/2 stderr + ;; + +jail) + sh MAKEDEV std pty0 + rm mem kmem pci io klog console # for security + ln -sf null mem # for libkvm (ab)users + ln -sf null kmem # --//-- + ln -sf null console + ;; + +mach-4) + mknod iopl c 22 0 + mknod kbd c 23 0 + mknod mouse c 24 0 + mknod time c 25 0 + mknod timezone c 26 0 + ;; + +# Create device files for new Archive/Wangtek QIC-02 tape driver (vak) +wt*) + umask $tape_umask + u=`expr $i : '..\(.*\)'` + if [ -z "${u}" ]; then u=0; fi + # default density, 512b blocks + mknod rwt${u} c 10 `expr 0 + $u` root:operator + mknod nrwt${u} c 10 `expr 4 + $u` root:operator + # default density, 1024b blocks +# mknod rWt${u} c 10 `expr 64 + $u` root:operator +# mknod nrWt${u} c 10 `expr 68 + $u` root:operator + mknod rwt${u}b c 10 `expr 16 + $u` root:operator # 60 megabytes + mknod nrwt${u}b c 10 `expr 20 + $u` root:operator + mknod rwt${u}c c 10 `expr 24 + $u` root:operator # 120 megabytes + mknod nrwt${u}c c 10 `expr 28 + $u` root:operator + mknod rwt${u}d c 10 `expr 32 + $u` root:operator # 150 megabytes + mknod nrwt${u}d c 10 `expr 36 + $u` root:operator +# mknod rwt${u}e c 10 `expr 40 + $u` root:operator # 300 megabytes? +# mknod nrwt${u}e c 10 `expr 44 + $u` root:operator +# mknod rwt${u}f c 10 `expr 48 + $u` root:operator # 600 megabytes? +# mknod nrwt${u}f c 10 `expr 52 + $u` root:operator + umask 77 + ;; + +# Individual slices. +aacd*s*|ad*s*|ar*s*|afd*s*|amrd*s*|da*s*|fla*s*|idad*s*|md*s*|mlxd*s*|twed*s*|vn*s*|wd*s*|wfd*s*) + umask $disk_umask + case $i in + aacd*s*) name=aacd; chr=151;; + ad*s*) name=ad; chr=116;; + ar*s*) name=ar; chr=157;; + afd*s*) name=afd; chr=118;; + amrd*s*) name=amrd; chr=133;; + da*s*) name=da; chr=13;; + fla*s*) name=fla; chr=102;; + idad*s*) name=idad; chr=109;; + md*s*) name=md; chr=95;; + mlxd*s*) name=mlxd; chr=131;; + twed*s*) name=twed; chr=147;; + vn*s*) name=vn; chr=43;; + wd*s*) name=wd; chr=3;; + wfd*s*) name=wfd; chr=87;; + esac + case $i in + aacd*s*|amrd*s*|idad*s*|mlxd*s*|twed*s*) + unit=`expr $i : '....\([0-9]*\)s'` + slice=`expr $i : '....[0-9]*s\([0-9]*\)'` + part=`expr $i : '....[0-9]*s[0-9]*\(.*\)'` + ;; + afd*s*|fla*s*|wfd*s*) + unit=`expr $i : '...\([0-9]*\)s'` + slice=`expr $i : '...[0-9]*s\([0-9]*\)'` + part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'` + ;; + *) + unit=`expr $i : '..\([0-9]*\)s'` + slice=`expr $i : '..[0-9]*s\([0-9]*\)'` + part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'` + ;; + esac + case $unit in + [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1]) + case $slice in + [0-9]|[1-2][0-9]|30) + oldslice=$slice + slice=$(($slice+1)) + slicename=`dkitos $slice` + minor=`dkminor 0 $unit $slice $dkrawpart` + mknod $name$unit$slicename c $chr $minor root:operator + ln -f $name$unit$slicename r$name$unit$slicename + case $part in + [a-h]) + case $oldslice in + 0) slice=$oldslice ;; + esac + for part in 0 1 2 3 4 5 6 7 + do + minor=`dkminor 0 $unit $slice $part` + partname=`dkitop $part` + mknod $name$unit$slicename$partname \ + c $chr $minor root:operator + ln -f $name$unit$slicename$partname \ + r$name$unit$slicename$partname + done + ;; + "") + ;; + *) + echo bad partition for disk in: $i + ;; + esac + ;; + *) + echo bad slice for disk in: $i + ;; + esac + ;; + *) + echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)" + ;; + esac + umask 77 + ;; + +fd*) + umask $disk_umask + unit=`expr $i : '..\(.*\)'` + name=fd; chr=9 + case $unit in + 0|1|2|3) + mknod ${name}${unit} c $chr `expr $unit '*' 64` root:operator + ln -f ${name}${unit} r${name}${unit} + # Fake BSD partitions + for i in a b c d e f g h + do + ln -f ${name}${unit} ${name}${unit}$i + ln -f r${name}${unit} r${name}${unit}$i + done + # User-readable and programmer-readable name sets + + mknod ${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1` \ + root:operator + ln -f ${name}${unit}.1720 r${name}${unit}.1720 + # ln -f ${name}${unit}.1720 ${name}${unit}135hs21 + # ln -f r${name}${unit}.1720 r${name}${unit}135hs21 + + mknod ${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2` \ + root:operator + ln -f ${name}${unit}.1480 r${name}${unit}.1480 + # ln -f ${name}${unit}.1480 ${name}${unit}135hs18 + # ln -f r${name}${unit}.1480 r${name}${unit}135hs18 + # ln -f ${name}${unit}.1480 ${name}${unit}96hs18 + # ln -f r${name}${unit}.1480 r${name}${unit}96hs18 + + mknod ${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3` \ + root:operator + ln -f ${name}${unit}.1440 r${name}${unit}.1440 + # ln -f ${name}${unit}.1440 ${name}${unit}135 + # ln -f r${name}${unit}.1440 r${name}${unit}135 + # ln -f ${name}${unit}.1440 ${name}${unit}135ds18 + # ln -f r${name}${unit}.1440 r${name}${unit}135ds18 + # ln -f ${name}${unit}.1440 ${name}${unit}96ds18 + # ln -f r${name}${unit}.1440 r${name}${unit}96ds18 + + mknod ${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4` \ + root:operator + ln -f ${name}${unit}.1200 r${name}${unit}.1200 + # ln -f ${name}${unit}.1200 ${name}${unit}96 + # ln -f r${name}${unit}.1200 r${name}${unit}96 + # ln -f ${name}${unit}.1200 ${name}${unit}96ds15 + # ln -f r${name}${unit}.1200 r${name}${unit}96ds15 + # ln -f ${name}${unit}.1200 ${name}${unit}135ds15 + # ln -f r${name}${unit}.1200 r${name}${unit}135ds15 + + mknod ${name}${unit}.820 c $chr `expr $unit '*' 64 + 5` \ + root:operator + ln -f ${name}${unit}.820 r${name}${unit}.820 + # ln -f ${name}${unit}.820 ${name}${unit}96hs10 + # ln -f r${name}${unit}.820 r${name}${unit}96hs10 + # ln -f ${name}${unit}.820 ${name}${unit}135hs10 + # ln -f r${name}${unit}.820 r${name}${unit}135hs10 + + mknod ${name}${unit}.800 c $chr `expr $unit '*' 64 + 6` \ + root:operator + ln -f ${name}${unit}.800 r${name}${unit}.800 + # ln -f ${name}${unit}.800 ${name}${unit}96ds10 + # ln -f r${name}${unit}.800 r${name}${unit}96ds10 + # ln -f ${name}${unit}.800 ${name}${unit}135ds10 + # ln -f r${name}${unit}.800 r${name}${unit}135ds10 + + mknod ${name}${unit}.720 c $chr `expr $unit '*' 64 + 7` \ + root:operator + ln -f ${name}${unit}.720 r${name}${unit}.720 + # ln -f ${name}${unit}.720 ${name}${unit}96ds9 + # ln -f r${name}${unit}.720 r${name}${unit}96ds9 + # ln -f ${name}${unit}.720 ${name}${unit}135ds9 + # ln -f r${name}${unit}.720 r${name}${unit}135ds9 + + mknod ${name}${unit}.360 c $chr `expr $unit '*' 64 + 8` \ + root:operator + ln -f ${name}${unit}.360 r${name}${unit}.360 + # ln -f ${name}${unit}.360 ${name}${unit}48 + # ln -f r${name}${unit}.360 r${name}${unit}48 + # ln -f ${name}${unit}.360 ${name}${unit}48ds9 + # ln -f r${name}${unit}.360 r${name}${unit}48ds9 + + mknod ${name}${unit}.640 c $chr `expr $unit '*' 64 + 9` \ + root:operator + ln -f ${name}${unit}.640 r${name}${unit}.640 + # ln -f ${name}${unit}.640 ${name}${unit}96ds8 + # ln -f r${name}${unit}.640 r${name}${unit}96ds8 + # ln -f ${name}${unit}.640 ${name}${unit}135ds8 + # ln -f r${name}${unit}.640 r${name}${unit}135ds8 + + mknod ${name}${unit}.1232 c $chr `expr $unit '*' 64 + 10` \ + root:operator + ln -f ${name}${unit}.1232 r${name}${unit}.1232 + # ln -f ${name}${unit}.1232 ${name}${unit}96ds8 + # ln -f r${name}${unit}.1232 r${name}${unit}96ds8 + # ln -f ${name}${unit}.1232 ${name}${unit}135ds8 + # ln -f r${name}${unit}.1232 r${name}${unit}135ds8 + ;; + *) + echo bad unit for disk in: $i + ;; + esac + umask 77 + ;; + +ata) + umask 177 + mknod ata c 159 0 root:operator + umask 77 + ;; + + +aacd*|ad*|ar*|afd*|amrd*|da*|fla*|idad*|md*|mlxd*|twed*|vn*|wd*|wfd*) + umask $disk_umask + case $i in + aacd*) name=aacd; chr=151;; + ad*) name=ad; chr=116;; + ar*) name=ar; chr=157;; + afd*) name=afd; chr=118;; + amrd*) name=amrd; chr=133;; + da*) name=da; chr=13;; + fla*) name=fla; chr=102;; + idad*) name=idad; chr=109;; + md*) name=md; chr=95;; + mlxd*) name=mlxd; chr=131;; + twed*) name=twed; chr=147;; + vn*) name=vn; chr=43;; + wd*) name=wd; chr=3;; + wfd*) name=wfd; chr=87;; + esac + case $i in + aacd*|amrd*|idad*|mlxd*|twed*) + unit=`expr $i : '....\(.*\)'` + ;; + afd*|fla*|wfd*) + unit=`expr $i : '...\(.*\)'` + ;; + *) + unit=`expr $i : '..\(.*\)'` + ;; + esac + case $unit in + [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1]) + for slicepartname in s0h s1 s2 s3 s4 + do + sh MAKEDEV $name$unit$slicepartname + done + if [ "x$name" = "xvn" ] ; then + # We need to control device so we can configure + # the vn disks with vnconfig + mknod $name$unit.ctl c \ + $chr `expr $unit '*' 8 + 33554432` root:operator + fi + ;; + *) + echo bad unit for disk in: $i + ;; + esac + umask 77 + ;; + +ccd*) + umask $disk_umask + name=ccd + chr=74 + unit=`expr $i : '...\(.*\)'` + case $unit in + [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1]) + for part in 0 1 2 3 4 5 6 7 + do + minor=`dkminor 0 $unit 0 $part` + partname=`dkitop $part` + mknod $name$unit$partname c $chr $minor root:operator + ln -f $name$unit$partname r$name$unit$partname + done + ;; + *) + echo bad unit for disk in: $i + ;; + esac + umask 77 + ;; + +# SCSI processor type driver +pt[0-9]*) + chr=61 + name=pt + unit=`expr $i : 'pt\([0-9][0-9]*\)'` + if [ -z "${unit}" ]; then + unit=0 + fi + unit=`expr $unit + 1 - 1` + mknod ${name}${unit} c $chr `unit2minor $unit` + ;; + +# SCSI SES/SAF-TE type driver +ses[0-9]*) + chr=110 + name=ses + unit=`expr $i : 'ses\([0-9][0-9]*\)'` + if [ -z "${unit}" ]; then + unit=0 + fi + unit=`expr $unit + 1 - 1` + mknod ${name}${unit} c $chr `unit2minor $unit` + ;; +# SCSI target mode sample driver +targ[0-9]*) + chr=65 + name=targ + unit=`expr $i : 'targ\([0-9][0-9]*\)'` + if [ -z "${unit}" ]; then + unit=0 + fi + unit=`expr $unit + 1 - 1` + mknod ${name}${unit} c $chr `unit2minor $unit` + mknod ${name}.ctl c $chr 0xffff00ff + ;; + +# CAM transport layer device +xpt*) + # This major number is temporary + chr=104 + name=xpt + units=`expr $i : 'xpt\(.*\)'` + if [ -z "${units}" ]; then + units=1 + fi + i=0 + while [ $i -lt $units ]; do + dname=$name$i + rm -rf $dname r$dname + mknod $dname c $chr `unit2minor $i` root:operator + i=$(($i + 1)) + done + ;; + +# CAM passthrough device +pass*) + # This major number is temporary + chr=31 + name=pass + units=`expr $i : 'pass\(.*\)'` + if [ -z "${units}" ]; then + units=1 + fi + i=0 + while [ $i -lt $units ]; do + dname=$name$i + rm -rf $dname r$dname + mknod $dname c $chr `unit2minor $i` root:operator + i=$(($i + 1)) + done + ;; +pty*) + class=`expr $i : 'pty\(.*\)'` + case $class in + 0) offset=0 name=p;; + 1) offset=32 name=q;; + 2) offset=64 name=r;; + 3) offset=96 name=s;; +# Note that xterm (at least) only look at p-s. + 4) offset=128 name=P;; + 5) offset=160 name=Q;; + 6) offset=192 name=R;; + 7) offset=224 name=S;; + # This still leaves [tuTU]. + *) echo bad unit for pty in: $i;; + esac + umask 0 + case $class in + 0|1|2|3|4|5|6|7) + i=0 + while [ $i -lt 32 ]; do +# This was an awk substr() before. + c=$(echo 0123456789abcdefghijklmnopqrstuv | + dd bs=1 skip=$i count=1 2>/dev/null) + mknod tty$name$c c 5 $(($offset + $i)) + mknod pty$name$c c 6 $(($offset + $i)) + i=$(($i + 1)) + done + ;; + esac + umask 77 + ;; + +sa*) + umask $tape_umask + unit=`expr $i : '..\(.*\)'` + chr=14 + + case $unit in + [0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]) + mknod sa${unit}.ctl c $chr `saminor 1 ${unit} 0 0` + ln -f sa${unit}.ctl rsa${unit}.ctl + for m in 0 1 2 3 + do + mknod sa${unit}.${m} c $chr \ + `saminor 0 ${unit} ${m} 0` root:operator + ln -f sa${unit}.${m} rsa${unit}.${m} + mknod nsa${unit}.${m} c $chr \ + `saminor 0 ${unit} ${m} 1` root:operator + ln -f nsa${unit}.${m} nrsa${unit}.${m} + mknod esa${unit}.${m} c $chr \ + `saminor 0 ${unit} ${m} 2` root:operator + ln -f esa${unit}.${m} ersa${unit}.${m} + done + ln -f sa${unit}.0 sa${unit} + ln -f sa${unit}.0 rsa${unit}.0 + ln -f sa${unit}.0 rsa${unit} + ln -f nsa${unit}.0 nsa${unit} + ln -f nsa${unit}.0 nrsa${unit}.0 + ln -f nsa${unit}.0 nrsa${unit} + ln -f esa${unit}.0 esa${unit} + ln -f esa${unit}.0 ersa${unit}.0 + ln -f esa${unit}.0 ersa${unit} + ;; + *) + echo bad unit for tape in: $i + ;; + esac + umask 77 + ;; + +ch*) + umask 37 + unit=`expr $i : '..\(.*\)'` + case $i in + ch*) name=ch; chr=17;; + esac + case $unit in + 0|1|2|3|4|5|6) + mknod ${name}${unit} c $chr $unit root:operator + ;; + *) + echo bad unit for media changer in: $i + ;; + esac + umask 77 + ;; + +ast*) + umask 2 ; + unit=`expr $i : '...\(.*\)'` + chr=119 + case $unit in + 0|1|2|3) + mknod rast${unit} c $chr `expr $unit '*' 8 + 0` root:operator + chmod 640 rast${unit} + mknod nrast${unit} c $chr `expr $unit '*' 8 + 1` root:operator + chmod 640 nrast${unit} + ;; + *) + echo bad unit for tape in: $i + ;; + esac + umask 77 + ;; + +acd*t*) + umask $disk_umask + units=`expr $i : '...\(.*\)t'`; + tracks=`expr $i : '.*t\(.*\)'`; + name=acd; + chr=117; + if [ -z "${units}" -o "${units}" -le 0 ]; then + units=1 + fi + if [ -z "${tracks}" -o "${tracks}" -le 0 ]; then + tracks=100 + fi + if [ "${units}" -le 31 -a "${tracks}" -le 169 ]; then + i=0 + while [ $i -le $units ]; do + dname=$name$i + rm -rf ${dname}t* + j=1 + while [ $j -le ${tracks} ]; do + mknod ${dname}t$j c $chr \ + $((($i * 8) + (65536 * $j))) \ + root:operator + j=$(($j + 1)) + done + i=$(($i + 1)) + done + else + echo "$i is invalid -- can't have more than 32 cd devices or 169 tracks" + fi + umask 77 + ;; + +acd*|cd*|mcd*|scd*) + umask $disk_umask + case $i in + acd*) units=`expr $i : '...\(.*\)'`; name=acd; chr=117;; + cd*) units=`expr $i : '..\(.*\)'`; name=cd; chr=15;; + mcd*) units=`expr $i : '...\(.*\)'`; name=mcd; chr=29;; + scd*) units=`expr $i : '...\(.*\)'`; name=scd; chr=45;; + esac + if [ -z "${units}" -o "${units}" -le 0 ]; then + units=1 + fi + if [ "${units}" -le 31 ]; then + i=0 + while [ $i -le $units ]; do + dname=$name$i + rm -rf ${dname}[!t]* r${dname}* + mknod ${dname}a c $chr $(($i * 8)) root:operator + mknod ${dname}c c $chr $(($i * 8 + 2)) root:operator + ln -f ${dname}a r${dname}a + ln -f ${dname}c r${dname}c + i=$(($i + 1)) + done + else + echo "$i is invalid -- can't have more than 32 cd devices" + fi + umask 77 + ;; + +matcd*) + umask 2 + case $i in + matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; chr=46;; + esac + case $unit in + 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15) + mknod ${name}${unit}a c $chr `expr $unit '*' 8 + 0` \ + root:operator + mknod ${name}${unit}c c $chr `expr $unit '*' 8 + 2` \ + root:operator + ln -f ${name}${unit}a r${name}${unit}a + ln -f ${name}${unit}c r${name}${unit}c + chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h] + + mknod ${name}${unit}la c $chr `expr $unit '*' 8 + 128` \ + root:operator + mknod ${name}${unit}lc c $chr `expr $unit '*' 8 + 130` \ + root:operator + ln -f ${name}${unit}la r${name}${unit}la + ln -f ${name}${unit}lc r${name}${unit}lc + chmod 640 ${name}${unit}l[a-h] r${name}${unit}l[a-h] + ;; + *) + echo bad unit for disk in: $i + ;; + esac + umask 77 + ;; + +wcd*) + umask 2 ; + unit=`expr $i : '...\(.*\)'` + chr=69 + case $unit in + 0|1|2|3|4|5|6|7) + mknod wcd${unit}a c $chr `expr $unit '*' 8 + 0` root:operator + mknod wcd${unit}c c $chr `expr $unit '*' 8 + 2` root:operator + ln -f wcd${unit}a rwcd${unit}a + ln -f wcd${unit}c rwcd${unit}c + chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h] + ;; + *) + echo bad unit for disk in: $i + ;; + esac + umask 77 + ;; + +wst*) + umask 2 ; + unit=`expr $i : '...\(.*\)'` + chr=90 + case $unit in + 0|1|2|3) + mknod rwst${unit} c $chr `expr $unit '*' 8 + 0` root:operator + chmod 640 rwst${unit} + ;; + esac + umask 77 + ;; + +iic*) + unit=`expr $i : 'iic\(.*\)'` + mknod iic$unit c 105 `unit2minor $unit` + ;; + +smb*) + unit=`expr $i : 'smb\(.*\)'` + mknod smb$unit c 106 `unit2minor $unit` + ;; + +pcfclock*) + unit=`expr $i : 'pcfclock\(.*\)'` + mknod pcfclock$unit c 140 `unit2minor $unit` + ;; + +ppi*) + unit=`expr $i : 'ppi\(.*\)'` + mknod ppi$unit c 82 `unit2minor $unit` + ;; + +pps*) + unit=`expr $i : 'pps\(.*\)'` + mknod pps$unit c 89 `unit2minor $unit` + ;; + +usb) + mknod usb$unit c 108 255 root:operator + chmod 0660 usb$unit + ;; + +usb*) + umask 7 + unit=`expr $i : 'usb\(.*\)'` + mknod usb$unit c 108 `unit2minor $unit` root:operator + umask 77 + ;; + +uhid*) + umask 7 + unit=`expr $i : 'uhid\(.*\)'` + mknod uhid$unit c 122 `unit2minor $unit` root:operator + umask 77 + ;; + +ums*) + umask 7 + unit=`expr $i : 'ums\(.*\)'` + mknod ums$unit c 111 `unit2minor $unit` root:operator + umask 77 + ;; + +ulpt*) + unit=`expr $i : 'ulpt\(.*\)'` + minor=`unit2minor $unit` + mknod ulpt$unit c 113 $minor + minor=`unit2minor \`expr $unit + 64\`` + mknod unlpt$unit c 113 $minor # and the 'no prime' version + ;; + +ugen*) + umask 7 + unit=`expr $i : 'ugen\([0-9][0-9]*\)'` + endpoint=`expr $i : 'ugen.*\.\([0-9][0-9]*\)'` + if [ -z "${unit}" ]; then + echo $i - Invalid unit number + fi + if [ -z "${endpoint}" ]; then # ugen0 & ugen0.1 - ugen0.15 + mknod ugen$unit c 114 \ + `unit2minor $(($unit * 16))` root:operator + i=1 + while [ $i -lt 16 ]; do + mknod ugen$unit.$i c 114 \ + `unit2minor $(($unit * 16 + $i))` root:operator + i=$(($i + 1)) + done + else + minor=`unit2minor $(($unit * 16 + $endpoint))` + mknod ugen$unit.$endpoint c 114 $minor root:operator + fi + umask 77 + ;; + +urio*) + umask 7 + unit=`expr $i : 'urio\(.*\)'` + mknod urio$unit c 143 `unit2minor $unit` root:operator + umask 77 + ;; + +usio*) + umask 7 + unit=`expr $i : 'usio\(.*\)'` + minor=`unit2minor $(($unit + 128))` + mknod usio$unit c 138 $minor uucp:dialer + umask 77 + ;; + +uscanner*) + umask 7 + unit=`expr $i : 'uscanner\(.*\)'` + mknod uscanner$unit c 156 `unit2minor $unit` root:operator + umask 77 + ;; + +umodem*) + umask 7 + unit=`expr $i : 'umodem\(.*\)'` + mknod umodem$unit c 124 `unit2minor $unit` uucp:dialer + umask 77 + ;; + +lpt*) + unit=`expr $i : 'lpt\(.*\)'` + mknod lpt$unit c 16 `unit2minor $unit` + mknod lpctl$unit c 16 `unit2minor \`expr $unit + 128\`` + ;; + +# Use this to create virtual consoles for syscons, pcvt or codrv +# ttyv0-b +# use as MAKEDEV vtyNN to create NN entries +vty*) + chr=12 + units=`expr $i : 'vty\(.*\)'` + i=0 + while [ $i -lt $units ]; do + mknod ttyv$(printf %01x $i) c $chr `unit2minor $i` + i=$(($i + 1)) + done + ln -fs ttyv0 vga # XXX X still needs this pccons relic + ;; + +nmdm*) + units=`expr $i : 'nmdm\(.*\)'` + chr=18 + i=0 + while [ $i -lt $units ]; do + minor=`unit2minor $i` + minor=$(($minor + $minor)) + mknod nmdm${i}A c $chr $minor + mknod nmdm${i}B c $chr $(($minor + 1)) + i=$(($i + 1)) + done + ;; + +bpf*) + nbpf=`expr $i : 'bpf\(.*\)$'` + unit=0 + while [ $unit -le $nbpf ]; do + mknod bpf$unit c 23 `unit2minor $unit` + unit=$(($unit + 1)) + done + ;; + +speaker) + mknod speaker c 26 0 + ;; + +cuaa?|cua?) + umask 7 + unit=`expr $i : 'cua.*\(.\)$'` + m=`ttyminor $unit` + mknod cuaa$unit c 28 `expr $m + 128` uucp:dialer + mknod cuaia$unit c 28 `expr $m + 32 + 128` uucp:dialer + mknod cuala$unit c 28 `expr $m + 64 + 128` uucp:dialer + umask 77 + ;; + +tty0?|ttyd?|tty?) + unit=`expr $i : 'tty.*\(.\)$'` + m=`ttyminor $unit` + mknod ttyd$unit c 28 $m + mknod ttyid$unit c 28 `expr $m + 32` + mknod ttyld$unit c 28 `expr $m + 64` + ;; + +cuac?) + umask 7 + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f + g h i j k l m n o p q r s t u v" + major=48 + card=`expr $i : 'cua.*\(.\)$'` + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor` + name=$card$unit + mknod cuac$name c $major `expr $minor + 128` uucp:dialer + mknod cuaic$name c $major `expr $minor + 32 + 128` uucp:dialer + mknod cualc$name c $major `expr $minor + 64 + 128` uucp:dialer + done + umask 77 + ;; + +ttyc?) + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f + g h i j k l m n o p q r s t u v" + major=48 + card=`expr $i : 'tty.*\(.\)$'` + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor` + name=$card$unit + mknod ttyc$name c $major $minor + mknod ttyic$name c $major `expr $minor + 32` + mknod ttylc$name c $major `expr $minor + 64` + done + ;; + +# RISCom8 'rc' driver entries + +cuam?) + umask 7 + unit=`expr $i : 'cua.*\(.\)$'` + m=`ttyminor $unit` + mknod cuam$unit c 63 `expr $m + 128` uucp:dialer + umask 77 + ;; + +ttym?) + unit=`expr $i : 'tty.*\(.\)$'` + m=`ttyminor $unit` + mknod ttym$unit c 63 $m + ;; + +# Specialix SI/XIO. +# Note: these are 'base 1' to match the numbers on the panels, and to match +# the manual that comes with the system. +ttyA*) + major=68 + nports=`expr $i : 'ttyA\(.*\)$'` + port=1 + while [ $port -le $nports ]; do + minor=$(expr $port - 1) + name=$(printf %02d $port) + mknod ttyA$name c $major $minor + mknod ttyiA$name c $major `expr $minor + 65536` + mknod ttylA$name c $major `expr $minor + 131072` + port=$(($port + 1)) + done + # For the user-mode control program, 'sicontrol' + mknod si_control c 68 262144 + ;; + +cuaA*) + umask 7 + major=68 + nports=`expr $i : 'cuaA\(.*\)$'` + port=1 + while [ $port -le $nports ]; do + minor=$(expr $port - 1) + name=$(printf %02d $port) + mknod cuaA$name c $major `expr $minor + 128` uucp:dialer + mknod cuaiA$name c $major `expr $minor + 128 + 65536` \ + uucp:dialer + mknod cualA$name c $major `expr $minor + 128 + 131072` \ + uucp:dialer + port=$(($port + 1)) + done + umask 77 + ;; + +# Digiboard PC/?? 16 port card. +# The current scheme of minor numbering is: +# +# unused{14} CARD{2} major{8} CALLOUT{1} LOCK{1} INIT{1} PORT{5} +# +# CARD bitfield in future versions may be extended to 3 bits. +# +# See dgb(4) +# +ttyD?) + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f" + major=58 + card=`expr $i : 'tty.*\(.\)$'` + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor` + name=$card$unit + mknod ttyD$name c $major $minor + mknod ttyiD$name c $major `expr $minor + 32` + mknod ttylD$name c $major `expr $minor + 64` + done + ;; + +cuaD?) + umask 7 + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f" + major=58 + card=`expr $i : 'cua.*\(.\)$'` + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor` + name=$card$unit + mknod cuaD$name c $major `expr $minor + 128` uucp:dialer + mknod cuaiD$name c $major `expr $minor + 32 + 128` uucp:dialer + mknod cualD$name c $major `expr $minor + 64 + 128` uucp:dialer + done + umask 77 + ;; + +ttyM*) + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f" + modulelist="a b c d" + major=101 + card=`expr $i : 'tty.*\(.\)$'` + for unit in $modulelist + do + moduleminor=`ttyminor $unit` + moduleminor=`expr $moduleminor % 10 \* 16` + modulename=$unit + + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor + $moduleminor` + name=$card$modulename$unit + rm -f tty*M$name + mknod ttyM$name c $major $minor + mknod ttyiM$name c $major `expr $minor + 64` + mknod ttylM$name c $major `expr $minor + 128` + done + done + ;; + +cuaM?) + umask 7 + portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f" + modulelist="a b c d" + major=101 + card=`expr $i : 'cua.*\(.\)$'` + for unit in $modulelist + do + moduleminor=`ttyminor $unit` + moduleminor=`expr $moduleminor % 10 \* 16` + modulename=$unit + + for unit in $portlist + do + minor=`ttyminor $unit` + minor=`expr $card \* 65536 + $minor + $moduleminor` + name=$card$modulename$unit + rm -f cua*M$name + mknod cuaM$name c $major `expr $minor + 262144` \ + uucp:dialer + mknod cuaiM$name c $major `expr $minor + 64 + 262144` \ + uucp:dialer + mknod cualM$name c $major `expr $minor + 128 + 262144` \ + uucp:dialer + done + done + umask 77 + ;; + +ttyR?) + major=81 + BOARD=1; Rnum=0 + MINOR=$(($BOARD * 65536)) + controllers=$( + dmesg | while read first rest; do + case "$first" in + RocketPort[0-4]) + echo "$first" + ;; + esac + done + ) + rm -f /dev/ttyR* /dev/ttyiR* /dev/ttylR* + for i in $controllers; do + ndevices=$( + dmesg | while read first bar ports rest; do + case "$first" in + $i*) + echo "$ports" + ;; + esac + done + ) + echo -n "Creating $ndevices devices for $i: " + dev=0 + while [ $dev -lt $ndevices ]; do + mknod /dev/ttyR$Rnum c $major $MINOR + mknod /dev/ttyiR$Rnum c $major $(($MINOR + 32)) + mknod /dev/ttylR$Rnum c $major $(($MINOR + 64)) + Rnum=$(($Rnum + 1)) + MINOR=$(($MINOR + 1)) + dev=$(($dev + 1)) + done + BOARD=$(($BOARD + 1)) + MINOR=$(($BOARD * 65536)) + echo " " + done + ;; + +cuaR?) + major=81 + BOARD=1; Rnum=0 + MINOR=$(($BOARD * 65536)) + controllers=$( + dmesg | while read first rest; do + case "$first" in + RocketPort[0-4]) + echo "$first" + ;; + esac + done + ) + rm -f /dev/cuaR* /dev/cuaiR* /dev/cualR* + for i in $controllers; do + ndevices=$( + dmesg | while read first bar ports rest; do + case "$first" in + $i*) + echo "$ports" + ;; + esac + done + ) + echo -n "Creating $ndevices devices for $i: " + dev=0 + while [ $dev -lt $ndevices ]; do + mknod /dev/cuaR$Rnum c $major $(($MINOR + 128)) uucp:dialer + mknod /dev/cuaiR$Rnum c $major $(($MINOR + 128 + 32)) \ + uucp:dialer + mknod /dev/cualR$Rnum c $major $(($MINOR + 128 + 64)) \ + uucp:dialer + Rnum=$(($Rnum + 1)) + MINOR=$(($MINOR + 1)) + dev=$(($dev + 1)) + done + BOARD=$(($BOARD + 1)) + MINOR=$(($BOARD * 65536)) + echo " " + done + ;; + +mse*) + unit=`expr $i : 'mse\(.*\)'` + chr=27 + # non-blocking for X11 + mknod mse$unit c $chr `unit2minor \`expr $unit '*' 2 + 1\`` + ;; + +psm*) + unit=`expr $i : 'psm\(.*\)'` + chr=21 + # non-blocking for X11 + mknod psm$unit c $chr `unit2minor \`expr $unit '*' 2 + 1\`` + ;; + +mouse*) + name=`expr $i : 'mouse\(.*\)'` + if [ ! -c $name ]; then + $0 $name # make the appropriate device + fi + ln -fs $name mouse + ;; + +pcaudio) + mknod pcaudio c 24 0 + mknod pcaudioctl c 24 128 + ;; + +socksys) + mknod socksys c 41 0 + mknod spx c 41 1 + ln -fs socksys nfsd + chmod 666 socksys nfsd spx + ;; + +snd*) +# +# changes from Linux voxware +# minor Linux FreeBSD +# 8 sequencer2 (aka music0) music0 +# 17 patmgr0 sequencer1 +# 33 patmgr1 sequencer2 +# + + unit=`expr $i : 'snd\(.*\)'` + chr=30 + + # XXX write this less verbosely, like std + snd_security_hole=0 # XXX + umask $snd_security_hole + + ln -fs mixer$unit mixer + ln -fs sequencer$unit sequencer + ln -fs dsp$unit dsp + ln -fs audio$unit audio + ln -fs dspW$unit dspW + ln -fs music$unit music + ln -fs pss$unit pss + + mknod mixer$unit c $chr `unit2minor \`expr $unit '*' 16 + 0\`` + mknod sequencer$unit c $chr `unit2minor \`expr $unit '*' 16 + 1\`` + mknod midi$unit c $chr `unit2minor \`expr $unit '*' 16 + 2\`` + mknod dsp$unit c $chr `unit2minor \`expr $unit '*' 16 + 3\`` + mknod audio$unit c $chr `unit2minor \`expr $unit '*' 16 + 4\`` + mknod dspW$unit c $chr `unit2minor \`expr $unit '*' 16 + 5\`` + mknod sndstat c $chr 6 + # minor number 7 is unused + mknod music$unit c $chr `unit2minor \`expr $unit '*' 16 + 8\`` + mknod pss$unit c $chr `unit2minor \`expr $unit '*' 16 + 9\`` + # minor number 10 is unused + mknod midistat c $chr 11 + # minor numbers 12-15 are unused + umask 77 + ;; + +vat) + mknod vatio c 25 128 + chmod 660 vatio + ;; + +gsc*) + unit=`expr $i : 'gsc\(.*\)'` + mknod gsc${unit} c 47 `unit2minor $unit` + mknod gsc${unit}p c 47 `unit2minor $(($unit + 8))` + mknod gsc${unit}d c 47 `unit2minor $(($unit + 32))` + mknod gsc${unit}pd c 47 `unit2minor $(($unit + 40))` + chmod 666 gsc${unit}* + ;; + +acpi) + mknod acpi c 152 0 root:operator + chmod 660 acpi + ;; + +apm) + mknod apm c 39 0 root:operator + chmod 664 apm + ;; + +apmctl) + mknod apmctl c 39 8 root:operator + chmod 660 apmctl + ;; + +card*) + unit=`expr $i : 'card\(.*\)'` + chr=50 + mknod card$unit c $chr `unit2minor $unit` + chmod 644 card$unit + ;; + +ttyx?|ttyy?|ttyz?) + case $i in + *0) unit=0;; *1) unit=1;; *2) unit=2;; *3) unit=3;; + *4) unit=4;; *5) unit=5;; *6) unit=6;; *7) unit=7;; + *8) unit=8;; *9) unit=9;; *a) unit=10;; *b) unit=11;; + *c) unit=12;; *d) unit=13;; *e) unit=14;; *f) unit=15;; + esac + case $i in + ttyy?) unit=`expr $unit \+ 16`;; + ttyz?) unit=`expr $unit \+ 32`;; + esac + mknod $i c 42 $unit + ;; + +cronyx) + mknod cronyx c 42 63 + ;; + +joy) + mknod joy0 c 51 0 root:operator + mknod joy1 c 51 1 root:operator + chmod 640 joy0 joy1 + ;; + +spigot) + mknod spigot c 11 0 + chmod 444 spigot + ;; + +ctx?) + unit=`expr $i : 'ctx\(.*\)'` + mknod ctx$unit c 40 `unit2minor $unit` + chmod 444 ctx$unit + ;; + +meteor?) + unit=`expr $i : 'meteor\(.*\)'` + mknod meteor$unit c 67 `unit2minor $unit` + chmod 444 meteor$unit + ;; + +bktr?) + unit=`expr $i : 'bktr\(.*\)'` + mknod bktr$unit c 92 `unit2minor $unit` + mknod tuner$unit c 92 `unit2minor $((16 + $unit ))` + mknod vbi$unit c 92 `unit2minor $((32 + $unit ))` + chmod 444 bktr$unit tuner$unit vbi$unit + ;; + +tun*) + ntun=`expr $i : 'tun\(.*\)$'` + unit=0 + while [ $unit -le $ntun ]; do + mknod tun$unit c 52 `unit2minor $unit` + unit=$(($unit + 1)) + done + ;; + +tap*) + ntap=`expr $i : 'tap\(.*\)$'` + unit=0 + while [ $unit -le $ntap ]; do + mknod tap$unit c 149 `unit2minor $unit` root:network + unit=$(($unit + 1)) + done + ;; + +sysmouse) + mknod sysmouse c 12 128 + mknod consolectl c 12 255 + ;; + +jogdial) + mknod jogdial c 160 0 + ;; + +snp?) + unit=`expr $i : 'snp\(.*\)'` + mknod snp$unit c 53 `unit2minor $unit` + ;; + +# dufault@hda.com: If I do much more work on other A-D boards +# then eventually we'll have a "ad" and "dio" interface and some of these +# "labpcaio" ones will be gone. +# labpcaio: D-A and A-D. +# labpcdio: Digital in and Digital out. +# +labpc*) + umask 7 + case $i in + labpcaio*) + name=labpcaio + unit=`expr $i : 'labpcaio\(.*\)'` + all="0 1 2 3 4 5 6 7" + offset=0 + ;; + labpcdio*) + name=labpcdio + unit=`expr $i : 'labpcdio\(.*\)'` + all="0 1 2 3" + offset=8 + ;; + *) + die 3 "Don't know LabPC type $i" + ;; + esac + if [ -z "${unit}" ]; then + unit=all + fi + case $unit in + 0|1|2|3|4|5|6|7) + mknod $name$unit c 66 `expr $offset + $unit ` + ;; + all) + for i in $all + do + mknod $name$i c 66 `expr $offset + $i ` + done + ;; + *) + echo "No such LabPC unit: $unit" + ;; + esac + umask 77 + ;; + +perfmon) + mknod perfmon c 2 32 root:kmem + chmod 640 perfmon + ;; + +ipl) + mknod ipl c 79 0 + mknod ipnat c 79 1 + mknod ipstate c 79 2 + mknod ipauth c 79 3 + ;; + +kbd*) + unit=`expr $i : 'kbd\(.*\)'` + chr=112 + mknod kbd$unit c $chr `unit2minor $unit` + ;; + +i4b) + mknod i4b c 60 0 + ;; + +i4bctl) + mknod i4bctl c 55 0 + ;; + +i4brbch*) + unit=`expr $i : 'i4brbch\(.*\)'` + mknod i4brbch$unit c 57 `unit2minor $unit` + ;; + +i4bteld*) + offset=64 + unit=`expr $i : 'i4bteld\(.*\)'` + mknod i4bteld$unit c 56 `unit2minor \`expr $offset + $unit\`` + ;; + +i4btel*) + unit=`expr $i : 'i4btel\(.*\)'` + mknod i4btel$unit c 56 `unit2minor $unit` + ;; + +i4btrc*) + unit=`expr $i : 'i4btrc\(.*\)'` + mknod i4btrc$unit c 59 `unit2minor $unit` + ;; + +aac*) + unit=`expr $i : 'aac\(.*\)'` + mknod aac$unit c 150 `unit2minor $unit` + ln -s aac$unit afa$unit + ;; + +mlx*) + unit=`expr $i : 'mlx\(.*\)'` + mknod mlx$unit c 130 `unit2minor $unit` + ;; + +mly*) + unit=`expr $i : 'mlx\(.*\)'` + mknod mlx$unit c 158 `unit2minor $unit` + ;; + +amr*) + unit=`expr $i : 'amr\(.*\)'` + mknod amr$unit c 132 `unit2minor $unit` + ;; + +3dfx*) + unit=`expr $i : '3dfx\(.*\)'` + mknod 3dfx$unit c 107 `unit2minor $unit` + ln -sf 3dfx$unit 3dfx + ln -sf 3dfx$unit voodoo + ;; + +agpgart) + mknod agpgart c 148 0 + ;; + +twe*) + unit=`expr $i : 'twe\(.*\)'` + mknod twe$unit c 146 `unit2minor $unit` + ;; + +tw*) + unit=`expr $i : 'tw\(.*\)'` + mknod tw$unit c 19 `unit2minor $unit` root:operator + ;; + +local) + umask 0 # XXX should be elsewhere + sh MAKEDEV.local + umask 77 + ;; + +*) + echo $i - no such device name + ;; + +esac +done diff --git a/etc/MAKEDEV.local b/etc/MAKEDEV.local new file mode 100644 index 0000000..06cc074 --- /dev/null +++ b/etc/MAKEDEV.local @@ -0,0 +1,50 @@ +#!/bin/sh - +# +# Copyright (c) 1991 The Regents of the University of California. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# @(#)MAKEDEV.local 5.1 (Berkeley) 3/22/91 +# + +# Local device MAKEDEV script. + +PATH=/sbin:/bin:/usr/bin +umask 77 +for i +do +case $i in + +*) + echo 'MAKEDEV.local: no such device.' + ;; +esac +done diff --git a/etc/Makefile b/etc/Makefile new file mode 100644 index 0000000..acc18d1 --- /dev/null +++ b/etc/Makefile @@ -0,0 +1,199 @@ +# from: @(#)Makefile 5.11 (Berkeley) 5/21/91 +# $FreeBSD$ + +.if !defined(NO_SENDMAIL) +SUBDIR= sendmail +.endif + +BIN1= amd.map apmd.conf auth.conf \ + crontab csh.cshrc csh.login csh.logout \ + dhclient.conf dm.conf fbtab ftpusers gettytab group \ + hosts hosts.allow hosts.equiv hosts.lpd \ + inetd.conf login.access login.conf \ + motd modems netconfig networks newsyslog.conf \ + pam.conf phones pim6dd.conf pim6sd.conf \ + printcap profile protocols \ + rc rc.atm rc.devfs rc.diskless1 rc.diskless2 rc.firewall rc.firewall6 \ + rc.isdn rc.network rc.network6 rc.pccard rc.serial rc.shutdown \ + rc.syscons rc.sysctl remote rpc security services shells syslog.conf \ + usbd.conf \ + etc.${MACHINE_ARCH}/disktab \ + etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \ + etc.${MACHINE_ARCH}/ttys \ + ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \ + ${.CURDIR}/../usr.bin/mail/misc/mail.rc \ + ${.CURDIR}/../usr.bin/locate/locate/locate.rc + +.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH) +SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ + ${.CURDIR}/../crypto/openssh/sshd_config +.endif + +.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL) +SSL= ${.CURDIR}/../crypto/openssl/apps/openssl.cnf +.endif + +# -rwxr-xr-x root.wheel, for the new cron root.wheel +BIN2= netstart pccard_ether rc.suspend rc.resume + +MTREE= BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \ + BSD.var.dist BSD.x11.dist BSD.x11-4.dist +NAMEDB= PROTO.localhost.rev named.conf named.root make-localhost +PPPCNF= ppp.deny ppp.shells.sample +PPPCF2= ppp.conf +ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ + mailertable.sample aliases + + +# Special top level files for FreeBSD +COPYRIGHT= COPYRIGHT +FREEBSD= +FREEBSD+= ${COPYRIGHT} + +etc: + +distribute: + cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/bin +.if defined(OBJFORMAT) + echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/bin/etc/objformat +.endif + @echo + +distribution: + (cd ${.CURDIR}; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${BIN1} ${DESTDIR}/etc; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN2} ${DESTDIR}/etc; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/rc.conf ${DESTDIR}/etc/defaults/; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/make.conf ${DESTDIR}/etc/defaults/; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/pccard.conf ${DESTDIR}/etc/defaults/; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 defaults/periodic.conf ${DESTDIR}/etc/defaults/; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ + ${DESTDIR}/var/log/cron; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 \ + master.passwd ${DESTDIR}/etc; \ + ( cd ${.CURDIR}/periodic; ${MAKE} install ); \ + ( cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall ); \ + ( cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ); \ + ( cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ); \ + ( cd ${.CURDIR}/isdn; ${MAKE} install ); \ + pwd_mkdb -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd; ) +.if !defined(NO_SENDMAIL) + ( cd ${.CURDIR}/sendmail; ${MAKE} distribution ); +.endif +.if !defined(NOUUCP) + ( cd ${.CURDIR}/../gnu/libexec/uucp/sample; ${MAKE} install ) +.endif +.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSH) + (cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSH} \ + ${DESTDIR}/etc/ssh ) +.endif +.if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL) + (cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${SSL} \ + ${DESTDIR}/etc/ssl ) +.endif +.if !defined(NO_MAKEDEV) + ( cd ${.CURDIR}; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ + MAKEDEV.local MAKEDEV ${DESTDIR}/dev ) + (cd ${DESTDIR}/dev; sh MAKEDEV all) +.endif + (cd ${.CURDIR}/root; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.cshrc \ + ${DESTDIR}/root/.cshrc; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.klogin \ + ${DESTDIR}/root/.klogin; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.login \ + ${DESTDIR}/root/.login; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 dot.profile \ + ${DESTDIR}/root/.profile; \ + rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ + ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ + ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile) + cd ${.CURDIR}/mtree; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${MTREE} ${DESTDIR}/etc/mtree + cd ${.CURDIR}/namedb; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${NAMEDB} ${DESTDIR}/etc/namedb + cd ${.CURDIR}/ppp; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${PPPCNF} ${DESTDIR}/etc/ppp + cd ${.CURDIR}/ppp; ${INSTALL} -c -o root -g ${BINGRP} -m 600 \ + ${PPPCF2} ${DESTDIR}/etc/ppp + cd ${.CURDIR}/mail; ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${ETCMAIL} ${DESTDIR}/etc/mail + @if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ + ! -f ${DESTDIR}/etc/aliases ]; then \ + set -x; \ + ln -s mail/aliases ${DESTDIR}/etc/aliases; \ + fi + ${INSTALL} -c -o ${BINOWN} -g operator -m 664 /dev/null \ + ${DESTDIR}/etc/dumpdates + ${INSTALL} -c -o nobody -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/db/locate.database + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/lpd-errs + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/maillog + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/lastlog + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/messages + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ + ${DESTDIR}/var/log/security + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ + ${DESTDIR}/var/log/slip.log + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 600 /dev/null \ + ${DESTDIR}/var/log/ppp.log + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/wtmp + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/run/utmp + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ + ${DESTDIR}/var/crash + (cd ${.CURDIR}/..; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FREEBSD} \ + ${DESTDIR}/) +.if !defined(NOMAN) + (cd ${.CURDIR}/../share/man; ${MAKE} makedb; ) +.endif + +distrib-dirs: + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/ + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ + -p ${DESTDIR}/usr/include + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \ + -p ${DESTDIR}/usr/libdata/perl/5.6.0/mach + cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys + cd ${DESTDIR}/usr/share/man/en.ISO_8859-1; ln -sf ../man* . + cd ${DESTDIR}/usr/share/locale; \ + set - `cat ${.CURDIR}/locale.alias`; \ + while [ $$# -gt 0 ] ; \ + do \ + rm -rf "$$1"; \ + ln -s "$$2" "$$1"; \ + shift; shift; \ + done + cd ${DESTDIR}/usr/share/nls; \ + set - `cat ${.CURDIR}/locale.alias`; \ + while [ $$# -gt 0 ] ; \ + do \ + rm -rf "$$1"; \ + ln -s "$$2" "$$1"; \ + shift; shift; \ + done; \ + rm -rf POSIX; \ + ln -s C POSIX + +etc-examples: + (cd ${.CURDIR}; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${BIN1} ${BIN2} \ + ${DESTDIR}/usr/share/examples/etc; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/rc.conf \ + ${DESTDIR}/usr/share/examples/etc/defaults; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/make.conf \ + ${DESTDIR}/usr/share/examples/etc/defaults; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/pccard.conf \ + ${DESTDIR}/usr/share/examples/etc/defaults; \ + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 defaults/periodic.conf \ + ${DESTDIR}/usr/share/examples/etc/defaults) + +.include <bsd.prog.mk> diff --git a/etc/amd.map b/etc/amd.map new file mode 100644 index 0000000..30672f4 --- /dev/null +++ b/etc/amd.map @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +/defaults type:=host;fs:=${autodir}/${rhost}/host;rhost:=${key} +* opts:=rw,grpid,resvport,vers=2,proto=udp,nosuid,nodev diff --git a/etc/apmd.conf b/etc/apmd.conf new file mode 100644 index 0000000..decfd45 --- /dev/null +++ b/etc/apmd.conf @@ -0,0 +1,38 @@ +# apmd Configuration File +# +# $FreeBSD$ +# + +apm_event SUSPENDREQ { + exec "/etc/rc.suspend"; +} + +apm_event USERSUSPENDREQ { + exec "sync && sync && sync"; + exec "sleep 1"; + exec "apm -z"; +} + +apm_event NORMRESUME, STANDBYRESUME { + exec "/etc/rc.resume"; +} + +# resume event configuration for serial mouse users by +# reinitializing a moused(8) connected to a serial port. +# +#apm_event NORMRESUME { +# exec "kill -HUP `cat /var/run/moused.pid`"; +#} + +# suspend request event configuration for ATA HDD users: +# execute standby instead of suspend. +# +#apm_event SUSPENDREQ { +# reject; +# exec "sync && sync && sync"; +# exec "sleep 1"; +# exec "apm -Z"; +#} + +# apmd Configuration ends here + diff --git a/etc/auth.conf b/etc/auth.conf new file mode 100644 index 0000000..5e9179a --- /dev/null +++ b/etc/auth.conf @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +# This file contains information on what types of authentication to use. +# It is just the beginnings of a greater scheme. + +# crypt_default = md5 des +# auth_list = passwd kerberos + +auth_list = passwd diff --git a/etc/crontab b/etc/crontab new file mode 100644 index 0000000..56ef475 --- /dev/null +++ b/etc/crontab @@ -0,0 +1,27 @@ +# /etc/crontab - root's crontab for FreeBSD +# +# $FreeBSD$ +# +SHELL=/bin/sh +PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin +HOME=/var/log +# +#minute hour mday month wday who command +# +*/5 * * * * root /usr/libexec/atrun +# +# save some entropy so that /dev/random can reseed on boot +*/11 * * * * operator /usr/libexec/save-entropy +# +# rotate log files every hour, if necessary +0 * * * * root newsyslog +# +# do daily/weekly/monthly maintenance +1 3 * * * root periodic daily +15 4 * * 6 root periodic weekly +30 5 1 * * root periodic monthly +# +# time zone change adjustment for wall cmos clock, +# does nothing, if you have UTC cmos clock. +# See adjkerntz(8) for details. +1,31 0-5 * * * root adjkerntz -a diff --git a/etc/csh.cshrc b/etc/csh.cshrc new file mode 100644 index 0000000..f4f775a --- /dev/null +++ b/etc/csh.cshrc @@ -0,0 +1,3 @@ +# $FreeBSD$ +# +# System-wide .cshrc file for csh(1). diff --git a/etc/csh.login b/etc/csh.login new file mode 100644 index 0000000..7d70f93 --- /dev/null +++ b/etc/csh.login @@ -0,0 +1,15 @@ +# $FreeBSD$ +# +# System-wide .login file for csh(1). +# Uncomment this to give you the default 4.2 behavior, where disk +# information is shown in K-Blocks +# setenv BLOCKSIZE K +# +# For the setting of languages and character sets please see +# login.conf(5) and in particular the charset and lang options. +# For full locales list check /usr/share/locale/* +# +# Read system messages +# msgs -f +# Allow terminal messages +# mesg y diff --git a/etc/csh.logout b/etc/csh.logout new file mode 100644 index 0000000..6b0584f --- /dev/null +++ b/etc/csh.logout @@ -0,0 +1,3 @@ +# $FreeBSD$ +# +# System-wide .logout file for csh(1). diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf new file mode 100644 index 0000000..3860a14 --- /dev/null +++ b/etc/defaults/make.conf @@ -0,0 +1,366 @@ +# $FreeBSD$ +# +# NOTE: Please would any committer updating this file also update the +# make.conf(5) manual page, if necessary, which is located in +# src/share/man/man5/make.conf.5. +# +# This file, if present, will be read by make (see /usr/share/mk/sys.mk). +# It allows you to override macro definitions to make without changing +# your source tree, or anything the source tree installs. +# +# This file must be in valid Makefile syntax. +# +# You have to find the things you can put here in the Makefiles and +# documentation of the source tree. +# +# +# The CPUTYPE variable controls which processor should be targetted for +# generated code. This controls processor-specific optimizations in +# certain code (currently only OpenSSL) as well as modifying the value +# of CFLAGS to contain the appropriate optimization directive to gcc. +# The automatic setting of CFLAGS may be overridden using the +# NO_CPU_CFLAGS variable below. +# Currently the following CPU types are recognised: +# Intel x86 architecture: +# (AMD CPUs) k7 k6-2 k6 k5 +# (Intel CPUs) p4 p3 p2 i686 i586/mmx i586 i486 i386 +# Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4 +# Intel ia64 architecture: itanium +# +#CPUTYPE=i686 +#NO_CPU_CFLAGS= true # Don't add -march=<cpu> to CFLAGS automatically +#NO_CPU_COPTFLAGS=true # Don't add -march=<cpu> to COPTFLAGS automatically +# +# CFLAGS controls the compiler settings used when compiling C code. +# Note that optimization settings above -O (-O2, ...) are not recommended +# or supported for compiling the world or the kernel - please revert any +# nonstandard optimization settings to "-O" before submitting bug reports +# to the developers. +# Note also that at this time the -O2 setting is known to produce BROKEN +# CODE on the Alpha platform. +# +#CFLAGS= -O -pipe +# +# CXXFLAGS controls the compiler settings used when compiling C++ code. +# Note that CXXFLAGS is initially set to the value of CFLAGS. If you wish +# to add to CXXFLAGS value, "+=" must be used rather than "=". Using "=" +# alone will remove the often needed contents of CFLAGS from CXXFLAGS. +# +#CXXFLAGS+= -fmemoize-lookups -fsave-memoized +# +# BDECFLAGS are a set of gcc warning settings that Bruce Evans has suggested +# for use in developing FreeBSD and testing changes. They can be used by +# putting "CFLAGS+=${BDECFLAGS}" in /etc/make.conf. +# +BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ + -Wcast-qual -Wchar-subscripts -Wconversion -Winline \ + -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ + -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings +# +# To compile just the kernel with special optimizations, you should use +# this instead of CFLAGS (which is not applicable to kernel builds anyway). +# There is very little to gain by using higher optimization levels, and doing +# so can cause problems. +# +#COPTFLAGS= -O -pipe +# +# Compare before install +#INSTALL=install -C +# +# Mtree will follow symlinks +#MTREE_FOLLOWS_SYMLINKS= -L +# +# To enable installing suidperl with the setuid bit turned on +#ENABLE_SUIDPERL= true +# +# To build perl with thread support +#PERL_THREADED= true +# +# To build ppp with normal permissions +#PPP_NOSUID= true +# +# To enable installing ssh(1) with the setuid bit turned on +#ENABLE_SUID_SSH= true +# +# To avoid building various parts of the base system: +#NO_CVS= true # do not build CVS +#NO_BIND= true # do not build BIND +#NO_FORTRAN= true # do not build g77 and related libraries +#NO_LPR= true # do not build lpr and related programs +#NO_MAILWRAPPER=true # do not build the mailwrapper(8) MTA selector +#NO_MODULES= true # do not build modules with the kernel +#NO_OBJC= true # do not build Objective C support +#NO_OPENSSH= true # do not build OpenSSH +#NO_OPENSSL= true # do not build OpenSSL (implies NO_OPENSSH) +#NO_SENDMAIL= true # do not build sendmail and related programs +#NO_SHAREDOCS= true # do not build the 4.4BSD legacy docs +#NO_TCSH= true # do not build and install /bin/csh (which is tcsh) +#NO_X= true # do not compile in XWindows support (e.g. doscmd) +#NOCRYPT= true # do not build any crypto code +#NOGAMES= true # do not build games (games/ subdir) +#NOINFO= true # do not make or install info files +#NOLIBC_R= true # do not build libc_r (re-entrant version of libc) +#NOPERL= true # do not build perl. Disables OpenSSL optimizations +#NOPROFILE= true # Avoid compiling profiled libraries +#NOSECURE= true # do not build crypto code in secure/ subdir +#NOSHARE= true # do not go into the share subdir +#NOUUCP= true # do not build uucp related programs +# +# To build the OpenSSL manpages, uncomment the following. These are not +# built by default because they clobber a number of system manpages with +# manpages describing parts of the OpenSSL toolkit, including passwd(1), +# err(3), md5(3), and others. +# +#WANT_OPENSSL_MANPAGES= true +# +# To build sys/modules when building the world (our old way of doing things) +#MODULES_WITH_WORLD=true # do not build modules when building kernel +# +# +# The following controls building optional IDEA code in libcrypto and +# certain ports. Patents are involved - you must not use this unless +# you either have a license or fall within patent 'fair use' +# provisions. +# +# *** It is YOUR RESPONSIBILITY to determine if you can use this! *** +# +# IDEA is patented in the USA and many european countries - thought to +# be OK to use for any non-commercial use. This is optional. +#MAKE_IDEA= YES # IDEA (128 bit symmetric encryption) +# +# To avoid running MAKEDEV all on /dev during install: +#NO_MAKEDEV= true +# +# If you do not want unformatted manual pages to be compressed +# when they are installed: +# +#NOMANCOMPRESS= true +# +# +# If you want the "compat" shared libraries installed as part of your normal +# builds, uncomment these: +# +#COMPAT1X= yes +#COMPAT20= yes +#COMPAT21= yes +#COMPAT22= yes +#COMPAT3X= yes +#COMPAT4X= yes +# +# +# If you do not want additional documentation (some of which are +# a few hundred KB's) for ports to be installed: +# +#NOPORTDOCS= true +# +# +# Default format for system documentation, depends on your printer. +# Set this to "ascii" for simple printers or screen +# +#PRINTERDEVICE= ps +# +# +# How long to wait for a console keypress before booting the default kernel. +# This value is approximately in milliseconds. Keypresses are accepted by the +# BIOS before booting from disk, making it possible to give custom boot +# parameters even when this is set to 0. +# +#BOOTWAIT=0 +#BOOTWAIT=30000 +# +# By default, the system will always use the keyboard/video card as system +# console. However, the boot blocks may be dynamically configured to use a +# serial port in addition to or instead of the keyboard/video console. +# +# By default we use COM1 as our serial console port *if* we're going to use +# a serial port as our console at all. Alter as necessary. +# +# COM1: = 0x3F8, COM2: = 0x2F8, COM3: = 0x3E8, COM4: = 0x2E8 +# +#BOOT_COMCONSOLE_PORT= 0x3F8 +# +# The default serial console speed is 9600. Set the speed to a larger value +# for better interactive response. +# +#BOOT_COMCONSOLE_SPEED= 115200 +# +# By default the 'pxeboot' loader retrieves the kernel via NFS. Defining +# this and recompiling /usr/src/sys/boot will cause it to retrieve the kernel +# via TFTP. This allows pxeboot to load a custom BOOTP diskless kernel yet +# still mount the server's '/' (i.e. rather then load the server's kernel). +# +#LOADER_TFTP_SUPPORT= YES +# +# By default, this points to /usr/X11R6 for XFree86 releases 3.0 or earlier. +# If you have a XFree86 from before 3.0 that has the X distribution in +# /usr/X386, you want to uncomment this. +# +#X11BASE= /usr/X386 +# +# +# If you have Motif on your system, uncomment this. +# +#HAVE_MOTIF= yes +#MOTIF_STATIC= yes +# +# If the default location of the Motif library (specified below) is NOT +# appropriate for you, uncomment this and change it to the correct value. +# If your motif is in ${X11BASE}/lib, you don't need to touch this line. +# +#MOTIFLIB= -L${X11BASE}/lib -lXm +# +# +# If you're resident in the USA, this will help various ports to determine +# whether or not they should attempt to comply with the various U.S. +# export regulations on certain types of software which do not apply to +# anyone else in the world. +# +#USA_RESIDENT= YES +# +# +# Override "don't install a port that's already installed" behavior. +# One might wish to do this for ports debugging or to unconditionally +# reinstall a set of suspect/broken ports. +# +#FORCE_PKG_REGISTER= YES +# +# +# If you're behind a firewall and need FTP or HTTP proxy services for +# ports collection fetching to work, the following examples give the +# necessary syntax. See the fetch(3) man page for details. +# +#FTP_PROXY= 10.0.0.1:21 +#HTTP_PROXY= 10.0.0.1:80 +# +# +# Port master sites. +# +# If you want your port fetches to go somewhere else than the default +# (specified below) in case the distfile/patchfile was not found, +# uncomment this and change it to a location nearest you. (Don't +# remove the "/${DIST_SUBDIR}/" part.) +# +#MASTER_SITE_BACKUP?= \ +# ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ +# +# If you want your port fetches to check the above site first (before +# the MASTER_SITES specified in the port Makefiles), uncomment the +# line below. You can also change the right side to point to wherever +# you want. +# +#MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP} +# +# Some ports use a special variable to point to a collection of +# mirrors of well-known software archives. If you have a mirror close +# to you, uncomment any of the following lines and change it to that +# address. (Don't remove the "/%SUBDIR%/" part.) +# +# Note: the right hand sides of the following lines are only for your +# information. For a full list of default sites, take a look at +# bsd.sites.mk. +# +#MASTER_SITE_XCONTRIB= ftp://ftp.x.org/contrib/%SUBDIR%/ +#MASTER_SITE_XFREE= ftp://ftp.freesoftware.com/pub/XFree86/%SUBDIR%/source/ +#MASTER_SITE_GNU= ftp://ftp.gnu.org/gnu/%SUBDIR%/ +#MASTER_SITE_PERL_CPAN= ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/%SUBDIR%/ +#MASTER_SITE_TEX_CTAN= ftp://ftp.tex.ac.uk/tex-archive/%SUBDIR%/ +#MASTER_SITE_SUNSITE= ftp://metalab.unc.edu/pub/Linux/%SUBDIR%/ +#MASTER_SITE_RINGSERVER= ftp://ring.ocn.ad.jp/pub/%SUBDIR%/ +#MASTER_SITE_KDE= ftp://ftp.kde.org/pub/kde/%SUBDIR%/ +#MASTER_SITE_COMP_SOURCES= ftp://gatekeeper.dec.com/pub/usenet/comp.sources.%SUBDIR%/ +#MASTER_SITE_GNOME= ftp://ftp.gnome.org/pub/GNOME/sources/%SUBDIR%/ +#MASTER_SITE_AFTERSTEP= ftp://ftp.afterstep.org/%SUBDIR%/ +#MASTER_SITE_WINDOWMAKER= ftp://ftp.windowmaker.org/pub/%SUBDIR%/ +#MASTER_SITE_MOZILLA= ftp://ftp.yggdrasil.com/mirrors/site/ftp.mozilla.org/pub/%SUBDIR%/ +#MASTER_SITE_XEMACS= ftp://ftp.sunsite.utk.edu/pub/xemacs/%SUBDIR%/ +#MASTER_SITE_TCLTK= ftp://ftp.uu.net/languages/tcl/%SUBDIR%/ +#MASTER_SITE_RUBY= ftp://ftp.fu-berlin.de/unix/languages/ruby/%SUBDIR%/ +# +# Also it is highly recommended that you configure MASTER_SORT_REGEX +# to choose better mirror sites for you. List awk(1)-style regular +# expressions separated by space so MASTER_SITES will be sorted in +# that order. The following example is for Japanese users; change +# "jp" part to your ccTLD ("de", "ru", "uk", etc.) or the domain names +# of your nearest/upstream networks to meet your needs. +# +#MASTER_SORT_REGEX?= ^file: ^ftp://ftp\.FreeBSD\.org/pub/FreeBSD/ports/local-distfiles/ ://[^/]*\.jp/ ://[^/]*\.jp\. +# +# Kerberos IV +# If you want KerberosIV (KTH eBones), define this: +# +#MAKE_KERBEROS4= yes +# +# +# Kerberos 5 +# If you want KerberosIV (KTH Heimdal), define this: +# +#MAKE_KERBEROS5= yes +# +# +# Kerberos5 +# If you want to install MIT Kerberos5 port somewhere other than /usr/local, +# define this (this is also used to tell ssh1 that kerberos is needed): +# +#KRB5_HOME= /usr/local +# +# +# CVSup update flags. Edit SUPFILE settings to reflect whichever distribution +# file(s) you use on your site (see /usr/share/examples/cvsup/README for more +# information on CVSup and these files). To use, do "make update" in /usr/src. +# +#SUP_UPDATE= yes +# +#SUP= /usr/local/bin/cvsup +#SUPFLAGS= -g -L 2 +#SUPHOST= cvsup.uk.FreeBSD.org +#SUPFILE= /usr/share/examples/cvsup/standard-supfile +#SUPFILE1= /usr/share/examples/cvsup/secure-supfile +#PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile +#DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile +# +# top(1) uses a hash table for the user names. The size of this hash +# can be tuned to match the number of local users. The table size should +# be a prime number approximately twice as large as the number of lines in +# /etc/passwd. The default number is 20011. +# +#TOP_TABLE_SIZE= 101 +# +# Documentation +# +# The list of languages and encodings to build and install +# +#DOC_LANG= en_US.ISO_8859-1 ru_RU.KOI8-R +# +# +# sendmail +# +# The following sets the default m4 configuration file to use at +# install time. Use with caution as a make install will overwrite +# any existing /etc/mail/sendmail.cf. Note that SENDMAIL_CF is now +# deprecated. The value should be a fully qualified path name. +# +#SENDMAIL_MC=/etc/mail/myconfig.mc +# +# If you need to build additional .cf files during a make buildworld, +# include the full paths to the .mc files in SENDMAIL_ADDITIONAL_MC. +# +#SENDMAIL_ADDITIONAL_MC=/etc/mail/foo.mc /etc/mail/bar.mc +# +# Setting the following variables modifes the build environment for +# sendmail and its related utilities. For example, SASL support can be +# added with settings such as: +# +# SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL +# SENDMAIL_LDFLAGS=-L/usr/local/lib +# SENDMAIL_LDADD=-lsasl +# +# Note: If you are using Cyrus SASL with other applications which require +# access to the sasldb file, you should add '-D_FFR_UNSAFE_SASL' to +# SENDMAIL_CFLAGS. Also, add the following to your sendmail.mc file: +# +# define(`confDONT_BLAME_SENDMAIL',`GroupReadableSASLFile') +# +#SENDMAIL_CFLAGS= +#SENDMAIL_LDFLAGS= +#SENDMAIL_LDADD= +#SENDMAIL_DPADD= diff --git a/etc/defaults/pccard.conf b/etc/defaults/pccard.conf new file mode 100644 index 0000000..0e5fc2e --- /dev/null +++ b/etc/defaults/pccard.conf @@ -0,0 +1,1819 @@ +# Default PCCARD configuration file +# +# Removing all IRQ conflicts from this file can't be done because of some +# IRQ-selfish PC-cards. So if you want to use some of these cards in +# your machine, you will be forced to modify their IRQ parameters from +# the following list. +# +# IRQ == 0 means "allocate free IRQ from IRQ pool" +# IRQ == 16 means "do not use IRQ (e.g. PIO mode)" +# +# $FreeBSD$ +# +# Send new entries for this file to imp@freebsd.org. He's volunteered +# to act as coordinator for this file. +# + +# Generally available IO ports +io 0x240-0x360 +# Generally available IRQs (Built-in sound-card owners remove 5) +irq 3 5 10 11 15 +# Available memory slots +memory 0xd4000 96k + +# Include user configration file +# This allow you to override or add configurations. +include /etc/pccard.conf + +# +# PLEASE KEEP THIS FILE IN ORDER +# +# In order is defined as follows. We sort first by driver type (an, ed, etc) +# and then by CIS strings. Do not commit to this file entries out of +# order. +# + +########## aic ########## + +# Adaptec SlimSCSI (also included with Sony CD-ROM players) +card "Adaptec, Inc." "/APA-1460 .*/" + config 0x9 "aic" ? + +# NewMedia Bustoaster SCSI +card "New Media" "SCSI" + config 0x22 "aic" ? + +########## an ########## + +# Aironet PC4500 2Mbps 802.11 wireless NIC +card "Aironet" "PC4500" + config 0x5 "an" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Aironet PC4800 11Mbps 802.11 wireless NIC +card "Aironet" "PC4800" + config 0x5 "an" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Aironet 340/342 Series 11Mbps 802.11 wireless NIC +card "Cisco Systems" "340 Series Wireless LAN Adapter" + config auto "an" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## ata ########## + +# Sony VAIO cdrom, Ninja-ATA CD-ROM Drive, MELCO CDN-D12EX +card " " "NinjaATA-" + config auto "ata" ? + logstr "NinjaATA" + +# Non-brand Compact Flash Card(32MB) +card " " "KCF 32M" + config 0x1 "ata" ? iosize 16 + logstr "Compact Flash Card 32M" + +# Caravelle PSC-IDE 6x ATAPI CD-ROM +card "Caravelle" "PSC-IDE " + config 0x2a "ata" ? # 0x1 (flags for wd, not sure for ata) + +# <Vendor Unknown> MCD-601p 6x CD-ROM drive. +card "CDROM" "IDE" + config auto "ata" ? + logstr "MCD-601p" + +# Lexar Media compact flash +card "CL ATA FLASH CARD LEXAR " "TIDALWV" +# auto does not work + config 0x1 "ata" ? + +# DATAFAB PCMMD2 +card "DATAFAB" "PCMCIA-TO-IDE" + config 0x1 "ata" ? + +# DHU Mobile Media CD-ROM +# (no hotplug support) +card "Digital Equipment Corporation." "Digital Mobile Media CD-ROM" + config auto "ata" ? + +# EXP DVD-780 DVD-ROM drive +card "EXP " "PnPIDE" + config auto "ata" ? + +# Toshiba mobile CD-ROM (Bundled with Portege 3110CT) +card "FREECOM" "PCCARD-IDE" + config auto "ata" ? iosize 16 + +# FUJITSU FlashDiskCard ZEBO-ATA40 +card "FUJITSU" "ZEBO-ATA" + config 0x03 "ata" ? + +# Greystone Diskdock +card "GREYSTONE PERIPHERAL DISKDOCK" "/.*/" + config default "ata" ? + +# HAGIWARA FLASH +card "HAGIWARA" "FLASH" + config default "ata" ? + +# Hitachi Flash ATA +card "HITACHI" "/.*FLASH.*/" + config 0x01 "ata" ? iosize 16 + +# IBM Flash ATA (Ricoh Flash ATA 10MB) +card "IBM" "IBM17JSSFP10" + config auto "ata" ? iosize 16 + +# XXX NOT SURE SUPPORTED +# IBM Portable 4X Speed CD-ROM Drive CD-400 +#card "IBM" "PCMCIA CD-ROM Drive CD-400" +# config 0x1 "ata" ? iosize 0x20 # 0x10000 (flags for wd, not sure for ata) + +# IBM CD-20XSeries(IDE PC Card) +card "IBM" "PCMCIA Portable CD-ROM Drive" + config auto "ata" ? iosize 0x1 + +# IBM Microdrive (CF+ Type II) +card "IBM" "microdrive" +# config 0x03 "ata" ? + config 0x01 "ata" ? iosize 16 + +# Integral Peripherals Viper HDD Series +card "INTEGRAL PERIPHERALS" "ATA CARD" +# config default "ata" ? + config 0x01 "ata" ? iosize 16 + +# IO DATA PCMF144/20 (as Flash ATA only) +card "IO DATA" "ATA&MODEM" + config 0x7 "ata" ? +# config auto "sio" ? + +# IO DATA CBIDE2 in 16 bit mode +# (bundled with IO DATA CDP-AX24T, Panasonic DVD-ROM LK-RV8171D) +card "IO DATA" "CBIDE2" + config default "ata" ? + +# IO Data PCIDE-II (bundled with CDP-TX6, etc.) +card "IO DATA" "PCIDEII" + config auto "ata" ? + +# Iomega Zip Drive +card "Iomega" "PCMCIA to 16 bit ATAPI Adapter" + config 0x2 "ata" ? + +# KODAK Picture Card +card "KODAK Picture Card" "KODAK" + config default "ata" ? + +# TOSHIBA Portable 24X Speed CD-ROM Drive PA2673UJ +card "LOOKMEET" "CBIDE2" + config default "ata" ? + +# Maxtor ATA HDD +card "Maxtor" "/MXL.*/" + config 0x03 "ata" ? + +# Microtech XpressDock +card "Microtech International Inc." "IDE PCCARD" + config auto "ata" ? 0x20000 iosize 16 + +# Midori Elec. Flash ATA +card "Midori Elec." "/.*FLASH.*/" + config 0x03 "ata" ? + +# Panasonic Flash ATA BN-040ABP3 +card "Panasonic" "ATA" "BN-040AB-M " +# auto does not work + config 0x1 "ata" ? + logstr "Panasonic Flash ATA BN-040ABP3" + +# LK-RM120 +card "Panasonic" "LMEK0406" + config 0x22 "ata" ? 0x1 + +# Another boring, generic ata atapter +card "PC CARD MANUFACTURER" "PCMCIA ATA/ATAPI Adapter" + config auto "ata" ? + +# pc-card from PSCD-740 cdrom +card "PCMCIA" "CD-ROM" + config 0x1 "ata" ? + +# Shining PMIDE-ASC CDROM / Road Warrior Bullet Disk +card "Shining" "PMIDE-ASC" + config auto "ata" ? 0x20000 + +# Microtech PortableDRIVE25/PCMCIA +card "SHUTTLE TECHNOLOGY LTD." "PCCARD-IDE/ATAPI Adapter" + config auto "ata" ? 0x20000 + +# XXX NOT SURE SUPPORTED +# CitiDISK & Addonics PocketZIP +#card "Shining" "PMIDE-ASC" +# config default "ata" ? # 0x20000 (flags for wd, not sure for ata) + +# Sicon Peripheral PCMCIA ATA/ATAPI Adapter +card "Sicon Peripheral" "PCMCIA ATA/ATAPI Adapter" + config default "ata" ? + +# SiliconTech,Inc. Compact PC Card +card "SiliconTech,Inc." "/[0-9]+MB Compact PC Card/" + config 0x1 "ata" ? + +# Simple Technology ata flash +card "Simple Technology " "STI-ATA" + config 0x2 "ata" ? + +# SONY Memory Stick PC Card Adaptor +card "SONY" "/MEMORYSTICK.*/" + config 0x01 "ata" ? + iosize 16 + +# SunDisk Flash ATA +# (OEM: Epson Flash Packer) +card "SunDisk" "/.*/" + config 0x1 "ata" ? + +# TDK Flash ATA +card "TDK TC_H." "/.*/" + config 0x1 "ata" ? + +# IO Data CBIDE (bundled with CDP-FX24, etc.) +card "WIT" "IDE16" + config auto "ata" ? + +# LIP-32B attached to Logitec LCW-PD648PI +card "WORKBIT" "ATA-32Bi(16)" + config default "ata" ? + +# Viking ATA Flash card +card "VIKING ATA/CF FLASH CARD " "TOR/AM " + config 0x2 "ata" ? + +########## awi ########## + +# Generic AMD Am79c930 based card +# Melco WLI-PCM +card "AMD" "Am79C930" + config 0x1 "awi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Bay Networks Baystack 650 Wireless LAN +card "Bay Networks" "BayStack 650 Wireless LAN" + config 0x1 "awi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Farallon SkyLINE Wireless +card "Farallon" "SkyLINE Wireless" + config auto "awi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ICom SL-200 +card "Icom" "SL-200" + config auto "awi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ZoomAir 4000 +card "Zoom" "Air-4000" + config auto "awi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## cnw ########## + +# NetWave AirSurfer +# NOTE: For some machines, wait cycle for memory access is required. +# you should change "0x40" on the last part of "cardmem" line to "0x44", +# like: +# cardmem 0xd4000 0x20000 0x9000 0x44 +# IBM ThinkPads are known to require this change. +# Xircom CreditCard Netwave +card "Xircom" "CreditCard Netwave" + config 0x01 "cnw" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## ed ########## + +# No-brand NE2000 compatible card (FCC ID: LXLC1LANTB) +card " " "Ethernet Combo card" + config auto "ed" ? 0x10 + logstr "NE2000 compatible card" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Map Japan MPL-972 +card "2408LAN" "Ethernet" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Accton EN2212 +# Very slow! (PIO mode) +card "ACCTON" "EN2212" + config auto "ed" ? 0x30 + ether 0xff0 # 00:00:e8 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Accton EN2216 +card "ACCTON" "EN2216-PCMCIA-ETHERNET" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Allied Telesis CentreCOM LA-PCM +card "Allied Telesis,K.K" "Ethernet LAN Card" + config default "ed" ? 0x10 + ether 0xff0 # 00:00:f4 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Allied Telesis CentreCOM LA-PCM_V2 ethernet card +# NTT-DATA ASTROWINK-M/MMOIL(IrLAN) ethernet card +card "Allied Telesis, K.K." "CentreCOM LA-PCM_V2" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Allied Telesis CentreCOM LA100-PCM-T V2 +card "Allied Telesis, K.K." "CentreCOM LA100-PCM-T V2 100/10M LAN PC Card" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Allied Telesis CentreCOM LA-PCM V3 +card "Allied Telesis K.K." "LA-PCM V3" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# AmbiCom 10BaseT card +card "AmbiCom Inc" "AMB8002T" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Billionton LNT-10TB +card "Billionton" "LNT-10TB" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# BUFFALO LPC2-CLT +card "BUFFALO" "LPC2-CLT" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# BUFFALO LPC3-CLX +card "BUFFALO" "LPC3-CLX" + config auto "ed" ? 0x30000 + ether 0x1c8 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# CNet BC40 adapter +card "CNet" "CN40BC Ethernet" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# COREGA FEther PCC-TXF +card "corega" "FEther PCC-TXF" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# COREGA Ether PCC-T and COREGA EtherII PCC-T +card "corega K.K." "/corega Ether(II)? PCC-T/" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# COREGA FastEther PCC-TX +card "corega K.K." "corega FastEther PCC-TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# COREGA FEther PCC-TXD +card "corega K.K." "corega FEther PCC-TXD" + config auto "ed" ? 0x30000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Corega PCM-T +card "Corega,K.K." "Ethernet LAN Card" + config auto "ed" ? + ether 0xff0 # 00:00:f4 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# CyQ've ELA-010 +card "CyQ've" "ELA-010" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# CyQ've ELA-110 and ELA-110E +card "CyQ've" "/ELA-110E? 10/100M LAN Card/" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# D-Link DE-650 and DE-660 +card "D-Link" "/DE-6[56]0/" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# D-Link DFE-650 Fast Ethernet Card +card "D-Link" "DFE-650" + config auto "ed" ? 0x80010 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# D-Link DME-560T LAN/FAX/MODEM Card (as Ethernet) +card "D-Link" "DME560T" + config default "ed" ? +# config auto "sio" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Danpex (Alloy, etc.) EN-6200P2 +card "DANPEX" "EN-6200P2" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Dayna Communications CommuniCard E +card "Dayna Communications, Inc." "CommuniCard E" + config auto "ed" ? 0x10 + ether 0x110 # 00:80:19 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Digital DEPCM-BA Ethernet +card "DIGITAL" "DEPCM-XX" + config auto "ed" ? 0x10 + ether 0xff0 # 00:00:e8 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Planex FNW-3600-T and FNW-3600-TX DirectDock (second model) +card "Dual Speed" "/10/100( Port Attached)? PC Card/" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Linksys Combo PCMCIA Ethernet Card +card "E-CARD" "E-CARD" + config auto "ed" ? + logstr "Linksys Combo Ethernet Card" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Eiger Labs Ethernet COMBO +card "EIGER Labs Inc." "Ethernet COMBO Card" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# XXX Compex Net-A adapter, Telecom SuperSocket RE450T, +# Apollo PCMCIA Ethernet Adapter, PLANEX ENW-3503-T and +# Fiber line 10M Ethernet COMBO have same manufacturer and +# card version string. They should be distinguished by +# other info. (such as additional information or OEM-ID/product-ID). + +# Note: There are several revisions of the cardon the market. +# Type A needs no "ether" line. +# Type B needs "ether 0x110" line. +# Type C needs "ether 0xff0" line. +# Yet more revisions exist, reportedly. +# If you see strange MAC address shown by ifconfig command, +# try other config. +card "Ethernet" "Adapter" + config auto "ed" ? +# ether 0x110 # 00:e0:98 + ether 0xff0 # 00:e0:98 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# pci Ethernet Adapter Card +card "Ethernet" "CF Size PC Card" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# "Ethernet Adapter" "E2000 PCMCIA Ethernet" +card "Ethernet Adapter" "E2000 PCMCIA Ethernet" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ADDTRON EP-210A +card "EP-210 PCMCIA LAN CARD." "/.*/" + config auto "ed" ? 0x10 + ether 0x110 # 00:40:33 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Planex FNW-3700-T Fast Ethernet +card "Fast Ethernet" "16-bit PC Card" + config auto "ed" ? 0x30000 + logstr "Planex FNW-3700-T" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Planex FNW-3600-T 16bit Fast Ethernet (old model) +card "Fast Ethernet" "Adapter" + config auto "ed" ? 0x80000 + logstr "Planex FNW-3600-T" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# TDK Grey Cell GCS2000 and GCS2220 +card "Grey Cell" "/GCS2(00|22)0/" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# GVC NIC-2000P Ethernet Card +card "GVC" "NIC-2000p" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# IBM PCMCIA Ethernet I/II, RIOS PC CARD II ETHERNET +card "IBM Corp." "Ethernet" + config auto "ed" ? + ether 0xff0 # 08:00:5a 00:04:ac 00:06:29 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# AR-P500 ethernet card, Planet Communications Smart COM 3500 same as +# model ENW-3500 and ENW-3501-T, IC-CARD Ethernet, SYSCOM SC100 Ethernet Card +# ELECOM Laneed LD-CDY, IC-CARD+ Ethernet card +card "/^IC-CARD\+?$/" "/^IC-CARD\+?$/" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# I/O DATA PCLA/T +card "I-O DATA" "PCLA" + config auto "ed" ? 0x10 +# ether 0x1c0 # 00:a0:b0 + ether 0xff0 # 00:a0:b0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# I-O DATA PCET/TX +card "IO DATA" "PCETTX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# I-O DATA PCET/TX-R +card "IO DATA" "PCETTXR" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# I-O DATA PCLA/TE +card "IO DATA" "PCLATE" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# KANSAI ELECTRIC KLA-PCM/T +card "KANSAI ELECTRIC CO.,LTD" "KLA-PCM/T" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Kingston KNE-PC2 +card "Kingston" "KNE-PC2" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Kingston KNE-PCM/x Ethernet +card "Kingston Technology Corp." "/EtheRx PC Card Ethernet.*/" + config auto "ed" ? + ether 0xff0 # 00:c0:f0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Laneed LD-10/100CD +card "Laneed" "LD-10/100CD" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Laneed LD-CDF, LD-CDS +card "Laneed" "/LD-CD[FS]/" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Laneed LD-CDL/TX +card "Laneed" "LD-CDL/TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Linksys Combo PCMCIA EthernetCard (model EC2T on box) +card "Linksys" "Combo PCMCIA EthernetCard (EC2T)" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Linksys Combo PCMCIA Ethernet Card +card "LINKSYS" "E-CARD" + config auto "ed" ? 0x10 + logstr "Linksys Combo Ethernet Card" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Linksys EtherFast 10/100 Intergrated PC Card (PCM100) +card "Linksys" "EtherFast 10/100 Integrated PC Card (PCM100)" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Linksys EtherFast 10/100 PC Card (PCMPC100), model V2 and V3 +card "Linksys" "/Ether[Ff]ast 10/100 PC Card \(PCMPC100.*\)/" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Logitec LPM-LN100TX 100BASE-TX Ethernet LAN CARD +card "Logitec" "LPM-LN100TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Logitec LPM-LN20T +card "Logitec" "LPM-LN20T" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Socket LP-E (WinCE Low Power Ethernet) +card "Low Power Ethernet LAN Adapter" "Socket Communications, Inc" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Laneed LD-CDWA (DP83902A), MACNICA Ethernet ME1 for JEIDA +card "MACNICA" "ME1-JEIDA" + config auto "ed" ? + ether 0xb8 # 08:00:42 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Matsushita Electric Industrial Co.,LTD. CF-VEL211P-B +card "Matsushita Electric Industrial Co.,LTD." "CF-VEL211" + config auto "ed" ? + ether 0xff0 # 00:80:45 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# MELCO LPC2-T +card "MELCO" "LPC2-T" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# MELCO LPC2-TX +card "MELCO" "LPC2-TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# MELCO LPC3-TX +card "MELCO" "LPC3-TX" + config auto "ed" ? 0x30000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# National Semiconductor InfoMover 4100 and NE4100 +card "National Semiconductor" "/InfoMover (NE)?4100/" + config auto "ed" ? + ether 0xff0 # 08:00:17 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NDC Ethernet Instant-Link NE2000 clone +card "NDC" "Ethernet" + config auto "ed" ? 0x30 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NEC PC-9801N-J12 +card "NEC" "PC-9801N-J12" + config auto "ed" ? + ether 0xff0 # 00:00:4c + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# BayNetworks NETGEAR FA410TXC Fast Ethernet +card "NETGEAR" "FA410TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Network Everywhere Ethernet 10BaseT PC Card +card "Network Everywhere" "Ethernet 10BaseT PC Card" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Network Everywhere Ethernet Fast Ethernet 10/100 PC Card +card "Network Everywhere" "Fast Ethernet 10/100 PC Card" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# New Media Corporation LiveWire 10/100 +card "New Media Corporation" "LiveWire 10/100" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NextCom Next Hawk Etherneet Adapter +card "NextCom K.K." "Next Hawk" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Nihon Unisys, Ltd. JPF0400-ETH and JPF0400-LAN +card "Nihon Unisys, Ltd." "/JPF0400-(ETH|LAN)/" + config auto "ed" ? + ether 0xff0 # 00:80:45 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# No-brand NE-2000 compatible card +card "PCMCIA" "ETHERNET V1.0" + config auto "ed" ? 0x10 + ether 0xff0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Telecom Device SuperSocket HPC100 +card "PCMCIA" "FastEthernet" + config auto "ed" ? 0x30000 + logstr "Telecom Device SuperSocket HPC100" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Billionton 10Base-TX ETHERNET PCCARD (aka UE2216) +# Also Genuius "Ethernet ME3000II SE" +card "PCMCIA" "PCMCIA-ETHERNET-CARD" + config auto "ed" ? 0x10 + logstr "UE2216" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Planet Smart COM 2000, Melco LPC-T +card "PCMCIA" "UE2212" + config auto "ed" ? 0x10 + ether 0xff0 # 00:00:e8 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# EXPsys PCMCIA Ethernet Combo, Relia PCMCIA Ethernet +card "PCMCIA LAN" "Ethernet" + config auto "ed" ? + logstr "EXPsys Ethernet" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# LinkMates LM 336 LAN Fax/Modem PC Card (as Ethernet only) +card "PCMCIAs" "ComboCard" + config 0x24 "ed" ? 0x10 +# config auto "sio" ? + logstr "LinkMates LM 336" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Telecom Device SuperSocket LM336 (as Ethernet only) +card "PCMCIAs" "LanModem" + config default "ed" ? +# config auto "sio" ? + logstr "SuperSocket LM336" + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# PreMax PE-200 Ethernet Card +card "PMX " "PE-200" + config auto "ed" ? 0x10 + ether 0x7f0 # 00:20:e0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Psion Dacom Gold Card V34 Ethernet GSM +# as ethernet +card "Psion Dacom" "Gold Card V34 Ethernet GSM" + config auto "ed" ? +# config auto "sio" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# RIOS PC CARD3 ETHERNET +card "RIOS Systems Co." "PC CARD3 ETHERNET" + config auto "ed" ? + ether 0xff0 # 00:00:48 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# RPTI EP401 Ethernet card +card "RPTI" "EP401 Ethernet NE2000 Compatible" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# SCM Ethernet Combo (*Not SMC :-)*) +card "SCM" "Ethernet Combo card" + config auto "ed" ? 0x10 + ether 0xff0 # 00:20:cb + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Epson EEN10B Ethernet Card +card "Seiko Epson Corp." "Ethernet" + config auto "ed" ? 0x10 + ether 0xff0 # 00:00:48 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3way 3WL-847-TX +card "SUN WAY" "3WL-847-TX 100BASE-TX" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Surecom EtherPerfect EP-427 +card "TAMARACK" "Ethernet" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# TDK LAK-CD031 +card "TDK" "/LAK-CD031.*/" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Telecom Device SuperSocket RE450T +card "Telecom Device K.K." "SuperSocket RE450T" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Telecom Device SuperSocket RE550T +card "Telecom Device K.K." "SuperSocket RE550T" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Toshiba Joho System PTJ-LAN/T +card "TJ" "Ethernet" + config auto "ed" ? 0x10 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# XXX NOT SUPPORTED YET +# TOSHIBA LABCTA00A (Add `option TOSH_ETHER' line to your kernel +# configuration file and rebuilding kernel.) +#card "TOSHIBA" "LANCT00A" +# config default "ed" ? 0x10 +# cardmem 0xd0000 0x0000 32k +## cardmem 0xd8000 0x0000 32k +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + +# Xircom CompactCard Ethernet 10 (CFE-10) +card "Xircom" "CompactCard Ethernet" + config auto "ed" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## ep ########## + +# 3Com Fast Etherlink 3C574TX +card "3Com" "3C574-TX Fast EtherLink PC Card" + config auto "ep" ? 0x1 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3Com Megahertz 3CCFEM556BI, 3CXEM556 and model B +# as ethernet +card "3Com" "/Megahertz 3C(CF|X)EM556/" + config default "ep" ? 0x1 +# config auto "sio" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3Com Megahertz 574B same as 3Com Fast Etherlink 3C574B +card "3Com" "Megahertz 574B" + config auto "ep" ? 0x1 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3Com Etherlink III 3CXE589EC and 3CXE589ET +card "3Com" "Megahertz 589E" + config auto "ep" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3Com OfficeConnect 3CXSH572BT +card "3Com" "OfficeConnect 572B" + config auto "ep" ? 0x1 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# 3Com Etherlink III 3C562 (as Network) +# Don't think this will work. +#card "3Com Corporation" "3C562" +# config 0x9 "ep" ? +# insert /etc/pccard_ether $device start -link0 link1 +# remove /etc/pccard_ether $device stop + +# 3Com Etherlink III 3C589, 3C589B, 3C589C, 3C589D +card "3Com Corporation" "/3C589/" + config auto "ep" ? + insert /etc/pccard_ether $device start -link0 link1 +# insert /etc/pccard_ether $device start link0 -link1 + remove /etc/pccard_ether $device stop + +# Farallon EtherMac +card "Farallon" "ENet" + config auto "ep" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## ex ########## + +# Olicom OC2220 +card "Olicom" "Ethernet" + config 0x1 "ex" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## fe ########## + +# CONTEC C-NET(PC)C Ethernet +card "CONTEC Co.,Ltd." "/C-NET\(PC\)C.*/" + config auto "fe" ? + ether 0x58 # 00:80:4c + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Fujitsu MBH10303 Ethernet PCMCIA +card "EAGLE Technology" "NE200 ETHERNET LAN MBH10303 " + config auto "fe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Eiger Labs EPX-10BT +card "Eiger labs,Inc." "EPX-10BT PC Card Ethernet 10BT" + config auto "fe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Fujitsu FMV-J182, FMV-J182A +card "FUJITSU" "LAN Card(FMV-J182)" + config auto "fe" ? +# These cards have same ID strings, and different MAC address +# locations. +# ether 0xf2c # 00:00:0e #FMV-J182 + ether 0x1cc # 00:00:0e #FMV-J182A + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Fujitsu Towa LA501 Ethernet +card "FUJITSU TOWA" "LA501" + config auto "fe" ? 0x10 + ether 0x332 # 00:00:0e + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# HITACHI HT-4840-11 +card "HITACHI" "HT-4840-11" + config auto "fe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NextCom J Link NC5310 +card "NextComK.K." "/NC5310 Ver1\.0.*/" + config auto "fe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# RATOC REX-5588, REX-9822, REX-4886 +card "PCMCIA LAN MBH10304 ES" " 01" + config auto "fe" ? +# ether 0x32c # 00:c0:d0 # many minor revs.... +# ether 0x328 # 00:c0:d0 + ether 0x200 # 00:c0:d0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Fujitsu MBH10302 +card "PCMCIA MBH10302" "01" + config auto "fe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# RATOC REX-R280 +card "RATOC System Inc." "10BASE_T CARD R280" + config auto "fe" ? + ether 0x1fc # 00:c0:d0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# TDK LAK-CD021, LAK-CD021A, LAK-CD021BX +card "TDK" "LAC-CD02x" + config auto "fe" ? +# These cards have same ID strings, and different MAC address +# locations. +# ether 0x92 # 00:80:98 # LAC-CD021, LAC-021A +# ether 0x96 # 00:80:98 # LAC-CD021BX + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## fdc ########## + +# Libretto Floppy disk +card "Y-E DATA" "External FDD" + config 0x4 "fdc" ? + +########## gp ########## + +# XXX NOT SUPPORTED YET +# National Instruments PCMCIA-GPIB Cards +#card "National Instruments" "PCMCIA-GPIB" +# config default "gp" pio + +########## hss ########## + +# XXX NOT SUPPORTED YET +# Hitachi microcomputer speech synthesizer card +#card "/HITACHI MICROCOMPUTER SYSTEM LTD.*/" "MSSHVPC02" +# config default "hss" pio + +########## joy ########## + +# XXX NOT SUPPORTED YET +# IO DATA PCJOY +#card "IO DATA" "PCJOY" +# config default "joy" pio +## config 0x1 "joy" pio +## config 0x2 "joy" pio + +########## ncv ########## + +# New Media Corporation BASICS SCSI +# (Do not put this entry under Bustoaster) +card "BASICS by New Media Corporation" "SCSI Sym53C500" + config auto "ncv" ? + +# Media Intelligent SCSI-2 PC Card MSC-200 +card "EPSON" "SCSI-2 PC Card SC200" + config auto "ncv" ? + +# KME (TAXAN ICD-400PN, etc.) +card "KME" "KXLC002" + config auto "ncv" ? 0xb4d00000 + +# KME KXLC004 +card "KME" "KXLC004" + config auto "ncv" ? 0xb4d00100 + +# IO DATA PCSC-DV +# Macnica Miracle SCSI mPS100 +card "MACNICA" "MIRACLE SCSI" "mPS100" "D.0" + config auto "ncv" ? 0xb6250000 + +# Macnica Miracle SCSI-II mPS110 +card "MACNICA" "MIRACLE SCSI-II mPS110" + config auto "ncv" ? 0 + +# NEC PC-9801N-J03R +card "NEC" "PC-9801N-J03R" + config auto "ncv" ? 0 + +# Qlogic Fast SCSI +card "QLOGIC CORPORATION" "pc05" + config auto "ncv" ? 0x84d00000 + +# RATOC REX-9530 +card "RATOC System Inc." "/SCSI2 CARD.*/" + config auto "ncv" ? 0x84d00000 + +# RATOC REX-5572 (as SCSI only) +card "RATOC System Inc." "/SOUND/SCSI2 CARD.*/" + config auto "ncv" ? 0x84d00000 +# cardio 0x640 0x10 + iosize 16 + +########## nsp ########## + +# WORKBIT Ninja SCSI series +card "IO DATA" "CBSC16 " + config auto "nsp" ? + +# Hewlett Packard M820e (CD-writer) +card "KME" "SCSI-CARD-001" + config auto "nsp" ? + +# WORKBIT Ninja SCSI series +card "WBT" "NinjaSCSI-3" + config auto "nsp" ? + +# WORKBIT Ninja SCSI series (PIO mode) +# (If you want to use them in PIO mode comment out above and uncommnet below.) +#card "WBT" "NinjaSCSI-3" +# config auto "nsp" ? 0x100 + +########## opl ########## + +# XXX NOT SUPPORTED YET +# RATOC REX-5570 Sound Card +#card "1195 RATOC System Inc." "REX5570 SOUND CARD" +# config default "opl" ? + +########## ray ########## + +# WebGEAR Aviator 2.4 +card "WebGear" "PC Card WLAN Adapter" + config auto "ray" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## scc ########## + +# XXX NOT SUPPORTED YET +# IBM Smart Capture Card +#card "IBM Corp." "Video Capture" +# config default "scc" pio +# cardmem 0xd4000 0x0 0x8000 + +########## sio ########## + +# 3Com/USR/MegaHertz 3CCM156 +card "3COM" "3CCM156" + config auto "sio" ? + +# 3com/USR/Megahertz 3CCM556 +card "3Com" "3CXM/3CCM556" + config auto "sio" ? + +# 3Com Etherlink III 3C562 and 3C563 (as Modem) +card "3Com Corporation" "/3C56[23]/" + config 0x09 "sio" ? +# config auto "sio" ? + +# ADVANTECH COMpad-32/85 (dual port, but only one works) +card "ADVANTECH" "COMpad-32/85" + config auto "sio" ? 0x330 + +# Apex Data 28.8 PC Card "MOBILE PLUS Cellular" modem. +card "AD PC_CARD" "RC288ACL" + config auto "sio" ? + +# AIWA PV-JF288 +card "AIWA CO.,LTD." "PV-JF288 " + config auto "sio" ? + +# AIWA PV-JF3356 +card "AIWA CO.,LTD. MODEM" "PV-JF3356" + config auto "sio" ? 0x40000 + +# APEX DATA MultiCard (as Modem only) +card "APEX DATA" "MULTICARD" + config 0xb "sio" ? +# config auto "sio" ? + +# Eiger 33.6 modem +card "AT&T" "V34+ Fax Modem" + config auto "sio" ? + +# AT&T Paradyne KeepInTouch 14.4 modem +card "AT&T Paradyne" "KeepInTouch Card" + config auto "sio" ? + reset 1000 + +# BUG Linkboy D64K (ISDN) +card "BUG Inc." "Linkboy D64K" + config auto "sio" ? + +# NewMedia 14.4K FAX/Data Modem +card "CIRRUS LOGIC" "FAX MODEM" + config auto "sio" ? + +# COM1 SA +card "COM1 SA" "/MC2(18|20) CARD/" + config auto "sio" ? + +# Digiteam Expresso 14.4 Modem +card "Digiteam GmbH" "Expresso Modem" + config auto "sio" ? + +# Eicon DIVA T/A +# at@menu Config menu +# at>vc View current profile +# at>vd View troubleshooting information +card "Eicon Technology" "DIVA T/A" + config auto "sio" ? + +# Ericsson DC23 GSM modem card +card "ERICSSON" "Modem, DC23" + config auto "sio" ? + +# GATEWAY 2000 FAX/Data Modem (14.4K) +card "GATEWAY2000" "CC3144" + config auto "sio" ? + +# This one does work though +card "HAYES" "OPT288" + config auto "sio" ? + +# Hayes OPTIMA 288 FAX/Data Modem +# currently does not work on my machine +card "Hayes" "OPTIMA 288 + FAX fo" + config auto "sio" ? + reset 10000 + +# IBM Push/Pop Modem (14.4K) +card "IBM" "Push/Pop Modem(14.4K)" + config auto "sio" ? + +# IBM 56k PCCCARD modem +card "IBM" "56K PC Card Modem" + config auto "sio" ? + +# Intel EtherExpress(TM) PRO/100 LAN/Modem PC Card Adapter (as modem) +card "Intel" "EtherExpress(TM) PRO/100 LAN/Modem PC Card Adapter" + config 0x1f "sio" ? +# config auto "sio" ? + +# US Robotics Worldport 14400 +card "Intel" "MODEM 2400+" + config auto "sio" ? + +# Intelligent SurfCard +card "Intelligent" "PCMCIA FAX+MODEM" + config auto "sio" ? + reset 1000 + +# Megahertz XJEM3288 (as modem) +card "MEGAHERTZ" "CC/XJEM3288" + config auto "sio" ? + +# Megahertz XJEM1336 (as modem) +card "MEGAHERTZ" "CC/XJEM3336" + config auto "sio" ? + +# Megahertz XJ1144, XJ2144 (US and JP), XJ2288, XJ3288 +card "MEGAHERTZ" "/XJ[0-9]+/" + config auto "sio" ? + +# Megahertz XJ-CC4288 +card "Megahertz" "XJ-CC4288" + config auto "sio" ? + +# Megahertz XJ4336 +card "Megahertz" "XJ4336-CC4336" + config auto "sio" ? + +# XXX generic serial? +# Megahertz X-Jack Ethernet/Modem 14.4K (as Modem only) +card "Megahertz" "XJEM1144/CCEM1144" + config 0x27 "sio" ? +# config auto "sio" ? + +# Motorola Montana +card "Motorola" "MONTANA 33.6 FAX/MODEM" + config auto "sio" ? + +# XXX generic serial? +# Motorola Marine multifunction card (as modem) +card "Motorola, Inc." "MARINER MODEM/FAX/LAN" + config 0x35 "sio" ? +# config auto "sio" ? + +# NTT ThunderCard Modem +card "NTT-IT CO., LTD" "ThunderCard AVF288, V.34" + config auto "sio" ? + +# NTT DoCoMo Mobile D Card 96P1 +card "NTT DoCoMo" "Mobile D Card 96P1" + config auto "sio" ? 0x82 + +# NTT DoCoMo (formerly NTT Personal) Paldio 611S +card "NTT DoCoMo" "PALDIO 611S PC CARD" + config auto "sio" ? 0x40000 + +# NTT DoCoMo DATA/FAX Adapter +card "NTT DoCoMo" "PCMCIA DATA/FAX ADAPTER 9600 Mark2" + config auto "sio" ? + +# NTT DoCoMo DATA/FAX Adapter +card "NTT DoCoMo" "/PCMCIA DATA/FAX.*/" + config auto "sio" ? 0x82 + +# NTT-IT ThunderCard +card "NTT Intelligent Technology Co., Ltd." "ThunderCard DD128" + config auto "sio" ? 0x80 + reset 1000 + +# NTT DoCoMo (formerly NTT Personal) FAX/Data 32K PHS Card Paldio 321S +card "NTT Personal" "32K Paldio 321S PC CARD" + config auto "sio" ? +# config auto "sio" ? 0x40000 + +# NTT DoCoMo (formerly NTT Personal) FAX/Data 32K PHS Card Paldio 341S +card "NTT Personal" "32K Paldio 341S PC CARD" + config auto "sio" ? + +# NTT Personal Paldio Data Card DC-1S +card "NTT Personal" "/Paldio Data.*/" "DC-1S" + config auto "sio" ? 0x40000 + +# Nokia Cellular Data Card DTP-2 and DTP-2 ver II +# This Nokia example allows either 1 or 2 Nokia cards to be fitted. +# With 2 Mobile Phones and Multilink PPP you can get a 19200 data channel. +# Nokia Cellular Data Card +card "Nokia Mobile Phones" "/DTP-2( ver II)?/" +# config 0x23 "sio" ? +# config 0x24 "sio" ? + config auto "sio" ? + +# Novalink NovaModem 144 +card "NovaLink Tech." "NovaModem 144 " + config auto "sio" ? + +# Novatel Merlin CDPD card (wireless modem) +card "Novatel Wireless" "Merlin Type II Wireless IP Modem" + config auto "sio" ? + +# Omron ME2814 FAX/DATA MODEM +card "OMRON" "ME2814 FAX/DATA MOD" + config auto "sio" ? + +# Omron MD24XCA FAX/Data Modem +card "OMRON Corp." "MD24XCA" + config auto "sio" ? +# config auto "sio" pio + reset 10000 + +# Option International PCMCIA55K06 +card "Option International" "GSM Data/Fax/SMS Modem" + config auto "sio" ? + +# Banksia CardModem 56 +card "PCCardModem" "CardModem 56" + config auto "sio" ? + +# Eiger PCCARD modem +# Apparently this modem does not work unless the recommended +# init string (AT&F&C1&D2) is supplied. +card "PCMCIA " "33.6K Fax/Modem " + config auto "sio" ? + +# Actiontec Datalink with v.90 upgrade +card "PCMCIA " "56K V.90 Fax Modem (LK) " + config auto "sio" ? + +# Billionton 56Kbps Fax Modem +card "PCMCIA CARD 56KFaxModem" "FM56C-NFS" + config auto "sio" ? + +# PREMAX FM288 FAX/Data Modem +card "PREMAX" "FM288 " + config auto "sio" ? + +# Panasonic FM-RADIO card +card "Panasonic" "CF-JVR101" + config auto "sio" ? +# config auto "sio" pio + +# Panasonic KX-PH402D +card "Panasonic" "KX-PH402D" + config auto "sio" ? + +# Panasonic Modem Card TO-706C +card "Panasonic" "TO-706C" + config auto "sio" ? + +# Panasonic Modem Card TO-706C +card "Panasonic" "TO-CAF288" + config auto "sio" ? + +# Panasonic TO-CAF56K FAX/Data Modem +card "Panasonic Co." "TO-CAF56K" +# config auto "sio" pio + config auto "sio" ? + reset 10000 + +# Random modem bundled with Dell systems +card "Psion Dacom" "Gold Card Global 56K+Fax" + config auto "sio" ? + +# RFI HotLine serial card +card "RFI" "RS-232 ComCard Rev.II" + config auto "sio" ? + +# SII MC-6530, MC-6550 and MC-P200 +card "SII" "/PHS (DATA|LINK) (32S|64)/" + config auto "sio" ? 0x40000 + +# TDK 14.4 FAX/Data Modem +card "TDK" "/DF1414(EX)? DATA/FAX MODEM/" + config auto "sio" ? + +# TDK DN1280R +card "TDK" "DN1280R" + config auto "sio" ? + reset 1000 + +# TDK DP9600 +card "TDK" "DP9600" + config auto "sio" ? 0x40000 + +# TDK Multifunctioon Card (as Modem) +card "TDK" "GlobalNetworker 3410/3412" + config auto "sio" ? 0x40000 + +# Toshiba Modem/LAN card IPC5001B (as Modem) +card "TOSHIBA" "Modem/LAN Card" + config 0x25 "sio" ? +# config auto "sio" ? + +# 3Com/USR/Toshiba SLIMV90 +card "TOSHIBA" "SLIMV90" + config auto "sio" ? + +# 3Com/NoteWorthy 56K modem (bundled with Toshiba notebooks) +card "Toshiba America" "3CXM056-BNW" + config auto "sio" ? + +# U.S. Robotics XJ1560 and XJ1560J, Megahertz XJ1336 +card "U.S. Robotics" "/XJ/CC1(336|560)J?/" + config auto "sio" ? + +# US Robotics Sportster PCMCIA V.34 +# US Robotics COURIER PCMCIA V.34 +card "USRobotics" "PCMCIA 28800 Data/F" + config auto "sio" ? + +# Viking V.90/K56Flex modem +card "Viking" "V.90 K56flex" + config auto "sio" ? + +# Xircom CreditCard Ethernet 10/100 + modem (modem part) +card "Xircom" "CreditCard Ethernet+Modem 33.6" + config 0x23 "sio" ? +# config auto "sio" ? + +# Xircom GlobalACCESS modem +card "Xircom" "CreditCard Modem 56 - GlobalACCESS" + config auto "sio" ? + +# Xircom CreditCard Modem +card "Xircom" "CreditCard Modem CM-56T" + config auto "sio" ? + reset 100 + +# Zoom 56K modem +# Freezes your system entirely if you don't have the reset.. +card "Zoom Telephonics, Inc." "PCMCIA 56K LT DataFax" + config auto "sio" ? + reset 1000 + +########## sn ########## + +# Megahertz X-Jack Ethernet +card "Megahertz" "CC10BT/2" + config auto "sn" ? + ether attr2 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Megahertz Ethernet Adapter +card "Megahertz" "ETHERNET ADAPTOR" + config auto "sn" ? + ether attr2 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# MELCO LPC-TX +card "MELCO/SMC" "LPC-TX" + config auto "sn" ? + ether 0x4a # 00:a0:dc + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# SMC EtherEZ Combo(SMC8020BT) +card "SMC" "EtherEZ Ethernet 8020" + config auto "sn" ? +# ether 0x9a # 00:00:c0 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Victor M-MOIL CARD +card "JVC" "MiniMoil Ethernet Card" + config auto "sn" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +########## spc ########## + +# XXX NOT SUPPORTED YET +# REX5535AC, REX5535X SCSI +#card "PCMCIA SCSI MBH10401" "01" +# config 0x3a "spc" ? + +########## stg ########## + +# RATOC REX-5536, Melco IFC-SC +card "1195 RATOC System Inc." "REX5536 SCSI2 CARD" + config auto "stg" ? 0 + +# Future Domain SCSI2GO +card "Future Domain Corporation" "SCSI PCMCIA Credit Card Controller" + config auto "stg" ? + +# IBM SCSI PCMCIA Card +card "IBM Corp." "SCSI PCMCIA Card" + config auto "stg" ? + +# RATOC REX-5536AM, REX-9836A, ICM PSC-2401 SCSI +# There's a buggy revision of this card which has broken CIS tupples. +# If you can't use this card, change config entry from `auto' to +# `default' and try the point enabler. (for example, +# type "pccardc enabler 0 stg0 -a 0x4140 -i 5" from root command prompt) +card "PCMCIA SCSI MBH10404" "01" +# config default "stg" ? + config auto "stg" ? + logstr "RATOC REX-5536AM SCSI" + +# RATOC REX-5536M +card "PCMCIA SCSI2 CARD" "01" + config auto "stg" ? 0 + logstr "RATOC REX-5536M SCSI" + +########## wlp ########## + +# XXX NOT SUPPORTED YET +# AT&T GIS Wavelan PCMCIA +# If you want to use Japanese version, uncomment the second config +# line and comment-out the first line. +#card "AT&T" "WaveLAN/PCMCIA" +# config default "wlp" ? # US version (915MHz) +## config default "wlp" ? 0x01 # Japanese version (2.4GHz) +## ether wavelan +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + +# XXX NOT SUPPORTED YET +# Digital RoamAbout +#card "Digital" "RoamAbout/DS" +# config auto "wlp" ? +## ether wavelan +# insert /usr/sbin/wlpconfig -i wlp0 -w 0xaaaa +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + +# XXX NOT SUPPORTED YET +# Lucent Wavelan +#card "Lucent Technologies" "WaveLAN/PCMCIA" +# config default "wlp" ? +# ether wavelan +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + +# XXX NOT SUPPORTED YET +# NCR Wavelan PCMCIA +# If you want to use Japanese version, uncomment the second config +# line and comment-out the first line. +#card "NCR" "WaveLAN/PCMCIA" +# config default "wlp" ? # US version (915MHz) +## config default "wlp" ? 0x01 # Japanese version (2.4GHz) +# ether wavelan +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + + +########## wi ########## + +# 3com 3crwe737A AirConnect Wireless LAN PC Card +#Something is wrong with this entry. +card "3Com" "3CRWE737A AirConnect Wireless LAN PC Card" + config auto "wi" ? 0x10000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Cabletron RoamAbout, WaveLAN/IEEE clone +card "Cabletron" "RoamAbout 802.11 DS" + config 0x1 "wi" ? +# config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Compaq WL100 +card "Compaq" "WL100_11Mbps_Wireless_PC_Card" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Corega KK Wireless LAN PCC-11 +card "corega K.K." "Wireless LAN PCC-11" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Corega KK Wireless LAN PCCA-11 +card "corega K.K." "Wireless LAN PCCA-11" + config auto "wi" ? 0x10000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Air@Hawk/LD-WL11/PCC (0.7.5) +card "ELECOM" "Air@Hark/LD-WL11/PCC" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ELECOM Air@Hawk/LD-WL11/PCC (0.7.6 and later) +card "ELECOM" "Air@Hawk/LD-WL11/PCC" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Intel PRO/Wireless 2011 LAN PC Card +card "Intel" "PRO/Wireless 2011 LAN PC Card" + config auto "wi" ? 0x10000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ICOM SL-1100 +card "ICOM" "SL-1100" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Farallon Skyline 11Mbps Wireless +card "INTERSIL" "HFA384x/IEEE" + config 0x1 "wi" ? +# config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# IO Data WN-B11/PCM +card "IO DATA" "WNB11PCM" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Lucent WaveLAN/IEEE +card "Lucent Technologies" "WaveLAN/IEEE" + config 0x1 "wi" ? +# config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Melco Airconnect +card "MELCO" "WLI-PCM-L11" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NCR WaveLAN/IEEE +card "NCR" "WaveLAN/IEEE" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NEC Wireless Card CMZ-RT-WP +card "NEC" "Wireless Card CMZ-RT-WP" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NEC WL11C (PC-WL/11C) +card "NEC Aterm" "WL11C (PC-WL/11C)" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# NEC Corporation PK-WL001 +card "NEC Corporation" "Wireless PC Card" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# PLANEX GeoWave/GW-NS110 +card "PLANEX" "GeoWave/GW-NS110" + config 0x1 "wi" ? +# config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# TDK LAK-CD011WL +card "TDK" "LAK-CD011WL for Wireless LAN" + config auto "wi" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + + +########## xe ########## + +# Accton EN2226/Fast EtherCard (16-bit verison) +card "Accton" "Fast EtherCard-16" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Compaq Netelligent 10/100 PC Card +card "Compaq" "Netelligent 10/100 PC Card" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Intel EtherExpress PRO/100 Mobile Adapter (16-bit verison) +card "Intel" "EtherExpress(TM) PRO/100 PC Card Mobile Adapter16" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# XXX NOT SURE SUPPORTED +# Toshiba 10/100 Ethernet PC Card IPC5008A +#card "Toshiba" "10/100 Ethernet PC Card" +# config auto "xe" ? +## cardio 0x300 0x10 +# iosize 16 +# insert /etc/pccard_ether $device start +# remove /etc/pccard_ether $device stop + +# Xircom 10/100 Network PC Card +card "Xircom" "10/100 Network PC Card" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Xircom Realport card + modem +card "Xircom" "16-bit Ethernet + Modem 56" + config 0x27 "xe" ? +# config auto "sio" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Xircom CreditCard Ethernet CE3-10/100 +card "Xircom" "CreditCard 10/100" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Xircom CreditCard Ethernet Adaptor IIps (PS-CE2-10) +card "Xircom" "CreditCard 10Base-T" + config auto "xe" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# Xircom CreditCard Ethernet 10/100 + modem (Ethernet part) (CEM56) +card "Xircom" "CreditCard Ethernet 10/100 + Modem 56" + config 0x27 "xe" ? +# config auto "sio" ? + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + +# ------------------------------------------------------------------- +# +# "Wildcard" entries +# +# ------------------------------------------------------------------- + +# GENERIC PCMCIA modem +generic serial + config auto "sio" ? +# reset 100 # default +# reset 1000 # safety reset time + reset 10000 # for unstable cards + logstr "GENERIC PCMCIA modem" + +# GENERIC Flash ATA / ATA HDD +generic fixed_disk + config auto "ata" ? + logstr "GENERIC Flash ATA / ATA HDD" + diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf new file mode 100644 index 0000000..9e0e594 --- /dev/null +++ b/etc/defaults/periodic.conf @@ -0,0 +1,206 @@ +#!/bin/sh +# +# This is defaults/periodic.conf - a file full of useful variables that +# you can set to change the default behaviour of periodic jobs on your +# system. You should not edit this file! Put any overrides into one of the +# $periodic_conf_files instead and you will be able to update these defaults +# later without spamming your local configuration information. +# +# The $periodic_conf_files files should only contain values which override +# values set in this file. This eases the upgrade path when defaults +# are changed and new features are added. +# +# $FreeBSD$ +# + +# What files override these defaults ? +periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local" + +# periodic script dirs +local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic" + + +# Daily options + +# These options are used by periodic(8) itself to determine what to do +# with the output of the sub-programs that are run, and where to send +# that output. $daily_output might be set to /var/log/daily.log if you +# wish to log the daily output and have the files rotated by newsyslog(8) +# +daily_output="root" # user or /file +daily_show_success="YES" # scripts returning 0 +daily_show_info="YES" # scripts returning 1 +daily_show_badconfig="NO" # scripts returning 2 + +# 100.clean-disks +daily_clean_disks_enable="NO" # Delete files daily +daily_clean_disks_files="[#,]* .#* a.out *.core *.CKP .emacs_[0-9]*" +daily_clean_disks_days=3 # If older than this +daily_clean_disks_verbose="YES" # Mention files deleted + +# 110.clean-tmps +daily_clean_tmps_enable="NO" # Delete stuff daily +daily_clean_tmps_dirs="/tmp" # Delete under here +daily_clean_tmps_days="3" # If not accessed for +daily_clean_tmps_ignore=".X*-lock quota.user quota.group" # Don't delete these +daily_clean_tmps_verbose="YES" # Mention files deleted + +# 120.clean-preserve +daily_clean_preserve_enable="YES" # Delete files daily +daily_clean_preserve_days=7 # If not modified for +daily_clean_preserve_verbose="YES" # Mention files deleted + +# 130.clean-msgs +daily_clean_msgs_enable="YES" # Delete msgs daily +daily_clean_msgs_days= # If not modified for + +# 140.clean-rwho +daily_clean_rwho_enable="YES" # Delete rwho daily +daily_clean_rwho_days=7 # If not modified for +daily_clean_rwho_verbose="YES" # Mention files deleted + +# 150.clean-hoststat +daily_clean_hoststat_enable="YES" # Delete .hoststat daily +daily_clean_hoststat_days=3 # If not modified for +daily_clean_hoststat_verbose="YES" # Mention files deleted + +# 200.backup-passwd +daily_backup_passwd_enable="YES" # Backup passwd & group + +# 210.backup-aliases +daily_backup_aliases_enable="YES" # Backup mail aliases + +# 220.backup-distfile +daily_backup_distfile_enable="YES" # Backup /etc/Distfile + +# 300.calendar +daily_calendar_enable="NO" # Run calendar -a + +# 310.accounting +daily_accounting_enable="YES" # Rotate acct files +daily_accounting_compress="NO" # Gzip rotated files + +# 320.distfile +daily_distfile_enable="YES" # Run rdist daily + +# 330.news +daily_news_expire_enable="YES" # Run news.expire + +# 340.uucp +daily_uuclean_enable="YES" # Run uuclean.daily + +# 400.status-disks +daily_status_disks_enable="YES" # Check disk status +daily_status_disks_df_flags="-k -t nonfs" # df(1) flags for check + +# 410.status-uucp +daily_status_uucp_enable="YES" # Check uucp status + +# 420.status-network +daily_status_network_enable="YES" # Check network status +daily_status_network_usedns="YES" # DNS lookups are ok + +# 430.status-rwho +daily_status_rwho_enable="YES" # Check system status + +# 440.status-mailq +daily_status_mailq_enable="YES" # Check mail status +daily_status_mailq_shorten="NO" # Shorten output + +# 450.status-security +daily_status_security_enable="YES" # Security check +daily_status_security_inline="NO" # Run inline ? +daily_status_security_output="root" # user or /file +daily_status_security_noamd="NO" # Don't check amd mounts +daily_status_security_nomfs="NO" # Don't check mfs mounts + +# 460.status-mail-rejects +daily_status_mail_rejects_enable="YES" # Check mail rejects +daily_status_mail_rejects_logs=3 # How many logs to check + +# 500.queuerun +daily_queuerun_enable="YES" # Run mail queue + +# 999.local +daily_local="/etc/daily.local" # Local scripts + + +# Weekly options + +# These options are used by periodic(8) itself to determine what to do +# with the output of the sub-programs that are run, and where to send +# that output. $weekly_output might be set to /var/log/weekly.log if you +# wish to log the weekly output and have the files rotated by newsyslog(8) +# +weekly_output="root" # user or /file +weekly_show_success="YES" # scripts returning 0 +weekly_show_info="YES" # scripts returning 1 +weekly_show_badconfig="NO" # scripts returning 2 + +# 120.clean-kvmdb +weekly_clean_kvmdb_enable="YES" # Clean kvmdb weekly +weekly_clean_kvmdb_days=7 # If not accessed for +weekly_clean_kvmdb_verbose="YES" # Mention files deleted + +# 300.uucp +weekly_uucp_enable="YES" # Clean uucp weekly + +# 310.locate +weekly_locate_enable="YES" # Update locate weekly + +# 320.whatis +weekly_whatis_enable="YES" # Update whatis weekly + +# 330.catman +weekly_catman_enable="NO" # Preformat man pages + +# 340.noid +weekly_noid_enable="NO" # Find unowned files +weekly_noid_dirs="/" # Look here + +# 400.status-pkg +weekly_status_pkg_enable="NO" # Find out-of-date pkgs + +# 999.local +weekly_local="/etc/weekly.local" # Local scripts + + +# Monthly options + +# These options are used by periodic(8) itself to determine what to do +# with the output of the sub-programs that are run, and where to send +# that output. $monthly_output might be set to /var/log/monthly.log if you +# wish to log the monthly output and have the files rotated by newsyslog(8) +# +monthly_output="root" # user or /file +monthly_show_success="YES" # scripts returning 0 +monthly_show_info="YES" # scripts returning 1 +monthly_show_badconfig="NO" # scripts returning 2 + +# 200.accounting +monthly_accounting_enable="YES" # Login accounting + +# 999.local +monthly_local="/etc/monthly.local" # Local scripts + + +# Define source_periodic_confs, the mechanism used by /etc/periodic/*/* +# scripts to source defaults/periodic.conf overrides safely. + +if [ -z "${source_periodic_confs_defined}" ]; then + source_periodic_confs_defined=yes + source_periodic_confs () { + local i sourced_files + + for i in ${periodic_conf_files}; do + case ${sourced_files} in + *:$i:*) + ;; + *) + sourced_files="${sourced_files}:$i:" + [ -r $i ] && . $i + ;; + esac + done + } +fi diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf new file mode 100644 index 0000000..27e274f --- /dev/null +++ b/etc/defaults/rc.conf @@ -0,0 +1,367 @@ +#!/bin/sh +# + +# This is rc.conf - a file full of useful variables that you can set +# to change the default startup behavior of your system. You should +# not edit this file! Put any overrides into one of the ${rc_conf_files} +# instead and you will be able to update these defaults later without +# spamming your local configuration information. +# +# The ${rc_conf_files} files should only contain values which override +# values set in this file. This eases the upgrade path when defaults +# are changed and new features are added. +# +# All arguments must be in double or single quotes. +# +# $FreeBSD$ + +############################################################## +### Important initial Boot-time options #################### +############################################################## + +swapfile="NO" # Set to name of swapfile if aux swapfile desired. +apm_enable="NO" # Set to YES to enable APM BIOS functions (or NO). +apmd_enable="NO" # Run apmd to handle APM event from userland. +apmd_flags="" # Flags to apmd (if enabled). +pccard_enable="NO" # Set to YES if you want to configure PCCARD devices. +pccard_mem="DEFAULT" # If pccard_enable=YES, this is card memory address. +pccard_beep="2" # pccard beep type. +pccard_ifconfig="NO" # Specialized pccard ethernet configuration (or NO). +pccardd_flags="" # Additional flags for pccardd. +pccard_conf="/etc/defaults/pccard.conf" # pccardd(8) config file +local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d" # startup script dirs. +rc_conf_files="/etc/rc.conf /etc/rc.conf.local" +fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails. + +############################################################## +### Network configuration sub-section ###################### +############################################################## + +### Basic network and firewall/security options: ### +hostname="" # Set this! +nisdomainname="NO" # Set to NIS domain if using NIS (or NO). +dhcp_program="/sbin/dhclient" # Path to dhcp client program. +dhcp_flags="" # Additional flags to pass to dhcp client. +firewall_enable="NO" # Set to YES to enable firewall functionality +firewall_script="/etc/rc.firewall" # Which script to run to set up the firewall +firewall_type="UNKNOWN" # Firewall type (see /etc/rc.firewall) +firewall_quiet="NO" # Set to YES to suppress rule display +firewall_logging="NO" # Set to YES to enable events logging +firewall_flags="" # Flags passed to ipfw when type is a file +ip_portrange_first="NO" # Set first dynamically allocated port +ip_portrange_last="NO" # Set last dynamically allocated port +ipsec_enable="NO" # Set to YES to run setkey on ipsec_file +ipsec_file="/etc/ipsec.conf" # Name of config file for setkey +natd_program="/sbin/natd" # path to natd, if you want a different one. +natd_enable="NO" # Enable natd (if firewall_enable == YES). +natd_interface="fxp0" # Public interface or IPaddress to use. +natd_flags="" # Additional flags for natd. +ipfilter_enable="NO" # Set to YES to enable ipfilter functionality +ipfilter_program="/sbin/ipf -Fa -f" + # program and how to specify the rules file, + # see /etc/rc.network (pass1) for details +ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see + # /usr/src/contrib/ipfilter/rules for examples +ipfilter_flags="-E" # should be *empty* when ipf is _not_ a module + # (i.e. compiled into the kernel) to + # avoid a warning about "already initialized" +ipnat_enable="NO" # Set to YES for ipnat; needs ipfilter, too! +ipnat_program="/sbin/ipnat -CF -f" # program and how to specify rules file +ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat +ipnat_flags="" # additional flags for ipnat +ipmon_enable="NO" # Set to YES for ipmon; needs ipfilter, too! +ipmon_program="/sbin/ipmon" # where the ipfilter monitor program lives +ipmon_flags="-Ds" # typically "-Ds" or "-D /var/log/ipflog" +tcp_extensions="NO" # Set to YES to turn on RFC1323 extensions. +log_in_vain="NO" # YES to log connects to ports w/o listeners. +tcp_keepalive="YES" # Enable stale TCP connection timeout (or NO). +# For the following two options, you need to have TCP_DROP_SYNFIN and +# TCP_RESTRICT_RST set in your kernel. Please refer to LINT for details. +tcp_drop_synfin="NO" # Set to YES to drop TCP packets with SYN+FIN + # NOTE: this violates the TCP specification +icmp_drop_redirect="NO" # Set to YES to ignore ICMP REDIRECT packets +icmp_log_redirect="NO" # Set to YES to log ICMP REDIRECT packets +network_interfaces="auto" # List of network interfaces (or "auto"). +ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. +#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. +#ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. +# +# If you have any sppp(4) interfaces above, you might also want to set +# the following parameters. Refer to spppcontrol(8) for their meaning. +sppp_interfaces="" # List of sppp interfaces. +#sppp_interfaces="isp0" # example: sppp over ISDN +#spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname=some-gw hisauthsecret='another secret'" + +# User ppp configuration. +ppp_enable="NO" # Start user-ppp (or NO). +ppp_mode="auto" # Choice of "auto", "ddial", "direct" or "dedicated". + # For details see man page for ppp(8). Default is auto. +ppp_nat="YES" # Use PPP's internal network address translation or NO. +ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf. +ppp_user="root" # Which user to run ppp as + +### Network daemon (miscellaneous) ### +syslogd_enable="YES" # Run syslog daemon (or NO). +syslogd_flags="-s" # Flags to syslogd (if enabled). +inetd_enable="NO" # Run the network daemon dispatcher (YES/NO). +inetd_flags="-wW" # Optional flags to inetd +# +# named. It may be possible to run named in a sandbox, man security for +# details. +# +named_enable="NO" # Run named, the DNS server (or NO). +named_program="named" # path to named, if you want a different one. +named_flags="" # Flags for named +#named_flags="-u bind -g bind" # Flags for named + +kerberos_server_enable="NO" # Run a kerberos master server (or NO). +kadmind_server_enable="NO" # Run kadmind (or NO) -- do not run on + # a slave kerberos server +kerberos_stash="" # Is the kerberos master key stashed? +rwhod_enable="NO" # Run the rwho daemon (or NO). +rwhod_flags="" # Flags for rwhod +rarpd_enable="NO" # Run rarpd (or NO). +rarpd_flags="" # Flags to rarpd. +xtend_enable="NO" # Run the X-10 power controller daemon. +xtend_flags="" # Flags to xtend (if enabled). +pppoed_enable="NO" # Run the PPP over Ethernet daemon. +pppoed_provider="*" # Provider and ppp(8) config file entry. +pppoed_flags="-P /var/run/pppoed.pid" # Flags to pppoed (if enabled). +pppoed_interface="fxp0" # The interface that pppoed runs on. +sshd_enable="NO" # Enable sshd +sshd_program="/usr/sbin/sshd" # path to sshd, if you want a different one. +sshd_flags="" # Additional flags for sshd. + +### Network daemon (NFS) Need all portmap_enable="YES" ### +amd_enable="NO" # Run amd service with $amd_flags (or NO). +amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" +amd_map_program="NO" # Can be set to "ypcat -k amd.master" +nfs_client_enable="NO" # This host is an NFS client (or NO). +nfs_client_flags="-n 4" # Flags to nfsiod (if enabled). +nfs_access_cache="2" # Client cache timeout in seconds +nfs_server_enable="NO" # This host is an NFS server (or NO). +nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled). +single_mountd_enable="NO" # Run mountd only (or NO). +mountd_flags="-r" # Flags to mountd (if NFS server enabled). +weak_mountd_authentication="NO" # Allow non-root mount requests to be served. +nfs_reserved_port_only="NO" # Provide NFS only on secure port (or NO). +nfs_bufpackets="DEFAULT" # bufspace (in packets) for client (or DEFAULT) +rpc_lockd_enable="NO" # Run NFS rpc.lockd (*broken!*) if nfs_server. +rpc_statd_enable="NO" # Run NFS rpc.statd if nfs_server (or NO). +portmap_enable="NO" # Run the portmapper service (YES/NO). +portmap_program="/usr/sbin/rpcbind" # path to portmap, if you want a different one. +portmap_flags="" # Flags to portmap (if enabled). +rpc_ypupdated_enable="NO" # Run if NIS master and SecureRPC (or NO). +keyserv_enable="NO" # Run the SecureRPC keyserver (or NO). +keyserv_flags="" # Flags to keyserv (if enabled). + +### Network Time Services options: ### +timed_enable="NO" # Run the time daemon (or NO). +timed_flags="" # Flags to timed (if enabled). +ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO). +ntpdate_program="ntpdate" # path to ntpdate, if you want a different one. +ntpdate_flags="" # Flags to ntpdate (if enabled). +xntpd_enable="NO" # Run ntpd Network Time Protocol (or NO). +xntpd_program="ntpd" # path to ntpd, if you want a different one. +xntpd_flags="-p /var/run/ntpd.pid" # Flags to ntpd (if enabled). + +# Network Information Services (NIS) options: Need all portmap_enable="YES" ### +nis_client_enable="NO" # We're an NIS client (or NO). +nis_client_flags="" # Flags to ypbind (if enabled). +nis_ypset_enable="NO" # Run ypset at boot time (or NO). +nis_ypset_flags="" # Flags to ypset (if enabled). +nis_server_enable="NO" # We're an NIS server (or NO). +nis_server_flags="" # Flags to ypserv (if enabled). +nis_ypxfrd_enable="NO" # Run rpc.ypxfrd at boot time (or NO). +nis_ypxfrd_flags="" # Flags to rpc.ypxfrd (if enabled). +nis_yppasswdd_enable="NO" # Run rpc.yppasswdd at boot time (or NO). +nis_yppasswdd_flags="" # Flags to rpc.yppasswdd (if enabled). + +### Network routing options: ### +defaultrouter="NO" # Set to default gateway (or NO). +static_routes="" # Set to static route list (or leave empty). +gateway_enable="NO" # Set to YES if this host will be a gateway. +router_enable="NO" # Set to YES to enable a routing daemon. +router="routed" # Name of routing daemon to use if enabled. +router_flags="-q" # Flags for routing daemon. +mrouted_enable="NO" # Do multicast routing (see /etc/mrouted.conf). +mrouted_flags="" # Flags for multicast routing daemon. +ipxgateway_enable="NO" # Set to YES to enable IPX routing. +ipxrouted_enable="NO" # Set to YES to run the IPX routing daemon. +ipxrouted_flags="" # Flags for IPX routing daemon. +arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL. +forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES") +accept_sourceroute="NO" # accept source routed packets to us + +### ATM interface options: ### +atm_enable="NO" # Configure ATM interfaces (or NO). +#atm_netif_hea0="atm 1" # Network interfaces for physical interface. +#atm_sigmgr_hea0="uni31" # Signalling manager for physical interface. +#atm_prefix_hea0="ILMI" # NSAP prefix (UNI interfaces only) (or ILMI). +#atm_macaddr_hea0="NO" # Override physical MAC address (or NO). +#atm_arpserver_atm0="0x47.0005.80.999999.9999.9999.9999.999999999999.00" # ATMARP server address (or local). +#atm_scsparp_atm0="NO" # Run SCSP/ATMARP on network interface (or NO). +atm_pvcs="" # Set to PVC list (or leave empty). +atm_arps="" # Set to permanent ARP list (or leave empty). + +### ISDN interface options: ### +isdn_enable="NO" # Enable the ISDN subsystem (or NO). +isdn_fsdev="/dev/ttyv4" # Output device for fullscreen mode (or NO for daemon mode). +isdn_flags="-dn -d0x1f9" # Flags for isdnd +isdn_trace="NO" # Enable the ISDN trace subsystem (or NO). +isdn_traceflags="-f /var/tmp/isdntrace0" # Flags for isdntrace + +### Miscellaneous network options: ### +icmp_bmcastecho="NO" # respond to broadcast ping packets + +### IPv6 options: ### +ipv6_enable="NO" # Set to YES to set up for IPv6. +ipv6_network_interfaces="auto" # List of network interfaces (or "auto"). +ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). +ipv6_static_routes="" # Set to static route list (or leave empty). +#ipv6_static_routes="xxx" # An example to set fec0:0000:0000:0006::/64 + # route toward loopback interface. +#ipv6_route_xxx="fec0:0000:0000:0006:: -prefixlen 64 ::1" +ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway. +ipv6_router_enable="NO" # Set to YES to enable an IPv6 routing daemon. +ipv6_router="/usr/sbin/route6d" # Name of IPv6 routing daemon. +ipv6_router_flags="" # Flags to IPv6 routing daemon. +#ipv6_router_flags="-l" # Example for route6d with only IPv6 site local + # addrs. +#ipv6_network_interfaces="ed0 ep0" # Examples for router + # or static configuration for end node. + # Choose correct prefix value. +#ipv6_prefix_ed0="fec0:0000:0000:0001 fec0:0000:0000:0002" # Examples for rtr. +#ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004" # Examples for rtr. +#ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64" # Sample manual assign entry +#ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry. +ipv6_default_interface="" # Default output interface for scoped addrs. + # Now this works only for IPv6 link local + # multicast addrs. +prefixcmd_enable="YES" # Use prefix command to assign router prefix. +rtadvd_enable="YES" # Set to YES to enable an IPv6 router + # advertisement daemon. If set to YES, + # this router becomes a possible candidate + # IPv6 default router for local subnets. +rtadvd_interfaces="" # Interfaces rtadvd sends RA packets. +mroute6d_enable="NO" # Do IPv6 multicast routing. +mroute6d_program="/usr/sbin/pim6dd" # Name of IPv6 multicast routing + # daemon. +mroute6d_flags="" # Flags to IPv6 multicast routing daemon. +gif_interfaces="NO" # List of GIF tunnels (or "NO"). +#gif_interfaces="gif0 gif1" # Examples typically for a router. + # Choose correct tunnel addrs. +#gifconfig_gif0="10.1.1.1 10.1.2.1" # Examples typically for a router. +#gifconfig_gif1="10.1.1.2 10.1.2.2" # Examples typically for a router. +stf_interface_ipv4addr="" # Local IPv4 addr for 6to4 IPv6 over IPv4 + # tunneling interface. Specify this entry + # to enable 6to4 interface. +stf_interface_ipv4plen="0" # Prefix length for 6to4 IPv4 addr, + # to limit peer addr range. Effective value + # is 0-31. +stf_interface_ipv6_ifid="0:0:0:1" # IPv6 interface id for stf0. + # If you like, you can set "AUTO" for this. +stf_interface_ipv6_slaid="0000" # IPv6 Site Level Aggregator for stf0 +ipv6_ipv4mapping="YES" # Leave empty to disable IPv4 mapped IPv6 addr + # communication. (like ::ffff:a.b.c.d) +ipv6_firewall_enable="NO" # Set to YES to enable IPv6 firewall + # functionality +ipv6_firewall_script="/etc/rc.firewall6" # Which script to run to set up the IPv6 firewall +ipv6_firewall_type="UNKNOWN" # IPv6 Firewall type (see /etc/rc.firewall6) +ipv6_firewall_quiet="NO" # Set to YES to suppress rule display +ipv6_firewall_logging="NO" # Set to YES to enable events logging +ipv6_firewall_flags="" # Flags passed to ip6fw when type is a file + +############################################################## +### System console options ################################# +############################################################## + +keymap="NO" # keymap in /usr/share/syscons/keymaps/* (or NO). +keyrate="NO" # keyboard rate to: slow, normal, fast (or NO). +keybell="NO" # bell to duration.pitch or normal or visual (or NO). +keychange="NO" # function keys default values (or NO). +cursor="NO" # cursor type {normal|blink|destructive} (or NO). +scrnmap="NO" # screen map in /usr/share/syscons/scrnmaps/* (or NO). +font8x16="NO" # font 8x16 from /usr/share/syscons/fonts/* (or NO). +font8x14="NO" # font 8x14 from /usr/share/syscons/fonts/* (or NO). +font8x8="NO" # font 8x8 from /usr/share/syscons/fonts/* (or NO). +blanktime="300" # blank time (in seconds) or "NO" to turn it off. +saver="NO" # screen saver: Uses /modules/${saver}_saver.ko +moused_enable="NO" # Run the mouse daemon. +moused_type="auto" # See man page for rc.conf(5) for available settings. +moused_port="/dev/psm0" # Set to your mouse port. +moused_flags="" # Any additional flags to moused. +allscreens_flags="" # Set this vidcontrol mode for all virtual screens + + +############################################################## +### Miscellaneous administrative options ################### +############################################################## + +cron_enable="YES" # Run the periodic job daemon. +cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled). +cron_flags="" # Which options to pass to the cron daemon. +lpd_enable="NO" # Run the line printer daemon. +lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. +lpd_flags="" # Flags to lpd (if enabled). +usbd_enable="NO" # Run the usbd daemon. +usbd_flags="" # Flags to usbd (if enabled). +sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO). +sendmail_flags="-bd -q30m" # Flags to sendmail (as a server) +sendmail_outbound_enable="YES" # Dequeue stuck mail (YES/NO). +sendmail_outbound_flags="-q30m" # Flags to sendmail (outbound only) +dumpdev="NO" # Device name to crashdump to (or NO). +savecore_flags="" # Used if dumpdev is enabled above, and present. +enable_quotas="NO" # turn on quotas on startup (or NO). +check_quotas="YES" # Check quotas on startup (or NO). +accounting_enable="NO" # Turn on process accounting (or NO). +ibcs2_enable="NO" # Ibcs2 (SCO) emulation loaded at startup (or NO). +ibcs2_loaders="coff" # List of additional Ibcs2 loaders (or NO). +sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO). +linux_enable="NO" # Linux binary compatibility loaded at startup (or NO). +svr4_enable="NO" # SysVR4 emulation loaded at startup (or NO). +osf1_enable="NO" # Alpha OSF/1 emulation loaded at startup (or NO). +clear_tmp_enable="NO" # Clear /tmp at startup. +ldconfig_insecure="NO" # Set to YES to disable ldconfig security checks +ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" + # shared library search paths +ldconfig_paths_aout="/usr/lib/compat/aout /usr/X11R6/lib/aout /usr/local/lib/aout" + # a.out shared library search paths +kern_securelevel_enable="NO" # kernel security level (see init(8)), +kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure +update_motd="YES" # update version info in /etc/motd (or NO) +start_vinum="" # set to YES to start vinum +unaligned_print="YES" # print unaligned access warnings on the alpha (or NO). +entropy_file="/entropy" # Set to NO to disable caching entropy through reboots. + # /var/db/entropy is preferred if / is not available. +entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron. +entropy_save_sz="2048" # Size of the entropy cache files. +entropy_save_num="8" # Number of entropy cache files to save. +harvest_interrupt="YES" # Entropy device harvests interrupt randomness +harvest_ethernet="YES" # Entropy device harvests ethernet randomness +harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness + +############################################################## +### Define source_rc_confs, the mechanism used by /etc/rc.* ## +### scripts to source rc_conf_files overrides safely. ## +############################################################## + +if [ -z "${source_rc_confs_defined}" ]; then + source_rc_confs_defined=yes + source_rc_confs ( ) { + local i sourced_files + for i in ${rc_conf_files}; do + case ${sourced_files} in + *:$i:*) + ;; + *) + sourced_files="${sourced_files}:$i:" + if [ -r $i ]; then + . $i + fi + ;; + esac + done + } +fi + diff --git a/etc/dhclient.conf b/etc/dhclient.conf new file mode 100644 index 0000000..36d4e09 --- /dev/null +++ b/etc/dhclient.conf @@ -0,0 +1,8 @@ +# $FreeBSD$ +# +# This file is required by the ISC DHCP client. +# See ``man 5 dhclient.conf'' for details. +# +# In most cases an empty file is suffient for most people as the +# defaults are usually fine. +# diff --git a/etc/disktab b/etc/disktab new file mode 100644 index 0000000..1302966 --- /dev/null +++ b/etc/disktab @@ -0,0 +1,229 @@ +# $FreeBSD$ +# +# Disk geometry and partition layout tables. +# Key: +# dt controller type +# ty type of disk (fixed, removeable, simulated) +# d[0-4] drive-type-dependent parameters +# ns #sectors/track +# nt #tracks/cylinder +# nc #cylinders/disk +# sc #sectors/cylinder, ns*nt default +# su #sectors/unit, sc*nc default +# se sector size, DEV_BSIZE default +# rm rpm, 3600 default +# sf supports bad144-style bad sector forwarding +# sk sector skew per track, default 0 +# cs sector skew per cylinder, default 0 +# hs headswitch time, default 0 +# ts one-cylinder seek time, default 0 +# il sector interleave (n:1), 1 default +# bs boot block size, default BBSIZE +# sb superblock size, default SBSIZE +# o[a-h] partition offsets in sectors +# p[a-h] partition sizes in sectors +# b[a-h] partition block sizes in bytes +# f[a-h] partition fragment sizes in bytes +# t[a-h] partition types (filesystem, swap, etc) +# +# All partition sizes reserve space for bad sector tables. +# (5 cylinders needed for maintenance + replacement sectors) +# + +# +# Floppy formats: +# +# To make a filesystem on a floppy: +# fdformat [-f <size>] fd<drive>[.<size>] +# disklabel -B -r -w fd<drive>[.<size>] fd<size> +# newfs <opts> fd<drive>[.<size>] +# +# with <opts>: +# -t 2 - two heads +# -u 9|15|18 - sectors per track +# (using the default value of 1/4096 is not much useful for floppies) +# -l 1 - interleave 1 (for most floppies) +# -i 65536 - bytes of data per i-node +# (the default -i value will render you with a floppy wasting way +# too much space in i-node areas) +# + +fd360:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\ + :pa#720:oa#0:ba#4096:fa#512:\ + :pb#720:ob#0:bb#4096:fb#512:\ + :pc#720:oc#0:bc#4096:fc#512: + +fd720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\ + :pa#1440:oa#0:ba#4096:fa#512:\ + :pb#1440:ob#0:bb#4096:fb#512:\ + :pc#1440:oc#0:bc#4096:fc#512: + +fd1200|floppy5|5in|5.25in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\ + :pa#2400:oa#0:ba#4096:fa#512:\ + :pb#2400:ob#0:bb#4096:fb#512:\ + :pc#2400:oc#0:bc#4096:fc#512: + +fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pb#2880:ob#0:bb#4096:fb#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +# +# Stressed floppy-formats. No guarantees given. +# + +fd800:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#80:\ + :pa#1600:oa#0:ba#4096:fa#512:\ + :pb#1600:ob#0:bb#4096:fb#512:\ + :pc#1600:oc#0:bc#4096:fc#512: + +fd820:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#82:\ + :pa#1640:oa#0:ba#4096:fa#512:\ + :pb#1640:ob#0:bb#4096:fb#512:\ + :pc#1640:oc#0:bc#4096:fc#512: + +fd1480:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#82:\ + :pa#2952:oa#0:ba#4096:fa#512:\ + :pb#2952:ob#0:bb#4096:fb#512:\ + :pc#2952:oc#0:bc#4096:fc#512: + +fd1720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#21:nc#82:\ + :pa#3444:oa#0:ba#4096:fa#512:\ + :pb#3444:ob#0:bb#4096:fb#512:\ + :pc#3444:oc#0:bc#4096:fc#512: + +# +# LS-120 floppy-format. +# +fd120m|floppy120|floppy120m|3.5in LS-120 Floppy:\ + :ty=floppy:se#512:nt#8:rm#300:ns#32:nc#963:\ + :pa#246528:oa#0:ba#4096:fa#512:\ + :pb#246528:ob#0:bb#4096:fb#512:\ + :pc#246528:oc#0:bc#4096:fc#512: + +# +# Harddisk formats +# +qp120at|Quantum Peripherals 120MB IDE:\ + :dt=ESDI:ty=winchester:se#512:nt#9:ns#32:nc#813:sf: \ + :pa#13824:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#13824:ob#13824:tb=swap: \ + :pc#234144:oc#0: \ + :ph#206496:oh#27648:th=4.2BSD:bh#4096:fh#512: + +pan60|Panasonic Laptop's 60MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#13:ns#17:nc#565:\ + :pa#13260:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#13260:ob#13260:tb=swap: \ + :pc#124865:oc#0: \ + :ph#97682:oh#26520:th=4.2BSD:bh#4096:fh#512: + +mk156|toshiba156|Toshiba MK156 156Mb:\ + :dt=SCSI:ty=winchester:se#512:nt#10:ns#35:nc#825:\ + :pa#15748:oa#0:ba#4096:fa#512:ta=4.2BSD:\ + :pb#15748:ob#15748:tb=swap:\ + :pc#288750:oc#0:\ + :ph#257250:oh#31500:bh#4096:fh#512:th=4.2BSD: + +cp3100|Connor Peripherals 100MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#12144:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#12144:ob#12144:tb=swap: \ + :pc#202224:oc#0: \ + :ph#177936:oh#24288:th=4.2BSD:bh#4096:fh#512: + +# a == root +# b == swap +# c == d == whole disk +# e == /var +# f == scratch +# h == /usr + +cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#24288:ob#15840:tb=swap: \ + :pc#202224:oc#0: \ + :pd#202224:od#0: \ + :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \ + :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \ + :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512: + +maxtor4380|Maxtor XT4380E ESDI :\ + :dt=ESDI:ty=winchester:se#512:nt#15:ns#36:nc#1222:sf: \ + :pa#21600:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#21600:ob#21600:tb=swap: \ + :pc#659880:oc#0: \ + :pd#216000:od#53200:td=4.2BSD:bd#4096:fd#512: \ + :ph#398520:oh#269200:th=4.2BSD:bh#4096:fh#512: + +miniscribe9380|compaq38|Miniscribe 9380 ESDI :\ + :ty=winchester:dt=ESDI:se#512:nt#15:ns#35:nc#1223:rm#3600:sf: \ + :pa#21000:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#42000:ob#21000:tb=swap: \ + :pc#642075:oc#0: \ + :pd#21000:od#63000:bd#8192:fd#1024:td=4.2BSD: \ + :ph#556500:oh#84000:bh#8192:fh#1024:th=4.2BSD: + +ida4|compaq88|Compaq IDA (4 drives) :\ + :ty=winchester:dt=IDA:se#512:nt#16:ns#63:nc#1644:rm#3600:\ + :pa#20160:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#80640:ob#20160:tb=swap: \ + :pc#1659168:oc#0: \ + :pd#201600:od#100800:bd#8192:fd#1024:td=4.2BSD: \ + :pe#20160:oe#1310400:be#8192:fe#1024:te=4.2BSD: \ + :ph#1008000:oh#302400:bh#8192:fh#1024:th=4.2BSD: \ + :pg#302400:og#1330560:bg#4096:fg#512:tg=4.2BSD: + +fuji513|Fujitsu M22XXXX: \ + :ty=winchester:dt=ESDI:se#512:nt#16:ns#63:nc#954:rm#3600:\ + :pa#20160:oa#82656:ba#4096:fa#512:ta=4.2BSD: \ + :pb#40320:ob#102816:tb=swap: \ + :pc#961632:oc#0: \ + :ph#656208:oh#143136:bh#4096:fh#512:th=4.2BSD: + +sony650|Sony 650 MB MOD|\ + :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\ + :pc#576600:oc#0:\ + :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024: + +mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\ + :ty=removeable:dt=SCSI:rm#3600:\ + :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\ + :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\ + :pc#444384:oc#0: + +minimum:ty=mfs:se#512:nt#1:rm#300:\ + :ns#2880:nc#1:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +minimum2:ty=mfs:se#512:nt#1:rm#300:\ + :ns#5760:nc#1:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pc#5760:oc#0:bc#4096:fc#512: + +minimum3:ty=mfs:se#512:nt#1:rm#300:\ + :ns#8640:nc#1:\ + :pa#8640:oa#0:ba#4096:fa#512:\ + :pc#8640:oc#0:bc#4096:fc#512: + +zip100|zip 100:\ + :ty=removable:se#512:nc#96:nt#64:ns#32:\ + :pa#196608:oa#0:ba#4096:fa#512:\ + :pb#196608:ob#0:bb#4096:fb#512:\ + :pc#196608:oc#0:bc#4096:fc#512: + +orb2200|orb22|orb:\ + :ty=removable:ns#63:nt#128:nc#4273:sc#1008:su#4307184:se#512:\ + :pa#4307184:oa#0:ba#8192:fa#1024:\ + :pc#4307184:oc#0:bc#8192:fc#1024: + diff --git a/etc/dm.conf b/etc/dm.conf new file mode 100644 index 0000000..63fad93 --- /dev/null +++ b/etc/dm.conf @@ -0,0 +1,20 @@ +# +# Game Control File +# $FreeBSD$ +# @(#)dm.conf 5.5 (Berkeley) 4/12/89 +# + +# TTYNAME +# badtty /dev/tty19 # news +# badtty /dev/tty20 # news/mail + +# DAY OF WEEK START STOP +# time Monday 7 16 # 7am to 4pm +# time Tuesday 7 16 +# time Wednesday 7 16 +# time Thursday 7 16 +# time Friday 7 16 + +# GAME MAX LOAD MAX USERS PRIORITY +# default must be the last entry for the ``game'' keyword +game default 5 * * diff --git a/etc/etc.alpha/disktab b/etc/etc.alpha/disktab new file mode 100644 index 0000000..63a26e2 --- /dev/null +++ b/etc/etc.alpha/disktab @@ -0,0 +1,218 @@ +# $FreeBSD$ +# +# Disk geometry and partition layout tables. +# Key: +# dt controller type +# ty type of disk (fixed, removeable, simulated) +# d[0-4] drive-type-dependent parameters +# ns #sectors/track +# nt #tracks/cylinder +# nc #cylinders/disk +# sc #sectors/cylinder, ns*nt default +# su #sectors/unit, sc*nc default +# se sector size, DEV_BSIZE default +# rm rpm, 3600 default +# sf supports bad144-style bad sector forwarding +# sk sector skew per track, default 0 +# cs sector skew per cylinder, default 0 +# hs headswitch time, default 0 +# ts one-cylinder seek time, default 0 +# il sector interleave (n:1), 1 default +# bs boot block size, default BBSIZE +# sb superblock size, default SBSIZE +# o[a-h] partition offsets in sectors +# p[a-h] partition sizes in sectors +# b[a-h] partition block sizes in bytes +# f[a-h] partition fragment sizes in bytes +# t[a-h] partition types (filesystem, swap, etc) +# +# All partition sizes reserve space for bad sector tables. +# (5 cylinders needed for maintenance + replacement sectors) +# + +# +# Floppy formats: +# +# To make a filesystem on a floppy: +# fdformat [-f <size>] fd<drive>[.<size>] +# disklabel -B -r -w fd<drive>[.<size>] fd<size> +# newfs <opts> fd<drive>[.<size>] +# +# with <opts>: +# -t 2 - two heads +# -u 9|15|18 - sectors per track +# (using the default value of 1/4096 is not much useful for floppies) +# -l 1 - interleave 1 (for most floppies) +# -i 65536 - bytes of data per i-node +# (the default -i value will render you with a floppy wasting way +# too much space in i-node areas) +# + +fd360:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\ + :pa#720:oa#0:ba#4096:fa#512:\ + :pb#720:ob#0:bb#4096:fb#512:\ + :pc#720:oc#0:bc#4096:fc#512: + +fd720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\ + :pa#1440:oa#0:ba#4096:fa#512:\ + :pb#1440:ob#0:bb#4096:fb#512:\ + :pc#1440:oc#0:bc#4096:fc#512: + +fd1200|floppy5|5in|5.25in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\ + :pa#2400:oa#0:ba#4096:fa#512:\ + :pb#2400:ob#0:bb#4096:fb#512:\ + :pc#2400:oc#0:bc#4096:fc#512: + +fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pb#2880:ob#0:bb#4096:fb#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +# +# Stressed floppy-formats. No guarantees given. +# + +fd800:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#80:\ + :pa#1600:oa#0:ba#4096:fa#512:\ + :pb#1600:ob#0:bb#4096:fb#512:\ + :pc#1600:oc#0:bc#4096:fc#512: + +fd820:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#82:\ + :pa#1640:oa#0:ba#4096:fa#512:\ + :pb#1640:ob#0:bb#4096:fb#512:\ + :pc#1640:oc#0:bc#4096:fc#512: + +fd1480:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#82:\ + :pa#2952:oa#0:ba#4096:fa#512:\ + :pb#2952:ob#0:bb#4096:fb#512:\ + :pc#2952:oc#0:bc#4096:fc#512: + +fd1720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#21:nc#82:\ + :pa#3444:oa#0:ba#4096:fa#512:\ + :pb#3444:ob#0:bb#4096:fb#512:\ + :pc#3444:oc#0:bc#4096:fc#512: + +# +# LS-120 floppy-format. +# +fd120m|floppy120|floppy120m|3.5in LS-120 Floppy:\ + :ty=floppy:se#512:nt#8:rm#300:ns#32:nc#963:\ + :pa#246528:oa#0:ba#4096:fa#512:\ + :pb#246528:ob#0:bb#4096:fb#512:\ + :pc#246528:oc#0:bc#4096:fc#512: + +# +# Harddisk formats +# +qp120at|Quantum Peripherals 120MB IDE:\ + :dt=ESDI:ty=winchester:se#512:nt#9:ns#32:nc#813:sf: \ + :pa#13824:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#13824:ob#13824:tb=swap: \ + :pc#234144:oc#0: \ + :ph#206496:oh#27648:th=4.2BSD:bh#4096:fh#512: + +pan60|Panasonic Laptop's 60MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#13:ns#17:nc#565:\ + :pa#13260:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#13260:ob#13260:tb=swap: \ + :pc#124865:oc#0: \ + :ph#97682:oh#26520:th=4.2BSD:bh#4096:fh#512: + +mk156|toshiba156|Toshiba MK156 156Mb:\ + :dt=SCSI:ty=winchester:se#512:nt#10:ns#35:nc#825:\ + :pa#15748:oa#0:ba#4096:fa#512:ta=4.2BSD:\ + :pb#15748:ob#15748:tb=swap:\ + :pc#288750:oc#0:\ + :ph#257250:oh#31500:bh#4096:fh#512:th=4.2BSD: + +cp3100|Connor Peripherals 100MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#12144:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#12144:ob#12144:tb=swap: \ + :pc#202224:oc#0: \ + :ph#177936:oh#24288:th=4.2BSD:bh#4096:fh#512: + +# a == root +# b == swap +# c == d == whole disk +# e == /var +# f == scratch +# h == /usr + +cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#24288:ob#15840:tb=swap: \ + :pc#202224:oc#0: \ + :pd#202224:od#0: \ + :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \ + :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \ + :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512: + +maxtor4380|Maxtor XT4380E ESDI :\ + :dt=ESDI:ty=winchester:se#512:nt#15:ns#36:nc#1222:sf: \ + :pa#21600:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#21600:ob#21600:tb=swap: \ + :pc#659880:oc#0: \ + :pd#216000:od#53200:td=4.2BSD:bd#4096:fd#512: \ + :ph#398520:oh#269200:th=4.2BSD:bh#4096:fh#512: + +miniscribe9380|compaq38|Miniscribe 9380 ESDI :\ + :ty=winchester:dt=ESDI:se#512:nt#15:ns#35:nc#1223:rm#3600:sf: \ + :pa#21000:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#42000:ob#21000:tb=swap: \ + :pc#642075:oc#0: \ + :pd#21000:od#63000:bd#8192:fd#1024:td=4.2BSD: \ + :ph#556500:oh#84000:bh#8192:fh#1024:th=4.2BSD: + +ida4|compaq88|Compaq IDA (4 drives) :\ + :ty=winchester:dt=IDA:se#512:nt#16:ns#63:nc#1644:rm#3600:\ + :pa#20160:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#80640:ob#20160:tb=swap: \ + :pc#1659168:oc#0: \ + :pd#201600:od#100800:bd#8192:fd#1024:td=4.2BSD: \ + :pe#20160:oe#1310400:be#8192:fe#1024:te=4.2BSD: \ + :ph#1008000:oh#302400:bh#8192:fh#1024:th=4.2BSD: \ + :pg#302400:og#1330560:bg#4096:fg#512:tg=4.2BSD: + +fuji513|Fujitsu M22XXXX: \ + :ty=winchester:dt=ESDI:se#512:nt#16:ns#63:nc#954:rm#3600:\ + :pa#20160:oa#82656:ba#4096:fa#512:ta=4.2BSD: \ + :pb#40320:ob#102816:tb=swap: \ + :pc#961632:oc#0: \ + :ph#656208:oh#143136:bh#4096:fh#512:th=4.2BSD: + +sony650|Sony 650 MB MOD|\ + :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\ + :pc#576600:oc#0:\ + :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024: + +mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\ + :ty=removeable:dt=SCSI:rm#3600:\ + :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\ + :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\ + :pc#444384:oc#0: + +minimum:ty=mfs:se#512:nt#1:rm#300:\ + :ns#2880:nc#1:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +minimum2:ty=mfs:se#512:nt#1:rm#300:\ + :ns#5760:nc#1:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pc#5760:oc#0:bc#4096:fc#512: + +zip100|zip 100:\ + :ty=removable:se#512:nc#96:nt#64:ns#32:\ + :pa#196608:oa#0:ba#4096:fa#512:\ + :pb#196608:ob#0:bb#4096:fb#512:\ + :pc#196608:oc#0:bc#4096:fc#512: diff --git a/etc/etc.alpha/rc.alpha b/etc/etc.alpha/rc.alpha new file mode 100644 index 0000000..cc2b3a3 --- /dev/null +++ b/etc/etc.alpha/rc.alpha @@ -0,0 +1,28 @@ +#!/bin/sh - +# +# $FreeBSD$ +# Do alpha specific processing +# + +echo -n 'Initial rc.alpha initialization:' + +# Start the Alpha OSF/1 binary compatibility if requested. +# +case ${osf1_enable} in +[Yy][Ee][Ss]) + echo -n ' OSF/1' + if ! kldstat -v | grep osf1_ecoff > /dev/null; then + kldload osf1 > /dev/null 2>&1 + fi + ;; +esac + +# knob for wether or not we should print out unaligned access warnings +# +case ${unaligned_print} in +[Nn][Oo]) + sysctl -w machdep.unaligned_print=0 + ;; +esac + +echo '.' diff --git a/etc/etc.alpha/ttys b/etc/etc.alpha/ttys new file mode 100644 index 0000000..a574070 --- /dev/null +++ b/etc/etc.alpha/ttys @@ -0,0 +1,305 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is cons25. Other +# common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 on secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 on secure +ttyv2 "/usr/libexec/getty Pc" cons25 on secure +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyd0 "/usr/libexec/getty std.9600" vt100 on secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network diff --git a/etc/etc.amd64/rc.amd64 b/etc/etc.amd64/rc.amd64 new file mode 100644 index 0000000..d3c12ae --- /dev/null +++ b/etc/etc.amd64/rc.amd64 @@ -0,0 +1,54 @@ +#!/bin/sh - +# +# $FreeBSD$ +# Do i386 specific processing +# + +echo -n 'Initial rc.i386 initialization:' + +case ${apm_enable} in +[Yy][Ee][Ss]) + echo -n ' apm' + apm -e enable > /dev/null 2>&1 + APM_DONE=yes + ;; +esac + +case ${apmd_enable} in +[Yy][Ee][Ss]) + case ${APM_DONE} in + '') + echo -n ' apm' + apm -e enable > /dev/null 2>&1 + ;; + esac + + echo -n ' apmd'; apmd ${apmd_flags} + ;; +esac + +# Start the SCO binary emulation if requested. +# +case ${ibcs2_enable} in +[Yy][Ee][Ss]) + echo -n ' ibcs2' + kldload ibcs2 > /dev/null 2>&1 + case ${ibcs2_loaders} in + [Nn][Oo]) + ;; + *) + for i in ${ibcs2_loaders}; do + kldload ibcs2_$i > /dev/null 2>&1 + done + ;; + esac + ;; +esac + +case ${xtend_enable} in +[Yy][Ee][Ss]) + echo -n ' xtend'; /usr/libexec/xtend + ;; +esac + +echo '.' diff --git a/etc/etc.amd64/ttys b/etc/etc.amd64/ttys new file mode 100644 index 0000000..c38b0f0 --- /dev/null +++ b/etc/etc.amd64/ttys @@ -0,0 +1,305 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is cons25. Other +# common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 on secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 on secure +ttyv2 "/usr/libexec/getty Pc" cons25 on secure +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyd0 "/usr/libexec/getty std.9600" dialup off secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network diff --git a/etc/etc.i386/disktab b/etc/etc.i386/disktab new file mode 100644 index 0000000..1302966 --- /dev/null +++ b/etc/etc.i386/disktab @@ -0,0 +1,229 @@ +# $FreeBSD$ +# +# Disk geometry and partition layout tables. +# Key: +# dt controller type +# ty type of disk (fixed, removeable, simulated) +# d[0-4] drive-type-dependent parameters +# ns #sectors/track +# nt #tracks/cylinder +# nc #cylinders/disk +# sc #sectors/cylinder, ns*nt default +# su #sectors/unit, sc*nc default +# se sector size, DEV_BSIZE default +# rm rpm, 3600 default +# sf supports bad144-style bad sector forwarding +# sk sector skew per track, default 0 +# cs sector skew per cylinder, default 0 +# hs headswitch time, default 0 +# ts one-cylinder seek time, default 0 +# il sector interleave (n:1), 1 default +# bs boot block size, default BBSIZE +# sb superblock size, default SBSIZE +# o[a-h] partition offsets in sectors +# p[a-h] partition sizes in sectors +# b[a-h] partition block sizes in bytes +# f[a-h] partition fragment sizes in bytes +# t[a-h] partition types (filesystem, swap, etc) +# +# All partition sizes reserve space for bad sector tables. +# (5 cylinders needed for maintenance + replacement sectors) +# + +# +# Floppy formats: +# +# To make a filesystem on a floppy: +# fdformat [-f <size>] fd<drive>[.<size>] +# disklabel -B -r -w fd<drive>[.<size>] fd<size> +# newfs <opts> fd<drive>[.<size>] +# +# with <opts>: +# -t 2 - two heads +# -u 9|15|18 - sectors per track +# (using the default value of 1/4096 is not much useful for floppies) +# -l 1 - interleave 1 (for most floppies) +# -i 65536 - bytes of data per i-node +# (the default -i value will render you with a floppy wasting way +# too much space in i-node areas) +# + +fd360:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\ + :pa#720:oa#0:ba#4096:fa#512:\ + :pb#720:ob#0:bb#4096:fb#512:\ + :pc#720:oc#0:bc#4096:fc#512: + +fd720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\ + :pa#1440:oa#0:ba#4096:fa#512:\ + :pb#1440:ob#0:bb#4096:fb#512:\ + :pc#1440:oc#0:bc#4096:fc#512: + +fd1200|floppy5|5in|5.25in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\ + :pa#2400:oa#0:ba#4096:fa#512:\ + :pb#2400:ob#0:bb#4096:fb#512:\ + :pc#2400:oc#0:bc#4096:fc#512: + +fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pb#2880:ob#0:bb#4096:fb#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +# +# Stressed floppy-formats. No guarantees given. +# + +fd800:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#80:\ + :pa#1600:oa#0:ba#4096:fa#512:\ + :pb#1600:ob#0:bb#4096:fb#512:\ + :pc#1600:oc#0:bc#4096:fc#512: + +fd820:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#82:\ + :pa#1640:oa#0:ba#4096:fa#512:\ + :pb#1640:ob#0:bb#4096:fb#512:\ + :pc#1640:oc#0:bc#4096:fc#512: + +fd1480:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#82:\ + :pa#2952:oa#0:ba#4096:fa#512:\ + :pb#2952:ob#0:bb#4096:fb#512:\ + :pc#2952:oc#0:bc#4096:fc#512: + +fd1720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#21:nc#82:\ + :pa#3444:oa#0:ba#4096:fa#512:\ + :pb#3444:ob#0:bb#4096:fb#512:\ + :pc#3444:oc#0:bc#4096:fc#512: + +# +# LS-120 floppy-format. +# +fd120m|floppy120|floppy120m|3.5in LS-120 Floppy:\ + :ty=floppy:se#512:nt#8:rm#300:ns#32:nc#963:\ + :pa#246528:oa#0:ba#4096:fa#512:\ + :pb#246528:ob#0:bb#4096:fb#512:\ + :pc#246528:oc#0:bc#4096:fc#512: + +# +# Harddisk formats +# +qp120at|Quantum Peripherals 120MB IDE:\ + :dt=ESDI:ty=winchester:se#512:nt#9:ns#32:nc#813:sf: \ + :pa#13824:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#13824:ob#13824:tb=swap: \ + :pc#234144:oc#0: \ + :ph#206496:oh#27648:th=4.2BSD:bh#4096:fh#512: + +pan60|Panasonic Laptop's 60MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#13:ns#17:nc#565:\ + :pa#13260:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#13260:ob#13260:tb=swap: \ + :pc#124865:oc#0: \ + :ph#97682:oh#26520:th=4.2BSD:bh#4096:fh#512: + +mk156|toshiba156|Toshiba MK156 156Mb:\ + :dt=SCSI:ty=winchester:se#512:nt#10:ns#35:nc#825:\ + :pa#15748:oa#0:ba#4096:fa#512:ta=4.2BSD:\ + :pb#15748:ob#15748:tb=swap:\ + :pc#288750:oc#0:\ + :ph#257250:oh#31500:bh#4096:fh#512:th=4.2BSD: + +cp3100|Connor Peripherals 100MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#12144:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#12144:ob#12144:tb=swap: \ + :pc#202224:oc#0: \ + :ph#177936:oh#24288:th=4.2BSD:bh#4096:fh#512: + +# a == root +# b == swap +# c == d == whole disk +# e == /var +# f == scratch +# h == /usr + +cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#24288:ob#15840:tb=swap: \ + :pc#202224:oc#0: \ + :pd#202224:od#0: \ + :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \ + :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \ + :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512: + +maxtor4380|Maxtor XT4380E ESDI :\ + :dt=ESDI:ty=winchester:se#512:nt#15:ns#36:nc#1222:sf: \ + :pa#21600:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#21600:ob#21600:tb=swap: \ + :pc#659880:oc#0: \ + :pd#216000:od#53200:td=4.2BSD:bd#4096:fd#512: \ + :ph#398520:oh#269200:th=4.2BSD:bh#4096:fh#512: + +miniscribe9380|compaq38|Miniscribe 9380 ESDI :\ + :ty=winchester:dt=ESDI:se#512:nt#15:ns#35:nc#1223:rm#3600:sf: \ + :pa#21000:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#42000:ob#21000:tb=swap: \ + :pc#642075:oc#0: \ + :pd#21000:od#63000:bd#8192:fd#1024:td=4.2BSD: \ + :ph#556500:oh#84000:bh#8192:fh#1024:th=4.2BSD: + +ida4|compaq88|Compaq IDA (4 drives) :\ + :ty=winchester:dt=IDA:se#512:nt#16:ns#63:nc#1644:rm#3600:\ + :pa#20160:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#80640:ob#20160:tb=swap: \ + :pc#1659168:oc#0: \ + :pd#201600:od#100800:bd#8192:fd#1024:td=4.2BSD: \ + :pe#20160:oe#1310400:be#8192:fe#1024:te=4.2BSD: \ + :ph#1008000:oh#302400:bh#8192:fh#1024:th=4.2BSD: \ + :pg#302400:og#1330560:bg#4096:fg#512:tg=4.2BSD: + +fuji513|Fujitsu M22XXXX: \ + :ty=winchester:dt=ESDI:se#512:nt#16:ns#63:nc#954:rm#3600:\ + :pa#20160:oa#82656:ba#4096:fa#512:ta=4.2BSD: \ + :pb#40320:ob#102816:tb=swap: \ + :pc#961632:oc#0: \ + :ph#656208:oh#143136:bh#4096:fh#512:th=4.2BSD: + +sony650|Sony 650 MB MOD|\ + :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\ + :pc#576600:oc#0:\ + :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024: + +mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\ + :ty=removeable:dt=SCSI:rm#3600:\ + :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\ + :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\ + :pc#444384:oc#0: + +minimum:ty=mfs:se#512:nt#1:rm#300:\ + :ns#2880:nc#1:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +minimum2:ty=mfs:se#512:nt#1:rm#300:\ + :ns#5760:nc#1:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pc#5760:oc#0:bc#4096:fc#512: + +minimum3:ty=mfs:se#512:nt#1:rm#300:\ + :ns#8640:nc#1:\ + :pa#8640:oa#0:ba#4096:fa#512:\ + :pc#8640:oc#0:bc#4096:fc#512: + +zip100|zip 100:\ + :ty=removable:se#512:nc#96:nt#64:ns#32:\ + :pa#196608:oa#0:ba#4096:fa#512:\ + :pb#196608:ob#0:bb#4096:fb#512:\ + :pc#196608:oc#0:bc#4096:fc#512: + +orb2200|orb22|orb:\ + :ty=removable:ns#63:nt#128:nc#4273:sc#1008:su#4307184:se#512:\ + :pa#4307184:oa#0:ba#8192:fa#1024:\ + :pc#4307184:oc#0:bc#8192:fc#1024: + diff --git a/etc/etc.i386/rc.i386 b/etc/etc.i386/rc.i386 new file mode 100644 index 0000000..d3c12ae --- /dev/null +++ b/etc/etc.i386/rc.i386 @@ -0,0 +1,54 @@ +#!/bin/sh - +# +# $FreeBSD$ +# Do i386 specific processing +# + +echo -n 'Initial rc.i386 initialization:' + +case ${apm_enable} in +[Yy][Ee][Ss]) + echo -n ' apm' + apm -e enable > /dev/null 2>&1 + APM_DONE=yes + ;; +esac + +case ${apmd_enable} in +[Yy][Ee][Ss]) + case ${APM_DONE} in + '') + echo -n ' apm' + apm -e enable > /dev/null 2>&1 + ;; + esac + + echo -n ' apmd'; apmd ${apmd_flags} + ;; +esac + +# Start the SCO binary emulation if requested. +# +case ${ibcs2_enable} in +[Yy][Ee][Ss]) + echo -n ' ibcs2' + kldload ibcs2 > /dev/null 2>&1 + case ${ibcs2_loaders} in + [Nn][Oo]) + ;; + *) + for i in ${ibcs2_loaders}; do + kldload ibcs2_$i > /dev/null 2>&1 + done + ;; + esac + ;; +esac + +case ${xtend_enable} in +[Yy][Ee][Ss]) + echo -n ' xtend'; /usr/libexec/xtend + ;; +esac + +echo '.' diff --git a/etc/etc.i386/ttys b/etc/etc.i386/ttys new file mode 100644 index 0000000..c38b0f0 --- /dev/null +++ b/etc/etc.i386/ttys @@ -0,0 +1,305 @@ +# +# $FreeBSD$ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is cons25. Other +# common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 on secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 on secure +ttyv2 "/usr/libexec/getty Pc" cons25 on secure +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyd0 "/usr/libexec/getty std.9600" dialup off secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network diff --git a/etc/fbtab b/etc/fbtab new file mode 100644 index 0000000..83ac65d --- /dev/null +++ b/etc/fbtab @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +#/dev/ttyv0 0600 /dev/console +#/dev/ttyv0 0600 /dev/pcaudio:/dev/pcaudioctl diff --git a/etc/ftpusers b/etc/ftpusers new file mode 100644 index 0000000..713d0bc --- /dev/null +++ b/etc/ftpusers @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# list of users disallowed any ftp access. +# read by ftpd(8). +root +toor +daemon +operator +bin +tty +kmem +games +news +man +bind +uucp +xten +pop +nobody diff --git a/etc/gettytab b/etc/gettytab new file mode 100644 index 0000000..ceba91e --- /dev/null +++ b/etc/gettytab @@ -0,0 +1,208 @@ +# $FreeBSD$ +# from: @(#)gettytab 5.14 (Berkeley) 3/27/91 +# +# Most of the table entries here are just copies of the old getty table, +# it is by no means certain, or even likely, that any of them are optimal +# for any purpose whatever. Nor is it likely that more than a couple are +# even correct. +# +# The default gettytab entry, used to set defaults for all other +# entries, and in cases where getty is called with no table name. +# +# cb, ce and ck are desirable on most crt's. The non-crt entries need to +# be changed to turn them off (:cb@:ce@:ck@:). +# +# lc should always be on; it's a remainder of some stone age when there +# have been terminals around not being able of handling lower-case +# characters. Those terminals aren't supported any longer, but getty is +# `smart' about them by default. +# +# Parity defaults to even, but the Pc entry and all the `std' entries +# specify no parity. The different parities are: +# (none): same as even except -inpck instead of inpck for login. +# ep: getty will use raw mode (cs8 -parenb) (unless rw is set) and +# fake parity. login will use even parity (cs7 parenb -parodd). +# op: same as ep except odd parity (cs7 parenb parodd) for login. +# op overrides ep. +# ap: same as ep except -inpck instead of inpck for login. +# ap overrides op and ep. +# np: 1. don't fake parity in getty. The fake parity garbles +# characters on non-terminals (like pccons) that don't +# support parity. It would probably better for getty not to +# try to fake parity. It could just use cbreak mode so as +# not to force cs8 and let the hardware handle the parity. +# login has to be rely on the hardware anyway. +# 2. set PASS8, giving cs8 -parenb -istrip -inpck. +# np:ep: same as np except inpck. +# np:op: same as np:ep except for parodd (but parodd is overridden). +# np:ap: same as np except istrip. +# +default:\ + :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:\ + :if=/etc/issue: + +# +# Fixed speed entries +# +# The "std.NNN" names are known to the special case +# portselector code in getty, however they can +# be assigned to any table desired. +# The "NNN-baud" names are known to the special case +# autobaud code in getty, and likewise can +# be assigned to any table desired (hopefully the same speed). +# +a|std.110|110-baud:\ + :np:nd#1:cd#1:uc:sp#110: +b|std.134|134.5-baud:\ + :np:nd#1:cd#2:ff#1:td#1:sp#134:ht:nl: +1|std.150|150-baud:\ + :np:nd#1:cd#2:td#1:fd#1:sp#150:ht:nl:lm=\E\72\6\6\17login\72 : +c|std.300|300-baud:\ + :np:nd#1:cd#1:sp#300: +d|std.600|600-baud:\ + :np:nd#1:cd#1:sp#600: +f|std.1200|1200-baud:\ + :np:fd#1:sp#1200: +6|std.2400|2400-baud:\ + :np:sp#2400: +7|std.4800|4800-baud:\ + :np:sp#4800: +2|std.9600|9600-baud:\ + :np:sp#9600: +g|std.19200|19200-baud:\ + :np:sp#19200: +std.38400|38400-baud:\ + :np:sp#38400: +std.57600|57600-baud:\ + :np:sp#57600: +std.115200|115200-baud:\ + :np:sp#115200: +std.230400|230400-baud:\ + :np:sp#230400: + +# +# Entry specifying explicit device settings. See termios(4) and +# /usr/include/termios.h, too. The entry forces the tty into +# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control. +# +# cflags: CLOCAL | HUPCL | CREAD | CS8 +# oflags: OPOST | ONLCR | OXTABS +# iflags: IXOFF | IXON | ICRNL | IGNPAR +# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE +# +# The `0' flags don't have input enabled. The `1' flags don't echo. +# (Echoing is done inside getty itself.) +# +local.9600|CLOCAL tty @ 9600 Bd:\ + :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\ + :o0#0x00000007:o1#0x00000002:o2#0x00000007:\ + :i0#0x00000704:i1#0x00000000:i2#0x00000704:\ + :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\ + :sp#9600: + +# +# Dial in rotary tables, speed selection via 'break' +# +0|d300|Dial-300:\ + :nx=d1200:cd#2:sp#300: +d1200|Dial-1200:\ + :nx=d150:fd#1:sp#1200: +d150|Dial-150:\ + :nx=d110:lm@:tc=150-baud: +d110|Dial-110:\ + :nx=d300:tc=300-baud: + +# +# Fast dialup terminals, 2400/1200/300 rotary (can start either way) +# +D2400|d2400|Fast-Dial-2400:\ + :nx=D1200:tc=2400-baud: +3|D1200|Fast-Dial-1200:\ + :nx=D300:tc=1200-baud: +5|D300|Fast-Dial-300:\ + :nx=D2400:tc=300-baud: + +# +#telebit (19200) +# +t19200:\ + :nx=t2400:tc=19200-baud: +t2400:\ + :nx=t1200:tc=2400-baud: +t1200:\ + :nx=t19200:tc=1200-baud: + +# +#telebit (9600) +# +t9600:\ + :nx=t2400a:tc=9600-baud: +t2400a:\ + :nx=t1200a:tc=2400-baud: +t1200a:\ + :nx=t9600:tc=1200-baud: + +# +# Odd special case terminals +# +-|tty33|asr33|Pity the poor user of this beast:\ + :tc=110-baud: + +4|Console|Console Decwriter II:\ + :nd@:cd@:rw:tc=300-baud: + +e|Console-1200|Console Decwriter III:\ + :fd@:nd@:cd@:rw:tc=1200-baud: + +i|Interdata console:\ + :uc:sp#0: + +l|lsi chess terminal:\ + :sp#300: + +X|Xwindow|X window system:\ + :fd@:nd@:cd@:rw:sp#9600: + +P|Pc|Pc console:\ + :ht:np:sp#115200: + +# +# Wierdo special case for fast crt's with hardcopy devices +# +8|T9600|CRT with hardcopy:\ + :nx=T300:tc=9600-baud: +9|T300|CRT with hardcopy (300):\ + :nx=T9600:tc=300-baud: + +# +# Plugboard, and misc other terminals +# +plug-9600|Plugboard-9600:\ + :pf#1:tc=9600-baud: +p|P9600|Plugboard-9600-rotary:\ + :pf#1:nx=P300:tc=9600-baud: +q|P300|Plugboard-300:\ + :pf#1:nx=P1200:tc=300-baud: +r|P1200|Plugboard-1200:\ + :pf#1:nx=P9600:tc=1200-baud: + +# +# XXXX Port selector +# +s|DSW|Port Selector:\ + :ps:sp#2400: + +# +# Auto-baud speed detect entry for Micom 600. +# Special code in getty will switch this out +# to one of the NNN-baud entries. +# +A|Auto-baud:\ + :ab:sp#2400:f0#040: + +# +# autologin - automatically log in as root +# + +autologin|al.9600:\ + :al=root:tc=std.9600: diff --git a/etc/group b/etc/group new file mode 100644 index 0000000..2418c29 --- /dev/null +++ b/etc/group @@ -0,0 +1,22 @@ +# $FreeBSD$ +# +wheel:*:0:root +daemon:*:1:daemon +kmem:*:2:root +sys:*:3:root +tty:*:4:root +operator:*:5:root +mail:*:6: +bin:*:7: +news:*:8: +man:*:9: +games:*:13: +staff:*:20:root +guest:*:31:root +bind:*:53: +uucp:*:66: +xten:*:67:xten +dialer:*:68: +network:*:69: +nogroup:*:65533: +nobody:*:65534: diff --git a/etc/hosts b/etc/hosts new file mode 100644 index 0000000..57b516f --- /dev/null +++ b/etc/hosts @@ -0,0 +1,29 @@ +# $FreeBSD$ +# +# Host Database +# This file should contain the addresses and aliases +# for local hosts that share this file. +# In the presence of the domain name service or NIS, this file may +# not be consulted at all; see /etc/nsswitch.conf for the resolution order. +# +# +::1 localhost localhost.my.domain myname.my.domain +127.0.0.1 localhost localhost.my.domain myname.my.domain +# +# Imaginary network. +#10.0.0.2 myname.my.domain myname +#10.0.0.3 myfriend.my.domain myfriend +# +# According to RFC 1918, you can use the following IP networks for +# private nets which will never be connected to the Internet: +# +# 10.0.0.0 - 10.255.255.255 +# 172.16.0.0 - 172.31.255.255 +# 192.168.0.0 - 192.168.255.255 +# +# In case you want to be able to connect to the Internet, you need +# real official assigned numbers. PLEASE PLEASE PLEASE do not try +# to invent your own network numbers but instead get one from your +# network provider (if any) or from the Internet Registry (ftp to +# rs.internic.net, directory `/templates'). +# diff --git a/etc/hosts.allow b/etc/hosts.allow new file mode 100644 index 0000000..8b97752 --- /dev/null +++ b/etc/hosts.allow @@ -0,0 +1,77 @@ +# +# hosts.allow access control file for "tcp wrapped" applications. +# $FreeBSD$ +# +# NOTE: The hosts.deny file is deprecated. +# Place both 'allow' and 'deny' rules in the hosts.allow file. +# See hosts_options(5) for the format of this file. +# hosts_access(5) no longer fully applies. + +# _____ _ _ +# | ____| __ __ __ _ _ __ ___ _ __ | | ___ | | +# | _| \ \/ / / _` | | '_ ` _ \ | '_ \ | | / _ \ | | +# | |___ > < | (_| | | | | | | | | |_) | | | | __/ |_| +# |_____| /_/\_\ \__,_| |_| |_| |_| | .__/ |_| \___| (_) +# |_| +# !!! This is an example! You will need to modify it for your specific +# !!! requirements! + + +# Start by allowing everything (this prevents the rest of the file +# from working, so remove it when you need protection). +# The rules here work on a "First match wins" basis. +ALL : ALL : allow + +# Wrapping sshd(8) is not normally a good idea, but if you +# need to do it, here's how +#sshd : .evil.cracker.example.com : deny + +# Prevent those with no reverse DNS from connecting. +ALL : PARANOID : RFC931 20 : deny + +# Allow anything from localhost. Note that an IP address (not a host +# name) *MUST* be specified for rpcbind(8). +ALL : localhost 127.0.0.1 : allow +ALL : my.machine.example.com 192.0.2.35 : allow + +# To use IPv6 addresses you must enclose them in []'s +ALL : [fe80::%fxp0]/10 : allow +ALL : [fe80::]/10 : deny +ALL : [3ffe:fffe:2:1:2:3:4:3fe1] : deny +ALL : [3ffe:fffe:2:1::]/64 : allow + +# Sendmail can help protect you against spammers and relay-rapers +sendmail : localhost : allow +sendmail : .nice.guy.example.com : allow +sendmail : .evil.cracker.example.com : deny +sendmail : ALL : allow + +# Exim is an alternative to sendmail, available in the ports tree +exim : localhost : allow +exim : .nice.guy.example.com : allow +exim : .evil.cracker.example.com : deny +exim : ALL : allow + +# Portmapper is used for all RPC services; protect your NFS! +# (IP addresses rather than hostnames *MUST* be used here) +rpcbind : 192.0.2.32/255.255.255.224 : allow +rpcbind : 192.0.2.96/255.255.255.224 : allow +rpcbind : ALL : deny + +# Provide a small amount of protection for ftpd +ftpd : localhost : allow +ftpd : .nice.guy.example.com : allow +ftpd : .evil.cracker.example.com : deny +ftpd : ALL : allow + +# You need to be clever with finger; do _not_ backfinger!! You can easily +# start a "finger war". +fingerd : ALL \ + : spawn (echo Finger. | \ + /usr/bin/mail -s "tcpd\: %u@%h[%a] fingered me!" root) & \ + : deny + +# The rest of the daemons are protected. +ALL : ALL \ + : severity auth.info \ + : twist /bin/echo "You are not welcome to use %d from %h." diff --git a/etc/hosts.equiv b/etc/hosts.equiv new file mode 100644 index 0000000..d8a71c1 --- /dev/null +++ b/etc/hosts.equiv @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +#localhost +#my_very_good_friend.domain diff --git a/etc/hosts.lpd b/etc/hosts.lpd new file mode 100644 index 0000000..b53202a --- /dev/null +++ b/etc/hosts.lpd @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +# See lpd(8) +#machine.domain diff --git a/etc/inetd.conf b/etc/inetd.conf new file mode 100644 index 0000000..b5e4d16 --- /dev/null +++ b/etc/inetd.conf @@ -0,0 +1,124 @@ +# $FreeBSD$ +# +# Internet server configuration database +# +# @(#)inetd.conf 5.4 (Berkeley) 6/30/90 +# +ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l +telnet stream tcp nowait root /usr/libexec/telnetd telnetd +#shell stream tcp nowait root /usr/libexec/rshd rshd +#login stream tcp nowait root /usr/libexec/rlogind rlogind +#finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -s +#exec stream tcp nowait root /usr/libexec/rexecd rexecd +#uucpd stream tcp nowait root /usr/libexec/uucpd uucpd +#nntp stream tcp nowait usenet /usr/libexec/nntpd nntpd +# run comsat as root to be able to print partial mailbox contents w/ biff, +# or use the safer tty:tty to just print that new mail has been received. +comsat dgram udp wait tty:tty /usr/libexec/comsat comsat +ntalk dgram udp wait tty:tty /usr/libexec/ntalkd ntalkd +#tftp dgram udp wait nobody /usr/libexec/tftpd tftpd /tftpboot +#bootps dgram udp wait root /usr/libexec/bootpd bootpd +# +# "Small servers" -- used to be standard on, but we're more conservative +# about things due to Internet security concerns. Only turn on what you +# need. +# +#daytime stream tcp nowait root internal +#daytime dgram udp wait root internal +#time stream tcp nowait root internal +#time dgram udp wait root internal +#echo stream tcp nowait root internal +#echo dgram udp wait root internal +#discard stream tcp nowait root internal +#discard dgram udp wait root internal +#chargen stream tcp nowait root internal +#chargen dgram udp wait root internal +# +# Kerberos authenticated services +# +#klogin stream tcp nowait root /usr/libexec/rlogind rlogind -k +#eklogin stream tcp nowait root /usr/libexec/rlogind rlogind -k -x +#kshell stream tcp nowait root /usr/libexec/rshd rshd -k +#kip stream tcp nowait root /usr/libexec/kipd kipd +# +# CVS servers - for master CVS repositories only! You must set the +# --allow-root path correctly or you open a trivial to exploit but +# deadly security hole. +# +#cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here pserver +#cvs stream tcp nowait root /usr/bin/cvs cvs --allow-root=/your/cvsroot/here kserver +# +# RPC based services (you MUST have portmapper running to use these) +# +#rstatd/1-3 dgram rpc/udp wait root /usr/libexec/rpc.rstatd rpc.rstatd +#rusersd/1-2 dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd +#walld/1 dgram rpc/udp wait root /usr/libexec/rpc.rwalld rpc.rwalld +#pcnfsd/1-2 dgram rpc/udp wait root /usr/libexec/rpc.pcnfsd rpc.pcnfsd +#rquotad/1 dgram rpc/udp wait root /usr/libexec/rpc.rquotad rpc.rquotad +#sprayd/1 dgram rpc/udp wait root /usr/libexec/rpc.sprayd rpc.sprayd +# +# example entry for the optional pop3 server +# +#pop3 stream tcp nowait root /usr/local/libexec/popper popper +# +# example entry for the optional imap4 server +# +#imap4 stream tcp nowait root /usr/local/libexec/imapd imapd +# +# Return error for all "ident" requests +# +#auth stream tcp nowait root internal +# +# Provide internally a real "ident" service which provides ~/.fakeid support, +# provides ~/.noident support, reports UNKNOWN as the operating system type +# and times out after 30 seconds. +# +#auth stream tcp nowait root internal auth -r -f -n -o UNKNOWN -t 30 +# +# Example entry for an external ident server +# +#auth stream tcp wait root /usr/local/sbin/identd identd -w -t120 +# +# Example entry for the optional qmail MTA +# NOTE: This is no longer the correct way to handle incoming SMTP +# connections for qmail. Use tcpserver (http://cr.yp.to/ucspi-tcp.html) +# instead. +# +#smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd +# +# Enable the following two entries to enable samba startup from inetd +# (from the Samba documentation). +# +#netbios-ssn stream tcp nowait root /usr/local/sbin/smbd smbd +#netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd + + +# +# IPv6 services +# +ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd -l +telnet stream tcp6 nowait root /usr/libexec/telnetd telnetd +#shell stream tcp6 nowait root /usr/libexec/rshd rshd +#login stream tcp6 nowait root /usr/libexec/rlogind rlogind +#finger stream tcp6 nowait/3/10 nobody /usr/libexec/fingerd fingerd -s +# +# IPv6 "Small servers" +# +#daytime stream tcp6 nowait root internal +#daytime dgram udp6 wait root internal +#time stream tcp6 nowait root internal +#time dgram udp6 wait root internal +#echo stream tcp6 nowait root internal +#echo dgram udp6 wait root internal +#discard stream tcp6 nowait root internal +#discard dgram udp6 wait root internal +#chargen stream tcp6 nowait root internal +#chargen dgram udp6 wait root internal +# +# Return error for all IPv6 "ident" requests +# +#auth stream tcp6 nowait root internal +# +# Example entry for a real IPv6 ident service similar to the one above for IPv4. +# +#auth stream tcp6 nowait root internal auth -r -f -n -o UNKNOWN -t 30 diff --git a/etc/isdn/Makefile b/etc/isdn/Makefile new file mode 100644 index 0000000..ec78726 --- /dev/null +++ b/etc/isdn/Makefile @@ -0,0 +1,26 @@ +# $FreeBSD$ + +I4BETCPROG= answer \ + isdntel.sh \ + record \ + tell \ + tell-record \ + unknown_incoming + +I4BETCFILE= holidays.D \ + isdnd.rates.A \ + isdnd.rates.D \ + isdnd.rates.F \ + isdnd.rates.L \ + isdnd.rates.UK.BT \ + isdnd.rc.sample \ + isdntel.alias.sample + +install: + for i in ${I4BETCPROG} ; do \ + ${INSTALL} -c -o root -g wheel -m 700 $$i ${DESTDIR}/etc/isdn ; \ + done ; \ + for i in ${I4BETCFILE} ; do \ + ${INSTALL} -c -o root -g wheel -m 600 $$i ${DESTDIR}/etc/isdn ; \ + done + diff --git a/etc/isdn/answer b/etc/isdn/answer new file mode 100755 index 0000000..d39a983 --- /dev/null +++ b/etc/isdn/answer @@ -0,0 +1,97 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# answer script for i4b isdnd +# --------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Thu May 20 11:44:38 1999] +# +#--------------------------------------------------------------------------- +VARDIR=/var/isdn + +#FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS +#LIBDIR=/usr/local/lib/isdn +#FreeBSD 3.1 and up +LIBDIR=/usr/share/isdn + +LOGFILE=/tmp/answer.log +NCALLFILE=${VARDIR}/ncall +DATE=`date +%d%H` +DF=0 +dF=0 +sF=0 + +if ! set -- `getopt D:d:s: $*`; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +for i ; do + case ${i} in + -D) + DEVICE=$2 + DF=1 + shift + shift + ;; + -d) + DEST=$2 + dF=1 + shift + shift + ;; + -s) + SRC=$2 + sF=1 + shift + shift + ;; + --) + shift + break + ;; + esac +done + +echo "" >>${LOGFILE} + +if [ "${DF}" -eq 0 -o "${dF}" -eq 0 -o "${sF}" -eq 0 ]; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +echo "answer: device ${DEVICE} destination ${DEST} source ${SRC} " >>${LOGFILE} + +if [ -r "${NCALLFILE}" ]; then + NCALL=`cat ${NCALLFILE}` +else + NCALL=0 +fi + +NCALL=`printf "%.4d" ${NCALL}` + +echo Date: `date` >> ${VARDIR}/I.${NCALL}.${DATE} + +if [ -n "${SRC}" ]; then + echo "From: ${SRC}" >> ${VARDIR}/I.${NCALL}.${DATE} +fi + +if [ -n "${DEST}" ]; then + echo "To: ${DEST}" >> ${VARDIR}/I.${NCALL}.${DATE} +fi + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k # >/dev/null 2>&1 +fi + +if [ -r "${LIBDIR}/msg.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/msg.al bs=2k # >/dev/null 2>&1 + if [ -r "${LIBDIR}/beep.al" ] + then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k # >/dev/null 2>&1 + fi +fi + +echo `expr ${NCALL} + 1` >${NCALLFILE} diff --git a/etc/isdn/holidays.D b/etc/isdn/holidays.D new file mode 100644 index 0000000..42bfd0d --- /dev/null +++ b/etc/isdn/holidays.D @@ -0,0 +1,34 @@ +#--------------------------------------------------------------------------- +# +# german holidays file 2001 / bundeseinheitliche Feiertage 2001 +# ------------------------------------------------------------- +# +# last edit-date: [Wed Jan 10 13:24:19 2001] +# +# ref: http://hamburg.de/Services/ferien/ferien.htm +# +# This file is only of value for installations which are +# using the german Telekom "T-ISDN XXL" tariff where calls +# on sundays and holidays are free of charge. Additional +# configuration of /etc/isdnd.rc has to take place to enable +# support for this tariff, see output of "man isdnd.rc" and +# search for keyword "valid". +# +# $FreeBSD$ +# +#--------------------------------------------------------------------------- +# +# same day/month each year +# +1.1 Neujahr +1.5 1. Mai +3.10 Tag der deutschen Einheit +25.12 1. Weihnachtsfeiertag +26.12 2. Weihnachtsfeiertag +# +# different day/month each year +# +13.4.2001 Karfreitag +16.4.2001 Ostermontag +24.5.2001 Himmelfahrt +4.6.2001 Pfingstmontag diff --git a/etc/isdn/isdnd.rates.A b/etc/isdn/isdnd.rates.A new file mode 100644 index 0000000..fa25b22 --- /dev/null +++ b/etc/isdn/isdnd.rates.A @@ -0,0 +1,39 @@ +#--------------------------------------------------------------------------- +# +# i4b - PTA Telekom charging rates config file +# -------------------------------------------- +# +# $Id: isdnd.rates.A,v 1.2 1999/12/13 21:25:24 hm Exp $ +# +# $FreeBSD$ +# +# last edit-date: [Mon Dec 13 21:42:02 1999] +# +# -mr updated to reflect last Telekom changes as of 1.9.99 +# +#--------------------------------------------------------------------------- +# +# reference: http://www.pta.at/ +# +#--------------------------------------------------------------------------- +# +# Syntax: +# ------- +# rate-code: ra0 = Online Tarif +# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc. +# Rate: start_hour.minutes-end_hour.minutes:period in seconds +# +#------------------------------------------------------------------------------ +# +#=================== Online ================================== +# +#rate-code Day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra0 0 00.00-24.00:360 +ra0 1 00.00-08.00:360 08.00-18.00:120 18.00-24.00:360 +ra0 2 00.00-08.00:360 08.00-18.00:120 18.00-24.00:360 +ra0 3 00.00-08.00:360 08.00-18.00:120 18.00-24.00:360 +ra0 4 00.00-08.00:360 08.00-18.00:120 18.00-24.00:360 +ra0 5 00.00-08.00:360 08.00-18.00:120 18.00-24.00:360 +ra0 6 00.00-24.00:360 +#================== EOF ====================================== diff --git a/etc/isdn/isdnd.rates.D b/etc/isdn/isdnd.rates.D new file mode 100644 index 0000000..430f9da --- /dev/null +++ b/etc/isdn/isdnd.rates.D @@ -0,0 +1,50 @@ +#--------------------------------------------------------------------------- +# +# i4b - Deutsche Telekom charging rates config file +# ------------------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Sun Jan 17 18:38:29 1999] +# +# -hm updated to reflect last Telekom changes as of 1.1.99 +# +#--------------------------------------------------------------------------- +# +# reference: http://www.telekom.de/untern/tarife/inland/index.htm +# +#--------------------------------------------------------------------------- +# +# Syntax: +# ------- +# rate-code: ra0 = City, ra1 = Deutschland +# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc. +# Rate: start_hour.minutes-end_hour.minutes:period in seconds +# +#------------------------------------------------------------------------------ +# +#=================== T-ISDN City ============================================================= +# +#rate-code Day rate1 rate2 rate3 rate4 rate5 +#--------- --- --------------- --------------- --------------- --------------- --------------- +ra0 0 00.00-05.00:240 05.00-21.00:150 21.00-24.00:240 +ra0 1 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240 +ra0 2 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240 +ra0 3 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240 +ra0 4 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240 +ra0 5 00.00-05.00:240 05.00-09.00:150 09.00-18.00:90 18.00-21.00:150 21.00-24.00:240 +ra0 6 00.00-05.00:240 05.00-21.00:150 21.00-24.00:240 +# +#=================== T-ISDN Deutschland ====================================================== +# +#rate-code Day rate1 rate2 rate3 rate4 rate5 +#--------- --- --------------- --------------- --------------- --------------- --------------- +ra1 0 00.00-24.00:60 +ra1 1 00.00-02.00:60 02.00-05.00:120 05.00-09.00:60 09.00-18.00:30 18.00-24.00:60 +ra1 2 00.00-02.00:60 02.00-05.00:120 05.00-09.00:60 09.00-18.00:30 18.00-24.00:60 +ra1 3 00.00-02.00:60 02.00-05.00:120 05.00-09.00:60 09.00-18.00:30 18.00-24.00:60 +ra1 4 00.00-02.00:60 02.00-05.00:120 05.00-09.00:60 09.00-18.00:30 18.00-24.00:60 +ra1 5 00.00-02.00:60 02.00-05.00:120 05.00-09.00:60 09.00-18.00:30 18.00-24.00:60 +ra1 6 00.00-24.00:60 +# +#================== EOF ====================================================================== diff --git a/etc/isdn/isdnd.rates.F b/etc/isdn/isdnd.rates.F new file mode 100644 index 0000000..14d772d --- /dev/null +++ b/etc/isdn/isdnd.rates.F @@ -0,0 +1,152 @@ +#--------------------------------------------------------------------------- +# +# i4b - Tarifs France Telecom +# --------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Thu Mar 19 20:05:18 1998] +# +# -hm got from Aurelien Bargy <dj@dial.oleane.com> +# +#--------------------------------------------------------------------------- +# +# a jour au 1.10.97 +# Aurelien Bargy - 18.03.97 +# +# I wrote a rates file for France. It is rather approximative +# because some time ago France Telecom decided to abandon the charging +# units system. The problem is, on ISDN lines charging units are still +# used for the aocd system, even as it gives a completely false price +# for a communication, so "abandoning" the msg_charging_unit system for +# French users of i4b is not a good idea :)) +# +#--------------------------------------------------------------------------- +# +# Syntax: +# ------- +# rate-code: ra0 = local ; ra1 = zone 1 ; ra2 = zone 2... +# plus quelques tarifs internationaux +# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc. +# Rate: start_hour.minutes-end_hour.minutes:period in seconds +# +#------------------------------------------------------------------------ +# +#========================== Communications locales ====================== +#rate-code Day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra0 0 00.00-24.00:317 +ra0 1 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317 +ra0 2 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317 +ra0 3 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317 +ra0 4 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317 +ra0 5 00.00-08.00:317 08.00-19.00:158 19.00-24.00:317 +ra0 6 00.00-08.00:317 08.00-12.00:158 12.00-24.00:317 +# +# +# +#================== Zone 1 : < 25 km ================================== +# +#rate-code Day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra1 0 00.00-24.00:222 +ra1 1 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222 +ra1 2 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222 +ra1 3 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222 +ra1 4 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222 +ra1 5 00.00-08.00:222 08.00-19.00:111 19.00-24.00:222 +ra1 6 00.00-08.00:222 08.00-12.00:111 12.00-24.00:222 +# +# +# +#================== Zone 2 : 25-30 km ================================= +# +#rate-code Day rate1 rate2 rate3 +#--------- --- --------------- --------------- -------------- +ra2 0 00.00-24.00:148 +ra2 1 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148 +ra2 2 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148 +ra2 3 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148 +ra2 4 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148 +ra2 5 00.00-08.00:148 08.00-19.00:74 19.00-24.00:148 +ra2 6 00.00-08.00:148 08.00-12.00:74 12.00-24.00:148 +# +#=================== Zone 3 : 30-52 km ================================ +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra3 0 00.00-24.00:94 +ra3 1 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94 +ra3 2 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94 +ra3 3 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94 +ra3 4 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94 +ra3 5 00.00-08.00:94 08.00-19.00:47 19.00-24.00:94 +ra3 6 00.00-08.00:94 08.00-12.00:47 12.00-24.00:94 +# +# +#=================== Zone 4 : > 52 km ================================= +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra4 0 00.00-24.00:78 +ra4 1 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78 +ra4 2 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78 +ra4 3 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78 +ra4 4 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78 +ra4 5 00.00-08.00:78 08.00-19.00:39 19.00-24.00:78 +ra4 6 00.00-08.00:78 08.00-12.00:39 12.00-24.00:78 +# +# +#=================== INTERNATIONAL : Allemagne ======================== +# (pour appeler Hellmuth) +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra5 0 00.00-24.00:27 +ra5 1 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27 +ra5 2 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27 +ra5 3 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27 +ra5 4 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27 +ra5 5 00.00-08.00:27 08.00-19.00:21 19.00-24.00:27 +ra5 6 00.00-08.00:27 08.00-12.00:21 12.00-24.00:27 +# +# +#=================== INTERNATIONAL : Pays-Bas ========================== +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra6 0 00.00-24.00:25 +ra6 1 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25 +ra6 2 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25 +ra6 3 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25 +ra6 4 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25 +ra6 5 00.00-08.00:25 08.00-19.00:20 19.00-24.00:25 +ra6 6 00.00-08.00:25 08.00-12.00:20 12.00-24.00:25 +# +# +#=================== INTERNATIONAL : Portugal =========================== +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra7 0 00.00-24.00:22 +ra7 1 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22 +ra7 2 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22 +ra7 3 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22 +ra7 4 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22 +ra7 5 00.00-08.00:22 08.00-19.00:18 19.00-24.00:22 +ra7 6 00.00-08.00:22 08.00-12.00:18 12.00-24.00:22 +# +# +#=================== INTERNATIONAL : USA/Canada ======================== +# +#rate-code day rate1 rate2 rate3 +#--------- --- --------------- --------------- --------------- +ra8 0 00.00-24.00:25 +ra8 1 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25 +ra8 2 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25 +ra8 3 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25 +ra8 4 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25 +ra8 5 00.00-13.00:25 13.00-19.00:20 19.00-24.00:25 +ra8 6 00.00-24.00:25 +# +#================== EOF ============================================== diff --git a/etc/isdn/isdnd.rates.L b/etc/isdn/isdnd.rates.L new file mode 100644 index 0000000..1c4383a --- /dev/null +++ b/etc/isdn/isdnd.rates.L @@ -0,0 +1,45 @@ +#--------------------------------------------------------------------------- +# +# i4b - Luxembourg PT charging rates config file +# ------------------------------------------------- +# +# $Id: isdnd.rates.L,v 1.2 1999/12/13 21:25:24 hm Exp $ +# +# $FreeBSD$ +# +# last edit-date: [Mon Dec 13 21:42:33 1999] +# +# Sent in by Joakim Hernberg, Digital Design Luxembourg sarl, jbh@ddl.lu +# +#--------------------------------------------------------------------------- +# +# reference: http://www.pt.lu +# +#--------------------------------------------------------------------------- +# +# Syntax: +# ------- +# rate-code: ra0 = Luxembourg normal isdn call +# rate-code: ra1 = Luxembourg PT Internet access +# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc. +# Rate: start_hour.minutes-end_hour.minutes:period in seconds +# +#------------------------------------------------------------------------------ +# +#rate-code Day rate1 rate2 rate3 rate4 rate5 +#--------- --- --------------- --------------- --------------- --------------- ---------------- +ra0 0 00.00-24.00:960 +ra0 1 00.00-06.00:960 06.00-08.00:480 08.00-19.00:240 19.00-23.00:480 23.00-24.00:960 +ra0 2 00.00-06.00:960 06.00-08.00:480 08.00-19.00:240 19.00-23.00:480 23.00-24.00:960 +ra0 3 00.00-06.00:960 06.00-08.00:480 08.00-19.00:240 19.00-23.00:480 23.00-24.00:960 +ra0 4 00.00-06.00:960 06.00-08.00:480 08.00-19.00:240 19.00-23.00:480 23.00-24.00:960 +ra0 5 00.00-06.00:960 06.00-08.00:480 08.00-19.00:240 19.00-23.00:480 23.00-24.00:960 +ra0 6 00.00-06.00:960 06.00-23.00:480 23.00-24.00:960 + +ra1 0 00.00-24.00:60 +ra1 1 00.00-24.00:60 +ra1 2 00.00-24.00:60 +ra1 3 00.00-24.00:60 +ra1 4 00.00-24.00:60 +ra1 5 00.00-24.00:60 +ra1 6 00.00-24.00:60 diff --git a/etc/isdn/isdnd.rates.UK.BT b/etc/isdn/isdnd.rates.UK.BT new file mode 100644 index 0000000..c4d34ec --- /dev/null +++ b/etc/isdn/isdnd.rates.UK.BT @@ -0,0 +1,61 @@ +#--------------------------------------------------------------------------- +# +# i4b - BT charges +# ------------------------------------------------- +# +# $FreeBSD$ +# +# Barry A. Scott barry@scottb.demon.co.uk +# +#--------------------------------------------------------------------------- +# +# reference: http://www.bt.com/Business/price_frm.htm +# (I use the bussiness figures as the Ex VAT gives more +# accurate rate data because BT round the Inc VAT figures) +# +#--------------------------------------------------------------------------- +# +# Syntax: +# ------- +# rate-code: ra0 = Local, ra1 = Regional, ra2 = National +# Day-No: 0-6, where 0 = Sunday, 1 = Monday, etc. +# Rate: start_hour.minutes-end_hour.minutes:period in seconds +# +#------------------------------------------------------------------------------ +# +#=================== Local ========================================================================= +# +#rate-code Day rate1 rate2 rate1 +#--------- --- --------------- --------------- --------------- +ra0 0 00.00-24.00:296 +ra0 1 00.00-08.00:200 08.00-18.00:75 18.00-00.00:200 +ra0 2 00.00-08.00:200 08.00-18.00:75 18.00-00.00:200 +ra0 3 00.00-08.00:200 08.00-18.00:75 18.00-00.00:200 +ra0 4 00.00-08.00:200 08.00-18.00:75 18.00-00.00:200 +ra0 5 00.00-08.00:200 08.00-18.00:75 18.00-00.00:200 +ra0 6 00.00-24.00:296 +# +#=================== Regional ========================================================================= +# +#rate-code Day rate1 rate2 rate1 +#--------- --- --------------- --------------- --------------- +ra1 0 00.00-24.00:100 +ra1 1 00.00-08.00:75 08.00-18.00:37 18.00-00.00:75 +ra1 2 00.00-08.00:75 08.00-18.00:37 18.00-00.00:75 +ra1 3 00.00-08.00:75 08.00-18.00:37 18.00-00.00:75 +ra1 4 00.00-08.00:75 08.00-18.00:37 18.00-00.00:75 +ra1 5 00.00-08.00:75 08.00-18.00:37 18.00-00.00:75 +ra1 6 00.00-24.00:100 +# +#=================== National ========================================================================= +# +#rate-code Day rate1 rate2 rate1 +#--------- --- --------------- --------------- --------------- +ra2 0 00.00-24.00:100 +ra2 1 00.00-08.00:71 08.00-18.00:37 18.00-00.00:71 +ra2 2 00.00-08.00:71 08.00-18.00:37 18.00-00.00:71 +ra2 3 00.00-08.00:71 08.00-18.00:37 18.00-00.00:71 +ra2 4 00.00-08.00:71 08.00-18.00:37 18.00-00.00:71 +ra2 5 00.00-08.00:71 08.00-18.00:37 18.00-00.00:71 +ra2 6 00.00-24.00:100 +#================== EOF ============================================================================================================ diff --git a/etc/isdn/isdnd.rc.sample b/etc/isdn/isdnd.rc.sample new file mode 100644 index 0000000..6681ed3 --- /dev/null +++ b/etc/isdn/isdnd.rc.sample @@ -0,0 +1,257 @@ +#------------------------------------------------------------------------------ +# +# example of a configuration file for the isdn daemon +# --------------------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Tue Jan 19 16:30:12 1999] +# +# NOTICE: +# ======= +# This configuration file is an EXAMPLE only and MUST be edited +# carefully to get the desired results! +# +# Please read the "isdnd.rc" manual page (execute "man isdnd.rc") +# for reference ! +# +#------------------------------------------------------------------------------ + +#============================================================================== +# SYSTEM section: isdnd global configuration parameters +#============================================================================== +system + +# accounting +# ---------- + +acctall = on # generate info for everything +acctfile = /var/log/isdnd.acct # name & location of accounting file +useacctfile = yes # generate accouting info to file + +# monitor +# ------- + +monitor-allowed = no # global switch: monitor on/off +monitor-port = 451 # default monitor TCP port + +# Monitor rights are granted due to the most specific host/net spec, i.e. in +# the example below host 192.168.1.2 will have the rights specified on that +# line, even so it belongs to net 192.168.1.0/24 as well. +# +# A monitor specification may either be: +# +# - the name of a local (UNIX-domain) socket; this MUST start with a "/" +monitor = "/var/run/isdn-monitor" +monitor-access = fullcmd +monitor-access = channelstate, logevents +monitor-access = callin, callout +# +# - a dotted-quad host spec +monitor = "192.168.1.2" +monitor-access = restrictedcmd, channelstate, callin, callout +# +# - a dotted-quad net spec with "/len" (CIDR-style) netmask spec +monitor = "192.168.1.0/24" +monitor-access = restrictedcmd, channelstate, callin, callout +# +# - a resolveable host name +monitor = "rumolt" +monitor-access = restrictedcmd, channelstate, callin, callout +# +# - a resolveable net name with "/len" netmask (s.a.) appended +monitor = "up-vision-net/24" +monitor-access = restrictedcmd, channelstate, callin, callout + +# ratesfile +# --------- + +ratesfile = /etc/isdn/isdnd.rates # name & location of rates file + +# regular expression pattern matching +# ----------------------------------- + +#regexpr = "connected.*XXX" # look for matches in log messages +#regprog = connectXXX # execute program when match is found + +# realtime priority section +# ------------------------- + +rtprio = 25 # modify isdnd's process priority + +#============================================================================== +# entry section: IP over ISDN example - i call back the remote end +#============================================================================== +entry + +name = I4BIP # name for reference. This name will + # be used in the logfile to identfy + # this entry. + + # the network or telephone device + # the data traffic should be routed to: +usrdevicename = ipr # ipr, isp, tel, rbch +usrdeviceunit = 0 # unit number + + # the ISDN controller number to be + # used for this entry: +isdncontroller = 0 # contoller to use or -1 to use any +isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any + + # incoming only, outgoing only or both: +direction = inout # in, out, inout + + # numbers used to verify a DIAL IN: +local-phone-incoming = 321 # this is my number +remote-phone-incoming = 0123456789 # this one can call in + + # numbers used at DIAL OUT time: +local-phone-dialout = 321 # this is my number +remote-phone-dialout = 00123456789 # i call this remote number + + # in case i have several remote + # telephone numbers specified, this + # is used to specify which one is + # used next on dial fail or retry: +remdial-handling = first # first, last or next + + # what happenes if someone dials in: +dialin-reaction = callback # accept, reject, ignore, answer, callback + + # normal dialout or do i call back: +dialout-type = normal # normal / calledback + +callbackwait = 1 # no of secs to wait before calling back + + # type of protocol on the B-channel: + # hdlc must be specified for IP (the + # ipr and isp drivers), raw must be + # specified for telephone answering +b1protocol = hdlc # hdlc, raw + + # shorthold mode and idle time + # configuration: +ratetype = 0 # ratesfile entry to use +unitlength = 90 # unitlength to assume +unitlengthsrc = rate # none, rate, cmdl, conf, aocd +idletime-incoming = 120 # incoming call idle timeout +idletime-outgoing = 60 # outgoing call idle timeout +earlyhangup = 5 # time to hangup before an expected + # next charging unit will occur + + # retry and recovery parameters +dialretries = 3 # # of dial retries +dialrandincr = off # random dial increment time +recoverytime = 5 # time to wait between 2 dial tries +usedown = off # set i/f down +downtries = 5 # retry cycles before set down +downtime = 30 # time to be in down before going up + +#connectprog = "ip-up" # run /etc/isdn/ip-up when an interface + # has established its network connection. + # example parameters are: + # /etc/isdn/ip-up -d isp0 -f up -a 192.110.12.14 +#disconnectprog = "ip-down" # like connectprog, but run after the connection + # is closed (ISDN layer down). The actual + # interface address might not be known + # any more. example parameters are: + # /etc/isdn/ip-up -d isp0 -f down -a 0.0.0.0 + +#============================================================================== +# entry section: IP over ISDN example - i am called back by the remote end +#============================================================================== +entry + +name = I4BIP1 # name for reference + +usrdevicename = ipr # ipr, tel, rbch +usrdeviceunit = 1 # unit number + +isdncontroller = 0 # contoller to use or -1 to use any +isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any + + # numbers used to DIAL OUT +remote-phone-dialout = 00401234567 # remote number to dial +local-phone-dialout = 38 # our number to tell remote + + # numbers used to verify at DIAL IN +local-phone-incoming = 38 # we take calls for this local number +remote-phone-incoming = 00401234567 # we take calls from this remote machine + +b1protocol = hdlc # hdlc, raw + +ratetype = 0 # city +unitlength = 90 # default unit length +earlyhangup = 5 # safety zone +unitlengthsrc = aocd # none, rate, cmdl, conf, aocd + +dialin-reaction = accept # accept, reject, ignore, anwer, callback + +dialout-type = calledback # normal or calledback + +dialretries = 3 +recoverytime = 3 +calledbackwait = 20 +dialrandincr = off + +usedown = off +downtries = 2 +downtime = 30 + +idletime-incoming = 300 +idletime-outgoing = 30 + +#============================================================================== +# entry section: answering machine example +#============================================================================== +entry + +name = I4BTEL # name for reference +usrdevicename = tel # ipr, tel, rbch +usrdeviceunit = 0 # unit number + +isdncontroller = 0 # contoller to use or -1 to use any +isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any + + # numbers used to verify at DIAL IN +local-phone-incoming = 456 # this is my number +remote-phone-incoming = * # anyone can call in + +dialin-reaction = answer # accept, reject, ignore, answer + +answerprog = answer # program to run + +b1protocol = raw # hdlc, raw + +idletime-incoming = 5 # 5 seconds idle timeout + +#======================================================================= +# entry section: PPP example +#====================================================================== +entry +name = I4BPPP +usrdevicename = isp +usrdeviceunit = 0 +isdncontroller = 0 +isdnchannel = -1 +local-phone-incoming = 1234 +remote-phone-incoming = 5678 +local-phone-dialout = 1234 +remote-phone-dialout = 5678 +remdial-handling = first +dialin-reaction = accept +dialout-type = normal +b1protocol = hdlc +idletime-incoming = 240 +idletime-outgoing = 30 +ratetype = 0 +unitlength = 90 +unitlengthsrc = rate +dialretries = 3 +dialrandincr = on +recoverytime = 25 +usedown = off +downtries = 2 +downtime = 30 + +# EOF ######################################################################### diff --git a/etc/isdn/isdntel.alias.sample b/etc/isdn/isdntel.alias.sample new file mode 100644 index 0000000..c06bc19 --- /dev/null +++ b/etc/isdn/isdntel.alias.sample @@ -0,0 +1,21 @@ +#--------------------------------------------------------------------------- +# +# alias file for the isdntel(1) application +# ----------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Fri Dec 18 18:06:03 1998] +# +# -hm cleanup for release +# +# +# the format is simple: the number beginning in column one followed +# by one or more spaces or tabs. The rest of the line is taken as +# and alias string for the number. Comment lines start with a "#". +# +#--------------------------------------------------------------------------- +123 alias for 123 +456 alias for 456 +789 alias for 789 + diff --git a/etc/isdn/isdntel.sh b/etc/isdn/isdntel.sh new file mode 100755 index 0000000..14f528a --- /dev/null +++ b/etc/isdn/isdntel.sh @@ -0,0 +1,98 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# isdn telephone answering +# ------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Thu May 20 11:45:04 1999] +# +#--------------------------------------------------------------------------- +#FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS +#LIBDIR=/usr/local/lib/isdn +#FreeBSD 3.1 and up +LIBDIR=/usr/share/isdn + +VARDIR=/var/isdn +DEVICE=/dev/i4btel0 + +# sounds +MESSAGE=${LIBDIR}/msg.al +BEEP=${LIBDIR}/beep.al + +# dd options +SKIP=25 + +# max message size +MAXMSIZ=100 + +# src and dst telephone numbers +src= +dst= + +# current date +DATE=`date` + +# check if directory exists +if [ ! -d "${VARDIR}" ] +then + mkdir ${VARDIR} +fi + +# get options +if ! set -- `/usr/bin/getopt D:d:s: $*`; then + echo "usage2: play -D device -d <dest-telno> -s <src-telno>" + exit 1 +fi + +# process options +for i ; do + case $i in + -D) + DEVICE=$2; shift; shift; + ;; + -d) + dst=$2; shift; shift; + ;; + -s) + src=$2; shift; shift; + ;; + --) + shift; break; + ;; + esac +done + +# this is a __MUST__ in order to use the fullscreen inteface !!! + +FILEDATE=`date \+%y%m%d%H%M%S` + +# echo message to phone +if [ -r "${MESSAGE}" ]; then + /bin/dd of=${DEVICE} if=${MESSAGE} bs=2k >/dev/null 2>&1 +fi + +# echo beep to phone +if [ -r "${BEEP}" ]; then + /bin/dd of=${DEVICE} if=${BEEP} bs=2k >/dev/null 2>&1 +fi + +# start time +START=`date \+%s` + +# get message from caller +/bin/dd if=${DEVICE} of=${VARDIR}/${FILEDATE}-${dst}-${src} skip=${SKIP} bs=2k count=${MAXMSIZ} >/dev/null 2>&1 + +# end time +END=`date \+%s` + +# duration +TIME=`expr ${END} - ${START}` + +# save recorded message +if [ -r "${VARDIR}/${FILEDATE}-${dst}-${src}" ]; then + mv ${VARDIR}/${FILEDATE}-${dst}-${src} ${VARDIR}/${FILEDATE}-${dst}-${src}-${TIME} +fi + +exit 0 diff --git a/etc/isdn/record b/etc/isdn/record new file mode 100755 index 0000000..61591fb --- /dev/null +++ b/etc/isdn/record @@ -0,0 +1,99 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# answer and record message script for i4b isdnd +# ---------------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Thu May 20 11:45:10 1999] +# +#--------------------------------------------------------------------------- +VARDIR=/var/isdn + +#FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS +#LIBDIR=/usr/local/lib/isdn +#FreeBSD 3.1 and up +LIBDIR=/usr/share/isdn + +LOGFILE=/tmp/answer.log +NCALLFILE=${VARDIR}/ncall +DATE=`date +%d%H` +DF=0 +dF=0 +sF=0 + +if ! set -- `getopt D:d:s: $*`; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +for i ; do + case ${i} in + -D) + DEVICE=$2 + DF=1 + shift + shift + ;; + -d) + DEST=$2 + dF=1 + shift + shift + ;; + -s) + SRC=$2 + sF=1 + shift + shift + ;; + --) + shift + break + ;; + esac +done + +echo "" >>${LOGFILE} + +if [ "${DF}" -eq 0 -o "${dF}" -eq 0 -o "${sF}" -eq 0 ]; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +echo "answer: device ${DEVICE} destination ${DEST} source ${SRC} " >>${LOGFILE} + +if [ -r "${NCALLFILE}" ]; then + NCALL=`cat ${NCALLFILE}` +else + NCALL=0 +fi + +NCALL=`printf "%.4d" ${NCALL}` + +echo Date: `date` >> ${VARDIR}/I.${NCALL}.${DATE} + +if [ -n "${SRC}" ]; then + echo "From: ${SRC}" >> ${VARDIR}/I.${NCALL}.${DATE} +fi + +if [ -n "${DEST}" ]; then + echo "To: ${DEST}" >> ${VARDIR}/I.${NCALL}.${DATE} +fi + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi + +if [ -r "${LIBDIR}/msg.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/msg.al bs=2k >/dev/null 2>&1 +fi + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi + +dd if=${DEVICE} of=${VARDIR}/R.${NCALL}.${DATE} bs=2k >/dev/null 2>&1 + +echo `expr $NCALL + 1` >$NCALLFILE diff --git a/etc/isdn/tell b/etc/isdn/tell new file mode 100755 index 0000000..047c834 --- /dev/null +++ b/etc/isdn/tell @@ -0,0 +1,87 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# tell called and calling numbers answer script for i4b isdnd +# ----------------------------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Thu May 20 11:45:15 1999] +# +#--------------------------------------------------------------------------- +VARDIR=/var/isdn + +#FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS +#LIBDIR=/usr/local/lib/isdn +#FreeBSD 3.1 and up +LIBDIR=/usr/share/isdn + +LOGFILE=/tmp/answer.log +NCALLFILE=${VARDIR}/ncall +DATE=`date +%d%H` +DF=0 +dF=0 +sF=0 + +if ! set -- `getopt D:d:s: $*`; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +for i ; do + case ${i} in + -D) + DEVICE=$2 + DF=1 + shift + shift + ;; + -d) + DEST=$2 + dF=1 + shift + shift + ;; + -s) + SRC=$2 + sF=1 + shift + shift + ;; + --) + shift + break + ;; + esac +done + +echo "" >>${LOGFILE} + +if [ "${DF}" -eq 0 -o "${dF}" -eq 0 -o "${sF}" -eq 0 ]; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +echo "answer: device ${DEVICE} destination ${DEST} source ${SRC} " >>${LOGFILE} + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi + +# tell the caller the number he is calling from + +POS=1 +LENGTH=`expr ${SRC} : '.*'` + +while : ; do + DIGIT=`echo ${SRC} | cut -c ${POS}` + /bin/dd of=${DEVICE} if=${LIBDIR}/${DIGIT}.al bs=2k >/dev/null 2>&1 + POS=`expr ${POS} + 1` + if [ "${POS}" -gt "${LENGTH}" ]; then + break + fi +done + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi diff --git a/etc/isdn/tell-record b/etc/isdn/tell-record new file mode 100755 index 0000000..ae4c8176 --- /dev/null +++ b/etc/isdn/tell-record @@ -0,0 +1,89 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# tell called and calling numbers answer script for i4b isdnd +# ----------------------------------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Tue Oct 31 10:59:49 2000] +# +#--------------------------------------------------------------------------- +VARDIR=/var/isdn + +#FreeBSD < 3.1, NetBSD, OpenBSD, BSD/OS +#LIBDIR=/usr/local/lib/isdn +#FreeBSD 3.1 and up +LIBDIR=/usr/share/isdn + +LOGFILE=/tmp/answer.log +NCALLFILE=${VARDIR}/ncall +DATE=`date +%d%H` +DF=0 +dF=0 +sF=0 + +if ! set -- `getopt D:d:s: $*`; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +for i ; do + case ${i} in + -D) + DEVICE=$2 + DF=1 + shift + shift + ;; + -d) + DEST=$2 + dF=1 + shift + shift + ;; + -s) + SRC=$2 + sF=1 + shift + shift + ;; + --) + shift + break + ;; + esac +done + +echo "" >>${LOGFILE} + +if [ "${DF}" -eq 0 -o "${dF}" -eq 0 -o "${sF}" -eq 0 ]; then + echo 'Usage: answer -D device -d destination -s source' + exit 1 +fi + +echo "answer: device ${DEVICE} destination ${DEST} source ${SRC} " >>${LOGFILE} + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi + +# tell the caller the number he is calling from + +POS=1 +LENGTH=`expr ${SRC} : '.*'` + +while : ; do + DIGIT=`echo ${SRC} | cut -c ${POS}` + /bin/dd of=${DEVICE} if=${LIBDIR}/${DIGIT}.al bs=2k >/dev/null 2>&1 + POS=`expr ${POS} + 1` + if [ "${POS}" -gt "${LENGTH}" ]; then + break + fi +done + +if [ -r "${LIBDIR}/beep.al" ]; then + dd of=${DEVICE} if=${LIBDIR}/beep.al bs=2k >/dev/null 2>&1 +fi + +dd if=${DEVICE} of=${VARDIR}/recorded.msg bs=2k >/dev/null 2>&1 diff --git a/etc/isdn/unknown_incoming b/etc/isdn/unknown_incoming new file mode 100755 index 0000000..9e26a64 --- /dev/null +++ b/etc/isdn/unknown_incoming @@ -0,0 +1,79 @@ +#!/bin/sh +#--------------------------------------------------------------------------- +# +# unknown_incoming - script for isdnd +# ----------------------------------- +# +# $FreeBSD$ +# +# last edit-date: [Wed Jan 10 13:40:36 2001] +# +# This script may be configured to be called by isdnd when an +# unknown incoming call is received. In case the destination +# telephone number is available, it sends mail with the time, +# source and destination numbers to a configurable address. +# +# For this to work, and entry like this: +# +# regexpr = "<unknown> incoming call from" +# regprog = unknown_incoming +# +# is needed in the system section of /etc/isdn/isdnd.rc. +# +# This script has to be configured to the sites needs, look +# for the comment lines start with "configure:" +# +#--------------------------------------------------------------------------- +# +# configure: who shall receive the mail +mailaddr=root +# +from=`echo $* | awk '{print $6}'` +to=`echo $* | awk '{print $8}'` +test=`echo $* | awk '{print $9}'` +ctrl=`echo $* | awk '{print $10}'` +date=`date "+%b %d"` +time=`date "+%H:%M"` +mach=`hostname` + +# configure: list of destination numbers to ignore +case "$from" in + "NotAvailable" ) exit 0 ;; + "00401234567"* ) exit 0 ;; + "00407654321" ) exit 0 ;; +esac + +# configure: how to name the line on which this was received +if [ $test = "ctrl" ] +then + case "$ctrl" in + "1") + line="PBX 1" + ;; + "2") + line="PBX 2" + ;; + *) + line="controller is $ctrl" + ;; + esac +else + line="test is $test, controller is $ctrl" +fi + +cat << ENDOFDATA | mail -s "isdnd: unknown incoming telephone call" $mailaddr + +Unknown incoming telephone call recognized: + + Date: $date + Time: $time + Line: $line + From: $from + To: $to + + Sincerly yours, + the isdnd on $mach + +ENDOFDATA + +exit 0 diff --git a/etc/kerberosIV/README b/etc/kerberosIV/README new file mode 100644 index 0000000..e57916c --- /dev/null +++ b/etc/kerberosIV/README @@ -0,0 +1,36 @@ +# $FreeBSD$ +# @(#)README 5.1 (Berkeley) 6/30/90 + +Notes about the contents of the /etc/kerberosIV directory: + +The file master_key contains a copy of the master key under which the +entire Kerberos database is encrypted. Disclosing this key would be bad +news. The reason it is stored in the filesystem is because the following +programs need to inspect or modify the kerberos database, and so the key +must be available for them, (or else it would have to be typed in by +hand): + - kerberos (the server itself) + - registerd (for new user registration) + - kpasswdd (for changing passwords) + +The srvtab file contains the encryption keys for each service on the local +host. Any host offering network services would have a key here, although +many such files can be used. + +The principal.* files comprise the Kerberos database itself, and contain +keys for all principles, and should not be world-readable. + +The kerberos.conf file contains the configuration for this machine: + - which realm I'm in + - which servers I should talk to for this realm + +The kerberos.realms file contains the name of Kerberos servers for +various (sub)domains. + +Kerberos log information it placed in /var/log/kerberos.log +(see rc.local to change it) + +The register_keys directory contains a set of files (all of which begin +with "."), each of which contains a des key used for registering new users +with the system. It is used only by the "registerd" program, and only on +a Kerberos server host. diff --git a/etc/kerberosIV/krb.conf b/etc/kerberosIV/krb.conf new file mode 100644 index 0000000..11ac1ac --- /dev/null +++ b/etc/kerberosIV/krb.conf @@ -0,0 +1,9 @@ +CS.BERKELEY.EDU +CS.BERKELEY.EDU okeeffe.berkeley.edu +ATHENA.MIT.EDU kerberos.mit.edu +ATHENA.MIT.EDU kerberos-1.mit.edu +ATHENA.MIT.EDU kerberos-2.mit.edu +ATHENA.MIT.EDU kerberos-3.mit.edu +LCS.MIT.EDU kerberos.lcs.mit.edu +TELECOM.MIT.EDU bitsy.mit.edu +ARC.NASA.GOV trident.arc.nasa.gov diff --git a/etc/kerberosIV/krb.realms b/etc/kerberosIV/krb.realms new file mode 100644 index 0000000..1f1bec5 --- /dev/null +++ b/etc/kerberosIV/krb.realms @@ -0,0 +1,3 @@ +.berkeley.edu CS.BERKELEY.EDU +.MIT.EDU ATHENA.MIT.EDU +.mit.edu ATHENA.MIT.EDU diff --git a/etc/locale.alias b/etc/locale.alias new file mode 100644 index 0000000..da79333 --- /dev/null +++ b/etc/locale.alias @@ -0,0 +1,2 @@ +ASCII en_US.ISO_8859-1 +US-ASCII en_US.ISO_8859-1 diff --git a/etc/login.access b/etc/login.access new file mode 100644 index 0000000..8d20467 --- /dev/null +++ b/etc/login.access @@ -0,0 +1,46 @@ +# $FreeBSD$ +# +# Login access control table. +# +# When someone logs in, the table is scanned for the first entry that +# matches the (user, host) combination, or, in case of non-networked +# logins, the first entry that matches the (user, tty) combination. The +# permissions field of that table entry determines whether the login will +# be accepted or refused. +# +# Format of the login access control table is three fields separated by a +# ":" character: +# +# permission : users : origins +# +# The first field should be a "+" (access granted) or "-" (access denied) +# character. The second field should be a list of one or more login names, +# group names, or ALL (always matches). The third field should be a list +# of one or more tty names (for non-networked logins), host names, domain +# names (begin with "."), host addresses, internet network numbers (end +# with "."), ALL (always matches) or LOCAL (matches any string that does +# not contain a "." character). If you run NIS you can use @netgroupname +# in host or user patterns. +# +# The EXCEPT operator makes it possible to write very compact rules. +# +# The group file is searched only when a name does not match that of the +# logged-in user. Only groups are matched in which users are explicitly +# listed: the program does not look at a user's primary group id value. +# +############################################################################## +# +# Disallow console logins to all but a few accounts. +# +#-:ALL EXCEPT wheel shutdown sync:console +# +# Disallow non-local logins to privileged accounts (group wheel). +# +#-:wheel:ALL EXCEPT LOCAL .win.tue.nl +# +# Some accounts are not allowed to login from anywhere: +# +#-:wsbscaro wsbsecr wsbspac wsbsym wscosor wstaiwde:ALL +# +# All other accounts are allowed to login from anywhere. +# diff --git a/etc/login.conf b/etc/login.conf new file mode 100644 index 0000000..74ded6f --- /dev/null +++ b/etc/login.conf @@ -0,0 +1,313 @@ +# login.conf - login class capabilities database. +# +# Remember to rebuild the database after each change to this file: +# +# cap_mkdb /etc/login.conf +# +# This file controls resource limits, accounting limits and +# default user environment settings. +# +# $FreeBSD$ +# + +# Default settings effectively disable resource limits, see the +# examples below for a starting point to enable them. + +# defaults +# These settings are used by login(1) by default for classless users +# Note that entries like "cputime" set both "cputime-cur" and "cputime-max" + +default:\ + :passwd_format=md5:\ + :copyright=/etc/COPYRIGHT:\ + :welcome=/etc/motd:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\ + :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin ~/bin:\ + :nologin=/var/run/nologin:\ + :cputime=unlimited:\ + :datasize=unlimited:\ + :stacksize=unlimited:\ + :memorylocked=unlimited:\ + :memoryuse=unlimited:\ + :filesize=unlimited:\ + :coredumpsize=unlimited:\ + :openfiles=unlimited:\ + :maxproc=unlimited:\ + :sbsize=unlimited:\ + :priority=0:\ + :ignoretime@:\ + :umask=022: + + +# +# A collection of common class names - forward them all to 'default' +# (login would normally do this anyway, but having a class name +# here suppresses the diagnostic) +# +standard:\ + :tc=default: +xuser:\ + :tc=default: +staff:\ + :tc=default: +daemon:\ + :tc=default: +news:\ + :tc=default: +dialer:\ + :tc=default: + +# +# Root can always login +# +# N.B. login_getpwclass(3) will use this entry for the root account, +# in preference to 'default'. +root:\ + :ignorenologin:\ + :tc=default: + +# +# Russian Users Accounts. Setup proper environment variables. +# +russian:Russian Users Accounts:\ + :charset=KOI8-R:\ + :lang=ru_RU.KOI8-R:\ + :tc=default: + + +###################################################################### +###################################################################### +## +## Example entries +## +###################################################################### +###################################################################### + +## Example defaults +## These settings are used by login(1) by default for classless users +## Note that entries like "cputime" set both "cputime-cur" and "cputime-max" +# +#default:\ +# :cputime=infinity:\ +# :datasize-cur=22M:\ +# :stacksize-cur=8M:\ +# :memorylocked-cur=10M:\ +# :memoryuse-cur=30M:\ +# :filesize=infinity:\ +# :coredumpsize=infinity:\ +# :maxproc-cur=64:\ +# :openfiles-cur=64:\ +# :priority=0:\ +# :requirehome@:\ +# :umask=022:\ +# :tc=auth-defaults: +# +# +## +## standard - standard user defaults +## +#standard:\ +# :copyright=/etc/COPYRIGHT:\ +# :welcome=/etc/motd:\ +# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :path=~/bin /bin /usr/bin /usr/local/bin:\ +# :manpath=/usr/share/man /usr/local/man:\ +# :nologin=/var/run/nologin:\ +# :cputime=1h30m:\ +# :datasize=8M:\ +# :stacksize=2M:\ +# :memorylocked=4M:\ +# :memoryuse=8M:\ +# :filesize=8M:\ +# :coredumpsize=8M:\ +# :openfiles=24:\ +# :maxproc=32:\ +# :priority=0:\ +# :requirehome:\ +# :passwordtime=90d:\ +# :umask=002:\ +# :ignoretime@:\ +# :tc=default: +# +# +## +## users of X (needs more resources!) +## +#xuser:\ +# :manpath=/usr/share/man /usr/X11R6/man /usr/local/man:\ +# :cputime=4h:\ +# :datasize=12M:\ +# :stacksize=4M:\ +# :filesize=8M:\ +# :memoryuse=16M:\ +# :openfiles=32:\ +# :maxproc=48:\ +# :tc=standard: +# +# +## +## Staff users - few restrictions and allow login anytime +## +#staff:\ +# :ignorenologin:\ +# :ignoretime:\ +# :requirehome@:\ +# :accounted@:\ +# :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :umask=022:\ +# :tc=standard: +# +# +## +## root - fallback for root logins +## +#root:\ +# :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :cputime=infinity:\ +# :datasize=infinity:\ +# :stacksize=infinity:\ +# :memorylocked=infinity:\ +# :memoryuse=infinity:\ +# :filesize=infinity:\ +# :coredumpsize=infinity:\ +# :openfiles=infinity:\ +# :maxproc=infinity:\ +# :memoryuse-cur=32M:\ +# :maxproc-cur=64:\ +# :openfiles-cur=1024:\ +# :priority=0:\ +# :requirehome@:\ +# :umask=022:\ +# :tc=auth-root-defaults: +# +# +## +## Settings used by /etc/rc +## +#daemon:\ +# :coredumpsize@:\ +# :coredumpsize-cur=0:\ +# :datasize=infinity:\ +# :datasize-cur@:\ +# :maxproc=512:\ +# :maxproc-cur@:\ +# :memoryuse-cur=64M:\ +# :memorylocked-cur=64M:\ +# :openfiles=1024:\ +# :openfiles-cur@:\ +# :stacksize=16M:\ +# :stacksize-cur@:\ +# :tc=default: +# +# +## +## Settings used by news subsystem +## +#news:\ +# :path=/usr/local/news/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\ +# :cputime=infinity:\ +# :filesize=128M:\ +# :datasize-cur=64M:\ +# :stacksize-cur=32M:\ +# :coredumpsize-cur=0:\ +# :maxmemorysize-cur=128M:\ +# :memorylocked=32M:\ +# :maxproc=128:\ +# :openfiles=256:\ +# :tc=default: +# +# +## +## The dialer class should be used for a dialup PPP/SLIP accounts +## Welcome messages/news suppressed +## +#dialer:\ +# :hushlogin:\ +# :requirehome@:\ +# :cputime=unlimited:\ +# :filesize=2M:\ +# :datasize=2M:\ +# :stacksize=4M:\ +# :coredumpsize=0:\ +# :memoryuse=4M:\ +# :memorylocked=1M:\ +# :maxproc=16:\ +# :openfiles=32:\ +# :tc=standard: +# +# +## +## Site full-time 24/7 PPP/SLIP connections +## - no time accounting, restricted to access via dialin lines +## +#site:\ +# :ignoretime:\ +# :passwordtime@:\ +# :refreshtime@:\ +# :refreshperiod@:\ +# :sessionlimit@:\ +# :autodelete@:\ +# :expireperiod@:\ +# :graceexpire@:\ +# :gracetime@:\ +# :warnexpire@:\ +# :warnpassword@:\ +# :idletime@:\ +# :sessiontime@:\ +# :daytime@:\ +# :weektime@:\ +# :monthtime@:\ +# :warntime@:\ +# :accounted@:\ +# :tc=dialer:\ +# :tc=staff: +# +# +## +## Example standard accounting entries for subscriber levels +## +# +#subscriber|Subscribers:\ +# :accounted:\ +# :refreshtime=180d:\ +# :refreshperiod@:\ +# :sessionlimit@:\ +# :autodelete=30d:\ +# :expireperiod=180d:\ +# :graceexpire=7d:\ +# :gracetime=10m:\ +# :warnexpire=7d:\ +# :warnpassword=7d:\ +# :idletime=30m:\ +# :sessiontime=4h:\ +# :daytime=6h:\ +# :weektime=40h:\ +# :monthtime=120h:\ +# :warntime=4h:\ +# :tc=standard: +# +# +## +## Subscriber accounts. These accounts have their login times +## accounted and have access limits applied. +## +#subppp|PPP Subscriber Accounts:\ +# :tc=dialer:\ +# :tc=subscriber: +# +# +#subslip|SLIP Subscriber Accounts:\ +# :tc=dialer:\ +# :tc=subscriber: +# +# +#subshell:Shell Subscriber Accounts:\ +# :tc=subscriber: +# +## +## If you want some of the accounts to use traditional UNIX DES based +## password hashes. +## +#des_users:\ +# :password_format=des:\ +# :tc=default: diff --git a/etc/mail/Makefile b/etc/mail/Makefile new file mode 100644 index 0000000..2ddd2f1 --- /dev/null +++ b/etc/mail/Makefile @@ -0,0 +1,153 @@ +# +# $FreeBSD$ +# +# This Makefile provides an easy way to generate the configuration +# file and database maps for the sendmail(8) daemon. +# +# The user-driven targets are: +# +# all - Build cf, maps and aliases +# cf - Build the .cf file from .mc file +# maps - Build the feature maps +# aliases - Build the sendmail aliases +# install - Install the .cf file as /etc/mail/sendmail.cf +# start - Start the sendmail daemon with the flags defined in +# /etc/defaults/rc.conf or /etc/rc.conf +# stop - Stop the sendmail daemon +# restart - Restart the sendmail daemon +# +# Calling `make' will generate the updated versions when either the +# aliases or one of the map files were changed. +# +# A `make install` is only necessary after modifying the .mc file. In +# this case one would normally also call `make restart' to allow the +# running sendmail to pick up the changes as well. +# +# ------------------------------------------------------------------------ +# +# This makefile uses `freebsd.mc' as the default .mc file. This can +# be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.: +# +# SENDMAIL_MC=/etc/mail/myconfig.mc +# +# ------------------------------------------------------------------------ +# +# The Makefile knows about the following maps: +# access, bitdomain, domaintable, genericstable, mailertable, userdb, +# uucpdomain, virtusertable +# + +SENDMAIL_MC?= freebsd.mc +INSTALL_CF= ${SENDMAIL_MC:R}.cf + +SENDMAIL_ALIASES?= /etc/mail/aliases + +# +# This is the directory where the sendmail configuration files are +# located. +# +.if exists(/usr/share/sendmail/cf) +SENDMAIL_CF_DIR?= /usr/share/sendmail/cf +.elif exists(/usr/src/contrib/sendmail/cf) +SENDMAIL_CF_DIR?= /usr/src/contrib/sendmail/cf +.endif + +# +# The pid is used to stop and restart the running daemon. +# +SENDMAIL_PIDFILE?= /var/run/sendmail.pid + +# +# Some useful programs we need. +# +SENDMAIL?= /usr/sbin/sendmail +MAKEMAP?= /usr/sbin/makemap +M4?= /usr/bin/m4 +KILL?= /bin/kill + +# Set a reasonable default +.MAIN: all + +# +# ------------------------------------------------------------------------ +# +# The Makefile picks up the list of files from SENDMAIL_MAP_SRC and +# stores the matching .db filenames in SENDMAIL_MAP_OBJ if the file +# exists in the current directory. +# +SENDMAIL_MAP_SRC+= mailertable domaintable bitdomain uucpdomain \ + genericstable virtusertable access userdb +SENDMAIL_MAP_OBJ= + +.for _f in ${SENDMAIL_MAP_SRC} +.if exists(${_f}) +SENDMAIL_MAP_OBJ+= ${_f}.db +.endif +.endfor + +# +# The makemap command is used to generate a hashed map from the textfile. +# +.for _f in ${SENDMAIL_MAP_SRC} +.if (exists(${_f}.sample) && !exists(${_f})) +${_f}: ${_f}.sample + sed -e 's/^/#/' < ${.OODATE} > ${.TARGET} +.endif + +${_f}.db: ${_f} + ${MAKEMAP} hash ${.TARGET} < ${.OODATE} +.endfor + +# +# The .cf file needs to be recreated if the templates were modified. +# +M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print + +# +# M4(1) is used to generate the .cf file from the .mc file. +# +.SUFFIXES: .cf .mc + +.mc.cf: ${M4FILES} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_CF_DIR}/m4/cf.m4 \ + ${@:R}.mc > ${.TARGET} + +# +# Aliases are handled separately since they normally reside in /etc +# and can be rebuild without the help of makemap. +# +${SENDMAIL_ALIASES}.db: ${SENDMAIL_ALIASES} + ${SENDMAIL} -bi + +# +# ------------------------------------------------------------------------ +# + +all: cf maps aliases + +clean: + +depend: + +cf: ${INSTALL_CF} + +maps: ${SENDMAIL_MAP_OBJ} + +aliases: ${SENDMAIL_ALIASES}.db + +install: ${INSTALL_CF} + ${INSTALL} -c -m ${SHAREMODE} ${INSTALL_CF} /etc/mail/sendmail.cf + +start: + (. /etc/defaults/rc.conf; source_rc_confs; \ + if [ "$${sendmail_enable}" = "YES" -a -r /etc/mail/sendmail.cf ];\ + then \ + ${SENDMAIL} $${sendmail_flags}; \ + fi \ + ) + +stop: + ${KILL} -TERM `head -1 ${SENDMAIL_PIDFILE}` + +restart: + ${KILL} -HUP `head -1 ${SENDMAIL_PIDFILE}` diff --git a/etc/mail/README b/etc/mail/README new file mode 100644 index 0000000..141744f --- /dev/null +++ b/etc/mail/README @@ -0,0 +1,16 @@ +# $FreeBSD$ + + Filtering out SPAM from your site + +Sendmail now includes excellent tools to block spam. These tools are +available as FEATUREs that you can add to your site's .mc file. Proper use +of these FEATUREs will prevent spammer from using your site as a relay as +well as significantly decrease the amount of spam that arrives at your +site. No set of anti-spam tools will block all spam without blocking some +portion of legitimate mail as well. Therefore, these FEATUREs are designed +to prevent as much spam as possible without blocking legitimate mail. + +These tools are discussed in /usr/share/sendmail/cf/README. Read the +section entitled "ANTI-SPAM CONFIGURATION CONTROL". Example usage and +additional tools can be found in /usr/share/sendmail/cf/cf/knecht.mc. + diff --git a/etc/mail/access.sample b/etc/mail/access.sample new file mode 100644 index 0000000..81c7c3f --- /dev/null +++ b/etc/mail/access.sample @@ -0,0 +1,10 @@ +# $FreeBSD$ +# +# Mail relay access control list. Default is to reject mail unless the +# destination is local, or listed in /etc/mail/local-host-names +# +cyberspammer.com 550 We don't accept mail from spammers +FREE.STEALTH.MAILER@ 550 We don't accept mail from spammers +another.source.of.spam REJECT +okay.cyberspammer.com OK +128.32 RELAY diff --git a/etc/mail/aliases b/etc/mail/aliases new file mode 100644 index 0000000..fe238b2 --- /dev/null +++ b/etc/mail/aliases @@ -0,0 +1,67 @@ +# $FreeBSD$ +# @(#)aliases 5.3 (Berkeley) 5/24/90 +# +# Aliases in this file will NOT be expanded in the header from +# Mail, but WILL be visible over networks. +# +# >>>>>>>>>> The program "newaliases" must be run after +# >> NOTE >> this file is updated for any changes to +# >>>>>>>>>> show through to sendmail. +# +# +# See also RFC 2142, `MAILBOX NAMES FOR COMMON SERVICES, ROLES +# AND FUNCTIONS', May 1997 + +# Pretty much everything else in this file points to "root", so +# you would do well in either reading roots mailbox or forwarding +# roots email from here. + +# root: me@my.domain + +# Basic system aliases -- these MUST be present +MAILER-DAEMON: postmaster +postmaster: root + +# General redirections for pseudo accounts +bin: root +bind: root +daemon: root +games: root +kmem: root +man: root +news: root +nobody: root +operator: root +pop: root +system: root +toor: root +tty: root +usenet: news +uucp: root +xten: root + +# Well-known aliases -- these should be filled in! +# manager: +# dumper: + +# BUSINESS-RELATED MAILBOX NAMES +# info: +# marketing: +# sales: +# support: + +# NETWORK OPERATIONS MAILBOX NAMES +abuse: root +# noc: root +security: root + +# SUPPORT MAILBOX NAMES FOR SPECIFIC INTERNET SERVICES +ftp: root +ftp-bugs: ftp +# hostmaster: root +# webmaster: root +# www: webmaster + +# msgs: "| /usr/bin/msgs -s" +# bit-bucket: /dev/null +# dev-null: bit-bucket diff --git a/etc/mail/mailer.conf b/etc/mail/mailer.conf new file mode 100644 index 0000000..9009502 --- /dev/null +++ b/etc/mail/mailer.conf @@ -0,0 +1,8 @@ +# $FreeBSD$ +# +# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail +# +sendmail /usr/libexec/sendmail/sendmail +send-mail /usr/libexec/sendmail/sendmail +mailq /usr/libexec/sendmail/sendmail +newaliases /usr/libexec/sendmail/sendmail diff --git a/etc/mail/mailertable.sample b/etc/mail/mailertable.sample new file mode 100644 index 0000000..d2c45e0 --- /dev/null +++ b/etc/mail/mailertable.sample @@ -0,0 +1,7 @@ +# $FreeBSD$ +# +# List of domains (possibly wildcarded) and destination mailers +# +.my.domain xnet:%1.my.domain +uuhost1.my.domain suucp:uuhost1 +.bitnet smtp:relay.bit.net diff --git a/etc/mail/virtusertable.sample b/etc/mail/virtusertable.sample new file mode 100644 index 0000000..43e2bbb --- /dev/null +++ b/etc/mail/virtusertable.sample @@ -0,0 +1,11 @@ +# $FreeBSD$ +# +# Map one or all usernames at a source hostname to a specific (or the same) +# username at another target hostname. Remember to add the source hostname +# to /etc/mail/local-host-names so that sendmail will accept mail for the +# source hostname. +# +username@a.sample.hostname localuser +username@a.sample.hostname specificuser@a.possibly.different.hostname +@another.sample.hostname specificuser@a.possibly.different.hostname +@yet.another.sample.hostname %1@a.possibly.different.hostname diff --git a/etc/master.passwd b/etc/master.passwd new file mode 100644 index 0000000..87dd004 --- /dev/null +++ b/etc/master.passwd @@ -0,0 +1,17 @@ +# $FreeBSD$ +# +root::0:0::0:0:Charlie &:/root:/bin/csh +toor:*:0:0::0:0:Bourne-again Superuser:/root: +daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin +operator:*:2:5::0:0:System &:/:/sbin/nologin +bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/sbin/nologin +tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin +kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin +games:*:7:13::0:0:Games pseudo-user:/usr/games:/sbin/nologin +news:*:8:8::0:0:News Subsystem:/:/sbin/nologin +man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/sbin/nologin +bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin +uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico +xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin +pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin +nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin diff --git a/etc/minfree b/etc/minfree new file mode 100644 index 0000000..c873496 --- /dev/null +++ b/etc/minfree @@ -0,0 +1 @@ +2048 diff --git a/etc/modems b/etc/modems new file mode 100644 index 0000000..422c5ff --- /dev/null +++ b/etc/modems @@ -0,0 +1,34 @@ +# +# $FreeBSD$ +# @(#)modems 3/24/95 +# +# modems -- modem configuration data base file +# see tip(1), modems(5) +# +# dial_command AT command to dial up remote +# echo_off_command AT command to turn off command echo +# escape_guard_time Shroud escape sequence with specified delay (ms) +# escape_sequence Return to command escape sequence +# hangup_command AT command to hangup modem +# hw_flow_control Enable RTS/CTS flow control between DTE/DCE +# intercharacter_delay Delay between characters sent to modem when issuing +# commands +# intercommand_delay Minimum delay between commands to modem +# init_string AT command to initialize modem before dialing out +# lock_baud Use fixed DTE / DCE bit rate +# reset_delay Delay required by modem for reset +# + +sportster|st|US Robotics Sportster 14.4K:dial_command=ATDT%s\r:hangup_command=ATH\r:\ + :echo_off_command=ATE0\r:reset_command=AT&F1\r:\ + :init_string=AT&B1&H1&R2&C1&D2\r:\ + :escape_sequence=+++:hw_flow_control:lock_baud:intercharacter_delay#50:\ + :intercommand_delay#250:escape_guard_time#500:reset_delay#2000: + +mt932|multitech|mt|Multitech 932:dial_command=ATDT%s\r:hangup_command=ATH\r:\ + :echo_off_command=ATE0\r:reset_command=ATZ\r:\ + :init_string=AT$BA0$SB38400&E1&E4&E13&E15Q0V1X4E0S0=0\r:\ + :escape_sequence=+++:hw_flow_control:lock_baud:intercharacter_delay#50:\ + :intercommand_delay#250:escape_guard_time#500:reset_delay#2000: + +generic|Generic AT command modem (use defaults): diff --git a/etc/motd b/etc/motd new file mode 100644 index 0000000..5cad2d2 --- /dev/null +++ b/etc/motd @@ -0,0 +1,24 @@ +FreeBSD ?.?.? (UNKNOWN) + +Welcome to FreeBSD! + +Before seeking technical support, please use the following resources: + +o Security advisories and updated errata information for all releases are + at http://www.FreeBSD.org/releases/ - always consult the ERRATA section + for your release first as it's updated frequently. + +o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, + along with the mailing lists, can be searched by going to + http://www.FreeBSD.org/search/ If the doc distribution has + been installed, they're also available formatted in /usr/share/doc. + +If you still have a question or problem, please take the output of +`uname -a', along with any relevant error messages, and email it +as a question to the questions@FreeBSD.org mailing list. If you are +unfamiliar with FreeBSD's directory layout, please refer to the hier(7) +man page. If you are not familiar with man pages, type "man man". + +You may also use sysinstall(8) to re-enter the installation and +configuration utility. Edit /etc/motd to change this login announcement. + diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist new file mode 100644 index 0000000..b62ad7f --- /dev/null +++ b/etc/mtree/BSD.include.dist @@ -0,0 +1,96 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + arpa + .. + cam + scsi + .. + .. + dev + ppbus + .. + usb + .. + wi + .. + .. + g++ + std + .. + .. + isc + .. + isofs + cd9660 + .. + .. + machine + .. + msdosfs + .. + net + .. + netatalk + .. + netatm + .. + netgraph + .. + netinet + .. + netinet6 + .. + netipx + .. + netkey + .. + netnatm + .. + netncp + .. + netns + .. + nfs + .. + ntfs + .. + nwfs + .. + objc + .. + openssl + .. + pccard + .. + posix4 + .. + protocols + .. + readline + .. + rpc + .. + rpcsvc + .. + security + .. + ss + .. + sys + .. + ufs + ffs + .. + mfs + .. + ufs + .. + .. + vm + .. +.. diff --git a/etc/mtree/BSD.local.dist b/etc/mtree/BSD.local.dist new file mode 100644 index 0000000..c04f54a --- /dev/null +++ b/etc/mtree/BSD.local.dist @@ -0,0 +1,307 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + bin + .. + etc + rc.d + .. + .. + include + .. + info + .. + lib + perl5 + 5.6.0 + man + man3 + .. + .. + .. + site_perl + 5.6.0 + auto + .. + mach + auto + .. + .. + .. + .. + .. + .. + libdata + .. + libexec + .. + man +/set uname=man + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. + de_DE.ISO_8859-1 \ + uname=root + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. +/set uname=root + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + ja +/set uname=man + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. +/set uname=root + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + sbin + .. + share + aclocal + .. + dict + .. + doc + ja + .. + .. + emacs + site-lisp + .. + .. + examples + .. + misc + .. + nls + C + .. + af_ZA.ISO_8859-1 + .. + cs_CZ.ISO_8859-2 + .. + da_DK.ISO_8859-1 + .. + de_AT.ISO_8859-1 + .. + de_CH.ISO_8859-1 + .. + de_DE.ISO_8859-1 + .. + el_GR.ISO_8859-7 + .. + en_AU.ISO_8859-1 + .. + en_CA.ISO_8859-1 + .. + en_GB.ISO_8859-1 + .. + en_NZ.ISO_8859-1 + .. + en_US.ISO_8859-1 + .. + es_ES.ISO_8859-1 + .. + et_EE.ISO_8859-15 + .. + fi_FI.ISO_8859-1 + .. + fr_BE.ISO_8859-1 + .. + fr_CA.ISO_8859-1 + .. + fr_CH.ISO_8859-1 + .. + fr_FR.ISO_8859-1 + .. + hr_HR.ISO_8859-2 + .. + hu_HU.ISO_8859-2 + .. + is_IS.ISO_8859-1 + .. + it_CH.ISO_8859-1 + .. + it_IT.ISO_8859-1 + .. + ja_JP.EUC + .. + ja_JP.SJIS + .. + ja_JP.Shift_JIS + .. + ko_KR.EUC + .. + la_LN.ASCII + .. + la_LN.ISO_8859-15 + .. + la_LN.ISO_8859-1 + .. + la_LN.ISO_8859-2 + .. + la_LN.ISO_8859-4 + .. + lt_LT.ISO_8859-4 + .. + nl_BE.ISO_8859-1 + .. + nl_NL.ISO_8859-1 + .. + no_NO.ISO_8859-1 + .. + pl_PL.ISO_8859-2 + .. + pt_PT.ISO_8859-1 + .. + ru_RU.CP866 + .. + ru_RU.ISO_8859-5 + .. + ru_RU.KOI8-R + .. + sl_SI.ISO_8859-2 + .. + sv_SE.ISO_8859-1 + .. + tr_TR.ISO_8859-9 + .. + uk_UA.KOI8-U + .. + zh_CN.EUC + .. + zh_TW.Big5 + .. + .. + skel + .. + .. +.. diff --git a/etc/mtree/BSD.release.dist b/etc/mtree/BSD.release.dist new file mode 100644 index 0000000..72758ab --- /dev/null +++ b/etc/mtree/BSD.release.dist @@ -0,0 +1,22 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + filesys + .. + floppies + .. + tarballs + bindist + .. + objdist + .. + secrdist + .. + srcdist + .. + .. +.. diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist new file mode 100644 index 0000000..11f42e9 --- /dev/null +++ b/etc/mtree/BSD.root.dist @@ -0,0 +1,74 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + bin + .. + boot + defaults + .. + kernel + .. + modules + .. + .. + dev + fd mode=0555 + .. + .. + etc + defaults + .. + gnats + .. + isdn mode=0700 + .. + kerberosIV + .. + mail + .. + mtree + .. + namedb +# leave commented out until buildworld/installworld can +# handle new user ids +# s uname=bind gname=bind mode=0750 +# .. + .. + periodic + daily + .. + monthly + .. + weekly + .. + .. + ppp + .. + skel + .. + ssh + .. + ssl + .. + uucp uname=uucp gname=uucp mode=0770 + .. + .. + mnt + .. + proc mode=0555 + .. + root + .. + sbin + .. + tmp mode=01777 + .. + usr + .. + var + .. +.. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist new file mode 100644 index 0000000..0f02ea1 --- /dev/null +++ b/etc/mtree/BSD.usr.dist @@ -0,0 +1,976 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + bin + .. + games + hide gname=games mode=0550 + .. + .. + include + .. + lib + aout + .. + compat + aout + .. + .. + .. + libdata + doscmd + fonts + .. + .. + gcc + .. + ldscripts + .. + lint + .. + msdosfs + .. + perl + 5.6.0 + B + .. + CGI + .. + CPAN + .. + Carp + .. + Class + .. + Data + .. + Devel + .. + Exporter + .. + ExtUtils + .. + File + Spec + .. + .. + Getopt + .. + I18N + .. + IO + .. + IPC + .. + Math + .. + Net + .. + Pod + Text + .. + .. + Search + .. + Sys + .. + Term + .. + Test + .. + Text + .. + Tie + .. + Time + .. + User + .. + auto + DB_File + .. + File + Glob + .. + .. + GDBM_File + .. + Getopt + Long + .. + .. + POSIX + .. + .. + mach + B + .. + CORE + .. + Data + .. + IO + Socket + .. + .. + IPC + .. + arpa + .. + auto + B + .. + DB_File + .. + Data + Dumper + .. + .. + DynaLoader + .. + Fcntl + .. + IO + .. + IPC + SysV + .. + .. + NDBM_File + .. + Opcode + .. + POSIX + .. + SDBM_File + .. + Socket + .. + attrs + .. + re + .. + sdbm + .. + .. + .. + pod + .. + unicode + In + .. + Is + .. + To + .. + .. + warnings + .. + .. + .. + stallion + .. + .. + libexec + aout + .. + elf + .. + lpr + ru + .. + .. + sendmail + .. + sm.bin + .. + uucp + .. + .. + local + .. + obj nochange + .. + sbin + .. + share + calendar + de_DE.ISO_8859-1 + .. + hr_HR.ISO_8859-2 + .. + ru_RU.KOI8-R + .. + .. + dict + .. + doc + IPv6 + .. + bind + html + .. + misc + .. + .. + ncurses + .. + ntp + .. + papers + .. + psd + 05.sysman + .. + 12.make + .. + 13.rcs + .. + 18.gprof + .. + 20.ipctut + .. + 21.ipc + .. + 22.rpcgen + .. + 23.rpc + .. + 24.xdr + .. + 25.xdrrfc + .. + 26.rpcrfc + .. + 27.nfsrfc + .. + 28.cvs + .. + .. + smm + 01.setup + .. + 02.config + .. + 03.fsck + .. + 04.quotas + .. + 05.fastfs + .. + 06.nfs + .. + 07.lpd + .. + 08.sendmailop + .. + 10.named + .. + 11.timedop + .. + 12.timed + .. + 18.net + .. + .. + usd + 04.csh + .. + 07.mail + .. + 10.exref + .. + 11.edit + .. + 12.vi + .. + 13.viref + .. + 18.msdiffs + .. + 19.memacros + .. + 20.meref + .. + 30.rogue + .. + 31.trek + .. + .. + .. + examples + BSD_daemon + .. + FreeBSD_version + .. + IPv6 + .. + atm + .. + bc + .. + bootforth + .. + cvs + contrib + .. + examples + .. + pcl-cvs + .. + .. + cvsup + .. + dialog + .. + diskless + 209.157.86.12 + .. + HT.DISKLESS + .. + HT.STD + .. + archive.backplane.com + .. + .. + drivers + .. + etc + defaults + .. + .. + find_interface + .. + ibcs2 + .. + isdn + .. + kld + cdev + module + .. + test + .. + .. + dyn_sysctl + module + .. + .. + syscall + module + .. + test + .. + .. + .. + libdialog + .. + libvgl + .. + mdoc + .. + meteor + .. + netgraph + .. + nwclient + .. + perfmon + .. + portal + .. + ppi + .. + ppp + .. + printing + .. + scsi_target + .. + ses + getencstat + .. + sesd + .. + setencstat + .. + setobjstat + .. + srcs + .. + .. + slattach + .. + sliplogin + .. + startslip + .. + sunrpc + dir + .. + msg + .. + sort + .. + .. + worm + .. + .. + games + atc + .. + fortune + .. + larn + .. + quiz.db + .. + .. + groff_font + devX100 + .. + devX100-12 + .. + devX75 + .. + devX75-12 + .. + devascii + .. + devcp1047 + .. + devdvi + .. + devhtml + .. + devkoi8-r + .. + devlatin1 + .. + devlbp + .. + devlj4 + .. + devps + .. + devutf8 + .. + .. + info + .. + isdn + .. + libg++ + .. + locale + af_ZA.ISO_8859-1 + .. + cs_CZ.ISO_8859-2 + .. + da_DK.ISO_8859-15 + .. + da_DK.ISO_8859-1 + .. + de_AT.ISO_8859-15 + .. + de_AT.ISO_8859-1 + .. + de_CH.ISO_8859-15 + .. + de_CH.ISO_8859-1 + .. + de_DE.ISO_8859-15 + .. + de_DE.ISO_8859-1 + .. + el_GR.ISO_8859-7 + .. + en_AU.ISO_8859-15 + .. + en_AU.ISO_8859-1 + .. + en_CA.ISO_8859-15 + .. + en_CA.ISO_8859-1 + .. + en_GB.ISO_8859-15 + .. + en_GB.ISO_8859-1 + .. + en_NZ.ISO_8859-1 + .. + en_US.ISO_8859-15 + .. + en_US.ISO_8859-1 + .. + es_ES.ISO_8859-15 + .. + es_ES.ISO_8859-1 + .. + et_EE.ISO_8859-15 + .. + fi_FI.ISO_8859-15 + .. + fi_FI.ISO_8859-1 + .. + fr_BE.ISO_8859-15 + .. + fr_BE.ISO_8859-1 + .. + fr_CA.ISO_8859-15 + .. + fr_CA.ISO_8859-1 + .. + fr_CH.ISO_8859-15 + .. + fr_CH.ISO_8859-1 + .. + fr_FR.ISO_8859-15 + .. + fr_FR.ISO_8859-1 + .. + hr_HR.ISO_8859-2 + .. + hu_HU.ISO_8859-2 + .. + is_IS.ISO_8859-15 + .. + is_IS.ISO_8859-1 + .. + it_CH.ISO_8859-15 + .. + it_CH.ISO_8859-1 + .. + it_IT.ISO_8859-15 + .. + it_IT.ISO_8859-1 + .. + ja_JP.EUC + .. + ja_JP.SJIS + .. + ja_JP.Shift_JIS + .. + ko_KR.EUC + .. + la_LN.ASCII + .. + la_LN.ISO_8859-15 + .. + la_LN.ISO_8859-1 + .. + la_LN.ISO_8859-2 + .. + la_LN.ISO_8859-4 + .. + lt_LT.ISO_8859-4 + .. + nl_BE.ISO_8859-15 + .. + nl_BE.ISO_8859-1 + .. + nl_NL.ISO_8859-15 + .. + nl_NL.ISO_8859-1 + .. + no_NO.ISO_8859-15 + .. + no_NO.ISO_8859-1 + .. + pl_PL.ISO_8859-2 + .. + pt_PT.ISO_8859-15 + .. + pt_PT.ISO_8859-1 + .. + ru_RU.CP866 + .. + ru_RU.ISO_8859-5 + .. + ru_RU.KOI8-R + .. + sl_SI.ISO_8859-2 + .. + sv_SE.ISO_8859-15 + .. + sv_SE.ISO_8859-1 + .. + tr_TR.ISO_8859-9 + .. + uk_UA.KOI8-U + .. + zh_CN.EUC + .. + zh_TW.Big5 + .. + .. + man +/set uname=man + cat1 + .. + cat1aout + .. + cat2 + .. + cat3 + .. + cat4 + alpha + .. + i386 + .. + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + alpha + .. + i386 + .. + .. + cat9 + i386 + .. + .. + catn + .. + en.ISO_8859-1 uname=root + cat1 + .. + cat1aout + .. + cat2 + .. + cat3 + .. + cat4 + alpha + .. + i386 + .. + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + alpha + .. + i386 + .. + .. + cat9 + i386 + .. + .. + catn + .. + .. + ja uname=root + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catn + .. +/set uname=root + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + mann + .. + .. + man1 + .. + man1aout + .. + man2 + .. + man3 + .. + man4 + alpha + .. + i386 + .. + .. + man5 + .. + man6 + .. + man7 + .. + man8 + alpha + .. + i386 + .. + .. + man9 + i386 + .. + .. + mann + .. + .. + me + .. + misc + fonts + .. + pcvtfonts + .. + .. + mk + .. + nls + C + .. + af_ZA.ISO_8859-1 + .. + cs_CZ.ISO_8859-2 + .. + da_DK.ISO_8859-15 + .. + da_DK.ISO_8859-1 + .. + de_AT.ISO_8859-15 + .. + de_AT.ISO_8859-1 + .. + de_CH.ISO_8859-15 + .. + de_CH.ISO_8859-1 + .. + de_DE.ISO_8859-15 + .. + de_DE.ISO_8859-1 + .. + el_GR.ISO_8859-7 + .. + en_AU.ISO_8859-15 + .. + en_AU.ISO_8859-1 + .. + en_CA.ISO_8859-15 + .. + en_CA.ISO_8859-1 + .. + en_GB.ISO_8859-15 + .. + en_GB.ISO_8859-1 + .. + en_NZ.ISO_8859-1 + .. + en_US.ISO_8859-15 + .. + en_US.ISO_8859-1 + .. + es_ES.ISO_8859-15 + .. + es_ES.ISO_8859-1 + .. + et_EE.ISO_8859-15 + .. + fi_FI.ISO_8859-15 + .. + fi_FI.ISO_8859-1 + .. + fr_BE.ISO_8859-15 + .. + fr_BE.ISO_8859-1 + .. + fr_CA.ISO_8859-15 + .. + fr_CA.ISO_8859-1 + .. + fr_CH.ISO_8859-15 + .. + fr_CH.ISO_8859-1 + .. + fr_FR.ISO_8859-15 + .. + fr_FR.ISO_8859-1 + .. + hr_HR.ISO_8859-2 + .. + hu_HU.ISO_8859-2 + .. + is_IS.ISO_8859-15 + .. + is_IS.ISO_8859-1 + .. + it_CH.ISO_8859-15 + .. + it_CH.ISO_8859-1 + .. + it_IT.ISO_8859-15 + .. + it_IT.ISO_8859-1 + .. + ja_JP.EUC + .. + ja_JP.SJIS + .. + ja_JP.Shift_JIS + .. + ko_KR.EUC + .. + la_LN.ASCII + .. + la_LN.ISO_8859-15 + .. + la_LN.ISO_8859-1 + .. + la_LN.ISO_8859-2 + .. + la_LN.ISO_8859-4 + .. + lt_LT.ISO_8859-4 + .. + nl_BE.ISO_8859-1 + .. + nl_NL.ISO_8859-1 + .. + no_NO.ISO_8859-1 + .. + pl_PL.ISO_8859-2 + .. + pt_PT.ISO_8859-1 + .. + ru_RU.CP866 + .. + ru_RU.ISO_8859-5 + .. + ru_RU.KOI8-R + .. + sl_SI.ISO_8859-2 + .. + sv_SE.ISO_8859-15 + .. + sv_SE.ISO_8859-1 + .. + tr_TR.ISO_8859-9 + .. + uk_UA.KOI8-U + .. + zh_CN.EUC + .. + .. + pcvt + Doc + .. + Etc + .. + .. + perl + man + cat3 uname=man + .. + man3 + .. + .. + .. + sendmail + .. + skel + .. + syscons + fonts + .. + keymaps + .. + scrnmaps + .. + .. + tabset + .. + tmac + locale + .. + mdoc + locale + .. + .. + mm + .. + .. + vi + catalog + .. + perl + .. + tcl + .. + .. + zoneinfo + Africa + .. + America + Indiana + .. + .. + Antarctica + .. + Arctic + .. + Asia + .. + Atlantic + .. + Australia + .. + Etc + .. + Europe + .. + Indian + .. + Pacific + .. + SystemV + .. + .. + .. + src nochange + .. +.. diff --git a/etc/mtree/BSD.var.dist b/etc/mtree/BSD.var.dist new file mode 100644 index 0000000..714cc2b --- /dev/null +++ b/etc/mtree/BSD.var.dist @@ -0,0 +1,96 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + account + .. + at +/set uname=daemon + jobs + .. + spool + .. +/set uname=root + .. +/set mode=0750 + backups + .. + crash + .. + cron + tabs mode=0700 + .. + .. +/set mode=0755 + db + entropy uname=operator gname=operator mode=0700 + .. + pkg + .. + .. +/set gname=games mode=0775 + games + hackdir mode=0770 + save mode=0770 + .. + .. + larn + .. + phantasia + .. + .. +/set gname=wheel mode=0755 + log + .. + mail gname=mail mode=0775 + .. + msgs uname=daemon + .. + preserve + .. + run + .. + rwho gname=daemon mode=0775 + .. + spool + lock uname=uucp gname=dialer mode=0775 + .. +/set gname=daemon + lpd + .. + mqueue + .. + opielocks mode=0700 + .. + output + lpd + .. + .. +/set gname=wheel +/set uname=uucp gname=uucp mode=0775 + uucp + .Preserve + .. + .Sequence + .. + .Status + .. + .Temp + .. + .Xqtdir + .. + .. + uucppublic mode=0777 + .. +/set uname=root gname=wheel mode=0755 + .. + tmp mode=01777 + vi.recover mode=01777 + .. + .. + yp + .. +.. diff --git a/etc/mtree/BSD.x11-4.dist b/etc/mtree/BSD.x11-4.dist new file mode 100644 index 0000000..6e13615 --- /dev/null +++ b/etc/mtree/BSD.x11-4.dist @@ -0,0 +1,412 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + bin + .. + etc + rc.d + .. + .. + include + DPS + .. + GL + .. + X11 + ICE + .. + PEX5 + .. + PM + .. + SM + .. + Xaw + .. + Xft + .. + Xmu + .. + bitmaps + .. + extensions + .. + fonts + codeconv + .. + .. + pixmaps + .. + .. + bitmaps + .. + freetype2 + freetype + cache + .. + config + .. + internal + .. + .. + .. + .. + info + .. + lib + X11 + XF86Setup + pics + .. + scripts + .. + tcllib + .. + .. + app-defaults + .. + config + .. + doc + PostScript + .. + html + .. + .. + etc + .. + fonts + 100dpi + .. + 75dpi + .. + CID + .. + PEX + .. + Speedo + .. + Type1 + .. + cyrillic + .. + encodings + large + .. + .. + latin2 + 100dpi + .. + 75dpi + .. + .. + local + .. + misc + .. + util + .. + .. + fs + .. + lbxproxy + .. + locale + C + .. + armscii-8 + .. + en_US.UTF-8 + .. + en_US.utf + .. + georgian-academy + .. + georgian-ps + .. + ibm-cp1133 + .. + iscii-dev + .. + isiri-3342 + .. + iso8859-1 + .. + iso8859-10 + .. + iso8859-13 + .. + iso8859-14 + .. + iso8859-15 + .. + iso8859-2 + .. + iso8859-3 + .. + iso8859-4 + .. + iso8859-5 + .. + iso8859-6 + .. + iso8859-7 + .. + iso8859-8 + .. + iso8859-9 + .. + iso8859-9e + .. + ja + .. + ja.JIS + .. + ja.SJIS + .. + ko + .. + koi8-c + .. + koi8-r + .. + koi8-u + .. + microsoft-cp1251 + .. + microsoft-cp1255 + .. + microsoft-cp1256 + .. + mk_MK.UTF-8 + .. + mulelao-1 + .. + nokhchi-1 + .. + tatar-cyr + .. + tbl_data + .. + th_TH.TACTIS + .. + tscii-0 + .. + vi_VN.tcvn + .. + vi_VN.viscii + .. + zh + .. + zh_TW + .. + zh_TW.Big5 + .. + .. + proxymngr + .. + rstart + commands + x11r6 + .. + .. + contexts + .. + .. + twm + .. + x11perfcomp + .. + xdm + pixmaps + .. + .. + xinit + .. + xkb + compat + .. + compiled + .. + geometry + digital + .. + sgi + .. + .. + keycodes + digital + .. + sgi + .. + .. + keymap + digital + .. + sgi + .. + sun + .. + .. + rules + .. + semantics + .. + symbols + digital + .. + fujitsu + .. + hp + .. + macintosh + .. + nec + .. + sgi + .. + sony + .. + sun + .. + xfree68 + .. + .. + types + .. + .. + xserver + .. + xsm + .. + .. + aout + .. + modules + codeconv + .. + dri + .. + drivers + .. + extensions + .. + fonts + .. + freebsd + .. + input + .. + .. + .. + libexec + .. + man +/set uname=man + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. + ja uname=root + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. +/set uname=root + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + share + aclocal + .. + doc + ja + .. + .. + examples + .. + .. +.. diff --git a/etc/mtree/BSD.x11.dist b/etc/mtree/BSD.x11.dist new file mode 100644 index 0000000..fc380ee --- /dev/null +++ b/etc/mtree/BSD.x11.dist @@ -0,0 +1,300 @@ +# $FreeBSD$ +# +# Please see the file README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. + bin + .. + etc + rc.d + .. + .. + include + X11 + ICE + .. + PEX5 + .. + PM + .. + SM + .. + Xaw + .. + Xmu + .. + bitmaps + .. + extensions + .. + fonts + .. + pixmaps + .. + .. + .. + info + .. + lib + X11 + XF86Setup + pics + .. + scripts + .. + tcllib + .. + .. + app-defaults + .. + config + .. + doc + .. + etc + .. + fonts + 100dpi + .. + 75dpi + .. + PEX + .. + Speedo + .. + Type1 + .. + cyrillic + .. + local + .. + misc + .. + .. + fs + .. + lbxproxy + .. + locale + C + .. + en_US.utf + .. + iso8859-1 + .. + iso8859-2 + .. + iso8859-3 + .. + iso8859-4 + .. + iso8859-5 + .. + iso8859-6 + .. + iso8859-7 + .. + iso8859-8 + .. + iso8859-9 + .. + ja + .. + ja.JIS + .. + ja.SJIS + .. + ko + .. + koi8-r + .. + tbl_data + .. + th_TH.TACTIS + .. + zh + .. + zh_TW + .. + zh_TW.Big5 + .. + .. + proxymngr + .. + rstart + commands + x11r6 + .. + .. + contexts + .. + .. + twm + .. + x11perfcomp + .. + xdm + .. + xinit + .. + xkb + compat + .. + compiled + .. + geometry + digital + .. + sgi + .. + .. + keycodes + digital + .. + sgi + .. + .. + keymap + digital + .. + sgi + .. + sun + .. + .. + rules + .. + semantics + .. + symbols + digital + .. + fujitsu + .. + nec + .. + sony + .. + sun + .. + .. + .. + xserver + .. + xsm + .. + .. + aout + .. + modules + .. + .. + libexec + .. + man +/set uname=man + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. + ja uname=root + cat1 + .. + cat2 + .. + cat3 + .. + cat4 + .. + cat5 + .. + cat6 + .. + cat7 + .. + cat8 + .. + cat9 + .. + catl + .. + catn + .. +/set uname=root + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + man1 + .. + man2 + .. + man3 + .. + man4 + .. + man5 + .. + man6 + .. + man7 + .. + man8 + .. + man9 + .. + manl + .. + mann + .. + .. + share + aclocal + .. + doc + ja + .. + .. + examples + .. + .. +.. diff --git a/etc/mtree/README b/etc/mtree/README new file mode 100644 index 0000000..2ab10e8 --- /dev/null +++ b/etc/mtree/README @@ -0,0 +1,48 @@ +$FreeBSD$ + +These files are used to create empty file hierarchies for building the +system into. Some notes about working with them are placed here to try +and keep them in good working order. + + a) The files use 4 space indentation, and other than in the header + comments, should not contain any tabs. An indentation of 4 is + preferable to the standard indentation of 8 because the indentation + of levels in these files can become quite deep causing the line to + overflow 80 characters. + + This also matches with the files generated when using the + mtree -c option, which was implemented that way for the same reason. + + b) Only directories should be listed here. + + c) The listing should be kept in filename sorted order. + + d) Sanity checking changes to these files can be done by following + this procedure (the sed -e is ugly, but fixing mtree -c to + not emit the trailing white space would be even uglier): + + mkdir /tmp/MTREE + mtree -deU -f BSD.X.dist -p /tmp/MTREE + mtree -cdin -k uname,gname,mode -p /tmp/MTREE | \ + sed -e 's/ *$//' | tail +5 >BSD.X.new + diff -u BSD.X.dist BSD.X.new + rm -r /tmp/MTREE + + Note that you will get some differences about /set lines, + and uname= gname= on certain directory areas, mainly man page + sections. This is caused by mtree not having a look ahead + mechanism for making better selections for these as it + traverses the hierarchy. + + The BSD.X.new file should NOT be commited, will be missing the + correct header, and important keywords like ``nochange''. Simply + use the diff for a sanity check to make sure things are in the + correct order and correctly indented. + + e) Further sanity checking of the system builds with DESTDIR=/someplace + are more complicated, but can often catch missing entries in these + files. I tend to run this more complete sanity check shortly after + the target date for a new release is announced. + + If you want details on it bug me about it via email to + rgrimes@FreeBSD.org. diff --git a/etc/namedb/PROTO.localhost.rev b/etc/namedb/PROTO.localhost.rev new file mode 100644 index 0000000..0468683 --- /dev/null +++ b/etc/namedb/PROTO.localhost.rev @@ -0,0 +1,17 @@ +; From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90 +; $FreeBSD$ +; +; This file is automatically edited by the `make-localhost' script in +; the /etc/namedb directory. +; + +$TTL 3600 + +@ IN SOA @host@. root.@host@. ( + @date@ ; Serial + 3600 ; Refresh + 900 ; Retry + 3600000 ; Expire + 3600 ) ; Minimum + IN NS @host@. +1 IN PTR localhost.@domain@. diff --git a/etc/namedb/make-localhost b/etc/namedb/make-localhost new file mode 100755 index 0000000..704fd55 --- /dev/null +++ b/etc/namedb/make-localhost @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# make-localhost - edit the appropriate local information into +# /etc/namedb/localhost.rev +# + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin +export PATH + +if [ "`hostname -s`" != "`hostname`" ]; then + # hostname must contain domain + + host=`hostname -s` + fullhost=`hostname` + domain=`echo $fullhost | sed "s/^$host\.//"` +else + host=`hostname` + + if [ -z "$1" ]; then + echo -n 'Enter your domain name: ' + read domain + else + domain="$1" + fi + + # strip trailing dot, if any + domain=`echo $domain | sed 's/\.$//'` + fullhost="$host.$domain" +fi + +date=`date +"%Y%m%d"` + +mv -f localhost.rev localhost.rev.BAK 2>/dev/null + +exec sed -e "s/@host@/$fullhost/g" \ + -e "s/@domain@/$domain/g" \ + -e "s/@date@/$date/g" \ + < PROTO.localhost.rev > localhost.rev diff --git a/etc/namedb/named.conf b/etc/namedb/named.conf new file mode 100644 index 0000000..f153e39 --- /dev/null +++ b/etc/namedb/named.conf @@ -0,0 +1,117 @@ +// $FreeBSD$ +// +// Refer to the named(8) man page for details. If you are ever going +// to setup a primary server, make sure you've understood the hairy +// details of how DNS is working. Even with simple mistakes, you can +// break connectivity for affected parties, or cause huge amount of +// useless Internet traffic. + +options { + directory "/etc/namedb"; + +// In addition to the "forwarders" clause, you can force your name +// server to never initiate queries of its own, but always ask its +// forwarders only, by enabling the following line: +// +// forward only; + +// If you've got a DNS server around at your upstream provider, enter +// its IP address here, and enable the line below. This will make you +// benefit from its cache, thus reduce overall DNS traffic in the Internet. +/* + forwarders { + 127.0.0.1; + }; +*/ + /* + * If there is a firewall between you and nameservers you want + * to talk to, you might need to uncomment the query-source + * directive below. Previous versions of BIND always asked + * questions using port 53, but BIND 8.1 uses an unprivileged + * port by default. + */ + // query-source address * port 53; + + /* + * If running in a sandbox, you may have to specify a different + * location for the dumpfile. + */ + // dump-file "s/named_dump.db"; +}; + +// Note: the following will be supported in a future release. +/* +host { any; } { + topology { + 127.0.0.0/8; + }; +}; +*/ + +// Setting up secondaries is way easier and the rough picture for this +// is explained below. +// +// If you enable a local name server, don't forget to enter 127.0.0.1 +// into your /etc/resolv.conf so this server will be queried first. +// Also, make sure to enable it in /etc/rc.conf. + +zone "." { + type hint; + file "named.root"; +}; + +zone "0.0.127.IN-ADDR.ARPA" { + type master; + file "localhost.rev"; +}; + +zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" { + type master; + file "localhost.rev"; +}; + +// NB: Do not use the IP addresses below, they are faked, and only +// serve demonstration/documentation purposes! +// +// Example secondary config entries. It can be convenient to become +// a secondary at least for the zone where your own domain is in. Ask +// your network administrator for the IP address of the responsible +// primary. +// +// Never forget to include the reverse lookup (IN-ADDR.ARPA) zone! +// (This is the first bytes of the respective IP address, in reverse +// order, with ".IN-ADDR.ARPA" appended.) +// +// Before starting to setup a primary zone, better make sure you fully +// understand how DNS and BIND works, however. There are sometimes +// unobvious pitfalls. Setting up a secondary is comparably simpler. +// +// NB: Don't blindly enable the examples below. :-) Use actual names +// and addresses instead. +// +// NOTE!!! FreeBSD can run bind in a sandbox (see named_flags in rc.conf). +// The directory containing the secondary zones must be write accessible +// to bind. The following sequence is suggested: +// +// mkdir /etc/namedb/s +// chown bind.bind /etc/namedb/s +// chmod 750 /etc/namedb/s + +/* +zone "domain.com" { + type slave; + file "s/domain.com.bak"; + masters { + 192.168.1.1; + }; +}; + +zone "0.168.192.in-addr.arpa" { + type slave; + file "s/0.168.192.in-addr.arpa.bak"; + masters { + 192.168.1.1; + }; +}; +*/ + diff --git a/etc/namedb/named.root b/etc/namedb/named.root new file mode 100644 index 0000000..eba0c9d --- /dev/null +++ b/etc/namedb/named.root @@ -0,0 +1,83 @@ +; This file holds the information on root name servers needed to +; initialize cache of Internet domain name servers +; (e.g. reference this file in the "cache . <file>" +; configuration file of BIND domain name servers). +; +; This file is made available by InterNIC registration services +; under anonymous FTP as +; file /domain/named.root +; on server FTP.RS.INTERNIC.NET +; -OR- under Gopher at RS.INTERNIC.NET +; under menu InterNIC Registration Services (NSI) +; submenu InterNIC Registration Archives +; file named.root +; +; last update: Aug 22, 1997 +; related version of root zone: 1997082200 +; $FreeBSD$ +; +; formerly NS.INTERNIC.NET +; +. 3600000 IN NS A.ROOT-SERVERS.NET. +A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 +; +; formerly NS1.ISI.EDU +; +. 3600000 NS B.ROOT-SERVERS.NET. +B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 +; +; formerly C.PSI.NET +; +. 3600000 NS C.ROOT-SERVERS.NET. +C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 +; +; formerly TERP.UMD.EDU +; +. 3600000 NS D.ROOT-SERVERS.NET. +D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 +; +; formerly NS.NASA.GOV +; +. 3600000 NS E.ROOT-SERVERS.NET. +E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 +; +; formerly NS.ISC.ORG +; +. 3600000 NS F.ROOT-SERVERS.NET. +F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 +; +; formerly NS.NIC.DDN.MIL +; +. 3600000 NS G.ROOT-SERVERS.NET. +G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 +; +; formerly AOS.ARL.ARMY.MIL +; +. 3600000 NS H.ROOT-SERVERS.NET. +H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 +; +; formerly NIC.NORDU.NET +; +. 3600000 NS I.ROOT-SERVERS.NET. +I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 +; +; temporarily housed at NSI (InterNIC) +; +. 3600000 NS J.ROOT-SERVERS.NET. +J.ROOT-SERVERS.NET. 3600000 A 198.41.0.10 +; +; housed in LINX, operated by RIPE NCC +; +. 3600000 NS K.ROOT-SERVERS.NET. +K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 +; +; temporarily housed at ISI (IANA) +; +. 3600000 NS L.ROOT-SERVERS.NET. +L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12 +; +; housed in Japan, operated by WIDE +; +. 3600000 NS M.ROOT-SERVERS.NET. +M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 +; End of File diff --git a/etc/netconfig b/etc/netconfig new file mode 100644 index 0000000..89234fe --- /dev/null +++ b/etc/netconfig @@ -0,0 +1,17 @@ +# The network configuration file. This file is currently only used in +# conjunction with the (TI-) RPC code in the C library, unlike its +# use in SVR4. +# +# Entries consist of: +# +# <network_id> <semantics> <flags> <protofamily> <protoname> \ +# <device> <nametoaddr_libs> +# +# The <device> and <nametoaddr_libs> fields are always empty in FreeBSD. +# +udp6 tpi_clts v inet6 udp - - +tcp6 tpi_cots_ord v inet6 tcp - - +udp tpi_clts v inet udp - - +tcp tpi_cots_ord v inet tcp - - +rawip tpi_raw - inet - - - +unix tpi_cots_ord - loopback - - - diff --git a/etc/netstart b/etc/netstart new file mode 100755 index 0000000..58d05a7 --- /dev/null +++ b/etc/netstart @@ -0,0 +1,59 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# This file is NOT called by any of the other scripts - it has been +# obsoleted by /etc/rc.network and is provided here only for user +# convenience (if you're sitting in single user mode and wish to start +# the network by hand, this script will do it for you). +# + +# If there is a global system configuration file, suck it in. +if [ -f /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -f /etc/rc.conf ]; then + . /etc/rc.conf +fi + +# Start pccard if necessary +if [ -r /etc/rc.pccard ]; then + . /etc/rc.pccard +fi + +if [ -r /etc/rc.network ]; then + . /etc/rc.network +else + echo 'Sorry, I cannot find /etc/rc.network - aborting' + exit 1 +fi + +echo 'Doing stage one network startup:' +network_pass1 +exit 0 diff --git a/etc/network.subr b/etc/network.subr new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/network.subr @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/networks b/etc/networks new file mode 100644 index 0000000..a6b15d4 --- /dev/null +++ b/etc/networks @@ -0,0 +1,17 @@ +# $FreeBSD$ +# @(#)networks 5.1 (Berkeley) 6/30/90 +# +# Your Local Networks Database +# +your-net 127 # your comment +your-netmask 255.255.255 # subnet mask for your-net + +# +# Your subnets +# +subnet1 127.0.1 alias1 # comment 1 +subnet2 127.0.2 alias2 # comment 2 + +# +# Internet networks (from nic.ddn.mil) +# diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf new file mode 100644 index 0000000..2879ff4 --- /dev/null +++ b/etc/newsyslog.conf @@ -0,0 +1,20 @@ +# configuration file for newsyslog +# $FreeBSD$ +# +# logfilename [owner:group] mode count size when [ZB] [/pid_file] [sig_num] +/var/log/cron 600 3 100 * Z +/var/log/amd.log 644 7 100 * Z +/var/log/kerberos.log 644 7 100 * Z +/var/log/lpd-errs 644 7 100 * Z +/var/log/maillog 644 7 * @T00 Z +/var/log/sendmail.st 644 10 * 168 B +/var/log/messages 644 5 100 * Z +/var/log/all.log 600 7 * @T00 Z +/var/log/slip.log 600 3 100 * Z +/var/log/ppp.log 600 3 100 * Z +/var/log/security 600 10 100 * Z +/var/log/wtmp 644 3 * @01T05 B +/var/log/daily.log 640 7 * @T00 Z +/var/log/weekly.log 640 5 1 $W6D0 Z +/var/log/monthly.log 640 12 * $M1D0 Z +/var/log/console.log 640 5 100 * Z diff --git a/etc/pam.conf b/etc/pam.conf new file mode 100644 index 0000000..4bc2f08 --- /dev/null +++ b/etc/pam.conf @@ -0,0 +1,49 @@ +# Configuration file for Pluggable Authentication Modules (PAM). +# +# This file controls the authentication methods that login and other +# utilities use. See pam(8) for a description of its format. +# +# Note: the final entry must say "required" -- otherwise, things don't +# work quite right. If you delete the final entry, be sure to change +# "sufficient" to "required" in the entry before it. +# +# $FreeBSD$ + +# If the user can authenticate with S/Key, that's sufficient; allow clear +# password. Try kerberos, then try plain unix password. +login auth sufficient pam_skey.so +login auth requisite pam_cleartext_pass_ok.so +#login auth sufficient pam_kerberosIV.so try_first_pass +login auth required pam_unix.so try_first_pass + +# Same requirement for ftpd as login +ftpd auth sufficient pam_skey.so +ftpd auth requisite pam_cleartext_pass_ok.so +#ftpd auth sufficient pam_kerberosIV.so try_first_pass +ftpd auth required pam_unix.so try_first_pass + +# OpenSSH with PAM support requires similar modules. The session one is +# a bit strange, though... +sshd auth sufficient pam_skey.so +#sshd auth sufficient pam_kerberosIV.so try_first_pass +sshd auth required pam_unix.so try_first_pass +sshd session required pam_permit.so + +# Don't break startx +xserver auth required pam_permit.so + +# XDM is difficult; it fails or moans unless there are modules for each +# of the four management groups; auth, account, session and password. +xdm auth required pam_unix.so +#xdm auth sufficient pam_kerberosIV.so try_first_pass +xdm account required pam_unix.so try_first_pass +xdm session required pam_deny.so +xdm password required pam_deny.so + +# Mail services +imap auth required pam_unix.so try_first_pass +pop3 auth required pam_unix.so try_first_pass + +# If we don't match anything else, default to using getpwnam(). +other auth required pam_unix.so try_first_pass +other account required pam_unix.so try_first_pass diff --git a/etc/pccard_ether b/etc/pccard_ether new file mode 100755 index 0000000..58f0ca6 --- /dev/null +++ b/etc/pccard_ether @@ -0,0 +1,191 @@ +#!/bin/sh - +# +# $FreeBSD$ +# +# pccard_ether interfacename [start|stop] [ifconfig option] +# +# example: pccard_ether ep0 start -link0 +# + +stop_dhcp() { + if [ -s /var/run/dhclient.${interface}.pid ]; then + pidfile="/var/run/dhclient.${interface}.pid" + elif [ -s /var/run/dhcpc.${interface}.pid ]; then + pidfile="/var/run/dhcpc.${interface}.pid" + else + return + fi + kill `cat ${pidfile}` + rm -f ${pidfile} +} + +start_dhcp() { + stop_dhcp + if [ -x "${dhcp_program}" ]; then + if [ `basename ${dhcp_program}` = "dhclient" ]; then + pidfile="/var/run/dhclient.${interface}.pid" + dhcp_flags="${dhcp_flags} -pf ${pidfile}" + fi + ${dhcp_program} ${dhcp_flags} ${interface} + else + echo "${dhcp_program}: DHCP client software not available" + fi +} + +# Suck in the configuration variables +# +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +interface=$1 +shift +startstop=$1 +shift + +case ${pccard_ifconfig} in +[Nn][Oo] | '') + expr "${removable_interfaces}" : ".*${interface}" > /dev/null || exit 0 + ;; +*) + # Backward compatible + eval ifconfig_${interface}=\${pccard_ifconfig} + ;; +esac + +case ${startstop} in +[Ss][Tt][Aa][Rr][Tt] | '') + if [ -r /etc/start_if.${interface} ]; then + . /etc/start_if.${interface} + fi + + eval ifconfig_args=\$ifconfig_${interface} + case ${ifconfig_args} in + [Nn][Oo] | '') + ;; + [Dd][Hh][Cc][Pp]) + # Start up the DHCP client program + start_dhcp + ;; + *) + # Do the primary ifconfig if specified + ifconfig ${interface} ${ifconfig_args} $* + + # Check to see if aliases need to be added + alias=0 + while : + do + eval ifx_args=\$ifconfig_${interface}_alias${alias} + if [ -n "${ifx_args}" ]; then + ifconfig ${interface} ${ifx_args} alias + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + eval ifx_args=\$ifconfig_${interface}_ipx + if [ -n "${ifx_args}" ]; then + ifconfig ${interface} ${ifx_args} + fi + + # Add default route into $static_routes + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Add private route for this interface into $static_routes + eval ifx_routes=\$static_routes_${interface} + if [ -n "${ifx_routes}" ]; then + static_routes="${ifx_routes} ${static_routes}" + fi + + # Set up any static routes if specified + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + ;; + esac + + # IPv6 setup + case ${ipv6_enable} in + [Yy][Ee][Ss]) + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + sysctl -w net.inet6.ip6.forwarding=0 + sysctl -w net.inet6.ip6.accept_rtadv=1 + ifconfig ${interface} up + rtsol ${interface} + ;; + esac + ;; + esac + ;; +# Stop the interface +*) + if [ -r /etc/stop_if.${interface} ]; then + . /etc/stop_if.${interface} + fi + + eval ifconfig_args=\$ifconfig_${interface} + case ${ifconfig_args} in + [Nn][Oo] | '') + ;; + [Dd][Hh][Cc][Pp]) + # Stop the DHCP client for this interface + stop_dhcp + ;; + *) + # Delelte static route if specified + eval ifx_routes=\$static_routes_${interface} + if [ -n "${ifx_routes}" ]; then + for i in ${ifx_routes}; do + eval route_args=\$route_${i} + route delete ${route_args} + done + fi + + # Delete aliases if exist + alias=0 + while : + do + eval ifx_args=\$ifconfig_${interface}_alias${alias} + if [ -n "${ifx_args}" ]; then + ifconfig ${interface} ${ifx_args} alias delete + alias=`expr ${alias} + 1` + else + break; + fi + done + ;; + esac + + # Remove the network interface and cleaning ARP table + ifconfig ${interface} delete + arp -d -a + + # Clean the routing table + case ${removable_route_flush} in + [Nn][Oo]) + ;; + *) + # flush beforehand, just in case.... + route -n flush + ;; + esac + ;; +esac diff --git a/etc/periodic/Makefile b/etc/periodic/Makefile new file mode 100644 index 0000000..4c1fda4 --- /dev/null +++ b/etc/periodic/Makefile @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR= daily weekly monthly + +.include <bsd.subdir.mk> diff --git a/etc/periodic/Makefile.inc b/etc/periodic/Makefile.inc new file mode 100644 index 0000000..aba8313 --- /dev/null +++ b/etc/periodic/Makefile.inc @@ -0,0 +1,8 @@ +# $FreeBSD$ + +BINDIR= /etc/periodic/${.CURDIR:T} +NOOBJ= + +beforeinstall: + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 755 ${BIN} \ + ${DESTDIR}${BINDIR} diff --git a/etc/periodic/daily/100.clean-disks b/etc/periodic/daily/100.clean-disks new file mode 100755 index 0000000..b12da6d --- /dev/null +++ b/etc/periodic/daily/100.clean-disks @@ -0,0 +1,55 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove garbage files more than $daily_clean_disks_days days old +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_disks_enable" in + [Yy][Ee][Ss]) + if [ -z "$daily_clean_disks_days" ] + then + echo '$daily_clean_disks_enable is set but' \ + '$daily_clean_disks_days is not' + rc=2 + elif [ -z "$daily_clean_disks_files" ] + then + echo '$daily_clean_disks_enable is set but' \ + '$daily_clean_disks_files is not' + rc=2 + else + echo "" + echo "Cleaning disks:" + set -f noglob + args="$args -name "`echo "$daily_clean_disks_files" | + sed -e 's/^[ ]*//' \ + -e 's/[ ]*$//' \ + -e 's/[ ][ ]*/ -o -name /g'` + + case "$daily_clean_tmps_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ + \( $args \) -atime +$daily_clean_disks_days -delete $print | + tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + set -f glob + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/110.clean-tmps b/etc/periodic/daily/110.clean-tmps new file mode 100755 index 0000000..b6a4795 --- /dev/null +++ b/etc/periodic/daily/110.clean-tmps @@ -0,0 +1,56 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Perform temporary directory cleaning so that long-lived systems +# don't end up with excessively old files there. +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_tmps_enable" in + [Yy][Ee][Ss]) + if [ -z "$daily_clean_tmps_days" ] + then + echo '$daily_clean_tmps_enable is set but' \ + '$daily_clean_tmps_days is not' + rc=2 + else + echo "" + echo "Removing old temporary files:" + + set -f noglob + args="-atime +$daily_clean_tmps_days -mtime +$daily_clean_tmps_days" + [ -n "$daily_clean_tmps_ignore" ] && + args="$args "`echo " ${daily_clean_tmps_ignore% }" | + sed 's/[ ][ ]*/ ! -name /g'` + case "$daily_clean_tmps_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + rc=$(for dir in $daily_clean_tmps_dirs + do + [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { + find -d . -type f $args -delete $print + find -d . ! -name . -type d -mtime \ + +$daily_clean_tmps_days -delete $print + } | sed "s,^\\., $dir," + done | tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + set -f glob + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/120.clean-preserve b/etc/periodic/daily/120.clean-preserve new file mode 100755 index 0000000..d5b34a1 --- /dev/null +++ b/etc/periodic/daily/120.clean-preserve @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove stale files in /var/preserve +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_preserve_enable" in + [Yy][Ee][Ss]) + if [ -z "$daily_clean_preserve_days" ] + then + echo '$daily_clean_preserve_enable is set but' \ + '$daily_clean_preserve_days is not' + rc=2 + elif [ ! -d /var/preserve ] + then + echo '$daily_clean_preserve_enable is set but /var/preserve' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Removing stale files from /var/preserve:" + + if cd /var/preserve + then + case "$daily_clean_preserve_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + rc=$(find . ! -name . -mtime +$daily_clean_preserve_days \ + -delete $print | tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + else + rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/130.clean-msgs b/etc/periodic/daily/130.clean-msgs new file mode 100755 index 0000000..b7890db --- /dev/null +++ b/etc/periodic/daily/130.clean-msgs @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove system messages +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_msgs_enable" in + [Yy][Ee][Ss]) + if [ ! -d /var/msgs ] + then + echo '$daily_clean_msgs_enable is set but /var/msgs' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Cleaning out old system announcements:" + + [ -n "$daily_clean_msgs_days" ] && + arg=-${daily_clean_msgs_days#-} || arg= + msgs -c $arg && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/140.clean-rwho b/etc/periodic/daily/140.clean-rwho new file mode 100755 index 0000000..9645d7e --- /dev/null +++ b/etc/periodic/daily/140.clean-rwho @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove stale files in /var/rwho +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_rwho_enable" in + [Yy][Ee][Ss]) + if [ -z "$daily_clean_rwho_days" ] + then + echo '$daily_clean_rwho_enable is enabled but' \ + '$daily_clean_rwho_days is not set' + rc=2 + elif [ ! -d /var/rwho ] + then + echo '$daily_clean_rwho_enable is enabled but /var/rwho' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Removing stale files from /var/rwho:" + + case "$daily_clean_rwho_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + if cd /var/rwho + then + rc=$(find . ! -name . -mtime +$daily_clean_rwho_days \ + -delete $print | tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + else + rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/150.clean-hoststat b/etc/periodic/daily/150.clean-hoststat new file mode 100755 index 0000000..952d96a --- /dev/null +++ b/etc/periodic/daily/150.clean-hoststat @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Remove stale files in /var/spool/.hoststat +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_clean_hoststat_enable" in + [Yy][Ee][Ss]) + if [ -z "$daily_clean_hoststat_days" ] + then + echo '$daily_clean_hoststat_enable is enabled but' \ + '$daily_clean_hoststat_days is not set' + rc=2 + elif [ ! -d /var/spool/.hoststat ] + then + echo '$daily_clean_hoststat_enable is enabled but' \ + "/var/spool/.hoststat doesn't exist" + rc=2 + else + echo "" + echo "Removing stale files from /var/spool/.hoststat:" + + case "$daily_clean_hoststat_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + if cd /var/hoststat + then + rc=$(find . ! -name . -mtime +$daily_clean_hoststat_days \ + -delete $print | tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + else + rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/200.backup-passwd b/etc/periodic/daily/200.backup-passwd new file mode 100755 index 0000000..865a197 --- /dev/null +++ b/etc/periodic/daily/200.backup-passwd @@ -0,0 +1,77 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_backup_passwd_enable" in + [Yy][Ee][Ss]) + if [ ! -f /etc/master.passwd ] + then + echo '$daily_backup_passwd_enable" is set but /etc/master.passwd' \ + "doesn't exist" + rc=2 + elif [ ! -f /etc/group ] + then + echo '$daily_backup_passwd_enable" is set but /etc/group' \ + "doesn't exist" + rc=2 + else + bak=/var/backups + rc=0 + + echo "" + echo "Backup passwd and group files:" + + if [ ! -f $bak/master.passwd.bak ] + then + rc=1 + echo "no $bak/master.passwd.bak" + cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 + fi + + if ! cmp -s $bak/master.passwd.bak /etc/master.passwd + then + [ $rc -lt 1 ] && rc=1 + echo "$host passwd diffs:" + diff $bak/master.passwd.bak /etc/master.passwd |\ + sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/' + mv $bak/master.passwd.bak $bak/master.passwd.bak2 + cp -p /etc/master.passwd $bak/master.passwd.bak || rc=3 + fi + + if [ ! -f $bak/group.bak ] + then + [ $rc -lt 1 ] && rc=1 + echo "no $bak/group.bak" + cp -p /etc/group $bak/group.bak || rc=3 + fi + + if ! cmp -s $bak/group.bak /etc/group + then + [ $rc -lt 1 ] && rc=1 + echo "$host group diffs:" + diff $bak/group.bak /etc/group + mv $bak/group.bak $bak/group.bak2 + cp -p /etc/group $bak/group.bak || rc=3 + fi + + if [ -f /etc/group ] + then + echo "" + echo "Verifying group file syntax:" + chkgrp /etc/group || rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/210.backup-aliases b/etc/periodic/daily/210.backup-aliases new file mode 100755 index 0000000..fe17038 --- /dev/null +++ b/etc/periodic/daily/210.backup-aliases @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_backup_aliases_enable" in + [Yy][Ee][Ss]) + if [ ! -f /etc/mail/aliases ] + then + echo '$daily_backup_aliases_enable is enabled but' \ + "/etc/mail/aliases doesn't exist" + rc=2 + else + bak=/var/backups + rc=0 + + echo "" + echo "Backing up mail aliases:" + + if [ ! -f $bak/aliases.bak ] + then + echo "no $bak/aliases.bak" + cp -p /etc/mail/aliases $bak/aliases.bak || rc=3 + fi + + if ! cmp -s $bak/aliases.bak /etc/mail/aliases + then + [ $rc -lt 1 ] && rc=1 + echo "$host aliases diffs:" + diff -u $bak/aliases.bak /etc/mail/aliases + mv $bak/aliases.bak $bak/aliases.bak2 + cp -p /etc/mail/aliases $bak/aliases.bak || rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/220.backup-distfile b/etc/periodic/daily/220.backup-distfile new file mode 100755 index 0000000..93d7660 --- /dev/null +++ b/etc/periodic/daily/220.backup-distfile @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_backup_distfile_enable" in + [Yy][Ee][Ss]) + if [ ! -f /etc/Distfile ] + then + echo '$daily_backup_distfile_enable is set but /etc/Distfile' \ + "doesn't exist" + rc=2 + else + bak=/var/backups + rc=0 + + echo "" + echo "Backing up /etc/Distfile:" + + if ! cmp -s $bak/Distfile.bak /etc/Distfile + then + rc=1 + mv $bak/Distfile.bak $bak/Distfile.bak2 + cp /etc/Distfile $bak/Distfile.bak || rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/300.calendar b/etc/periodic/daily/300.calendar new file mode 100755 index 0000000..cc12097 --- /dev/null +++ b/etc/periodic/daily/300.calendar @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# `calendar -a' needs to die. Why? Because it's a bad idea, particular +# with networked home directories, but also in general. If you want the +# output of `calendar' mailed to you, set up a cron job to do it, +# or run it from your ~/.profile or ~/.login. +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_calendar_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Running calendar:" + + calendar -a && rc=0 || rc=3;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/310.accounting b/etc/periodic/daily/310.accounting new file mode 100755 index 0000000..c510a94 --- /dev/null +++ b/etc/periodic/daily/310.accounting @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_accounting_enable" in + [Yy][Ee][Ss]) + if [ ! -f /var/account/acct ] + then + echo '$daily_accounting_enable is set but /var/account/acct' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Rotating accounting logs and gathering statistics:" + + cd /var/account + rc=0 + + rm -f acct.3.gz acct.3 || rc=3 + [ -f acct.2.gz ] && { mv -f acct.2.gz acct.3.gz || rc=3; } + [ -f acct.2 ] && { mv -f acct.2 acct.3 || rc=3; } + [ -f acct.1.gz ] && { mv -f acct.1.gz acct.2.gz || rc=3; } + [ -f acct.1 ] && { mv -f acct.1 acct.2 || rc=3; } + [ -f acct.0.gz ] && { mv -f acct.0.gz acct.1.gz || rc=3; } + [ -f acct.0 ] && { mv -f acct.0 acct.1 || rc=3; } + cp -pf acct acct.0 || rc=3 + sa -s >/dev/null || rc=3 + + case "$daily_accounting_compress" in + [Yy][Ee][Ss]) + gzip -f acct.0 || rc=3;; + esac + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/320.rdist b/etc/periodic/daily/320.rdist new file mode 100755 index 0000000..11ec190 --- /dev/null +++ b/etc/periodic/daily/320.rdist @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_distfile_enable" in + [Yy][Ee][Ss]) + if [ ! -f /etc/Distfile ] + then + echo '$daily_distfile_enable is set but /etc/Distfile' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Running rdist with /etc/Distfile:" + + rdist -f /etc/Distfile && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/330.news b/etc/periodic/daily/330.news new file mode 100755 index 0000000..ec06437 --- /dev/null +++ b/etc/periodic/daily/330.news @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Expire news articles +# (This is present only for backwards compatibility, usually the news +# system handles this on its own). + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_news_expire_enable" in + [Yy][Ee][Ss]) + if [ ! -f /etc/news.expire ] + then + echo '$daily_news_expire_enable is set but /etc/news.expire' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Running news.expire:" + + /etc/news.expire && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/340.uucp b/etc/periodic/daily/340.uucp new file mode 100755 index 0000000..120c874 --- /dev/null +++ b/etc/periodic/daily/340.uucp @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Local cleanup of UUCP files. This is for backwards compatibility, +# /etc/uuclean.daily doesn't exist by default. +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_uuclean_enable" in + [Yy][Ee][Ss]) + if [ ! -d /var/spool/uucp ] + then + echo '$daily_uuclean_enable is set, but /var/spool/uucp' \ + "doesn't exist" + rc=2 + elif [ ! -f /etc/uuclean.daily ] + then + echo '$daily_uuclean_enable is set, but /etc/uuclean.daily' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Cleaning up UUCP:" + + echo /etc/uuclean.daily | su -m uucp && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/400.status-disks b/etc/periodic/daily/400.status-disks new file mode 100755 index 0000000..6d6ebac --- /dev/null +++ b/etc/periodic/daily/400.status-disks @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_disks_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Disk status:" + + df $daily_status_disks_df_flags && rc=0 || rc=3 + + # display which filesystems need backing up + + echo "" + dump W || rc=3;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/410.status-uucp b/etc/periodic/daily/410.status-uucp new file mode 100755 index 0000000..96b52ec --- /dev/null +++ b/etc/periodic/daily/410.status-uucp @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_uucp_enable" in + [Yy][Ee][Ss]) + if [ ! -d /var/spool/uucp ] + then + echo '$daily_status_uucp_enable is set but /var/spool/uucp' \ + "doesn't exist" + rc=2 + elif [ ! -x /usr/bin/uustat ] + then + echo '$daily_status_uucp_enable is set but /usr/bin/uustat' \ + "isn't executable" + rc=2 + else + echo "" + echo "UUCP status:" + + uustat -a && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/420.status-network b/etc/periodic/daily/420.status-network new file mode 100755 index 0000000..8399cf7 --- /dev/null +++ b/etc/periodic/daily/420.status-network @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_network_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Network interface status:" + + case "$daily_status_network_usedns" in + [Yy][Ee][Ss]) + netstat -i && rc=0 || rc=3;; + *) + netstat -in && rc=0 || rc=3;; + esac;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/430.status-rwho b/etc/periodic/daily/430.status-rwho new file mode 100755 index 0000000..4476136 --- /dev/null +++ b/etc/periodic/daily/430.status-rwho @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_rwho_enable" in + [Yy][Ee][Ss]) + rwho=$(echo /var/rwho/*) + if [ -f "${rwho%% *}" ] + then + echo "" + echo "Local network system status:" + prog=ruptime + else + echo "" + echo "Local system status:" + prog=uptime + fi + rc=$($prog | tee /dev/stderr | wc -l) + if [ $? -eq 0 ] + then + [ $rc -gt 1 ] && rc=1 + else + rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/440.status-mailq b/etc/periodic/daily/440.status-mailq new file mode 100755 index 0000000..17bc710 --- /dev/null +++ b/etc/periodic/daily/440.status-mailq @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_mailq_enable" in + [Yy][Ee][Ss]) + if [ ! -x /usr/bin/mailq ] + then + echo '$daily_status_mailq_enable is set but /usr/bin/mailq' \ + "isn't executable" + rc=2 + elif [ ! -d /var/spool/mqueue ] + then + echo '$daily_status_mailq_enable is set but /var/spool/mqueue' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Mail in local queue:" + + rc=$(case "$daily_status_mailq_shorten" in + [Yy][Ee][Ss]) + rc=$(mailq | + perl -ne 'print if /^\s+\S+@/' | + sort | + uniq -c | + sort -nr | + awk '$1 > 1 {print $1, $2}');; + *) + mailq;; + esac | tee /dev/stderr | fgrep -v 'mqueue is empty' | wc -l) + [ $rc -gt 1 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/450.status-security b/etc/periodic/daily/450.status-security new file mode 100755 index 0000000..4953fbb --- /dev/null +++ b/etc/periodic/daily/450.status-security @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_security_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Security check:" + + case "$daily_status_security_noamd" in + [Yy][Ee][Ss]) + args=-a;; + *) + args=;; + esac + + case "$daily_status_security_nomfs" in + [Yy][Ee][Ss]) + args="$args -m";; + esac + + case "$daily_status_security_inline" in + [Yy][Ee][Ss]) + sh /etc/security -s $args + rc=$?;; + + *) + case "${daily_status_security_output:=root}" in + /*) + echo " (output logged separately)" + sh /etc/security -s $args \ + >$daily_status_security_output 2>&1;; + *) + echo " (output mailed separately)" + sh /etc/security $args 2>&1 | + sendmail $daily_status_security_output;; + esac;; + esac;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/460.status-mail-rejects b/etc/periodic/daily/460.status-mail-rejects new file mode 100755 index 0000000..5a92130 --- /dev/null +++ b/etc/periodic/daily/460.status-mail-rejects @@ -0,0 +1,60 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_mail_rejects_enable" in + [Yy][Ee][Ss]) + if [ ! -d /etc/mail ] + then + echo '$daily_status_mail_rejects_enable is set but /etc/mail' \ + "doesn't exist" + rc=2 + elif [ ! -f /var/log/maillog ] + then + echo '$daily_status_mail_rejects_enable is set but ' \ + "/var/log/maillog doesn't exist" + rc=2 + elif [ "$daily_status_mail_rejects_logs" -le 0 ] + then + echo '$daily_status_mail_rejects_enable is set but ' \ + '$daily_status_mail_rejects_logs is not greater than zero' + rc=2 + else + echo + echo Checking for rejected mail hosts: + + start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'` + n=$(($daily_status_mail_rejects_logs - 2)) + rc=$({ + while [ $n -ge 0 ] + do + if [ -f /var/log/maillog.$n ] + then + cat /var/log/maillog.$n + elif [ -f /var/log/maillog.$n.gz ] + then + zcat -fc /var/log/maillog.$n.gz + fi + n=$(($n - 1)) + done + cat /var/log/maillog + } | + perl -ne "print \"\$2\n\" + if (/reject=/ and /^$start.*ruleset=check_\S+,\s+arg1=(<[^@]+@)?([^>,]+).*reject=/o);" | + sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l) + [ $rc -gt 0 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/500.queuerun b/etc/periodic/daily/500.queuerun new file mode 100755 index 0000000..2a8b2a1 --- /dev/null +++ b/etc/periodic/daily/500.queuerun @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_queuerun_enable" in + [Yy][Ee][Ss]) + if [ ! -x /usr/sbin/sendmail ] + then + echo '$daily_queuerun_enable is set but /usr/sbin/sendmail' \ + "isn't executable" + rc=2 + elif [ ! -d /var/spool/mqueue ] + then + echo '$daily_queuerun_enable is set but /var/spool/mqueue' \ + "doesn't exist" + rc=2 + else + /usr/sbin/sendmail -q >/dev/null 2>&1 & + rc=0 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/999.local b/etc/periodic/daily/999.local new file mode 100755 index 0000000..099f293 --- /dev/null +++ b/etc/periodic/daily/999.local @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Run the old /etc/daily.local script. This is really for backwards +# compatibility more than anything else. +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 +for script in $daily_local +do + case "$script" in + /*) + if [ -f "$script" ] + then + echo "" + echo "Running $script:" + + sh $script || rc=3 + else + echo "$script: No such file" + [ $rc -lt 2 ] && rc=2 + fi;; + *) + echo "$script: Not an absolute path" + [ $rc -lt 2 ] && rc=2;; + esac +done + +exit $rc diff --git a/etc/periodic/daily/Makefile b/etc/periodic/daily/Makefile new file mode 100644 index 0000000..d016934 --- /dev/null +++ b/etc/periodic/daily/Makefile @@ -0,0 +1,29 @@ +# $FreeBSD$ + +BIN= 100.clean-disks \ + 110.clean-tmps \ + 120.clean-preserve \ + 130.clean-msgs \ + 140.clean-rwho \ + 150.clean-hoststat \ + 200.backup-passwd \ + 210.backup-aliases \ + 220.backup-distfile \ + 300.calendar \ + 310.accounting \ + 320.rdist \ + 330.news \ + 400.status-disks \ + 420.status-network \ + 430.status-rwho \ + 440.status-mailq \ + 450.status-security \ + 460.status-mail-rejects \ + 500.queuerun \ + 999.local +.if !defined(NOUUCP) +BIN+= 340.uucp \ + 410.status-uucp +.endif + +.include <bsd.prog.mk> diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting new file mode 100755 index 0000000..f808bbf --- /dev/null +++ b/etc/periodic/monthly/200.accounting @@ -0,0 +1,33 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$monthly_accounting_enable" in + [Yy][Ee][Ss]) + W=/var/log/wtmp + if [ ! -f $W.0 ] + then + echo '$monthly_accounting_enable is set but' \ + "$W.0 doesn't exist" + rc=2 + else + echo "" + echo "Doing login accounting:" + + rc=$(ac -p -w $W.0 | sort -nr +1 | tee /dev/stderr | wc -l) + [ $rc -gt 0 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/monthly/999.local b/etc/periodic/monthly/999.local new file mode 100755 index 0000000..a70a14f --- /dev/null +++ b/etc/periodic/monthly/999.local @@ -0,0 +1,35 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 +for script in $monthly_local +do + case "$script" in + /*) + if [ -f "$script" ] + then + echo "" + echo "Running $script:" + + sh $script || rc=3 + else + echo "$script: No such file" + [ $rc -lt 2 ] && rc=2 + fi;; + *) + echo "$script: Not an absolute path" + [ $rc -lt 2 ] && rc=2;; + esac +done + +exit $rc diff --git a/etc/periodic/monthly/Makefile b/etc/periodic/monthly/Makefile new file mode 100644 index 0000000..6fea21c --- /dev/null +++ b/etc/periodic/monthly/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +BIN= 200.accounting \ + 999.local + +.include <bsd.prog.mk> diff --git a/etc/periodic/weekly/120.clean-kvmdb b/etc/periodic/weekly/120.clean-kvmdb new file mode 100755 index 0000000..603e70b --- /dev/null +++ b/etc/periodic/weekly/120.clean-kvmdb @@ -0,0 +1,49 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_clean_kvmdb_enable" in + [Yy][Ee][Ss]) + if [ ! -d /var/db ] + then + echo '$weekly_clean_kvmdb_enable is set but /var/db' \ + "doesn't exist" + rc=2 + elif [ -z "$weekly_clean_kvmdb_days" ] + then + echo '$weekly_clean_kvmdb_enable is set but' \ + '$weekly_clean_kvmdb_days is not' + rc=2 + else + echo "" + echo "Cleaning up kernel database files:" + + kernel=`sysctl -n kern.bootfile` + kernel=kvm_${kernel##*/}.db + + case "$weekly_clean_kvmdb_verbose" in + [Yy][Ee][Ss]) + print=-print;; + *) + print=;; + esac + + rc=$(find /var/db -name "kvm_*.db" ! -name $kernel \ + -atime +$weekly_clean_kvmdb_days -delete $print | + tee /dev/stderr | wc -l) + [ -z "$print" ] && rc=0 + [ $rc -gt 1 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/300.uucp b/etc/periodic/weekly/300.uucp new file mode 100755 index 0000000..1d146bc --- /dev/null +++ b/etc/periodic/weekly/300.uucp @@ -0,0 +1,38 @@ +#!/bin/sh - +# +# $FreeBSD$ +# +# This is really here for backwards compatibility, clean.weekly is not +# created by default anymore. + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_uucp_enable" in + [Yy][Ee][Ss]) + if [ ! -d /var/spool/uucp ] + then + echo '$weekly_uucp_enable is set but /var/spool/uucp' \ + "doesn't exist" + rc=2 + elif [ ! -x /usr/libexec/uucp/clean.weekly ] + then + echo '$weekly_uucp_enable is set but' \ + "/usr/libexec/uucp/clean.weekly isn't executable" + rc=2 + else + echo "" + echo "Cleaning up UUCP:" + + echo /usr/libexec/uucp/clean.weekly | su -m daemon && rc=0 || rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/310.locate b/etc/periodic/weekly/310.locate new file mode 100755 index 0000000..e6921ab --- /dev/null +++ b/etc/periodic/weekly/310.locate @@ -0,0 +1,32 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_locate_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Rebuilding locate database:" + + locdb=/var/db/locate.database + + touch $locdb && rc=0 || rc=3 + chown nobody $locdb || rc=3 + chmod 644 $locdb || rc=3 + + cd / + echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody || rc=3 + chmod 444 $locdb || rc=3;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/320.whatis b/etc/periodic/weekly/320.whatis new file mode 100755 index 0000000..dfc218a --- /dev/null +++ b/etc/periodic/weekly/320.whatis @@ -0,0 +1,51 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_whatis_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Rebuilding whatis database:" + + MANPATH=`/usr/bin/manpath -q` + if [ $? = 0 ] + then + if [ -z "${MANPATH}" ] + then + echo "manpath failed to find any manpage directories" + rc=3 + else + man_locales=`/usr/bin/manpath -qL` + rc=0 + + # Build whatis(1) database(s) for original, non-localized + # manpages. + /usr/libexec/makewhatis.local "${MANPATH}" || rc=3 + + # Build whatis(1) database(s) for localized manpages. + if [ X"${man_locales}" != X ] + then + for i in ${man_locales} + do + LC_ALL=$i /usr/libexec/makewhatis.local -a \ + -L "${MANPATH}" || rc=3 + done + fi + fi + else + rc=3 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/330.catman b/etc/periodic/weekly/330.catman new file mode 100755 index 0000000..6739ae9 --- /dev/null +++ b/etc/periodic/weekly/330.catman @@ -0,0 +1,58 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_catman_enable" in + [Yy][Ee][Ss]) + if [ ! -d /usr/share/man/cat1 ] + then + echo '$weekly_catman_enable is set but /usr/share/man/cat1' \ + "doesn't exist" + rc=2 + else + echo "" + echo "Reformatting manual pages:" + + MANPATH=`/usr/bin/manpath -q` + if [ $? = 0 ] + then + if [ -z "${MANPATH}" ] + then + echo "manpath failed to find any manpath directories" + rc=3 + else + man_locales=`/usr/bin/manpath -qL` + rc=0 + + # Preformat original, non-localized manpages + echo /usr/libexec/catman.local "$MANPATH" | + su -fm man || rc=3 + + # Preformat localized manpages. + if [ -n "$man_locales" ] + then + for i in $man_locales + do + LC_ALL=$i echo /usr/libexec/catman.local -L \ + "$MANPATH" | su -fm man || rc=3 + done + fi + fi + else + rc=3 + fi + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/340.noid b/etc/periodic/weekly/340.noid new file mode 100644 index 0000000..7b56f01 --- /dev/null +++ b/etc/periodic/weekly/340.noid @@ -0,0 +1,27 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_noid_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Check for files with an unknown user or group:" + + rc=$(find -H ${weekly_noid_dirs:-/} -fstype local \ + \( -nogroup -o -nouser \) -print | sed 's/^/ /' | + tee /dev/stderr | wc -l) + [ $rc -gt 1 ] && rc=1;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/400.status-pkg b/etc/periodic/weekly/400.status-pkg new file mode 100755 index 0000000..e9bd5d0 --- /dev/null +++ b/etc/periodic/weekly/400.status-pkg @@ -0,0 +1,30 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_status_pkg_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Check for out of date packages:" + + rc=$(pkg_version -v | + sed -n -e 's/^\([^ ]*\) *< */ \1 /p' \ + -e '/^[^ ]*-\([^ ]*\) *\* *multiple versions.*[ ,]\1[,)].*/d' \ + -e 's/^\([^ ]*\) *\* *multiple versions.*\((.*\)/ \1 needs updating \2/p' | + tee /dev/stderr | + wc -l) + [ $rc -gt 1 ] && rc=1;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/weekly/999.local b/etc/periodic/weekly/999.local new file mode 100755 index 0000000..f8b74d2 --- /dev/null +++ b/etc/periodic/weekly/999.local @@ -0,0 +1,35 @@ +#!/bin/sh - +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +rc=0 +for script in $weekly_local +do + case "$script" in + /*) + if [ -f "$script" ] + then + echo "" + echo "Running $script:" + + sh $script || rc=3 + else + echo "$script: No such file" + [ $rc -lt 2 ] && rc=2 + fi;; + *) + echo "$script: Not an absolute path" + [ $rc -lt 2 ] && rc=2;; + esac +done + +exit $rc diff --git a/etc/periodic/weekly/Makefile b/etc/periodic/weekly/Makefile new file mode 100644 index 0000000..2433e69 --- /dev/null +++ b/etc/periodic/weekly/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +BIN= 120.clean-kvmdb \ + 310.locate \ + 320.whatis \ + 330.catman \ + 340.noid \ + 400.status-pkg \ + 999.local +.if !defined(NOUUCP) +BIN+= 300.uucp +.endif + +.include <bsd.prog.mk> diff --git a/etc/phones b/etc/phones new file mode 100644 index 0000000..536ac20 --- /dev/null +++ b/etc/phones @@ -0,0 +1,11 @@ +# $FreeBSD$ +# From: @(#)phones 5.2 (Berkeley) 6/30/90 +# +# phones -- remote host phone number data base +# see tip(1), phones(5) +# +system1 9=3155557750 +system2 9145551241 +netcom 1(408)555-9760 +netcom 1(415)555-9940 +omen 1(503)555-3746 diff --git a/etc/pim6dd.conf b/etc/pim6dd.conf new file mode 100644 index 0000000..44cf790 --- /dev/null +++ b/etc/pim6dd.conf @@ -0,0 +1 @@ +phyint stf0 disable diff --git a/etc/pim6sd.conf b/etc/pim6sd.conf new file mode 100644 index 0000000..44cf790 --- /dev/null +++ b/etc/pim6sd.conf @@ -0,0 +1 @@ +phyint stf0 disable diff --git a/etc/ppp/ppp.conf b/etc/ppp/ppp.conf new file mode 100644 index 0000000..3423e1d --- /dev/null +++ b/etc/ppp/ppp.conf @@ -0,0 +1,37 @@ +################################################################# +# PPP Sample Configuration File +# Originally written by Toshiharu OHNO +# Simplified 5/14/1999 by wself@cdrom.com +# +# See /usr/share/examples/ppp/ for some examples +# +# $FreeBSD$ +################################################################# + +default: + ident user-ppp VERSION (built COMPILATIONDATE) + + # Ensure that "device" references the correct serial port + # for your modem. (cuaa0 = COM1, cuaa1 = COM2) + # + set device /dev/cuaa1 + + set log Phase Chat LCP IPCP CCP tun command + set speed 115200 + set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ + \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" + set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 + set timeout 180 # 3 minute idle timer (the default) + add default HISADDR # Add a (sticky) default route + enable dns # request DNS info (for resolv.conf) + +papchap: + + # + # edit the next three lines and replace the items in caps with + # the values which have been assigned by your ISP. + # + + set phone PHONE_NUM + set authname USERNAME + set authkey PASSWORD diff --git a/etc/ppp/ppp.deny b/etc/ppp/ppp.deny new file mode 100644 index 0000000..6aed819 --- /dev/null +++ b/etc/ppp/ppp.deny @@ -0,0 +1,22 @@ +# $FreeBSD$ +# +# list of users disallowed any pppd access via 'system +# password login'. +# read by pppd(8). +root +toor +daemon +operator +bin +tty +kmem +games +news +man +bind +ftp +uucp +xten +pop +ingres +nobody diff --git a/etc/ppp/ppp.shells.sample b/etc/ppp/ppp.shells.sample new file mode 100644 index 0000000..93b6840 --- /dev/null +++ b/etc/ppp/ppp.shells.sample @@ -0,0 +1,14 @@ +# $FreeBSD$ +# +# List of acceptable shells for pppd(8). +# Pppd will not accept a system password login +# by a user whose shell is not listed below. + +/bin/sh +/bin/csh +/bin/tcsh +/usr/local/bin/ksh +/usr/local/bin/zsh +/usr/local/bin/bash +/usr/local/bin/tcsh +/usr/local/bin/ppplogin.sh diff --git a/etc/printcap b/etc/printcap new file mode 100644 index 0000000..b492863 --- /dev/null +++ b/etc/printcap @@ -0,0 +1,54 @@ +# @(#)printcap 5.3 (Berkeley) 6/30/90 +# $FreeBSD$ + +# +# This enables a simple local "raw" printer, hooked up to the first +# parallel port. No kind of filtering is done, so everything you pass +# to the "lpr" command will be printed unmodified. +# +# Remember, for further print queues you're going to add, you have +# to choose different spool directories (the "sd" capability below), +# otherwise you will greatly confuse lpd. +# +# For some advanced printing, have a look at the "apsfilter" package. +# It plugs into the lpd system, allowing you to print a variety of +# different file types by converting everything to PostScript(tm) +# format. For more information about apsfilter visit +# +# http://www.apsfilter.org/ +# +# If you don't have a PostScript(tm) printer, don't panic, but do +# also install the latest "ghostscript" package for best printer support. +# +# Do also refer to the "printing" section of the handbook. +# +# http://www.freebsd.org/handbook/printing.html +# +# A local copy can be found under +# +# /usr/share/doc/handbook/handbook.{html,latin1}. +# +# Banner pages are now suppressed by default. Remove the :sh: capability +# to turn them back on. +# +#lp|local line printer:\ +# :sh:\ +# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: +# +# Sample remote printer. The physical printer is on machine "lphost". +# You can perform any kind of local filtering directly. If you need +# local filters (e.g. LF -> CR-LF conversion for HP printers), create +# a filter script that sends the proper escape sequence to the printer +# and then concatenates stdin to stdout. +# +#remote|sample remote printer:\ +# :sh:\ +# :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs:\ +# :if=/usr/local/libexec/if-script: +# +# Simple Russian printer with hardware CP866 character set, output filter +# used for KOI8-R -> CP866 conversion +# +#lp|Russian local line printer:\ +# :sh:of=/usr/libexec/lpr/ru/koi2alt:\ +# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: diff --git a/etc/profile b/etc/profile new file mode 100644 index 0000000..4705247 --- /dev/null +++ b/etc/profile @@ -0,0 +1,18 @@ +# $FreeBSD$ +# +# System-wide .profile file for sh(1). +# +# Uncomment this to give you the default 4.2 behavior, where disk +# information is shown in K-Blocks +# BLOCKSIZE=K; export BLOCKSIZE +# +# For the setting of languages and character sets please see +# login.conf(5) and in particular the charset and lang options. +# For full locales list check /usr/share/locale/* +# You should also read the setlocale(3) man page for information +# on how to achieve more precise control of locale settings. +# +# Read system messages +# msgs -f +# Allow terminal messages +# mesg y diff --git a/etc/protocols b/etc/protocols new file mode 100644 index 0000000..d642fe8 --- /dev/null +++ b/etc/protocols @@ -0,0 +1,146 @@ +# +# Internet protocols +# +# $FreeBSD$ +# from: @(#)protocols 5.1 (Berkeley) 4/17/89 +# +# See also http://www.isi.edu/in-notes/iana/assignments/protocol-numbers +# +ip 0 IP # internet protocol, pseudo protocol number +#hopopt 0 HOPOPT # hop-by-hop options for ipv6 +icmp 1 ICMP # internet control message protocol +igmp 2 IGMP # internet group management protocol +ggp 3 GGP # gateway-gateway protocol +ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'') +st2 5 ST2 # ST2 datagram mode (RFC 1819) +tcp 6 TCP # transmission control protocol +cbt 7 CBT # CBT, Tony Ballardie <A.Ballardie@cs.ucl.ac.uk> +egp 8 EGP # exterior gateway protocol +igp 9 IGP # any private interior gateway (Cisco: for IGRP) +bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring +nvp 11 NVP-II # Network Voice Protocol +pup 12 PUP # PARC universal packet protocol +argus 13 ARGUS # ARGUS +emcon 14 EMCON # EMCON +xnet 15 XNET # Cross Net Debugger +chaos 16 CHAOS # Chaos +udp 17 UDP # user datagram protocol +mux 18 MUX # Multiplexing protocol +dcn 19 DCN-MEAS # DCN Measurement Subsystems +hmp 20 HMP # host monitoring protocol +prm 21 PRM # packet radio measurement protocol +xns-idp 22 XNS-IDP # Xerox NS IDP +trunk-1 23 TRUNK-1 # Trunk-1 +trunk-2 24 TRUNK-2 # Trunk-2 +leaf-1 25 LEAF-1 # Leaf-1 +leaf-2 26 LEAF-2 # Leaf-2 +rdp 27 RDP # "reliable datagram" protocol +irtp 28 IRTP # Internet Reliable Transaction Protocol +iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4 +netblt 30 NETBLT # Bulk Data Transfer Protocol +mfe-nsp 31 MFE-NSP # MFE Network Services Protocol +merit-inp 32 MERIT-INP # MERIT Internodal Protocol +sep 33 SEP # Sequential Exchange Protocol +3pc 34 3PC # Third Party Connect Protocol +idpr 35 IDPR # Inter-Domain Policy Routing Protocol +xtp 36 XTP # Xpress Tranfer Protocol +ddp 37 DDP # Datagram Delivery Protocol +idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto +tp++ 39 TP++ # TP++ Transport Protocol +il 40 IL # IL Transport Protocol +ipv6 41 IPV6 # ipv6 +sdrp 42 SDRP # Source Demand Routing Protocol +ipv6-route 43 IPV6-ROUTE # routing header for ipv6 +ipv6-frag 44 IPV6-FRAG # fragment header for ipv6 +idrp 45 IDRP # Inter-Domain Routing Protocol +rsvp 46 RSVP # Resource ReSerVation Protocol +gre 47 GRE # Generic Routing Encapsulation +mhrp 48 MHRP # Mobile Host Routing Protocol +bna 49 BNA # BNA +esp 50 ESP # encapsulating security payload +ah 51 AH # authentication header +i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA +swipe 53 SWIPE # IP with Encryption +narp 54 NARP # NBMA Address Resolution Protocol +mobile 55 MOBILE # IP Mobility +tlsp 56 TLSP # Transport Layer Security Protocol +skip 57 SKIP # SKIP +ipv6-icmp 58 IPV6-ICMP # ICMP for IPv6 +ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6 +ipv6-opts 60 IPV6-OPTS # destination options for ipv6 +# 61 # any host internal protocol +cftp 62 CFTP # CFTP +# 63 # any local network +sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK +kryptolan 65 KRYPTOLAN # Kryptolan +rvd 66 RVD # MIT Remote Virtual Disk Protocol +ippc 67 IPPC # Internet Pluribus Packet Core +# 68 # any distributed file system +sat-mon 69 SAT-MON # SATNET Monitoring +visa 70 VISA # VISA Protocol +ipcv 71 IPCV # Internet Packet Core Utility +cpnx 72 CPNX # Computer Protocol Network Executive +cphb 73 CPHB # Computer Protocol Heart Beat +wsn 74 WSN # Wang Span Network +pvp 75 PVP # Packet Video Protocol +br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring +sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary +wb-mon 78 WB-MON # WIDEBAND Monitoring +wb-expak 79 WB-EXPAK # WIDEBAND EXPAK +iso-ip 80 ISO-IP # ISO Internet Protocol +vmtp 81 VMTP # Versatile Message Transport +secure-vmtp 82 SECURE-VMTP # SECURE-VMTP +vines 83 VINES # VINES +ttp 84 TTP # TTP +nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP +dgp 86 DGP # Dissimilar Gateway Protocol +tcf 87 TCF # TCF +eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco) +ospf 89 OSPFIGP # Open Shortest Path First IGP +sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol +larp 91 LARP # Locus Address Resolution Protocol +mtp 92 MTP # Multicast Transport Protocol +ax.25 93 AX.25 # AX.25 Frames +ipip 94 IPIP # Yet Another IP encapsulation +micp 95 MICP # Mobile Internetworking Control Pro. +scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro. +etherip 97 ETHERIP # Ethernet-within-IP Encapsulation +encap 98 ENCAP # Yet Another IP encapsulation +# 99 # any private encryption scheme +gmtp 100 GMTP # GMTP +ifmp 101 IFMP # Ipsilon Flow Management Protocol +pnni 102 PNNI # PNNI over IP +pim 103 PIM # Protocol Independent Multicast +aris 104 ARIS # ARIS +scps 105 SCPS # SCPS +qnx 106 QNX # QNX +a/n 107 A/N # Active Networks +ipcomp 108 IPComp # IP Payload Compression Protocol +snp 109 SNP # Sitara Networks Protocol +compaq-peer 110 Compaq-Peer # Compaq Peer Protocol +ipx-in-ip 111 IPX-in-IP # IPX in IP +vrrp 112 VRRP # Virtual Router Redundancy Protocol +pgm 113 PGM # PGM Reliable Transport Protocol +# 114 # any 0-hop protocol +l2tp 115 L2TP # Layer Two Tunneling Protocol +ddx 116 DDX # D-II Data Exchange +iatp 117 IATP # Interactive Agent Transfer Protocol +st 118 ST # Schedule Transfer +srp 119 SRP # SpectraLink Radio Protocol +uti 120 UTI # UTI +smp 121 SMP # Simple Message Protocol +sm 122 SM # SM +ptp 123 PTP # Performance Transparency Protocol +isis 124 ISIS # ISIS over IPv4 +fire 125 FIRE +crtp 126 CRTP # Combat Radio Transport Protocol +crdup 127 CRUDP # Combat Radio User Datagram +sscopmce 128 SSCOPMCE +iplt 129 IPLT +sps 130 SPS # Secure Packet Shield +pipe 131 PIPE # Private IP Encapsulation within IP +sctp 132 SCTP # Stream Control Transmission Protocol +fc 133 FC # Fibre Channel +# 134-254 # Unassigned +divert 254 DIVERT # Divert pseudo-protocol [non IANA] +# 255 # Reserved @@ -0,0 +1,813 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)rc 5.27 (Berkeley) 6/5/91 +# + +# System startup script run by init on autoboot +# or after single-user. +# Output and error are redirected to console by init, +# and the console is the controlling terminal. + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +stty status '^T' + +# Set shell to ignore SIGINT (2), but not children; +# shell catches SIGQUIT (3) and returns to single user after fsck. +# +trap : 2 +trap : 3 # shouldn't be needed + +bootmode=$1 + +HOME=/ +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin +export HOME PATH + +# BOOTP diskless boot. We have to run the rc file early in order to +# retarget various config files. +# +if [ -r /etc/rc.diskless1 ]; then + dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` + if [ ${dlv:=0} != 0 ]; then + . /etc/rc.diskless1 + fi +fi + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +feed_dev_random() { + if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then + echo "Using ${1} as an entropy file" + cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null + fi +} + +chkdepend() { + svc=$1 + svc_var=$2 + dep=$3 + dep_var=$4 + + eval svc_val=\${$svc_var} + eval dep_val=\${$dep_var} + + case ${svc_val} in + [Yy][Ee][Ss]) + case ${dep_val} in + [Yy][Ee][Ss]) + ;; + *) + eval ${dep_var}="YES" + echo "DEPENDENCY NOTE: ${dep} will be enabled" \ + "to support ${svc}" + ;; + esac + ;; + esac +} + +chkdepend amd amd_enable portmap portmap_enable +chkdepend NFS nfs_server_enable portmap portmap_enable +chkdepend NIS nis_server_enable portmap portmap_enable +chkdepend NIS nis_client_enable portmap portmap_enable + +# Enable harvesting of entropy via devices. The sooner this happens the +# better so that we can take advantage of the boot process. +# +echo -n 'Entropy harvesting:' + +case ${harvest_interrupt} in +[Nn][Oo]) + ;; +*) + if [ -w /dev/random ]; then + /sbin/sysctl -w kern.random.sys.harvest.interrupt=1 >/dev/null + echo -n ' interrupts' + fi + ;; +esac + +case ${harvest_ethernet} in +[Nn][Oo]) + ;; +*) + if [ -w /dev/random ]; then + /sbin/sysctl -w kern.random.sys.harvest.ethernet=1 >/dev/null + echo -n ' ethernet' + fi + ;; +esac + +case ${harvest_p_to_p} in +[Nn][Oo]) + ;; +*) + if [ -w /dev/random ]; then + /sbin/sysctl -w kern.random.sys.harvest.point_to_point=1 >/dev/null + echo -n ' point_to_point' + fi + ;; +esac + +echo '.' + +# First pass at reseeding /dev/random. +# +case ${entropy_file} in +[Nn][Oo] | '') + ;; +*) + if [ -w /dev/random ]; then + feed_dev_random "${entropy_file}" + fi + ;; +esac + +# XXX temporary until we can get the entropy +# harvesting rate up +# Entropy below is not great, +# but better than nothing. +( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \ + | dd of=/dev/random bs=8k 2>/dev/null +cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null + +# Configure ccd devices. +# +if [ -r /etc/ccd.conf ]; then + ccdconfig -C +fi + +case ${start_vinum} in +[Yy][Ee][Ss]) + vinum start + ;; +esac + +swapon -a + +case ${bootmode} in +autoboot) + echo 'Automatic boot in progress...' + fsck -p + case $? in + 0) + ;; + 2) + exit 1 + ;; + 4) + reboot + echo 'Reboot failed... help!' + exit 1 + ;; + 8) + case ${fsck_y_enable} in + [Yy][Ee][Ss]) + echo 'File system preen failed, trying fsck -y . . .' + fsck -y + case $? in + 0) + ;; + *) + echo 'Automatic file system check failed . . . help!' + exit 1 + ;; + esac + ;; + *) + echo 'Automatic file system check failed . . . help!' + exit 1 + ;; + esac + ;; + 12) + echo 'Reboot interrupted' + exit 1 + ;; + 130) + # interrupt before catcher installed + exit 1 + ;; + *) + echo 'Unknown error in reboot' + exit 1 + ;; + esac + ;; +*) + echo 'Skipping disk checks ...' + ;; +esac + +set -T +trap "echo 'Reboot interrupted'; exit 1" 3 + +# root normally must be read/write, but if this is a BOOTP NFS +# diskless boot it does not have to be. +# +case ${root_rw_mount} in +[Nn][Oo] | '') + ;; +*) + if ! mount -u -o rw / ; then + echo 'Mounting root filesystem rw failed, startup aborted' + exit 1 + fi + ;; +esac + +umount -a >/dev/null 2>&1 + +# Mount everything except nfs filesystems. +mount -a -t nonfs + +case $? in +0) + ;; +*) + echo 'Mounting /etc/fstab filesystems failed, startup aborted' + exit 1 + ;; +esac + +# Run custom disk mounting function here +# +if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then + sh ${diskless_mount} +fi + +# Reseed /dev/random with previously stored entropy. +case ${entropy_dir} in +[Nn][Oo]) + ;; +*) + entropy_dir=${entropy_dir:-/var/db/entropy} + if [ -d "${entropy_dir}" ]; then + if [ -w /dev/random ]; then + for seedfile in ${entropy_dir}/*; do + feed_dev_random "${seedfile}" + done + fi + fi + ;; +esac + +case ${entropy_file} in +[Nn][Oo] | '') + ;; +*) + if [ -w /dev/random ]; then + feed_dev_random "${entropy_file}" + fi + ;; +esac + +adjkerntz -i + +purgedir() { + local dir file + + if [ $# -eq 0 ]; then + purgedir . + else + for dir + do + ( + cd "$dir" && for file in .* * + do + [ ."$file" = .. -o ."$file" = ... ] && continue + [ -d "$file" -a ! -L "$file" ] && + purgedir "$file" + [ -f "$file" ] && rm -f -- "$file" + done + ) + done + fi +} + +clean_var() { + if [ ! -f /var/run/clean_var ]; then + purgedir /var/run /var/spool/lock + rm -rf /var/spool/uucp/.Temp/* + # Keep a copy of the boot messages around + dmesg >/var/run/dmesg.boot + # And an initial utmp file + (cd /var/run && cp /dev/null utmp && chmod 644 utmp;) + >/var/run/clean_var + fi +} + +if [ -d /var/run -a -d /var/spool/lock -a -d /var/spool/uucp/.Temp ]; then + # network_pass1() *may* end up writing stuff to /var - we don't want to + # remove it immediately afterwards - *nor* to we want to fail to clean + # an nfs-mounted /var. + clean_var +fi + +# Add additional swapfile, if configured. +# +case ${swapfile} in +[Nn][Oo] | '') + ;; +*) + if [ -w "${swapfile}" -a -c /dev/vn0b ]; then + echo "Adding ${swapfile} as additional swap" + vnconfig /dev/vn0b ${swapfile} && swapon /dev/vn0b + fi + ;; +esac + +# Set sysctl variables as early as we can +# +if [ -r /etc/rc.sysctl ]; then + . /etc/rc.sysctl +fi + +# Configure serial devices +# +if [ -r /etc/rc.serial ]; then + . /etc/rc.serial +fi + +# Start up PC-card configuration +# +if [ -r /etc/rc.pccard ]; then + . /etc/rc.pccard +fi + +# Start up the initial network configuration. +# +if [ -r /etc/rc.network ]; then + . /etc/rc.network # We only need to do this once. + network_pass1 +fi + +case ${ipv6_enable} in +[Yy][Ee][Ss]) + if [ -r /etc/rc.network6 ]; then + . /etc/rc.network6 # We only need to do this once also. + network6_pass1 + fi + ;; +esac + +# Mount NFS filesystems if present in /etc/fstab +case "`mount -d -a -t nfs`" in +*mount_nfs*) + echo -n 'Mounting NFS file systems:' + mount -a -t nfs + echo '.' + ;; +esac + +# Whack the pty perms back into shape. +# +if ls /dev/tty[pqrsPQRS]* > /dev/null 2>&1; then + chflags 0 /dev/tty[pqrsPQRS]* + chmod 666 /dev/tty[pqrsPQRS]* + chown root:wheel /dev/tty[pqrsPQRS]* +fi + +# Clean up left-over files +# +clean_var # If it hasn't already been done +rm /var/run/clean_var + +# Clearing /tmp at boot-time seems to have a long tradition. It doesn't +# help in any way for long-living systems, and it might accidentally +# clobber files you would rather like to have preserved after a crash +# (if not using mfs /tmp anyway). +# +# See also the example of another cleanup policy in /etc/periodic/daily. +# +case ${clear_tmp_enable} in +[Yy][Ee][Ss]) + echo -n 'Clearing /tmp:' + # prune quickly with one rm, then use find to clean up /tmp/[lq]* + # (not needed with mfs /tmp, but doesn't hurt there...) + (cd /tmp && rm -rf [a-km-pr-zA-Z]* && + find -d . ! -name . ! -name lost+found ! -name quota.user \ + ! -name quota.group -exec rm -rf -- {} \;) + echo '.' + ;; +esac + +# Remove X lock files, since they will prevent you from restarting X11 +# after a system crash. +# +rm -f /tmp/.X*-lock /tmp/.X11-unix/* + +# Snapshot any kernel -c changes back to disk here <someday>. +# This has changed with ELF and /kernel.config. + +echo -n 'Additional daemons:' + +# Start system logging and name service. Named needs to start before syslogd +# if you don't have a /etc/resolv.conf. +# +case ${syslogd_enable} in +[Yy][Ee][Ss]) + # Transitional symlink (for the next couple of years :) until all + # binaries have had a chance to move towards /var/run/log. + if [ ! -h /dev/log ]; then + # might complain for r/o root f/s + ln -sf /var/run/log /dev/log + fi + + rm -f /var/run/log + echo -n ' syslogd'; syslogd ${syslogd_flags} + ;; +esac + +echo '.' + +# Build device name databases if we are not using DEVFS +# +if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then + rm -f /var/run/dev.db +else + dev_mkdb +fi + +# Enable dumpdev so that savecore can see it. +# /var/crash should be a directory or a symbolic link +# to the crash directory if core dumps are to be saved. +# +case ${dumpdev} in +[Nn][Oo] | '') + ;; +*) + if [ -e "${dumpdev}" -a -d /var/crash ]; then + /sbin/dumpon -v ${dumpdev} + echo -n 'Checking for core dump: ' + /sbin/savecore ${savecore_flags} /var/crash + fi + ;; +esac + +if [ -n "${network_pass1_done}" ]; then + network_pass2 +fi + +# Enable/Check the quotas (must be after ypbind if using NIS) +# +case ${enable_quotas} in +[Yy][Ee][Ss]) + case ${check_quotas} in + [Yy][Ee][Ss]) + echo -n 'Checking quotas:' + quotacheck -a + echo ' done.' + ;; + esac + + echo -n 'Enabling quotas:' + quotaon -a + echo ' done.' + ;; +esac + +if [ -n "${network_pass2_done}" ]; then + network_pass3 +fi + +# Check the password temp/lock file +# +if [ -e /etc/ptmp ]; then + logger -s -p auth.err \ + "password file may be incorrect -- /etc/ptmp exists" +fi + +case ${accounting_enable} in +[Yy][Ee][Ss]) + if [ -d /var/account ]; then + echo 'Turning on accounting:' + if [ ! -e /var/account/acct ]; then + touch /var/account/acct + fi + accton /var/account/acct + fi + ;; +esac + +# Make shared lib searching a little faster. Leave /usr/lib first if you +# add your own entries or you may come to grief. +# +ldconfig="/sbin/ldconfig" +case ${ldconfig_insecure} in +[Yy][Ee][Ss]) + ldconfig="${ldconfig} -i" + ;; +esac +if [ -x /sbin/ldconfig ]; then + case `/usr/bin/objformat` in + elf) + _LDC=/usr/lib + for i in ${ldconfig_paths}; do + if [ -d "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done + echo 'ELF ldconfig path:' ${_LDC} + ${ldconfig} -elf ${_LDC} + ;; + esac + + # Legacy aout support for i386 only + case `sysctl -n hw.machine` in + i386) + # Default the a.out ldconfig path. + : ${ldconfig_paths_aout=${ldconfig_paths}} + _LDC=/usr/lib/aout + for i in ${ldconfig_paths_aout}; do + if [ -d "${i}" ]; then + _LDC="${_LDC} ${i}" + fi + done + echo 'a.out ldconfig path:' ${_LDC} + ${ldconfig} -aout ${_LDC} + ;; + esac +fi + +# Now start up miscellaneous daemons that don't belong anywhere else +# +echo -n 'Starting standard daemons:' +case ${inetd_enable} in +[Nn][Oo]) + ;; +*) + echo -n ' inetd'; inetd ${inetd_flags} + ;; +esac + +case ${cron_enable} in +[Nn][Oo]) + ;; +*) + echo -n ' cron'; ${cron_program:-/usr/sbin/cron} ${cron_flags} + ;; +esac + +case ${lpd_enable} in +[Yy][Ee][Ss]) + echo -n ' printer'; ${lpd_program:-/usr/sbin/lpd} ${lpd_flags} + ;; +esac + +case ${sshd_enable} in +[Yy][Ee][Ss]) + if [ -x ${sshd_program:-/usr/sbin/sshd} ]; then + echo -n ' sshd'; + ${sshd_program:-/usr/sbin/sshd} ${sshd_flags} + fi + ;; +esac + +case ${usbd_enable} in +[Yy][Ee][Ss]) + echo -n ' usbd'; /usr/sbin/usbd ${usbd_flags} + ;; +esac + +if [ -r /etc/mail/sendmail.cf ]; then + case ${sendmail_enable} in + [Yy][Ee][Ss]) + echo -n ' sendmail' + /usr/sbin/sendmail ${sendmail_flags} + ;; + *) + case ${sendmail_outbound_enable} in + [Yy][Ee][Ss]) + echo -n ' sendmail' + /usr/sbin/sendmail ${sendmail_outbound_flags} + ;; + esac + ;; + esac +fi + +echo '.' + +# Recover vi editor files. +find /var/tmp/vi.recover ! -type f -a ! -type d -delete +vibackup=`echo /var/tmp/vi.recover/vi.*` +if [ "${vibackup}" != '/var/tmp/vi.recover/vi.*' ]; then + echo -n 'Recovering vi editor sessions:' + for i in /var/tmp/vi.recover/vi.*; do + # Only test files that are readable. + if [ ! -r "${i}" ]; then + continue + fi + + # Unmodified nvi editor backup files either have the + # execute bit set or are zero length. Delete them. + if [ -x "${i}" -o ! -s "${i}" ]; then + rm -f "${i}" + fi + done + + # It is possible to get incomplete recovery files, if the editor + # crashes at the right time. + virecovery=`echo /var/tmp/vi.recover/recover.*` + if [ "${virecovery}" != "/var/tmp/vi.recover/recover.*" ]; then + for i in /var/tmp/vi.recover/recover.*; do + # Only test files that are readable. + if [ ! -r "${i}" ]; then + continue + fi + + # Delete any recovery files that are zero length, + # corrupted, or that have no corresponding backup file. + # Else send mail to the user. + recfile=`awk '/^X-vi-recover-path:/{print $2}' < "${i}"` + if [ -n "${recfile}" -a -s "${recfile}" ]; then + sendmail -t < "${i}" + else + rm -f "${i}" + fi + done + fi + echo '.' +fi + +# Make a bounds file for msgs(1) if there isn't one already +# +if [ -d /var/msgs -a ! -f /var/msgs/bounds -a ! -L /var/msgs/bounds ]; then + echo 0 > /var/msgs/bounds +fi + +case ${update_motd} in +[Nn][Oo] | '') + ;; +*) + if T=`mktemp /tmp/_motd.XXXXXX`; then + uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T} + awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T} + cmp -s ${T} /etc/motd || { + cp ${T} /etc/motd + chmod 644 /etc/motd + } + rm -f ${T} + fi + ;; +esac + +# Configure implementation specific stuff +# +arch=`uname -m` +if [ -r /etc/rc.${arch} ]; then + . /etc/rc.${arch} +fi + +# Configure the system console +# +if [ -r /etc/rc.syscons ]; then + . /etc/rc.syscons +fi + +# Run rc.devfs if readable to customize devfs +# +if [ -r /etc/rc.devfs ]; then + sh /etc/rc.devfs +fi + +echo -n 'Additional ABI support:' + +# Load the SysV IPC API if requested. +case ${sysvipc_enable} in +[Yy][Ee][Ss]) + echo -n ' sysvipc' + kldload sysvmsg >/dev/null 2>&1 + kldload sysvsem >/dev/null 2>&1 + kldload sysvshm >/dev/null 2>&1 + ;; +esac + +# Start the Linux binary compatibility if requested. +# +case ${linux_enable} in +[Yy][Ee][Ss]) + echo -n ' linux' + if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then + kldload linux > /dev/null 2>&1 + fi + if [ -x /compat/linux/sbin/ldconfig ]; then + /compat/linux/sbin/ldconfig + fi + ;; +esac + +# Start the SysVR4 binary emulation if requested. +# +case ${svr4_enable} in +[Yy][Ee][Ss]) + echo -n ' svr4'; kldload svr4 > /dev/null 2>&1 + ;; +esac + +echo '.' + +# Do traditional (but rather obsolete) rc.local file if it exists. If you +# use this file and want to make it programmatic, source /etc/defaults/rc.conf +# in /etc/rc.local and add your custom variables to /etc/rc.conf, as +# shown below. Please do not put local extensions into /etc/rc itself. +# Use /etc/rc.local +# +# ---- rc.local ---- +# if [ -r /etc/defaults/rc.conf ]; then +# . /etc/defaults/rc.conf +# source_rc_confs +# elif [ -r /etc/rc.conf ]; then +# . /etc/rc.conf +# fi +# +# ... additional startup conditionals ... +# ---- rc.local ---- +# +if [ -r /etc/rc.local ]; then + echo -n 'Starting local daemons:' + sh /etc/rc.local + echo '.' +fi + +# For each valid dir in $local_startup, search for init scripts matching *.sh +# +case ${local_startup} in +[Nn][Oo] | '') + ;; +*) + echo -n 'Local package initialization:' + for dir in ${local_startup}; do + if [ -d "${dir}" ]; then + for script in ${dir}/*.sh; do + if [ -x "${script}" ]; then + (set -T + trap 'exit 1' 2 + ${script} start) + fi + done + fi + done + echo '.' + ;; +esac + +if [ -n "${network_pass3_done}" ]; then + network_pass4 +fi + +# Raise kernel security level. This should be done only after `fsck' has +# repaired local file systems if you want the securelevel to be greater than 1. +# +case ${kern_securelevel_enable} in +[Yy][Ee][Ss]) + if [ "${kern_securelevel}" -ge 0 ]; then + echo 'Raising kernel security level: ' + sysctl -w kern.securelevel=${kern_securelevel} + fi + ;; +esac + +echo '' + +date + +exit 0 + diff --git a/etc/rc.atm b/etc/rc.atm new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.atm @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/atm1 b/etc/rc.d/atm1 new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.d/atm1 @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/atm2 b/etc/rc.d/atm2 new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.d/atm2 @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/atm2.sh b/etc/rc.d/atm2.sh new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.d/atm2.sh @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/atm3 b/etc/rc.d/atm3 new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.d/atm3 @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/atm3.sh b/etc/rc.d/atm3.sh new file mode 100644 index 0000000..88e4354 --- /dev/null +++ b/etc/rc.d/atm3.sh @@ -0,0 +1,217 @@ +#!/bin/sh +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# ATM networking startup script +# +# Initial interface configuration. +# N.B. /usr is not mounted. +# +atm_pass1() { + # Locate all probed ATM adapters + atmdev=`atm sh stat int | while read dev junk; do + case ${dev} in + hea[0-9] | hea[0-9][0-9]) + echo "${dev} " + ;; + hfa[0-9] | hfa[0-9][0-9]) + echo "${dev} " + ;; + *) + continue + ;; + esac + done` + + if [ -z "${atmdev}" ]; then + echo 'No ATM adapters found' + return 0 + fi + + # Load microcode into FORE adapters (if needed) + if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then + fore_dnld + fi + + # Configure physical interfaces + ilmid=0 + for phy in ${atmdev}; do + echo -n "Configuring ATM device ${phy}:" + + # Define network interfaces + eval netif_args=\$atm_netif_${phy} + if [ -n "${netif_args}" ]; then + atm set netif ${phy} ${netif_args} || continue + else + echo ' missing network interface definition' + continue + fi + + # Override physical MAC address + eval macaddr_args=\$atm_macaddr_${phy} + if [ -n "${macaddr_args}" ]; then + case ${macaddr_args} in + [Nn][Oo] | '') + ;; + *) + atm set mac ${phy} ${macaddr_args} || continue + ;; + esac + fi + + # Configure signalling manager + eval sigmgr_args=\$atm_sigmgr_${phy} + if [ -n "${sigmgr_args}" ]; then + atm attach ${phy} ${sigmgr_args} || continue + else + echo ' missing signalling manager definition' + continue + fi + + # Configure UNI NSAP prefix + eval prefix_args=\$atm_prefix_${phy} + if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then + if [ -z "${prefix_args}" ]; then + echo ' missing NSAP prefix for UNI interface' + continue + fi + + case ${prefix_args} in + ILMI) + ilmid=1 + ;; + *) + atm set prefix ${phy} ${prefix_args} || continue + ;; + esac + fi + + atm_phy="${atm_phy} ${phy}" + echo '.' + done + + echo -n 'Starting initial ATM daemons:' + # Start ILMI daemon (if needed) + case ${ilmid} in + 1) + echo -n ' ilmid' + ilmid + ;; + esac + + echo '.' + atm_pass1_done=YES +} + +# +# Finish up configuration. +# N.B. /usr is not mounted. +# +atm_pass2() { + echo -n 'Configuring ATM network interfaces:' + + atm_scspd=0 + atm_atmarpd="" + + # Configure network interfaces + for phy in ${atm_phy}; do + eval netif_args=\$atm_netif_${phy} + set -- ${netif_args} + netname=$1 + netcnt=$2 + netindx=0 + while [ ${netindx} -lt ${netcnt} ]; do + net="${netname}${netindx}" + netindx=`expr ${netindx} + 1` + echo -n " ${net}" + + # Configure atmarp server + eval atmarp_args=\$atm_arpserver_${net} + if [ -n "${atmarp_args}" ]; then + atm set arpserver ${net} ${atmarp_args} || + continue + fi + eval scsparp_args=\$atm_scsparp_${net} + + case ${scsparp_args} in + [Yy][Ee][Ss]) + case ${atmarp_args} in + local) + ;; + *) + echo ' local arpserver required for SCSP' + continue + ;; + esac + + atm_atmarpd="${atm_atmarpd} ${net}" + atm_scspd=1 + esac + done + done + echo '.' + + # Define any PVCs. + if [ -n "${atm_pvcs}" ]; then + for i in ${atm_pvcs}; do + eval pvc_args=\$atm_pvc_${i} + atm add pvc ${pvc_args} + done + fi + + # Define any permanent ARP entries. + if [ -n "${atm_arps}" ]; then + for i in ${atm_arps}; do + eval arp_args=\$atm_arp_${i} + atm add arp ${arp_args} + done + fi + atm_pass2_done=YES +} + +# +# Start any necessary daemons. +# +atm_pass3() { + # Start SCSP daemon (if needed) + case ${atm_scspd} in + 1) + echo -n ' scspd' + scspd + ;; + esac + + # Start ATMARP daemon (if needed) + if [ -n "${atm_atmarpd}" ]; then + echo -n ' atmarpd' + atmarpd ${atm_atmarpd} + fi + + atm_pass3_done=YES +} diff --git a/etc/rc.d/diskless b/etc/rc.d/diskless new file mode 100644 index 0000000..1443724 --- /dev/null +++ b/etc/rc.d/diskless @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# $FreeBSD$ +# +# $FreeBSD$ +# + +# PROVIDE: diskless +# REQUIRE: initdiskless mountcritlocal + if [ -n "$4" ]; then + bpi="-i $4" + fi + /sbin/mdconfig -a -t malloc -s $1 -u $3 + /sbin/disklabel -r -w md$3 auto + /sbin/newfs $bpi /dev/md$3c + /sbin/mount /dev/md$3c $2 +} + +mount_mfs -s ${varsize:=65536} -T qp120at dummy /var +var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ + spool/output/lpd" +for i in ${var_dirs} +do + mkdir /var/${i} +done +chmod 755 /var/run +chmod 755 /var/db +chmod 755 /var/spool +chmod 1777 /var/tmp +chown -R root.daemon /var/spool/output +chgrp daemon /var/spool/lpd +# Since we are starting with a very fresh /etc on an MFS: +if [ -d /conf/default/etc ]; then + newaliases +fi +if [ ! -h /tmp -a ! -h /var/tmp ]; then + mount_null /var/tmp /tmp +fi +# +# extract a list of device entries, then copy them to a writable partition +(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp +mount_mfs -s 4096 -i 512 -T qp120at dummy /dev +(cd /; cpio -i -H newc -d < /tmp/dev.tmp) + # extract a list of device entries, then copy them to a writable fs + (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp + mount_md 4096 /dev 3 512 + (cd /; cpio -i -H newc -d < /tmp/dev.tmp) +fi diff --git a/etc/rc.d/initdiskless b/etc/rc.d/initdiskless new file mode 100644 index 0000000..80ca2ce --- /dev/null +++ b/etc/rc.d/initdiskless @@ -0,0 +1,127 @@ +# Copyright (c) 1999 Matt Dillion +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/rc.diskless1 - general BOOTP startup +# +# BOOTP has mounted / for us. Assume a read-only mount. We must then +# - figure out our IP by querying the interface +# - fill /conf/etc (writable) with files from /etc, and then update +# per-machine files from /conf/*/ where * is the IP of the host, +# the IP of the subnet, "default", or nothing. +# - mount /conf/etc over /etc so we can see the new files. +# +# WARNING: i thing you should not change /etc/rc or strange things could +# happen. +# +# The operator is in charge of setting /conf/*/etc/* things as appropriate. +# Typically rc.conf and fstab need to be changed, but possibly +# also other files such as inetd.conf etc. + +# chkerr: +# +# Routine to check for error +# +# checks error code and drops into shell on failure. +# if shell exits, terminates script as well as /etc/rc. +# +chkerr() { + case $1 in + 0) + ;; + *) + echo "$2 failed: dropping into /bin/sh" + /bin/sh + # RESUME + ;; + esac +} + +# DEBUGGING +# +# set -v + +# Figure out our interface and IP. +# +bootp_ifc="" +bootp_ipa="" +bootp_ipbca="" +iflist=`ifconfig -l` +for i in ${iflist} ; do + set `ifconfig ${i}` + while [ $# -ge 1 ] ; do + if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then + bootp_ifc=${i} ; bootp_ipa=${2} ; shift + fi + if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then + bootp_ipbca=$2; shift + fi + shift + done + if [ "${bootp_ifc}" != "" ] ; then + break + fi +done +echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" + +# Files in /etc are copied to /conf/etc which is writable. Then +# per-machine configs from /conf/ip.address/etc are copied onto this +# directory. First choice is using the client's IP, then the client's +# broadcast address, then a default configuration. +# This way we have some flexibility to handle clusters of machines +# on separate subnets. +# +# WARNING! null mounts cannot handle mmap, and since many programs +# use mmap (such as 'cp'), we have to copy. +# +mount_mfs -s 2048 -T qp120at dummy /conf/etc +cp -Rp /etc/* /conf/etc +chkerr $? "MFS mount on /conf/etc" + +if [ -d /conf/${bootp_ipa} ] ; then + cp -Rp /conf/${bootp_ipa}/etc/* /conf/etc +elif [ -d /conf/${bootp_ipbca} ] ; then + cp -Rp /conf/${bootp_ipbca}/etc/* /conf/etc +else + cp -Rp /conf/default/etc/* /conf/etc +fi + +# Make the new directory available as /etc +# +mount_null /conf/etc /etc + +# Tell /etc/rc to run the specified script after +# it does its mounts but before it does anything +# else. +# +# This script is responsible for setting up the +# diskless mount environment. This can be +# overriden by /conf/ME/rc.conf.local if, for +# example, you do not want to run the standard +# system /etc/rc.diskless2 + +diskless_mount="/etc/rc.diskless2" diff --git a/etc/rc.d/isdnd b/etc/rc.d/isdnd new file mode 100644 index 0000000..7da0bf8 --- /dev/null +++ b/etc/rc.d/isdnd @@ -0,0 +1,88 @@ +#!/bin/sh +# +# Copyright (c) 1999 Hellmuth Michaelis +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#--------------------------------------------------------------------------- +# +# /etc/rc.isdn - isdn4bsd startup script +# -------------------------------------- +# +# last edit-date: [Mon Mar 8 12:15:56 1999] +# +#--------------------------------------------------------------------------- + +case ${isdn_enable} in +[Yy][Ee][Ss]) + echo -n 'ISDN subsystem setup:' + + # Terminal type for fullscreen mode, default to syscons driver + # + isdn_ttype=cons25 + + # Check for pcvt driver (VT100/VT220 emulator) + # + if [ -x /usr/sbin/ispcvt ]; then + if /usr/sbin/ispcvt; then + isdn_ttype=pcvt25 + fi + fi + + case ${isdn_flags} in + [Nn][Oo] | '') + isdn_flags='' + ;; + esac + + # Start the isdn daemon + # + if [ -x /usr/sbin/isdnd ]; then + echo -n ' isdnd' + case ${isdn_fsdev} in + [Nn][Oo] | '') + /usr/sbin/isdnd ${isdn_flags} + ;; + *) + /usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype} + ;; + esac + fi + + # Start isdntrace + # + case ${isdn_trace} in + [Yy][Ee][Ss]) + if [ -x /usr/sbin/isdntrace ]; then + echo -n ' isdntrace' + nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 & + fi + ;; + esac + + echo '.' + ;; +esac diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.d/netoptions @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.d/network1 b/etc/rc.d/network1 new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.d/network1 @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.d/network2 b/etc/rc.d/network2 new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.d/network2 @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.d/network3 b/etc/rc.d/network3 new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.d/network3 @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.d/network_ipv6 b/etc/rc.d/network_ipv6 new file mode 100644 index 0000000..6b47af8 --- /dev/null +++ b/etc/rc.d/network_ipv6 @@ -0,0 +1,498 @@ +#! /bin/sh +# +# Copyright (c) 2000 The KAME Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Note that almost all of the user-configurable behavior is not in this +# file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# IPv6 startup + +network6_pass1() { + echo -n 'Doing IPv6 network setup:' + + # Initialize IP filtering using ip6fw + # + if /sbin/ip6fw -q flush > /dev/null 2>&1; then + ipv6_firewall_in_kernel=1 + else + ipv6_firewall_in_kernel=0 + fi + + case ${ipv6_firewall_enable} in + [Yy][Ee][Ss]) + if [ "${ipv6_firewall_in_kernel}" -eq 0 ] && kldload ip6fw; then + ipv6_firewall_in_kernel=1 + echo "Kernel IPv6 firewall module loaded." + elif [ "${ipv6_firewall_in_kernel}" -eq 0 ]; then + echo "Warning: IPv6 firewall kernel module failed to load." + fi + ;; + esac + + # Load the filters if required + # + case ${ipv6_firewall_in_kernel} in + 1) + if [ -z "${ipv6_firewall_script}" ]; then + ipv6_firewall_script=/etc/rc.firewall6 + fi + + case ${ipv6_firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${ipv6_firewall_script}" ]; then + . "${ipv6_firewall_script}" + echo -n 'IPv6 Firewall rules loaded.' + elif [ "`ip6fw l 65535`" = "65535 deny ipv6 from any to any" ]; then + echo -n "Warning: kernel has IPv6 firewall functionality, " + echo "but IPv6 firewall rules are not enabled." + echo " All ipv6 services are disabled." + fi + + case ${ipv6_firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'IPv6 Firewall logging=YES' + sysctl -w net.inet6.ip6.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + case ${ipv6_network_interfaces} in + [Aa][Uu][Tt][Oo]) + # + # list of interfaces, and prefix for interfaces + # + ipv6_network_interfaces="`ifconfig -l`" + ;; + esac + + # just to make sure + ifconfig lo0 up + + # disallow "internal" addresses to appear on the wire + route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # act as a router + sysctl -w net.inet6.ip6.forwarding=1 + sysctl -w net.inet6.ip6.accept_rtadv=0 + + # wait for DAD + for i in $ipv6_network_interfaces; do + ifconfig $i up + done + sleep `sysctl -n net.inet6.ip6.dad_count` + sleep 1 + ;; + *) + # act as endhost - start with manual configuration + sysctl -w net.inet6.ip6.forwarding=0 + sysctl -w net.inet6.ip6.accept_rtadv=0 + ;; + esac + + # gifconfig + network6_gif_setup + + # setting up interfaces + network6_interface_setup + + # wait for DAD's completion (for global addrs) + sleep `sysctl -n net.inet6.ip6.dad_count` + sleep 1 + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # Filter out interfaces on which IPv6 addr init failed. + ipv6_working_interfaces="" + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_working_interfaces="$i \ + ${ipv6_working_interfaces}" + ;; + esac + done + ipv6_network_interfaces=${ipv6_working_interfaces} + ;; + esac + + # 6to4 setup + network6_stf_setup + + # install the "default interface" to kernel, which will be used + # as the default route when there's no router. + network6_default_interface_setup + + # setup static routes + network6_static_routes_setup + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # ipv6_router + case ${ipv6_router_enable} in + [Yy][Ee][Ss]) + if [ -x ${ipv6_router} ]; then + echo -n " ${ipv6_router}" + ${ipv6_router} ${ipv6_router_flags} + fi + ;; + esac + + # rtadvd + # This should enabled with a great care. + # You may want to fine-tune /etc/rtadvd.conf. + # + # And if you wish your rtadvd to receive and process + # router renumbering messages, specify your Router Renumbering + # security policy by -R option. + # + # See `man 3 ipsec_set_policy` for IPsec policy specification + # details. + # (CAUTION: This enables your routers prefix renumbering + # from another machine, so if you enable this, do it with + # enough care.) + # + case ${rtadvd_enable} in + [Yy][Ee][Ss]) + # default + case ${rtadvd_interfaces} in + '') + for i in ${ipv6_network_interfaces}; do + case $i in + lo0|gif*|stf*|faith*) + continue + ;; + *) + rtadvd_interfaces="${rtadvd_interfaces} ${i}" + ;; + esac + done + ;; + esac + rtadvd ${rtadvd_interfaces} + # + # Enable Router Renumbering, unicast case + # (use correct src/dst addr) + # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" \ + # ${ipv6_network_interfaces} + # Enable Router Renumbering, multicast case + # (use correct src addr) + # rtadvd -R "in ipsec ah/transport/ff05::2-fec0:0:0:10::1/require" \ + # ${ipv6_network_interfaces} + ;; + esac + + # mroute6d + case ${mroute6d_enable} in + [Yy][Ee][Ss]) + if [ -x ${mroute6d_program} ]; then + echo -n " ${mroute6d_program}" + ${mroute6d_program} ${mroute6d_flags} + fi + ;; + esac + ;; + esac + + case ${ipv6_ipv4mapping} in + [Yy][Ee][Ss]) + echo -n ' IPv4 mapped IPv6 address support=YES' + sysctl -w net.inet6.ip6.mapped_addr=1 >/dev/null + ;; + '' | *) + echo -n ' IPv4 mapped IPv6 address support=NO' + sysctl -w net.inet6.ip6.mapped_addr=0 >/dev/null + ;; + esac + + echo '.' + + # Let future generations know we made it. + # + network6_pass1_done=YES +} + +network6_interface_setup() { + rtsol_interfaces='' + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + rtsol_available=no + ;; + *) + rtsol_available=yes + prefixcmd_enable=NO + ;; + esac + for i in $ipv6_network_interfaces; do + rtsol_interface=yes + eval prefix=\$ipv6_prefix_$i + if [ -n "${prefix}" ]; then + rtsol_available=no + rtsol_interface=no + for j in ${prefix}; do + case ${prefixcmd_enable} in + [Yy][Ee][Ss]) + prefix $i $j:: + ;; + *) + laddr=`network6_getladdr $i` + hostid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + address=$j\:${hostid} + + eval hostid_$i=${hostid} + eval address_$i=${address} + + ifconfig $i inet6 ${address} \ + prefixlen 64 alias + ;; + esac + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # subnet-router anycast address + # (rfc2373) + ifconfig $i inet6 $j:: prefixlen 64 \ + alias anycast + ;; + esac + done + fi + eval ipv6_ifconfig=\$ipv6_ifconfig_$i + if [ -n "${ipv6_ifconfig}" ]; then + rtsol_available=no + rtsol_interface=no + ifconfig $i inet6 ${ipv6_ifconfig} alias + fi + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done + + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] + then + case ${i} in + lo0|gif*|stf*|faith*) + ;; + *) + rtsol_interfaces="${rtsol_interfaces} ${i}" + ;; + esac + else + ifconfig $i inet6 + fi + done + + if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then + # Act as endhost - automatically configured. + # You can configure only single interface, as + # specification assumes that autoconfigured host has + # single interface only. + sysctl -w net.inet6.ip6.accept_rtadv=1 + set ${rtsol_interfaces} + ifconfig $1 up + rtsol $1 + fi +} + +network6_gif_setup() { + case ${gif_interfaces} in + [Nn][Oo] | '') + ;; + *) + for i in ${gif_interfaces}; do + eval peers=\$gifconfig_$i + case ${peers} in + '') + continue + ;; + *) + gifconfig $i ${peers} + ;; + esac + done + ;; + esac +} + +network6_stf_setup() { + case ${stf_interface_ipv4addr} in + [Nn][Oo] | '') + ;; + *) + # assign IPv6 addr and interface route for 6to4 interface + stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) + OIFS="$IFS" + IFS=".$IFS" + set ${stf_interface_ipv4addr} + IFS="$OIFS" + ipv4_in_hexformat=`printf "%x:%x\n" \ + $(($1*256 + $2)) $(($3*256 + $4))` + case ${stf_interface_ipv6_ifid} in + [Aa][Uu][Tt][Oo] | '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr ${i}` + case ${laddr} in + '') + ;; + *) + break + ;; + esac + done + stf_interface_ipv6_ifid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + case ${stf_interface_ipv6_ifid} in + '') + stf_interface_ipv6_ifid=0:0:0:1 + ;; + esac + ;; + esac + ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ + prefixlen ${stf_prefixlen} + # disallow packets to malicious 6to4 prefix + route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject + route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject + ;; + esac +} + +network6_static_routes_setup() { + # Set up any static routes. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ;; + *) + ipv6_static_routes="default ${ipv6_static_routes}" + ipv6_route_default="default ${ipv6_defaultrouter}" + ;; + esac + case ${ipv6_static_routes} in + [Nn][Oo] | '') + ;; + *) + for i in ${ipv6_static_routes}; do + eval ipv6_route_args=\$ipv6_route_${i} + route add -inet6 ${ipv6_route_args} + done + ;; + esac +} + +network6_default_interface_setup() { + # Choose IPv6 default interface if it is not clearly specified. + case ${ipv6_default_interface} in + '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_default_interface=$i + break + ;; + esac + done + ;; + esac + + # Disallow unicast packets without outgoing scope identifiers, + # or route such packets to a "default" interface, if it is specified. + route add -inet6 fe80:: -prefixlen 10 ::1 -reject + case ${ipv6_default_interface} in + [Nn][Oo] | '') + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + ;; + *) + laddr=`network6_getladdr ${ipv6_default_interface}` + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ + -cloning + + # Disable installing the default interface with the + # case net.inet6.ip6.forwarding=0 and + # net.inet6.ip6.accept_rtadv=0, due to avoid conflict + # between the default router list and the manual + # configured default route. + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] + then + ndp -I ${ipv6_default_interface} + fi + ;; + esac + ;; + esac +} + +network6_getladdr() { + ifconfig $1 2>/dev/null | while read proto addr rest; do + case ${proto} in + inet6) + case ${addr} in + fe80::*) + if [ -z "$2" ]; then + echo ${addr} + return + fi + case ${rest} in + *tentative*) + continue + ;; + *) + echo ${addr} + return + esac + esac + esac + done +} diff --git a/etc/rc.d/pccard b/etc/rc.d/pccard new file mode 100644 index 0000000..9152e82 --- /dev/null +++ b/etc/rc.d/pccard @@ -0,0 +1,56 @@ +#!/bin/sh - +# +# Copyright (c) 1996 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# PC-card startup script + +case ${pccard_enable} in +[Yy][Ee][Ss]) + echo -n 'Setup PC-CARD:' + + case ${pccard_mem} in + [Dd][Ee][Ff][Aa][Uu][Ll][Tt]) + pccardc pccardmem 0xd0000 1>/dev/null && echo -n ' memory' + ;; + *) + pccardc pccardmem ${pccard_mem} 1>/dev/null && echo -n ' memory' + ;; + esac + + if [ -n "${pccard_beep}" ] ; then + pccardc beep ${pccard_beep} && echo -n ' beep' + fi + + if [ -n "${pccard_conf}" ]; then + pccardd_flags="${pccardd_flags} -f ${pccard_conf}" + fi + + pccardd ${pccardd_flags} && echo -n ' pccardd' + echo '.' + ;; +esac diff --git a/etc/rc.d/resolv b/etc/rc.d/resolv new file mode 100644 index 0000000..1443724 --- /dev/null +++ b/etc/rc.d/resolv @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# $FreeBSD$ +# +# $FreeBSD$ +# + +# PROVIDE: diskless +# REQUIRE: initdiskless mountcritlocal + if [ -n "$4" ]; then + bpi="-i $4" + fi + /sbin/mdconfig -a -t malloc -s $1 -u $3 + /sbin/disklabel -r -w md$3 auto + /sbin/newfs $bpi /dev/md$3c + /sbin/mount /dev/md$3c $2 +} + +mount_mfs -s ${varsize:=65536} -T qp120at dummy /var +var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ + spool/output/lpd" +for i in ${var_dirs} +do + mkdir /var/${i} +done +chmod 755 /var/run +chmod 755 /var/db +chmod 755 /var/spool +chmod 1777 /var/tmp +chown -R root.daemon /var/spool/output +chgrp daemon /var/spool/lpd +# Since we are starting with a very fresh /etc on an MFS: +if [ -d /conf/default/etc ]; then + newaliases +fi +if [ ! -h /tmp -a ! -h /var/tmp ]; then + mount_null /var/tmp /tmp +fi +# +# extract a list of device entries, then copy them to a writable partition +(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp +mount_mfs -s 4096 -i 512 -T qp120at dummy /dev +(cd /; cpio -i -H newc -d < /tmp/dev.tmp) + # extract a list of device entries, then copy them to a writable fs + (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp + mount_md 4096 /dev 3 512 + (cd /; cpio -i -H newc -d < /tmp/dev.tmp) +fi diff --git a/etc/rc.d/routing b/etc/rc.d/routing new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.d/routing @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.d/serial b/etc/rc.d/serial new file mode 100644 index 0000000..2599d31 --- /dev/null +++ b/etc/rc.d/serial @@ -0,0 +1,153 @@ +#!/bin/sh +# +# Copyright (c) 1996 Andrey A. Chernov +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Change some defaults for serial devices. +# Standard defaults are: +# dtrwait 300 drainwait 0 +# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl +# initial iflag, lflag and oflag all 0 +# speed 9600 +# special chars from <sys/ttydefaults.h> +# nothing locked +# except for serial consoles the initial iflag, lflag and oflag are from +# <sys/ttydefaults.h> and clocal is locked on. + +default() { + # Reset everything changed by the other functions to initial defaults. + + ci=$1; shift # call in device identifier + co=$1; shift # call out device identifier + + for i in $* + do + comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0 + stty < /dev/ttyi${ci}${i} -clocal crtscts hupcl 9600 reprint ^R + stty < /dev/ttyl${ci}${i} -clocal -crtscts -hupcl 0 + stty < /dev/cuai${co}${i} -clocal crtscts hupcl 9600 reprint ^R + stty < /dev/cual${co}${i} -clocal -crtscts -hupcl 0 + done +} + +maybe() { + # Special settings. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # Don't use ^R; it breaks bash's ^R when typed ahead. + stty < /dev/ttyi${ci}${i} reprint undef + stty < /dev/cuai${co}${i} reprint undef + # Lock clocal off on dialin device for security. + stty < /dev/ttyl${ci}${i} clocal + # Lock the speeds to use old binaries that don't support them. + # Any legal speed works to lock the initial speed. + stty < /dev/ttyl${ci}${i} 300 + stty < /dev/cual${co}${i} 300 + done +} + +modem() { + # Modem that supports CTS and perhaps RTS handshaking. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # may depend on modem + comcontrol /dev/tty${ci}${i} dtrwait 100 drainwait 180 + # Lock crtscts on. + # Speed reasonable for V42bis. + stty < /dev/ttyi${ci}${i} crtscts 57600 + stty < /dev/ttyl${ci}${i} crtscts + stty < /dev/cuai${co}${i} crtscts 57600 + stty < /dev/cual${co}${i} crtscts + done +} + +mouse() { + # Mouse on either callin or callout port. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # Lock clocal on, hupcl off. + # Standard speed for Microsoft mouse. + stty < /dev/ttyi${ci}${i} clocal -hupcl 1200 + stty < /dev/ttyl${ci}${i} clocal hupcl + stty < /dev/cuai${co}${i} clocal -hupcl 1200 + stty < /dev/cual${co}${i} clocal hupcl + done +} + +terminal() { + # Terminal that supports CTS and perhaps RTS handshaking + # with the cable or terminal arranged so that DCD is on + # at least while the terminal is on. + # Also works for bidirectional communications to another pc + # provided at most one side runs getty. + # Same as modem() except we want a faster speed and no dtrwait. + + ci=$1; shift + co=$1; shift + + modem ${ci} ${co} $* + for i in $* + do + comcontrol /dev/tty${ci}${i} dtrwait 0 + stty < /dev/ttyi${ci}${i} 115200 + stty < /dev/cuai${co}${i} 115200 + done +} + +# Don't use anything from this file unless you have some buggy programs +# that require it. + +# Edit the functions and the examples to suit your system. +# $1 is the call in device identifier, $2 is the call out device identifier +# and the remainder of the line lists the device numbers. + +# Initialize assorted 8250-16550 (sio) ports. +# maybe d a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v +# mouse d a 2 +# modem d a 1 +# terminal d a 0 + +# Initialize all ports on a Cyclades-8yo. +# modem c c 00 01 02 03 04 05 06 07 + +# Initialize all ports on a Cyclades-16ye. +# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f + +# Initialize all ports on a Digiboard 8. +# modem D D 00 01 02 03 04 05 06 07 diff --git a/etc/rc.d/syscons b/etc/rc.d/syscons new file mode 100644 index 0000000..4fd663e --- /dev/null +++ b/etc/rc.d/syscons @@ -0,0 +1,176 @@ +#!/bin/sh - +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# Do syscons configuration +# + +# stdin must be redirected because it might be for a serial console +# +kbddev=/dev/ttyv0 +viddev=/dev/ttyv0 + +echo -n 'Configuring syscons:' + +# keymap +# +case ${keymap} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + ;; +esac + +# keyrate +# +case ${keyrate} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate} + ;; +esac + +# keybell +# +case ${keybell} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell} + ;; +esac + +# change function keys +# +case ${keychange} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keychange' + set - ${keychange} + while [ $# -gt 0 ]; do + kbdcontrol <${kbddev} -f "$1" "$2" + shift; shift + done + ;; +esac + +# cursor type +# +case ${cursor} in +[Nn][Oo] | '') + ;; +*) + echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor} + ;; +esac + +# screen mapping +# +case ${scrnmap} in +[Nn][Oo] | '') + ;; +*) + echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap} + ;; +esac + +# font 8x16 +# +case ${font8x16} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16} + ;; +esac + +# font 8x14 +# +case ${font8x14} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14} + ;; +esac + +# font 8x8 +# +case ${font8x8} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8} + ;; +esac + +# blank time +# +case ${blanktime} in +[Nn][Oo] | '') + ;; +*) + echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime} + ;; +esac + +# screen saver +# +case ${saver} in +[Nn][Oo] | '') + ;; +*) + echo -n ' screensaver' + for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do + kldunload ${i} + done + kldstat -v | grep -q _saver || kldload ${saver}_saver + ;; +esac + +# mouse daemon +# +case ${moused_enable} in +[Yy][Ee][Ss]) + echo -n ' moused' + moused ${moused_flags} -p ${moused_port} -t ${moused_type} + vidcontrol < ${viddev} -m on + ;; +esac + +# set this mode for all virtual screens +# +if [ -n "${allscreens_flags}" ]; then + echo -n ' allscreens' + for ttyv in /dev/ttyv*; do + vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1 + done +fi + +echo '.' diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl new file mode 100644 index 0000000..80af229 --- /dev/null +++ b/etc/rc.d/sysctl @@ -0,0 +1,45 @@ +#!/bin/sh +# +# Copyright (c) 1999 Warner Losh +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# Read in /etc/sysctl.conf and set things accordingly +# + +if [ -f /etc/sysctl.conf ]; then + while read var comments + do + case ${var} in + \#*|'') + ;; + *) + sysctl -w ${var} + ;; + esac + done < /etc/sysctl.conf +fi diff --git a/etc/rc.d/tmp b/etc/rc.d/tmp new file mode 100644 index 0000000..1443724 --- /dev/null +++ b/etc/rc.d/tmp @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# $FreeBSD$ +# +# $FreeBSD$ +# + +# PROVIDE: diskless +# REQUIRE: initdiskless mountcritlocal + if [ -n "$4" ]; then + bpi="-i $4" + fi + /sbin/mdconfig -a -t malloc -s $1 -u $3 + /sbin/disklabel -r -w md$3 auto + /sbin/newfs $bpi /dev/md$3c + /sbin/mount /dev/md$3c $2 +} + +mount_mfs -s ${varsize:=65536} -T qp120at dummy /var +var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ + spool/output/lpd" +for i in ${var_dirs} +do + mkdir /var/${i} +done +chmod 755 /var/run +chmod 755 /var/db +chmod 755 /var/spool +chmod 1777 /var/tmp +chown -R root.daemon /var/spool/output +chgrp daemon /var/spool/lpd +# Since we are starting with a very fresh /etc on an MFS: +if [ -d /conf/default/etc ]; then + newaliases +fi +if [ ! -h /tmp -a ! -h /var/tmp ]; then + mount_null /var/tmp /tmp +fi +# +# extract a list of device entries, then copy them to a writable partition +(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp +mount_mfs -s 4096 -i 512 -T qp120at dummy /dev +(cd /; cpio -i -H newc -d < /tmp/dev.tmp) + # extract a list of device entries, then copy them to a writable fs + (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp + mount_md 4096 /dev 3 512 + (cd /; cpio -i -H newc -d < /tmp/dev.tmp) +fi diff --git a/etc/rc.d/var b/etc/rc.d/var new file mode 100644 index 0000000..1443724 --- /dev/null +++ b/etc/rc.d/var @@ -0,0 +1,70 @@ +#!/bin/sh +# +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# $FreeBSD$ +# +# $FreeBSD$ +# + +# PROVIDE: diskless +# REQUIRE: initdiskless mountcritlocal + if [ -n "$4" ]; then + bpi="-i $4" + fi + /sbin/mdconfig -a -t malloc -s $1 -u $3 + /sbin/disklabel -r -w md$3 auto + /sbin/newfs $bpi /dev/md$3c + /sbin/mount /dev/md$3c $2 +} + +mount_mfs -s ${varsize:=65536} -T qp120at dummy /var +var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ + spool/output/lpd" +for i in ${var_dirs} +do + mkdir /var/${i} +done +chmod 755 /var/run +chmod 755 /var/db +chmod 755 /var/spool +chmod 1777 /var/tmp +chown -R root.daemon /var/spool/output +chgrp daemon /var/spool/lpd +# Since we are starting with a very fresh /etc on an MFS: +if [ -d /conf/default/etc ]; then + newaliases +fi +if [ ! -h /tmp -a ! -h /var/tmp ]; then + mount_null /var/tmp /tmp +fi +# +# extract a list of device entries, then copy them to a writable partition +(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp +mount_mfs -s 4096 -i 512 -T qp120at dummy /dev +(cd /; cpio -i -H newc -d < /tmp/dev.tmp) + # extract a list of device entries, then copy them to a writable fs + (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp + mount_md 4096 /dev 3 512 + (cd /; cpio -i -H newc -d < /tmp/dev.tmp) +fi diff --git a/etc/rc.devfs b/etc/rc.devfs new file mode 100644 index 0000000..c441127 --- /dev/null +++ b/etc/rc.devfs @@ -0,0 +1,39 @@ +# Copyright (c) 1998 Søren Schmidt +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. + +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +# Setup DEVFS, ie permissions, links etc. +# +ln -fs /dev/ttyv0 /dev/vga diff --git a/etc/rc.diskless1 b/etc/rc.diskless1 new file mode 100644 index 0000000..80ca2ce --- /dev/null +++ b/etc/rc.diskless1 @@ -0,0 +1,127 @@ +# Copyright (c) 1999 Matt Dillion +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/rc.diskless1 - general BOOTP startup +# +# BOOTP has mounted / for us. Assume a read-only mount. We must then +# - figure out our IP by querying the interface +# - fill /conf/etc (writable) with files from /etc, and then update +# per-machine files from /conf/*/ where * is the IP of the host, +# the IP of the subnet, "default", or nothing. +# - mount /conf/etc over /etc so we can see the new files. +# +# WARNING: i thing you should not change /etc/rc or strange things could +# happen. +# +# The operator is in charge of setting /conf/*/etc/* things as appropriate. +# Typically rc.conf and fstab need to be changed, but possibly +# also other files such as inetd.conf etc. + +# chkerr: +# +# Routine to check for error +# +# checks error code and drops into shell on failure. +# if shell exits, terminates script as well as /etc/rc. +# +chkerr() { + case $1 in + 0) + ;; + *) + echo "$2 failed: dropping into /bin/sh" + /bin/sh + # RESUME + ;; + esac +} + +# DEBUGGING +# +# set -v + +# Figure out our interface and IP. +# +bootp_ifc="" +bootp_ipa="" +bootp_ipbca="" +iflist=`ifconfig -l` +for i in ${iflist} ; do + set `ifconfig ${i}` + while [ $# -ge 1 ] ; do + if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then + bootp_ifc=${i} ; bootp_ipa=${2} ; shift + fi + if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then + bootp_ipbca=$2; shift + fi + shift + done + if [ "${bootp_ifc}" != "" ] ; then + break + fi +done +echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" + +# Files in /etc are copied to /conf/etc which is writable. Then +# per-machine configs from /conf/ip.address/etc are copied onto this +# directory. First choice is using the client's IP, then the client's +# broadcast address, then a default configuration. +# This way we have some flexibility to handle clusters of machines +# on separate subnets. +# +# WARNING! null mounts cannot handle mmap, and since many programs +# use mmap (such as 'cp'), we have to copy. +# +mount_mfs -s 2048 -T qp120at dummy /conf/etc +cp -Rp /etc/* /conf/etc +chkerr $? "MFS mount on /conf/etc" + +if [ -d /conf/${bootp_ipa} ] ; then + cp -Rp /conf/${bootp_ipa}/etc/* /conf/etc +elif [ -d /conf/${bootp_ipbca} ] ; then + cp -Rp /conf/${bootp_ipbca}/etc/* /conf/etc +else + cp -Rp /conf/default/etc/* /conf/etc +fi + +# Make the new directory available as /etc +# +mount_null /conf/etc /etc + +# Tell /etc/rc to run the specified script after +# it does its mounts but before it does anything +# else. +# +# This script is responsible for setting up the +# diskless mount environment. This can be +# overriden by /conf/ME/rc.conf.local if, for +# example, you do not want to run the standard +# system /etc/rc.diskless2 + +diskless_mount="/etc/rc.diskless2" diff --git a/etc/rc.diskless2 b/etc/rc.diskless2 new file mode 100644 index 0000000..4866a888 --- /dev/null +++ b/etc/rc.diskless2 @@ -0,0 +1,65 @@ +# Copyright (c) 1999 Matt Dillon +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# rc.diskless2 +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +mount_mfs -s ${varsize:=65536} -T qp120at dummy /var +var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ + spool/output/lpd" +for i in ${var_dirs} +do + mkdir /var/${i} +done +chmod 755 /var/run +chmod 755 /var/db +chmod 755 /var/spool +chmod 1777 /var/tmp +chown -R root.daemon /var/spool/output +chgrp daemon /var/spool/lpd +# +# XXX make sure to create one dir for each printer as requested by lpd +# + +if [ ! -h /tmp -a ! -h /var/tmp ]; then + mount_null /var/tmp /tmp +fi + +# extract a list of device entries, then copy them to a writable partition +(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp +mount_mfs -s 4096 -i 512 -T qp120at dummy /dev +(cd /; cpio -i -H newc -d < /tmp/dev.tmp) diff --git a/etc/rc.firewall b/etc/rc.firewall new file mode 100644 index 0000000..4b8641b --- /dev/null +++ b/etc/rc.firewall @@ -0,0 +1,291 @@ +# Copyright (c) 1996 Poul-Henning Kamp +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# Setup system for firewall service. +# + +# Suck in the configuration variables. +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +############ +# Define the firewall type in /etc/rc.conf. Valid values are: +# open - will allow anyone in +# client - will try to protect just this machine +# simple - will try to protect a whole network +# closed - totally disables IP services except via lo0 interface +# UNKNOWN - disables the loading of firewall rules. +# filename - will load the rules in the given filename (full path required) +# +# For ``client'' and ``simple'' the entries below should be customized +# appropriately. + +############ +# +# If you don't know enough about packet filtering, we suggest that you +# take time to read this book: +# +# Building Internet Firewalls, 2nd Edition +# Brent Chapman and Elizabeth Zwicky +# +# O'Reilly & Associates, Inc +# ISBN 1-56592-871-7 +# http://www.ora.com/ +# http://www.oreilly.com/catalog/fire2/ +# +# For a more advanced treatment of Internet Security read: +# +# Firewalls & Internet Security +# Repelling the wily hacker +# William R. Cheswick, Steven M. Bellowin +# +# Addison-Wesley +# ISBN 0-201-63357-4 +# http://www.awl.com/ +# http://www.awlonline.com/product/0%2C2627%2C0201633574%2C00.html +# + +if [ -n "${1}" ]; then + firewall_type="${1}" +fi + +############ +# Set quiet mode if requested +# +case ${firewall_quiet} in +[Yy][Ee][Ss]) + fwcmd="/sbin/ipfw -q" + ;; +*) + fwcmd="/sbin/ipfw" + ;; +esac + +############ +# Flush out the list before we begin. +# +${fwcmd} -f flush + +############ +# Network Address Translation. All packets are passed to natd(8) +# before they encounter your remaining rules. The firewall rules +# will then be run again on each packet after translation by natd +# starting at the rule number following the divert rule. +# +# For ``simple'' firewall type the divert rule should be put to a +# different place to not interfere with address-checking rules. +# +case ${firewall_type} in +[Oo][Pp][Ee][Nn]|[Cc][Ll][Ii][Ee][Nn][Tt]) + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + ${fwcmd} add 50 divert natd all from any to any via ${natd_interface} + fi + ;; + esac +esac + +############ +# If you just configured ipfw in the kernel as a tool to solve network +# problems or you just want to disallow some particular kinds of traffic +# then you will want to change the default policy to open. You can also +# do this as your only action by setting the firewall_type to ``open''. +# +# ${fwcmd} add 65000 pass all from any to any + +############ +# Only in rare cases do you want to change these rules +# +${fwcmd} add 100 pass all from any to any via lo0 +${fwcmd} add 200 deny all from any to 127.0.0.0/8 +${fwcmd} add 300 deny ip from 127.0.0.0/8 to any +# If you're using 'options BRIDGE', uncomment the following line to pass ARP +#${fwcmd} add 400 pass udp from 0.0.0.0 2054 to 0.0.0.0 + + +# Prototype setups. +# +case ${firewall_type} in +[Oo][Pp][Ee][Nn]) + ${fwcmd} add 65000 pass all from any to any + ;; + +[Cc][Ll][Ii][Ee][Nn][Tt]) + ############ + # This is a prototype setup that will protect your system somewhat + # against people from outside your own network. + ############ + + # set these to your network and netmask and ip + net="192.0.2.0" + mask="255.255.255.0" + ip="192.0.2.1" + + # Allow any traffic to or from my own net. + ${fwcmd} add pass all from ${ip} to ${net}:${mask} + ${fwcmd} add pass all from ${net}:${mask} to ${ip} + + # Allow TCP through if setup succeeded + ${fwcmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fwcmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fwcmd} add pass tcp from any to ${ip} 25 setup + + # Allow setup of outgoing TCP connections only + ${fwcmd} add pass tcp from ${ip} to any setup + + # Disallow setup of all other TCP connections + ${fwcmd} add deny tcp from any to any setup + + # Allow DNS queries out in the world + ${fwcmd} add pass udp from ${ip} to any 53 keep-state + + # Allow NTP queries out in the world + ${fwcmd} add pass udp from ${ip} to any 123 keep-state + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Ss][Ii][Mm][Pp][Ll][Ee]) + ############ + # This is a prototype setup for a simple firewall. Configure this + # machine as a named server and ntp server, and point all the machines + # on the inside at this machine for those services. + ############ + + # set these to your outside interface network and netmask and ip + oif="ed0" + onet="192.0.2.0" + omask="255.255.255.240" + oip="192.0.2.1" + + # set these to your inside interface network and netmask and ip + iif="ed1" + inet="192.0.2.16" + imask="255.255.255.240" + iip="192.0.2.17" + + # Stop spoofing + ${fwcmd} add deny all from ${inet}:${imask} to any in via ${oif} + ${fwcmd} add deny all from ${onet}:${omask} to any in via ${iif} + + # Stop RFC1918 nets on the outside interface + ${fwcmd} add deny all from any to 10.0.0.0/8 via ${oif} + ${fwcmd} add deny all from any to 172.16.0.0/12 via ${oif} + ${fwcmd} add deny all from any to 192.168.0.0/16 via ${oif} + + # Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1, + # DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E) + # on the outside interface + ${fwcmd} add deny all from any to 0.0.0.0/8 via ${oif} + ${fwcmd} add deny all from any to 169.254.0.0/16 via ${oif} + ${fwcmd} add deny all from any to 192.0.2.0/24 via ${oif} + ${fwcmd} add deny all from any to 224.0.0.0/4 via ${oif} + ${fwcmd} add deny all from any to 240.0.0.0/4 via ${oif} + + # Network Address Translation. This rule is placed here deliberately + # so that it does not interfere with the surrounding address-checking + # rules. If for example one of your internal LAN machines had its IP + # address set to 192.0.2.1 then an incoming packet for it after being + # translated by natd(8) would match the `deny' rule above. Similarly + # an outgoing packet originated from it before being translated would + # match the `deny' rule below. + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + ${fwcmd} add divert natd all from any to any via ${natd_interface} + fi + ;; + esac + + # Stop RFC1918 nets on the outside interface + ${fwcmd} add deny all from 10.0.0.0/8 to any via ${oif} + ${fwcmd} add deny all from 172.16.0.0/12 to any via ${oif} + ${fwcmd} add deny all from 192.168.0.0/16 to any via ${oif} + + # Stop draft-manning-dsua-03.txt (1 May 2000) nets (includes RESERVED-1, + # DHCP auto-configuration, NET-TEST, MULTICAST (class D), and class E) + # on the outside interface + ${fwcmd} add deny all from 0.0.0.0/8 to any via ${oif} + ${fwcmd} add deny all from 169.254.0.0/16 to any via ${oif} + ${fwcmd} add deny all from 192.0.2.0/24 to any via ${oif} + ${fwcmd} add deny all from 224.0.0.0/4 to any via ${oif} + ${fwcmd} add deny all from 240.0.0.0/4 to any via ${oif} + + # Allow TCP through if setup succeeded + ${fwcmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fwcmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fwcmd} add pass tcp from any to ${oip} 25 setup + + # Allow access to our DNS + ${fwcmd} add pass tcp from any to ${oip} 53 setup + ${fwcmd} add pass udp from any to ${oip} 53 + ${fwcmd} add pass udp from ${oip} 53 to any + + # Allow access to our WWW + ${fwcmd} add pass tcp from any to ${oip} 80 setup + + # Reject&Log all setup of incoming connections from the outside + ${fwcmd} add deny log tcp from any to any in via ${oif} setup + + # Allow setup of any other TCP connection + ${fwcmd} add pass tcp from any to any setup + + # Allow DNS queries out in the world + ${fwcmd} add pass udp from ${oip} to any 53 keep-state + + # Allow NTP queries out in the world + ${fwcmd} add pass udp from ${oip} to any 123 keep-state + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Uu][Nn][Kk][Nn][Oo][Ww][Nn]) + ;; +*) + if [ -r "${firewall_type}" ]; then + ${fwcmd} ${firewall_flags} ${firewall_type} + fi + ;; +esac diff --git a/etc/rc.firewall6 b/etc/rc.firewall6 new file mode 100644 index 0000000..a83daed --- /dev/null +++ b/etc/rc.firewall6 @@ -0,0 +1,260 @@ +############ +# Setup system for IPv6 firewall service. +# $FreeBSD$ + +# Suck in the configuration variables. +if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi +fi + +############ +# Define the firewall type in /etc/rc.conf. Valid values are: +# open - will allow anyone in +# client - will try to protect just this machine +# simple - will try to protect a whole network +# closed - totally disables IP services except via lo0 interface +# UNKNOWN - disables the loading of firewall rules. +# filename - will load the rules in the given filename (full path required) +# +# For ``client'' and ``simple'' the entries below should be customized +# appropriately. + +############ +# +# If you don't know enough about packet filtering, we suggest that you +# take time to read this book: +# +# Building Internet Firewalls, 2nd Edition +# Brent Chapman and Elizabeth Zwicky +# +# O'Reilly & Associates, Inc +# ISBN 1-56592-871-7 +# http://www.ora.com/ +# http://www.oreilly.com/catalog/fire2/ +# +# For a more advanced treatment of Internet Security read: +# +# Firewalls & Internet Security +# Repelling the wily hacker +# William R. Cheswick, Steven M. Bellowin +# +# Addison-Wesley +# ISBN 0-201-63357-4 +# http://www.awl.com/ +# http://www.awlonline.com/product/0%2C2627%2C0201633574%2C00.html +# + +if [ -n "${1}" ]; then + ipv6_firewall_type="${1}" +fi + +############ +# Set quiet mode if requested +# +case ${ipv6_firewall_quiet} in +[Yy][Ee][Ss]) + fw6cmd="/sbin/ip6fw -q" + ;; +*) + fw6cmd="/sbin/ip6fw" + ;; +esac + +############ +# Flush out the list before we begin. +# +${fw6cmd} -f flush + +############ +# If you just configured ipfw in the kernel as a tool to solve network +# problems or you just want to disallow some particular kinds of traffic +# then you will want to change the default policy to open. You can also +# do this as your only action by setting the ipv6_firewall_type to ``open''. +# +# ${fw6cmd} add 65000 pass all from any to any + +############ +# Only in rare cases do you want to change these rules +# +${fw6cmd} add 100 pass all from any to any via lo0 +# +# ND +# +# DAD +${fw6cmd} add pass ipv6-icmp from ff02::/16 to :: +${fw6cmd} add pass ipv6-icmp from :: to ff02::/16 +# RS, RA, NS, NA, redirect... +${fw6cmd} add pass ipv6-icmp from fe80::/10 to fe80::/10 +${fw6cmd} add pass ipv6-icmp from fe80::/10 to ff02::/16 + + +# Prototype setups. +# +case ${ipv6_firewall_type} in +[Oo][Pp][Ee][Nn]) + ${fw6cmd} add 65000 pass all from any to any + ;; + +[Cc][Ll][Ii][Ee][Nn][Tt]) + ############ + # This is a prototype setup that will protect your system somewhat + # against people from outside your own network. + ############ + + # set these to your network and prefixlen and ip + # + # This needs more work + # + net="3ffe:505:2:1::" + prefixlen="64" + ip="3ffe:505:2:1::1" + + # Allow any traffic to or from my own net. + ${fw6cmd} add pass all from ${ip} to ${net}/${prefixlen} + ${fw6cmd} add pass all from ${net}/${prefixlen} to ${ip} + + # Allow TCP through if setup succeeded + ${fw6cmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fw6cmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fw6cmd} add pass tcp from any to ${ip} 25 setup + + # Allow setup of outgoing TCP connections only + ${fw6cmd} add pass tcp from ${ip} to any setup + + # Disallow setup of all other TCP connections + ${fw6cmd} add deny tcp from any to any setup + + # Allow DNS queries out in the world + ${fw6cmd} add pass udp from any 53 to ${ip} + ${fw6cmd} add pass udp from ${ip} to any 53 + + # Allow NTP queries out in the world + ${fw6cmd} add pass udp from any 123 to ${ip} + ${fw6cmd} add pass udp from ${ip} to any 123 + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Ss][Ii][Mm][Pp][Ll][Ee]) + ############ + # This is a prototype setup for a simple firewall. Configure this + # machine as a named server and ntp server, and point all the machines + # on the inside at this machine for those services. + ############ + + # set these to your outside interface network and prefixlen and ip + oif="ed0" + onet="3ffe:505:2:1::" + oprefixlen="64" + oip="3ffe:505:2:1::1" + + # set these to your inside interface network and prefixlen and ip + iif="ed1" + inet="3ffe:505:2:2::" + iprefixlen="64" + iip="3ffe:505:2:2::1" + + # Stop spoofing + ${fw6cmd} add deny all from ${inet}/${iprefixlen} to any in via ${oif} + ${fw6cmd} add deny all from ${onet}/${oprefixlen} to any in via ${iif} + + # Stop site-local on the outside interface + ${fw6cmd} add deny all from ff02::/16 to any via ${oif} + ${fw6cmd} add deny all from any to ff02::/16 via ${oif} + + # Disallow "internal" addresses to appear on the wire. + ${fw6cmd} add deny all from ::ffff:0.0.0.0/96 to any via ${oif} + ${fw6cmd} add deny all from any to ::ffff:0.0.0.0/96 via ${oif} + + # Disallow packets to malicious IPv4 compatible prefix. + ${fw6cmd} add deny all from ::224.0.0.0/100 to any via ${oif} + ${fw6cmd} add deny all from any to ::224.0.0.0/100 via ${oif} + ${fw6cmd} add deny all from ::127.0.0.0/104 to any via ${oif} + ${fw6cmd} add deny all from any to ::127.0.0.0/104 via ${oif} + ${fw6cmd} add deny all from ::0.0.0.0/104 to any via ${oif} + ${fw6cmd} add deny all from any to ::0.0.0.0/104 via ${oif} + ${fw6cmd} add deny all from ::255.0.0.0/104 to any via ${oif} + ${fw6cmd} add deny all from any to ::255.0.0.0/104 via ${oif} + + ${fw6cmd} add deny all from ::0.0.0.0/96 to any via ${oif} + ${fw6cmd} add deny all from any to ::0.0.0.0/96 via ${oif} + + # Disallow packets to malicious 6to4 prefix. + ${fw6cmd} add deny all from 2002:e000::/20 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:e000::/20 via ${oif} + ${fw6cmd} add deny all from 2002:7f00::/24 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:7f00::/24 via ${oif} + ${fw6cmd} add deny all from 2002:0000::/24 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:0000::/24 via ${oif} + ${fw6cmd} add deny all from 2002:ff00::/24 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:ff00::/24 via ${oif} + + ${fw6cmd} add deny all from 2002:0a00::/24 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:0a00::/24 via ${oif} + ${fw6cmd} add deny all from 2002:ac10::/28 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:ac10::/28 via ${oif} + ${fw6cmd} add deny all from 2002:c0a8::/32 to any via ${oif} + ${fw6cmd} add deny all from any to 2002:c0a8::/32 via ${oif} + + ${fw6cmd} add deny all from ff05::/32 to any via ${oif} + ${fw6cmd} add deny all from any to ff05::/32 via ${oif} + + # Allow TCP through if setup succeeded + ${fw6cmd} add pass tcp from any to any established + + # Allow IP fragments to pass through + ${fw6cmd} add pass all from any to any frag + + # Allow setup of incoming email + ${fw6cmd} add pass tcp from any to ${oip} 25 setup + + # Allow access to our DNS + ${fw6cmd} add pass tcp from any to ${oip} 53 setup + ${fw6cmd} add pass udp from any to ${oip} 53 + ${fw6cmd} add pass udp from ${oip} 53 to any + + # Allow access to our WWW + ${fw6cmd} add pass tcp from any to ${oip} 80 setup + + # Reject&Log all setup of incoming connections from the outside + ${fw6cmd} add deny log tcp from any to any in via ${oif} setup + + # Allow setup of any other TCP connection + ${fw6cmd} add pass tcp from any to any setup + + # Allow DNS queries out in the world + ${fw6cmd} add pass udp from any 53 to ${oip} + ${fw6cmd} add pass udp from ${oip} to any 53 + + # Allow NTP queries out in the world + ${fw6cmd} add pass udp from any 123 to ${oip} + ${fw6cmd} add pass udp from ${oip} to any 123 + + # RIPng + #${fw6cmd} add pass udp from fe80::/10 521 to ff02::9 521 + + # Everything else is denied by default, unless the + # IPFIREWALL_DEFAULT_TO_ACCEPT option is set in your kernel + # config file. + ;; + +[Uu][Nn][Kk][Nn][Oo][Ww][Nn]) + ;; +*) + if [ -r "${ipv6_firewall_type}" ]; then + # Can't use ${fw6cmd} as ip6fw doesn't support -q with a file + /sbin/ip6fw ${ipv6_firewall_flags} ${ipv6_firewall_type} + fi + ;; +esac diff --git a/etc/rc.initdiskless b/etc/rc.initdiskless new file mode 100644 index 0000000..80ca2ce --- /dev/null +++ b/etc/rc.initdiskless @@ -0,0 +1,127 @@ +# Copyright (c) 1999 Matt Dillion +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# /etc/rc.diskless1 - general BOOTP startup +# +# BOOTP has mounted / for us. Assume a read-only mount. We must then +# - figure out our IP by querying the interface +# - fill /conf/etc (writable) with files from /etc, and then update +# per-machine files from /conf/*/ where * is the IP of the host, +# the IP of the subnet, "default", or nothing. +# - mount /conf/etc over /etc so we can see the new files. +# +# WARNING: i thing you should not change /etc/rc or strange things could +# happen. +# +# The operator is in charge of setting /conf/*/etc/* things as appropriate. +# Typically rc.conf and fstab need to be changed, but possibly +# also other files such as inetd.conf etc. + +# chkerr: +# +# Routine to check for error +# +# checks error code and drops into shell on failure. +# if shell exits, terminates script as well as /etc/rc. +# +chkerr() { + case $1 in + 0) + ;; + *) + echo "$2 failed: dropping into /bin/sh" + /bin/sh + # RESUME + ;; + esac +} + +# DEBUGGING +# +# set -v + +# Figure out our interface and IP. +# +bootp_ifc="" +bootp_ipa="" +bootp_ipbca="" +iflist=`ifconfig -l` +for i in ${iflist} ; do + set `ifconfig ${i}` + while [ $# -ge 1 ] ; do + if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then + bootp_ifc=${i} ; bootp_ipa=${2} ; shift + fi + if [ "${bootp_ipbca}" = "" -a "$1" = "broadcast" ] ; then + bootp_ipbca=$2; shift + fi + shift + done + if [ "${bootp_ifc}" != "" ] ; then + break + fi +done +echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" + +# Files in /etc are copied to /conf/etc which is writable. Then +# per-machine configs from /conf/ip.address/etc are copied onto this +# directory. First choice is using the client's IP, then the client's +# broadcast address, then a default configuration. +# This way we have some flexibility to handle clusters of machines +# on separate subnets. +# +# WARNING! null mounts cannot handle mmap, and since many programs +# use mmap (such as 'cp'), we have to copy. +# +mount_mfs -s 2048 -T qp120at dummy /conf/etc +cp -Rp /etc/* /conf/etc +chkerr $? "MFS mount on /conf/etc" + +if [ -d /conf/${bootp_ipa} ] ; then + cp -Rp /conf/${bootp_ipa}/etc/* /conf/etc +elif [ -d /conf/${bootp_ipbca} ] ; then + cp -Rp /conf/${bootp_ipbca}/etc/* /conf/etc +else + cp -Rp /conf/default/etc/* /conf/etc +fi + +# Make the new directory available as /etc +# +mount_null /conf/etc /etc + +# Tell /etc/rc to run the specified script after +# it does its mounts but before it does anything +# else. +# +# This script is responsible for setting up the +# diskless mount environment. This can be +# overriden by /conf/ME/rc.conf.local if, for +# example, you do not want to run the standard +# system /etc/rc.diskless2 + +diskless_mount="/etc/rc.diskless2" diff --git a/etc/rc.isdn b/etc/rc.isdn new file mode 100644 index 0000000..7da0bf8 --- /dev/null +++ b/etc/rc.isdn @@ -0,0 +1,88 @@ +#!/bin/sh +# +# Copyright (c) 1999 Hellmuth Michaelis +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#--------------------------------------------------------------------------- +# +# /etc/rc.isdn - isdn4bsd startup script +# -------------------------------------- +# +# last edit-date: [Mon Mar 8 12:15:56 1999] +# +#--------------------------------------------------------------------------- + +case ${isdn_enable} in +[Yy][Ee][Ss]) + echo -n 'ISDN subsystem setup:' + + # Terminal type for fullscreen mode, default to syscons driver + # + isdn_ttype=cons25 + + # Check for pcvt driver (VT100/VT220 emulator) + # + if [ -x /usr/sbin/ispcvt ]; then + if /usr/sbin/ispcvt; then + isdn_ttype=pcvt25 + fi + fi + + case ${isdn_flags} in + [Nn][Oo] | '') + isdn_flags='' + ;; + esac + + # Start the isdn daemon + # + if [ -x /usr/sbin/isdnd ]; then + echo -n ' isdnd' + case ${isdn_fsdev} in + [Nn][Oo] | '') + /usr/sbin/isdnd ${isdn_flags} + ;; + *) + /usr/sbin/isdnd ${isdn_flags} -f -r ${isdn_fsdev} -t ${isdn_ttype} + ;; + esac + fi + + # Start isdntrace + # + case ${isdn_trace} in + [Yy][Ee][Ss]) + if [ -x /usr/sbin/isdntrace ]; then + echo -n ' isdntrace' + nohup /usr/sbin/isdntrace ${isdn_traceflags} >/dev/null 2>&1 & + fi + ;; + esac + + echo '.' + ;; +esac diff --git a/etc/rc.network b/etc/rc.network new file mode 100644 index 0000000..fbe8bf3 --- /dev/null +++ b/etc/rc.network @@ -0,0 +1,769 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# Note that almost all of the user-configurable behavior is no longer in +# this file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# First pass startup stuff. +# +network_pass1() { + echo -n 'Doing initial network setup:' + + # Convert host.conf to nsswitch.conf if necessary + if [ -f "/etc/host.conf" ]; then + echo '' + echo 'Warning: /etc/host.conf is no longer used' + if [ -f "/etc/nsswitch.conf" ]; then + echo ' /etc/nsswitch.conf will be used instead' + else + echo ' /etc/nsswitch.conf will be created for you' + convert_host_conf /etc/host.conf /etc/nsswitch.conf + fi + fi + + # Set the host name if it is not already set + # + if [ -z "`hostname -s`" ]; then + hostname ${hostname} + echo -n ' hostname' + fi + + # Establish ipfilter ruleset as early as possible (best in + # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file) + # + case "${ipfilter_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipfilter_rules}" ]; then + echo -n ' ipfilter'; + ${ipfilter_program:-/sbin/ipf -Fa -f} \ + "${ipfilter_rules}" ${ipfilter_flags} + case "${ipmon_enable}" in + [Yy][Ee][Ss]) + echo -n ' ipmon' + ${ipmon_program:-/sbin/ipmon} ${ipmon_flags} + ;; + esac + case "${ipnat_enable}" in + [Yy][Ee][Ss]) + if [ -r "${ipnat_rules}" ]; then + echo -n ' ipnat'; + eval ${ipnat_program:-/sbin/ipnat -CF -f} \ + "${ipnat_rules}" ${ipnat_flags} + else + echo -n ' NO IPNAT RULES' + fi + ;; + esac + else + ipfilter_enable="NO" + echo -n ' NO IPF RULES' + fi + ;; + esac + + # Set the domainname if we're using NIS + # + case ${nisdomainname} in + [Nn][Oo] | '') + ;; + *) + domainname ${nisdomainname} + echo -n ' domain' + ;; + esac + + echo '.' + + # Initial ATM interface configuration + # + case ${atm_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.atm ]; then + . /etc/rc.atm + atm_pass1 + fi + ;; + esac + + # Special options for sppp(4) interfaces go here. These need + # to go _before_ the general ifconfig section, since in the case + # of hardwired (no link1 flag) but required authentication, you + # cannot pass auth parameters down to the already running interface. + # + for ifn in ${sppp_interfaces}; do + eval spppcontrol_args=\$spppconfig_${ifn} + if [ -n "${spppcontrol_args}" ]; then + # The auth secrets might contain spaces; in order + # to retain the quotation, we need to eval them + # here. + eval spppcontrol ${ifn} ${spppcontrol_args} + fi + done + + # Set up all the network interfaces, calling startup scripts if needed + # + case ${network_interfaces} in + [Aa][Uu][Tt][Oo]) + network_interfaces="`ifconfig -l`" + ;; + esac + + dhcp_interfaces="" + for ifn in ${network_interfaces}; do + if [ -r /etc/start_if.${ifn} ]; then + . /etc/start_if.${ifn} + eval showstat_$ifn=1 + fi + + # Do the primary ifconfig if specified + # + eval ifconfig_args=\$ifconfig_${ifn} + + case ${ifconfig_args} in + '') + ;; + [Dd][Hh][Cc][Pp]) + # DHCP inits are done all in one go below + dhcp_interfaces="$dhcp_interfaces $ifn" + eval showstat_$ifn=1 + ;; + *) + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + ;; + esac + done + + if [ ! -z "${dhcp_interfaces}" ]; then + ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces} + fi + + for ifn in ${network_interfaces}; do + # Check to see if aliases need to be added + # + alias=0 + while : ; do + eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} alias + eval showstat_$ifn=1 + alias=`expr ${alias} + 1` + else + break; + fi + done + + # Do ipx address if specified + # + eval ifconfig_args=\$ifconfig_${ifn}_ipx + if [ -n "${ifconfig_args}" ]; then + ifconfig ${ifn} ${ifconfig_args} + eval showstat_$ifn=1 + fi + done + + for ifn in ${network_interfaces}; do + eval showstat=\$showstat_${ifn} + if [ ! -z ${showstat} ]; then + ifconfig ${ifn} + fi + done + + # ISDN subsystem startup + # + case ${isdn_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/rc.isdn ]; then + . /etc/rc.isdn + fi + ;; + esac + + # Start user ppp if required. This must happen before natd. + # + case ${ppp_enable} in + [Yy][Ee][Ss]) + # Establish ppp mode. + # + if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ + -a "${ppp_mode}" != "dedicated" \ + -a "${ppp_mode}" != "background" ]; then + ppp_mode="auto" + fi + + ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}" + + # Switch on NAT mode? + # + case ${ppp_nat} in + [Yy][Ee][Ss]) + ppp_command="${ppp_command} -nat" + ;; + esac + + ppp_command="${ppp_command} ${ppp_profile}" + + echo -n "Starting ppp as \"${ppp_user}\"" + su -m ${ppp_user} -c "exec ${ppp_command}" + ;; + esac + + # Initialize IP filtering using ipfw + # + if /sbin/ipfw -q flush > /dev/null 2>&1; then + firewall_in_kernel=1 + else + firewall_in_kernel=0 + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ "${firewall_in_kernel}" -eq 0 ] && kldload ipfw; then + firewall_in_kernel=1 + echo 'Kernel firewall module loaded' + elif [ "${firewall_in_kernel}" -eq 0 ]; then + echo 'Warning: firewall kernel module failed to load' + fi + ;; + esac + + # Load the filters if required + # + case ${firewall_in_kernel} in + 1) + if [ -z "${firewall_script}" ]; then + firewall_script=/etc/rc.firewall + fi + + case ${firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${firewall_script}" ]; then + . "${firewall_script}" + echo -n 'Firewall rules loaded, starting divert daemons:' + + # Network Address Translation daemon + # + case ${natd_enable} in + [Yy][Ee][Ss]) + if [ -n "${natd_interface}" ]; then + if echo ${natd_interface} | \ + grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then + natd_ifarg="-a ${natd_interface}" + else + natd_ifarg="-n ${natd_interface}" + fi + + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} + fi + ;; + esac + + echo '.' + + elif [ "`ipfw l 65535`" = "65535 deny ip from any to any" ]; then + echo 'Warning: kernel has firewall functionality,' \ + 'but firewall rules are not enabled.' + echo ' All ip services are disabled.' + fi + + case ${firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'Firewall logging=YES' + sysctl -w net.inet.ip.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + # Additional ATM interface configuration + # + if [ -n "${atm_pass1_done}" ]; then + atm_pass2 + fi + + # Configure routing + # + case ${defaultrouter} in + [Nn][Oo] | '') + ;; + *) + static_routes="default ${static_routes}" + route_default="default ${defaultrouter}" + ;; + esac + + # Set up any static routes. This should be done before router discovery. + # + if [ -n "${static_routes}" ]; then + for i in ${static_routes}; do + eval route_args=\$route_${i} + route add ${route_args} + done + fi + + echo -n 'Additional routing options:' + case ${tcp_extensions} in + [Yy][Ee][Ss] | '') + ;; + *) + echo -n ' tcp extensions=NO' + sysctl -w net.inet.tcp.rfc1323=0 >/dev/null + ;; + esac + + case ${icmp_bmcastecho} in + [Yy][Ee][Ss]) + echo -n ' broadcast ping responses=YES' + sysctl -w net.inet.icmp.bmcastecho=1 >/dev/null + ;; + esac + + case ${icmp_drop_redirect} in + [Yy][Ee][Ss]) + echo -n ' ignore ICMP redirect=YES' + sysctl -w net.inet.icmp.drop_redirect=1 >/dev/null + ;; + esac + + case ${icmp_log_redirect} in + [Yy][Ee][Ss]) + echo -n ' log ICMP redirect=YES' + sysctl -w net.inet.icmp.log_redirect=1 >/dev/null + ;; + esac + + case ${gateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IP gateway=YES' + sysctl -w net.inet.ip.forwarding=1 >/dev/null + ;; + esac + + case ${forward_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' do source routing=YES' + sysctl -w net.inet.ip.sourceroute=1 >/dev/null + ;; + esac + + case ${accept_sourceroute} in + [Yy][Ee][Ss]) + echo -n ' accept source routing=YES' + sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null + ;; + esac + + case ${tcp_keepalive} in + [Yy][Ee][Ss]) + echo -n ' TCP keepalive=YES' + sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null + ;; + esac + + case ${tcp_drop_synfin} in + [Yy][Ee][Ss]) + echo -n ' drop SYN+FIN packets=YES' + sysctl -w net.inet.tcp.drop_synfin=1 >/dev/null + ;; + esac + + case ${ipxgateway_enable} in + [Yy][Ee][Ss]) + echo -n ' IPX gateway=YES' + sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null + ;; + esac + + case ${arpproxy_all} in + [Yy][Ee][Ss]) + echo -n ' ARP proxyall=YES' + sysctl -w net.link.ether.inet.proxyall=1 >/dev/null + ;; + esac + + case ${ip_portrange_first} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_first=$ip_portrange_first" + sysctl -w net.inet.ip.portrange.first=$ip_portrange_first >/dev/null + ;; + esac + + case ${ip_portrange_last} in + [Nn][Oo] | '') + ;; + *) + echo -n " ip_portrange_last=$ip_portrange_last" + sysctl -w net.inet.ip.portrange.last=$ip_portrange_last >/dev/null + ;; + esac + + echo '.' + + case ${ipsec_enable} in + [Yy][Ee][Ss]) + if [ -f ${ipsec_file} ]; then + echo ' ipsec: enabled' + setkey -f ${ipsec_file} + else + echo ' ipsec: file not found' + fi + ;; + esac + + echo -n 'Routing daemons:' + case ${router_enable} in + [Yy][Ee][Ss]) + echo -n " ${router}"; ${router} ${router_flags} + ;; + esac + + case ${ipxrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' IPXrouted' + IPXrouted ${ipxrouted_flags} > /dev/null 2>&1 + ;; + esac + + case ${mrouted_enable} in + [Yy][Ee][Ss]) + echo -n ' mrouted'; mrouted ${mrouted_flags} + ;; + esac + + case ${rarpd_enable} in + [Yy][Ee][Ss]) + echo -n ' rarpd'; rarpd ${rarpd_flags} + ;; + esac + echo '.' + + # Let future generations know we made it. + # + network_pass1_done=YES +} + +network_pass2() { + echo -n 'Doing additional network setup:' + case ${named_enable} in + [Yy][Ee][Ss]) + echo -n ' named'; ${named_program:-named} ${named_flags} + ;; + esac + + case ${ntpdate_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpdate' + ${ntpdate_program:-ntpdate} ${ntpdate_flags} >/dev/null 2>&1 + ;; + esac + + case ${xntpd_enable} in + [Yy][Ee][Ss]) + echo -n ' ntpd'; ${xntpd_program:-ntpd} ${xntpd_flags} + ;; + esac + + case ${timed_enable} in + [Yy][Ee][Ss]) + echo -n ' timed'; timed ${timed_flags} + ;; + esac + + case ${portmap_enable} in + [Yy][Ee][Ss]) + echo -n ' rpcbind'; ${portmap_program:-/usr/sbin/rpcbind} \ + ${portmap_flags} + + # Start ypserv if we're an NIS server. + # Run rpc.ypxfrd and rpc.yppasswdd only on the NIS master server. + # + case ${nis_server_enable} in + [Yy][Ee][Ss]) + echo -n ' ypserv'; ypserv ${nis_server_flags} + + case ${nis_ypxfrd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypxfrd' + rpc.ypxfrd ${nis_ypxfrd_flags} + ;; + esac + + case ${nis_yppasswdd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.yppasswdd' + rpc.yppasswdd ${nis_yppasswdd_flags} + ;; + esac + ;; + esac + + # Start ypbind if we're an NIS client + # + case ${nis_client_enable} in + [Yy][Ee][Ss]) + echo -n ' ypbind'; ypbind ${nis_client_flags} + case ${nis_ypset_enable} in + [Yy][Ee][Ss]) + echo -n ' ypset'; ypset ${nis_ypset_flags} + ;; + esac + ;; + esac + + # Start keyserv if we are running Secure RPC + # + case ${keyserv_enable} in + [Yy][Ee][Ss]) + echo -n ' keyserv'; keyserv ${keyserv_flags} + ;; + esac + + # Start ypupdated if we are running Secure RPC + # and we are NIS master + # + case ${rpc_ypupdated_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.ypupdated'; rpc.ypupdated + ;; + esac + ;; + esac + + # Start ATM daemons + if [ -n "${atm_pass2_done}" ]; then + atm_pass3 + fi + + echo '.' + network_pass2_done=YES +} + +network_pass3() { + echo -n 'Starting final network daemons:' + + case ${portmap_enable} in + [Yy][Ee][Ss]) + case ${nfs_server_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="${mountd_flags} -n" + ;; + esac + + mountd ${mountd_flags} + + case ${nfs_reserved_port_only} in + [Yy][Ee][Ss]) + echo -n ' NFS on reserved port only=YES' + sysctl -w vfs.nfs.nfs_privport=1 > /dev/null + ;; + esac + + echo -n ' nfsd'; nfsd ${nfs_server_flags} + + if [ -n "${nfs_bufpackets}" ]; then + sysctl -w vfs.nfs.bufpackets=${nfs_bufpackets} > /dev/null + fi + + case ${rpc_lockd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.lockd'; rpc.lockd + ;; + esac + + case ${rpc_statd_enable} in + [Yy][Ee][Ss]) + echo -n ' rpc.statd'; rpc.statd + ;; + esac + fi + ;; + *) + case ${single_mountd_enable} in + [Yy][Ee][Ss]) + if [ -r /etc/exports ]; then + echo -n ' mountd' + + case ${weak_mountd_authentication} in + [Yy][Ee][Ss]) + mountd_flags="-n" + ;; + esac + + mountd ${mountd_flags} + fi + ;; + esac + ;; + esac + + case ${nfs_client_enable} in + [Yy][Ee][Ss]) + echo -n ' nfsiod'; nfsiod ${nfs_client_flags} + if [ -n "${nfs_access_cache}" ]; then + echo -n " NFS access cache time=${nfs_access_cache}" + sysctl -w vfs.nfs.access_cache_timeout=${nfs_access_cache} >/dev/null + fi + ;; + esac + + # If /var/db/mounttab exists, some nfs-server has not been + # sucessfully notified about a previous client shutdown. + # If there is no /var/db/mounttab, we do nothing. + if [ -f /var/db/mounttab ]; then + rpc.umntall -k + fi + + case ${amd_enable} in + [Yy][Ee][Ss]) + echo -n ' amd' + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + amd_flags="${amd_flags} `eval\ + ${amd_map_program}`" + ;; + esac + + if [ -n "${amd_flags}" ]; then + amd -p ${amd_flags}\ + > /var/run/amd.pid 2> /dev/null + else + amd 2> /dev/null + fi + ;; + esac + ;; + esac + + case ${rwhod_enable} in + [Yy][Ee][Ss]) + echo -n ' rwhod'; rwhod ${rwhod_flags} + ;; + esac + + # Kerberos runs ONLY on the Kerberos server machine + case ${kerberos_server_enable} in + [Yy][Ee][Ss]) + case ${kerberos_stash} in + [Yy][Ee][Ss]) + stash_flag=-n + ;; + *) + stash_flag= + ;; + esac + + echo -n ' kerberos' + kerberos ${stash_flag} >> /var/log/kerberos.log & + + case ${kadmind_server_enable} in + [Yy][Ee][Ss]) + echo -n ' kadmind' + (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & + ;; + esac + unset stash_flag + ;; + esac + + case ${pppoed_enable} in + [Yy][Ee][Ss]) + if [ -n "${pppoed_provider}" ]; then + pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" + fi + echo -n ' pppoed'; + /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} + ;; + esac + + case ${sshd_enable} in + [Yy][Ee][Ss]) + if [ ! -f /etc/ssh/ssh_host_key ]; then + echo ' creating ssh RSA host key'; + /usr/bin/ssh-keygen -N "" -f /etc/ssh/ssh_host_key + fi + if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then + echo ' creating ssh DSA host key'; + /usr/bin/ssh-keygen -d -N "" -f /etc/ssh/ssh_host_dsa_key + fi + ;; + esac + + echo '.' + network_pass3_done=YES +} + +network_pass4() { + echo -n 'Additional TCP options:' + case ${log_in_vain} in + [Nn][Oo] | '') + ;; + *) + echo -n ' log_in_vain=YES' + sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null + sysctl -w net.inet.udp.log_in_vain=1 >/dev/null + ;; + esac + + echo '.' + network_pass4_done=YES +} + +convert_host_conf() { + host_conf=$1; shift; + nsswitch_conf=$1; shift; + awk ' \ + /^[:blank:]*#/ { next } \ + /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \ + /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \ + /nis/ { nsswitch[c] = "nis"; c++; next } \ + { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \ + END { \ + printf "hosts: "; \ + for (i in nsswitch) printf "%s ", nsswitch[i]; \ + printf "\n"; \ + }' < $host_conf > $nsswitch_conf +} + diff --git a/etc/rc.network6 b/etc/rc.network6 new file mode 100644 index 0000000..6b47af8 --- /dev/null +++ b/etc/rc.network6 @@ -0,0 +1,498 @@ +#! /bin/sh +# +# Copyright (c) 2000 The KAME Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Note that almost all of the user-configurable behavior is not in this +# file, but rather in /etc/defaults/rc.conf. Please check that file +# first before contemplating any changes here. If you do need to change +# this file for some reason, we would like to know about it. + +# IPv6 startup + +network6_pass1() { + echo -n 'Doing IPv6 network setup:' + + # Initialize IP filtering using ip6fw + # + if /sbin/ip6fw -q flush > /dev/null 2>&1; then + ipv6_firewall_in_kernel=1 + else + ipv6_firewall_in_kernel=0 + fi + + case ${ipv6_firewall_enable} in + [Yy][Ee][Ss]) + if [ "${ipv6_firewall_in_kernel}" -eq 0 ] && kldload ip6fw; then + ipv6_firewall_in_kernel=1 + echo "Kernel IPv6 firewall module loaded." + elif [ "${ipv6_firewall_in_kernel}" -eq 0 ]; then + echo "Warning: IPv6 firewall kernel module failed to load." + fi + ;; + esac + + # Load the filters if required + # + case ${ipv6_firewall_in_kernel} in + 1) + if [ -z "${ipv6_firewall_script}" ]; then + ipv6_firewall_script=/etc/rc.firewall6 + fi + + case ${ipv6_firewall_enable} in + [Yy][Ee][Ss]) + if [ -r "${ipv6_firewall_script}" ]; then + . "${ipv6_firewall_script}" + echo -n 'IPv6 Firewall rules loaded.' + elif [ "`ip6fw l 65535`" = "65535 deny ipv6 from any to any" ]; then + echo -n "Warning: kernel has IPv6 firewall functionality, " + echo "but IPv6 firewall rules are not enabled." + echo " All ipv6 services are disabled." + fi + + case ${ipv6_firewall_logging} in + [Yy][Ee][Ss] | '') + echo 'IPv6 Firewall logging=YES' + sysctl -w net.inet6.ip6.fw.verbose=1 >/dev/null + ;; + *) + ;; + esac + + ;; + esac + ;; + esac + + case ${ipv6_network_interfaces} in + [Aa][Uu][Tt][Oo]) + # + # list of interfaces, and prefix for interfaces + # + ipv6_network_interfaces="`ifconfig -l`" + ;; + esac + + # just to make sure + ifconfig lo0 up + + # disallow "internal" addresses to appear on the wire + route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # act as a router + sysctl -w net.inet6.ip6.forwarding=1 + sysctl -w net.inet6.ip6.accept_rtadv=0 + + # wait for DAD + for i in $ipv6_network_interfaces; do + ifconfig $i up + done + sleep `sysctl -n net.inet6.ip6.dad_count` + sleep 1 + ;; + *) + # act as endhost - start with manual configuration + sysctl -w net.inet6.ip6.forwarding=0 + sysctl -w net.inet6.ip6.accept_rtadv=0 + ;; + esac + + # gifconfig + network6_gif_setup + + # setting up interfaces + network6_interface_setup + + # wait for DAD's completion (for global addrs) + sleep `sysctl -n net.inet6.ip6.dad_count` + sleep 1 + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # Filter out interfaces on which IPv6 addr init failed. + ipv6_working_interfaces="" + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_working_interfaces="$i \ + ${ipv6_working_interfaces}" + ;; + esac + done + ipv6_network_interfaces=${ipv6_working_interfaces} + ;; + esac + + # 6to4 setup + network6_stf_setup + + # install the "default interface" to kernel, which will be used + # as the default route when there's no router. + network6_default_interface_setup + + # setup static routes + network6_static_routes_setup + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # ipv6_router + case ${ipv6_router_enable} in + [Yy][Ee][Ss]) + if [ -x ${ipv6_router} ]; then + echo -n " ${ipv6_router}" + ${ipv6_router} ${ipv6_router_flags} + fi + ;; + esac + + # rtadvd + # This should enabled with a great care. + # You may want to fine-tune /etc/rtadvd.conf. + # + # And if you wish your rtadvd to receive and process + # router renumbering messages, specify your Router Renumbering + # security policy by -R option. + # + # See `man 3 ipsec_set_policy` for IPsec policy specification + # details. + # (CAUTION: This enables your routers prefix renumbering + # from another machine, so if you enable this, do it with + # enough care.) + # + case ${rtadvd_enable} in + [Yy][Ee][Ss]) + # default + case ${rtadvd_interfaces} in + '') + for i in ${ipv6_network_interfaces}; do + case $i in + lo0|gif*|stf*|faith*) + continue + ;; + *) + rtadvd_interfaces="${rtadvd_interfaces} ${i}" + ;; + esac + done + ;; + esac + rtadvd ${rtadvd_interfaces} + # + # Enable Router Renumbering, unicast case + # (use correct src/dst addr) + # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" \ + # ${ipv6_network_interfaces} + # Enable Router Renumbering, multicast case + # (use correct src addr) + # rtadvd -R "in ipsec ah/transport/ff05::2-fec0:0:0:10::1/require" \ + # ${ipv6_network_interfaces} + ;; + esac + + # mroute6d + case ${mroute6d_enable} in + [Yy][Ee][Ss]) + if [ -x ${mroute6d_program} ]; then + echo -n " ${mroute6d_program}" + ${mroute6d_program} ${mroute6d_flags} + fi + ;; + esac + ;; + esac + + case ${ipv6_ipv4mapping} in + [Yy][Ee][Ss]) + echo -n ' IPv4 mapped IPv6 address support=YES' + sysctl -w net.inet6.ip6.mapped_addr=1 >/dev/null + ;; + '' | *) + echo -n ' IPv4 mapped IPv6 address support=NO' + sysctl -w net.inet6.ip6.mapped_addr=0 >/dev/null + ;; + esac + + echo '.' + + # Let future generations know we made it. + # + network6_pass1_done=YES +} + +network6_interface_setup() { + rtsol_interfaces='' + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + rtsol_available=no + ;; + *) + rtsol_available=yes + prefixcmd_enable=NO + ;; + esac + for i in $ipv6_network_interfaces; do + rtsol_interface=yes + eval prefix=\$ipv6_prefix_$i + if [ -n "${prefix}" ]; then + rtsol_available=no + rtsol_interface=no + for j in ${prefix}; do + case ${prefixcmd_enable} in + [Yy][Ee][Ss]) + prefix $i $j:: + ;; + *) + laddr=`network6_getladdr $i` + hostid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + address=$j\:${hostid} + + eval hostid_$i=${hostid} + eval address_$i=${address} + + ifconfig $i inet6 ${address} \ + prefixlen 64 alias + ;; + esac + + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + # subnet-router anycast address + # (rfc2373) + ifconfig $i inet6 $j:: prefixlen 64 \ + alias anycast + ;; + esac + done + fi + eval ipv6_ifconfig=\$ipv6_ifconfig_$i + if [ -n "${ipv6_ifconfig}" ]; then + rtsol_available=no + rtsol_interface=no + ifconfig $i inet6 ${ipv6_ifconfig} alias + fi + alias=0 + while : ; do + eval ipv6_ifconfig=\$ipv6_ifconfig_${i}_alias${alias} + if [ -z "${ipv6_ifconfig}" ]; then + break; + fi + ifconfig $i inet6 ${ipv6_ifconfig} alias + alias=$((${alias} + 1)) + done + + if [ ${rtsol_available} = yes -a ${rtsol_interface} = yes ] + then + case ${i} in + lo0|gif*|stf*|faith*) + ;; + *) + rtsol_interfaces="${rtsol_interfaces} ${i}" + ;; + esac + else + ifconfig $i inet6 + fi + done + + if [ ${rtsol_available} = yes -a -n "${rtsol_interfaces}" ]; then + # Act as endhost - automatically configured. + # You can configure only single interface, as + # specification assumes that autoconfigured host has + # single interface only. + sysctl -w net.inet6.ip6.accept_rtadv=1 + set ${rtsol_interfaces} + ifconfig $1 up + rtsol $1 + fi +} + +network6_gif_setup() { + case ${gif_interfaces} in + [Nn][Oo] | '') + ;; + *) + for i in ${gif_interfaces}; do + eval peers=\$gifconfig_$i + case ${peers} in + '') + continue + ;; + *) + gifconfig $i ${peers} + ;; + esac + done + ;; + esac +} + +network6_stf_setup() { + case ${stf_interface_ipv4addr} in + [Nn][Oo] | '') + ;; + *) + # assign IPv6 addr and interface route for 6to4 interface + stf_prefixlen=$((16+${stf_interface_ipv4plen:-0})) + OIFS="$IFS" + IFS=".$IFS" + set ${stf_interface_ipv4addr} + IFS="$OIFS" + ipv4_in_hexformat=`printf "%x:%x\n" \ + $(($1*256 + $2)) $(($3*256 + $4))` + case ${stf_interface_ipv6_ifid} in + [Aa][Uu][Tt][Oo] | '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr ${i}` + case ${laddr} in + '') + ;; + *) + break + ;; + esac + done + stf_interface_ipv6_ifid=`expr "${laddr}" : \ + 'fe80::\(.*\)%\(.*\)'` + case ${stf_interface_ipv6_ifid} in + '') + stf_interface_ipv6_ifid=0:0:0:1 + ;; + esac + ;; + esac + ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \ + prefixlen ${stf_prefixlen} + # disallow packets to malicious 6to4 prefix + route add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + route add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + route add -inet6 2002:0000:: -prefixlen 24 ::1 -reject + route add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject + ;; + esac +} + +network6_static_routes_setup() { + # Set up any static routes. + case ${ipv6_defaultrouter} in + [Nn][Oo] | '') + ;; + *) + ipv6_static_routes="default ${ipv6_static_routes}" + ipv6_route_default="default ${ipv6_defaultrouter}" + ;; + esac + case ${ipv6_static_routes} in + [Nn][Oo] | '') + ;; + *) + for i in ${ipv6_static_routes}; do + eval ipv6_route_args=\$ipv6_route_${i} + route add -inet6 ${ipv6_route_args} + done + ;; + esac +} + +network6_default_interface_setup() { + # Choose IPv6 default interface if it is not clearly specified. + case ${ipv6_default_interface} in + '') + for i in ${ipv6_network_interfaces}; do + laddr=`network6_getladdr $i exclude_tentative` + case ${laddr} in + '') + ;; + *) + ipv6_default_interface=$i + break + ;; + esac + done + ;; + esac + + # Disallow unicast packets without outgoing scope identifiers, + # or route such packets to a "default" interface, if it is specified. + route add -inet6 fe80:: -prefixlen 10 ::1 -reject + case ${ipv6_default_interface} in + [Nn][Oo] | '') + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + ;; + *) + laddr=`network6_getladdr ${ipv6_default_interface}` + route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface \ + -cloning + + # Disable installing the default interface with the + # case net.inet6.ip6.forwarding=0 and + # net.inet6.ip6.accept_rtadv=0, due to avoid conflict + # between the default router list and the manual + # configured default route. + case ${ipv6_gateway_enable} in + [Yy][Ee][Ss]) + ;; + *) + if [ `sysctl -n net.inet6.ip6.accept_rtadv` -eq 1 ] + then + ndp -I ${ipv6_default_interface} + fi + ;; + esac + ;; + esac +} + +network6_getladdr() { + ifconfig $1 2>/dev/null | while read proto addr rest; do + case ${proto} in + inet6) + case ${addr} in + fe80::*) + if [ -z "$2" ]; then + echo ${addr} + return + fi + case ${rest} in + *tentative*) + continue + ;; + *) + echo ${addr} + return + esac + esac + esac + done +} diff --git a/etc/rc.pccard b/etc/rc.pccard new file mode 100644 index 0000000..9152e82 --- /dev/null +++ b/etc/rc.pccard @@ -0,0 +1,56 @@ +#!/bin/sh - +# +# Copyright (c) 1996 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# PC-card startup script + +case ${pccard_enable} in +[Yy][Ee][Ss]) + echo -n 'Setup PC-CARD:' + + case ${pccard_mem} in + [Dd][Ee][Ff][Aa][Uu][Ll][Tt]) + pccardc pccardmem 0xd0000 1>/dev/null && echo -n ' memory' + ;; + *) + pccardc pccardmem ${pccard_mem} 1>/dev/null && echo -n ' memory' + ;; + esac + + if [ -n "${pccard_beep}" ] ; then + pccardc beep ${pccard_beep} && echo -n ' beep' + fi + + if [ -n "${pccard_conf}" ]; then + pccardd_flags="${pccardd_flags} -f ${pccard_conf}" + fi + + pccardd ${pccardd_flags} && echo -n ' pccardd' + echo '.' + ;; +esac diff --git a/etc/rc.resume b/etc/rc.resume new file mode 100755 index 0000000..ee1b82c --- /dev/null +++ b/etc/rc.resume @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Copyright (c) 1999 Mitsuru IWASAKI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# sample run command file for APM Resume Event + +if [ -r /var/run/rc.suspend.pid ]; then + kill -9 `cat /var/run/rc.suspend.pid` + rm -f /var/run/rc.suspend.pid + echo 'rc.suspend is killed' +fi + +# Turns on a power supply of a card in the slot inactivated. +# See also contrib/pccardq.c (only for PAO users). +# pccardq | awk -F '~' '$5 == "inactive" \ +# { printf("pccardc power %d 1", $1); }' | sh + +logger -t apmd resumed at `date +'%Y%m%d %H:%M:%S'` +sync && sync && sync + +exit 0 diff --git a/etc/rc.serial b/etc/rc.serial new file mode 100644 index 0000000..2599d31 --- /dev/null +++ b/etc/rc.serial @@ -0,0 +1,153 @@ +#!/bin/sh +# +# Copyright (c) 1996 Andrey A. Chernov +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Change some defaults for serial devices. +# Standard defaults are: +# dtrwait 300 drainwait 0 +# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl +# initial iflag, lflag and oflag all 0 +# speed 9600 +# special chars from <sys/ttydefaults.h> +# nothing locked +# except for serial consoles the initial iflag, lflag and oflag are from +# <sys/ttydefaults.h> and clocal is locked on. + +default() { + # Reset everything changed by the other functions to initial defaults. + + ci=$1; shift # call in device identifier + co=$1; shift # call out device identifier + + for i in $* + do + comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0 + stty < /dev/ttyi${ci}${i} -clocal crtscts hupcl 9600 reprint ^R + stty < /dev/ttyl${ci}${i} -clocal -crtscts -hupcl 0 + stty < /dev/cuai${co}${i} -clocal crtscts hupcl 9600 reprint ^R + stty < /dev/cual${co}${i} -clocal -crtscts -hupcl 0 + done +} + +maybe() { + # Special settings. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # Don't use ^R; it breaks bash's ^R when typed ahead. + stty < /dev/ttyi${ci}${i} reprint undef + stty < /dev/cuai${co}${i} reprint undef + # Lock clocal off on dialin device for security. + stty < /dev/ttyl${ci}${i} clocal + # Lock the speeds to use old binaries that don't support them. + # Any legal speed works to lock the initial speed. + stty < /dev/ttyl${ci}${i} 300 + stty < /dev/cual${co}${i} 300 + done +} + +modem() { + # Modem that supports CTS and perhaps RTS handshaking. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # may depend on modem + comcontrol /dev/tty${ci}${i} dtrwait 100 drainwait 180 + # Lock crtscts on. + # Speed reasonable for V42bis. + stty < /dev/ttyi${ci}${i} crtscts 57600 + stty < /dev/ttyl${ci}${i} crtscts + stty < /dev/cuai${co}${i} crtscts 57600 + stty < /dev/cual${co}${i} crtscts + done +} + +mouse() { + # Mouse on either callin or callout port. + + ci=$1; shift + co=$1; shift + + for i in $* + do + # Lock clocal on, hupcl off. + # Standard speed for Microsoft mouse. + stty < /dev/ttyi${ci}${i} clocal -hupcl 1200 + stty < /dev/ttyl${ci}${i} clocal hupcl + stty < /dev/cuai${co}${i} clocal -hupcl 1200 + stty < /dev/cual${co}${i} clocal hupcl + done +} + +terminal() { + # Terminal that supports CTS and perhaps RTS handshaking + # with the cable or terminal arranged so that DCD is on + # at least while the terminal is on. + # Also works for bidirectional communications to another pc + # provided at most one side runs getty. + # Same as modem() except we want a faster speed and no dtrwait. + + ci=$1; shift + co=$1; shift + + modem ${ci} ${co} $* + for i in $* + do + comcontrol /dev/tty${ci}${i} dtrwait 0 + stty < /dev/ttyi${ci}${i} 115200 + stty < /dev/cuai${co}${i} 115200 + done +} + +# Don't use anything from this file unless you have some buggy programs +# that require it. + +# Edit the functions and the examples to suit your system. +# $1 is the call in device identifier, $2 is the call out device identifier +# and the remainder of the line lists the device numbers. + +# Initialize assorted 8250-16550 (sio) ports. +# maybe d a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v +# mouse d a 2 +# modem d a 1 +# terminal d a 0 + +# Initialize all ports on a Cyclades-8yo. +# modem c c 00 01 02 03 04 05 06 07 + +# Initialize all ports on a Cyclades-16ye. +# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f + +# Initialize all ports on a Digiboard 8. +# modem D D 00 01 02 03 04 05 06 07 diff --git a/etc/rc.shutdown b/etc/rc.shutdown new file mode 100644 index 0000000..0f77f47 --- /dev/null +++ b/etc/rc.shutdown @@ -0,0 +1,123 @@ +#!/bin/sh +# +# Copyright (c) 1997 Ollivier Robert +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# Site-specific closing actions for daemons run by init on shutdown, +# or before going single-user from multi-user. +# Output and errors are directed to console by init, and the +# console is the controlling terminal. + +stty status '^T' + +# Set shell to ignore SIGINT (2), but not children; +# shell catches SIGQUIT (3) and returns to single user after fsck. +trap : 2 +trap : 3 # shouldn't be needed + +HOME=/ +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin +export HOME PATH + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs +elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf +fi + +# Write some entropy so the rebooting /dev/random can reseed +# +case ${entropy_file} in +[Nn][Oo] | '') + ;; +*) + echo -n 'Writing entropy file:' + rm -f ${entropy_file} + oumask=`umask` + umask 077 + if touch ${entropy_file} ; then + entropy_file_confirmed="${entropy_file}" + else + # Try this as a reasonable alternative for read-only + # roots, diskless workstations, etc. + rm -f /var/db/entropy + if touch /var/db/entropy ; then + entropy_file_confirmed=/var/db/entropy + fi + fi + case ${entropy_file_confirmed} in + '') + echo ' ERROR - entropy file write failed' + ;; + *) + dd if=/dev/random of=${entropy_file_confirmed} \ + bs=4096 count=1 2> /dev/null + echo '.' + ;; + esac + umask ${oumask} + ;; +esac + +# Check if /var/db/mounttab is clean. +case $1 in +reboot) + if [ -f /var/db/mounttab ]; then + rpc.umntall + fi + ;; +esac + +echo -n 'Shutting down daemon processes:' + +# for each valid dir in $local_startup, search for init scripts matching *.sh +case ${local_startup} in +[Nn][Oo] | '') + ;; +*) + for dir in ${local_startup}; do + if [ -d "${dir}" ]; then + for script in ${dir}/*.sh; do + if [ -x "${script}" ]; then + (set -T + trap 'exit 1' 2 + ${script} stop) + fi + done + fi + done + echo '.' + ;; +esac + +# Insert other shutdown procedures here + +echo '.' +exit 0 diff --git a/etc/rc.suspend b/etc/rc.suspend new file mode 100755 index 0000000..8b3e4fa --- /dev/null +++ b/etc/rc.suspend @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Copyright (c) 1999 Mitsuru IWASAKI +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# sample run command file for APM Suspend Event + +if [ -r /var/run/rc.suspend.pid ]; then + exit 1 +fi + +echo $$ > /var/run/rc.suspend.pid + +# If you have troubles on suspending with PC-CARD modem, try this. +# See also contrib/pccardq.c (Only for PAO users). +# pccardq | awk -F '~' '$5 == "filled" && $4 ~ /sio/ \ +# { printf("pccardc power %d 0", $1); }' | sh + +logger -t apmd suspend at `date +'%Y%m%d %H:%M:%S'` +sync && sync && sync +sleep 3 + +rm -f /var/run/rc.suspend.pid +zzz + +exit 0 diff --git a/etc/rc.syscons b/etc/rc.syscons new file mode 100644 index 0000000..4fd663e --- /dev/null +++ b/etc/rc.syscons @@ -0,0 +1,176 @@ +#!/bin/sh - +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# Do syscons configuration +# + +# stdin must be redirected because it might be for a serial console +# +kbddev=/dev/ttyv0 +viddev=/dev/ttyv0 + +echo -n 'Configuring syscons:' + +# keymap +# +case ${keymap} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + ;; +esac + +# keyrate +# +case ${keyrate} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate} + ;; +esac + +# keybell +# +case ${keybell} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell} + ;; +esac + +# change function keys +# +case ${keychange} in +[Nn][Oo] | '') + ;; +*) + echo -n ' keychange' + set - ${keychange} + while [ $# -gt 0 ]; do + kbdcontrol <${kbddev} -f "$1" "$2" + shift; shift + done + ;; +esac + +# cursor type +# +case ${cursor} in +[Nn][Oo] | '') + ;; +*) + echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor} + ;; +esac + +# screen mapping +# +case ${scrnmap} in +[Nn][Oo] | '') + ;; +*) + echo -n ' screen_map'; vidcontrol < ${viddev} -l ${scrnmap} + ;; +esac + +# font 8x16 +# +case ${font8x16} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16} + ;; +esac + +# font 8x14 +# +case ${font8x14} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14} + ;; +esac + +# font 8x8 +# +case ${font8x8} in +[Nn][Oo] | '') + ;; +*) + echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8} + ;; +esac + +# blank time +# +case ${blanktime} in +[Nn][Oo] | '') + ;; +*) + echo -n ' blank_time'; vidcontrol < ${viddev} -t ${blanktime} + ;; +esac + +# screen saver +# +case ${saver} in +[Nn][Oo] | '') + ;; +*) + echo -n ' screensaver' + for i in `kldstat | awk '$5 ~ "^splash_.*$" { print $5 }'`; do + kldunload ${i} + done + kldstat -v | grep -q _saver || kldload ${saver}_saver + ;; +esac + +# mouse daemon +# +case ${moused_enable} in +[Yy][Ee][Ss]) + echo -n ' moused' + moused ${moused_flags} -p ${moused_port} -t ${moused_type} + vidcontrol < ${viddev} -m on + ;; +esac + +# set this mode for all virtual screens +# +if [ -n "${allscreens_flags}" ]; then + echo -n ' allscreens' + for ttyv in /dev/ttyv*; do + vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1 + done +fi + +echo '.' diff --git a/etc/rc.sysctl b/etc/rc.sysctl new file mode 100644 index 0000000..80af229 --- /dev/null +++ b/etc/rc.sysctl @@ -0,0 +1,45 @@ +#!/bin/sh +# +# Copyright (c) 1999 Warner Losh +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +# +# Read in /etc/sysctl.conf and set things accordingly +# + +if [ -f /etc/sysctl.conf ]; then + while read var comments + do + case ${var} in + \#*|'') + ;; + *) + sysctl -w ${var} + ;; + esac + done < /etc/sysctl.conf +fi diff --git a/etc/remote b/etc/remote new file mode 100644 index 0000000..78c684c --- /dev/null +++ b/etc/remote @@ -0,0 +1,58 @@ +# $FreeBSD$ +# +# @(#)remote 5.2 (Berkeley) 6/30/90 +# +# remote -- remote host description file +# see tip(1), remote(5) +# +# dv device to use for the tty +# el EOL marks (default is NULL) +# du make a call flag (dial up) +# pn phone numbers (@ =>'s search phones file; possibly taken from +# PHONES environment variable) +# at ACU type +# ie input EOF marks (default is NULL) +# oe output EOF string (default is NULL) +# cu call unit (default is dv) +# br baud rate (defaults to 300) +# fs frame size (default is BUFSIZ) -- used in buffering writes on +# receive operations +# tc to continue a capability + +# Systems definitions +netcom|Netcom Unix Access:\ + :pn=\@:tc=unix1200: +omen|Omen BBS:\ + :pn=\@:tc=dos1200: + +# UNIX system definitions +unix1200|1200 Baud dial-out to a UNIX system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200: +unix300|300 Baud dial-out to a UNIX system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300: + +# DOS system definitions +dos1200|1200 Baud dial-out to a DOS system:\ + :el=^U^C^R^O^D^S^Q:ie=%$:oe=^Z:pa=none:tc=dial1200: + +# General dialer definitions used below +# +# COURIER switch settings: +# switch: 1 2 3 4 5 6 7 8 9 10 +# setting: D U D U D D U D U U +# Rackmount: U U D U D U D D U D +# +dial2400|2400 Baud Hayes attributes:\ + :dv=/dev/cuaa0:br#2400:cu=/dev/cuaa0:at=hayes:du: +dial1200|1200 Baud Hayes attributes:\ + :dv=/dev/cuaa0:br#1200:cu=/dev/cuaa0:at=hayes:du: + +# Hardwired line +cuaa0b|cua0b:dv=/dev/cuaa0:br#2400:pa=none: +cuaa0c|cua0c:dv=/dev/cuaa0:br#9600:pa=none: + +# Finger friendly shortcuts +com1:dv=/dev/cuaa0:br#9600:pa=none: +com2:dv=/dev/cuaa1:br#9600:pa=none: +com3:dv=/dev/cuaa2:br#9600:pa=none: +com4:dv=/dev/cuaa3:br#9600:pa=none: diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc new file mode 100644 index 0000000..8469eba --- /dev/null +++ b/etc/root/dot.cshrc @@ -0,0 +1,35 @@ +# $FreeBSD$ +# +# .cshrc - csh resource script, read at beginning of execution by each shell +# +# see also csh(1), environ(7). +# + +alias h history 25 +alias j jobs -l +alias la ls -a +alias lf ls -FA +alias ll ls -lA + +# A righteous umask +umask 22 + +set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) + +setenv EDITOR vi +setenv PAGER more +setenv BLOCKSIZE K + +if ($?prompt) then + # An interactive shell -- set some stuff up + set prompt = "`hostname -s`# " + set filec + set history = 100 + set savehist = 100 + set mail = (/var/mail/$USER) + if ( $?tcsh ) then + bindkey "^W" backward-delete-word + bindkey -k up history-search-backward + bindkey -k down history-search-forward + endif +endif diff --git a/etc/root/dot.klogin b/etc/root/dot.klogin new file mode 100644 index 0000000..55e653a --- /dev/null +++ b/etc/root/dot.klogin @@ -0,0 +1,4 @@ +# $FreeBSD$ +# +# user1.root@your.realm.wherever +# user2.root@your.realm.wherever diff --git a/etc/root/dot.login b/etc/root/dot.login new file mode 100644 index 0000000..3032ef9 --- /dev/null +++ b/etc/root/dot.login @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# .login - csh login script, read by login shell, after `.cshrc' at login. +# +# see also csh(1), environ(7). +# + +# Uncomment to display a random cookie each login: +# [ -x /usr/games/fortune ] && /usr/games/fortune -s diff --git a/etc/root/dot.profile b/etc/root/dot.profile new file mode 100644 index 0000000..bcf606d --- /dev/null +++ b/etc/root/dot.profile @@ -0,0 +1,10 @@ +# $FreeBSD$ +# +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin +export PATH +HOME=/root +export HOME +TERM=${TERM:-cons25} +export TERM +PAGER=more +export PAGER @@ -0,0 +1,67 @@ +# +# $FreeBSD$ +# rpc 88/08/01 4.0 RPCSRC; from 1.12 99/07/25 SMI +# +rpcbind 100000 portmap sunrpc rpcbind +rstatd 100001 rstat rstat_svc rup perfmeter +rusersd 100002 rusers +nfs 100003 nfsprog +ypserv 100004 ypprog +mountd 100005 mount showmount +ypbind 100007 +walld 100008 rwall shutdown +yppasswdd 100009 yppasswd +etherstatd 100010 etherstat +rquotad 100011 rquotaprog quota rquota +sprayd 100012 spray +3270_mapper 100013 +rje_mapper 100014 +selection_svc 100015 selnsvc +database_svc 100016 +rexd 100017 rex +alis 100018 +sched 100019 +llockmgr 100020 +nlockmgr 100021 +x25.inr 100022 +statmon 100023 +status 100024 +bootparamd 100026 bootparam +ypupdated 100028 ypupdate +keyserv 100029 keyserver +sunlink_mapper 100033 +tfsd 100037 +nsed 100038 +nsemntd 100039 +showfhd 100043 showfh +ioadmd 100055 rpc.ioadmd +NETlicense 100062 +sunisamd 100065 +debug_svc 100066 dbsrv +cmsd 100068 +bugtraqd 100071 +kerbd 100078 +ttdbserver 100083 tooltalk +event 100101 na.event # SunNet Manager +logger 100102 na.logger # SunNet Manager +sync 100104 na.sync +hostperf 100107 na.hostperf +activity 100109 na.activity # SunNet Manager +hostmem 100112 na.hostmem +sample 100113 na.sample +x25 100114 na.x25 +ping 100115 na.ping +rpcnfs 100116 na.rpcnfs +hostif 100117 na.hostif +etherif 100118 na.etherif +iproutes 100120 na.iproutes +layers 100121 na.layers +snmp 100122 na.snmp snmp-cmc snmp-synoptics snmp-unisys snmp-utk +traffic 100123 na.traffic +nfs_acl 100227 +sadmind 100232 +nisd 100300 rpc.nisd +nispasswd 100303 rpc.nispasswdd +ufsd 100233 ufsd +pcnfsd 150001 pcnfs +amd 300019 diff --git a/etc/security b/etc/security new file mode 100644 index 0000000..a0a2701 --- /dev/null +++ b/etc/security @@ -0,0 +1,209 @@ +#!/bin/sh - +# +# Copyright (c) 2000 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)security 5.3 (Berkeley) 5/28/91 +# $FreeBSD$ +# + +PATH=/sbin:/bin:/usr/bin +LC_ALL=C; export LC_ALL +rc=0 +LOG=/var/log +TMP=/var/run/_secure.$$ + +separator () { + echo '' + echo '' +} + +catmsgs() { + find $LOG -name 'messages.*' -mtime -2 | + sort -t. -r -n +1 -2 | + xargs zcat -f + [ -f $LOG/messages ] && cat $LOG/messages +} + +sflag=FALSE ignore= +while getopts ams c +do + case "$c" in + a) ignore="$ignore|^amd:";; + m) ignore="$ignore|^mfs:";; + s) sflag=TRUE;; + esac +done + +yesterday=`date -v-1d "+%b %e "` + +host=`hostname` +[ $sflag = FALSE ] && echo "Subject: ${host} security check output" + +umask 027 + +echo 'Checking setuid files and devices:' + +# Don't have ncheck, but this does the equivalent of the commented out block. +# Note that one of the original problems, the possibility of overrunning +# the args to ls, is still here... +# +MP=`mount -t ufs | grep -v " nosuid" | awk '{ print $3 }' | sort` +set ${MP} +while [ $# -ge 1 ]; do + mount=$1 + shift + find $mount -xdev -type f \ + \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \ + \( -perm -u+s -or -perm -g+s \) -print0 +done | xargs -0 -n 20 ls -liTd | sort +10 > ${TMP} + +if [ ! -f ${LOG}/setuid.today ]; then + [ $rc -lt 1 ] && rc=1 + separator + echo "No ${LOG}/setuid.today" + cp ${TMP} ${LOG}/setuid.today || rc=3 +fi + +if ! cmp ${LOG}/setuid.today ${TMP} >/dev/null; then + [ $rc -lt 1 ] && rc=1 + separator + echo "${host} setuid diffs:" + diff -w ${LOG}/setuid.today ${TMP} + mv ${LOG}/setuid.today ${LOG}/setuid.yesterday || rc=3 + mv ${TMP} ${LOG}/setuid.today || rc=3 +fi + +# Show changes in the way filesystems are mounted +# +[ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat +if mount -p | $cmd > $TMP; then + if [ ! -f $LOG/mount.today ]; then + [ $rc -lt 1 ] && rc=1 + separator + echo "No $LOG/mount.today" + cp $TMP $LOG/mount.today || rc=3 + fi + if ! cmp $LOG/mount.today $TMP >/dev/null 2>&1; then + [ $rc -lt 1 ] && rc=1 + separator + echo "$host changes in mounted filesystems:" + diff -b $LOG/mount.today $TMP + mv $LOG/mount.today $LOG/mount.yesterday || rc=3 + mv $TMP $LOG/mount.today || rc=3 + fi +fi + +separator +echo 'Checking for uids of 0:' +n=$(awk -F: '/^#/ {next} $3==0 {print $1,$3}' /etc/master.passwd | + tee /dev/stderr | + sed -e '/^root 0$/d' -e '/^toor 0$/d' | + wc -l) +[ $n -gt 0 -a $rc -lt 1 ] && rc=1 + +separator +echo 'Checking for passwordless accounts:' +n=$(awk -F: 'NF > 1 && $1 !~ /^[#+-]/ && $2=="" {print $0}' /etc/master.passwd | + tee /dev/stderr | wc -l) +[ $n -gt 0 -a $rc -lt 1 ] && rc=1 + +# Show denied packets +# +if ipfw -a l 2>/dev/null | egrep "deny|reset|unreach" > ${TMP}; then + if [ ! -f ${LOG}/ipfw.today ]; then + [ $rc -lt 1 ] && rc=1 + separator + echo "No ${LOG}/ipfw.today" + cp ${TMP} ${LOG}/ipfw.today || rc=3 + fi + + if ! cmp ${LOG}/ipfw.today ${TMP} >/dev/null; then + [ $rc -lt 1 ] && rc=1 + separator + echo "${host} denied packets:" + diff -b ${LOG}/ipfw.today ${TMP} | egrep "^>" + mv ${LOG}/ipfw.today ${LOG}/ipfw.yesterday || rc=3 + mv ${TMP} ${LOG}/ipfw.today || rc=3 + fi +fi + +# Show ipfw rules which have reached the log limit +# +IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` +if [ $? -eq 0 -a "${IPFW_LOG_LIMIT}" -ne 0 ]; then + ipfw -a l | grep " log " | perl -n -e \ + '/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > ${TMP} + if [ -s "${TMP}" ]; then + [ $rc -lt 1 ] && rc=1 + separator + echo 'ipfw log limit reached:' + cat ${TMP} + fi +fi + +# Show kernel log messages +# +if dmesg 2>/dev/null > ${TMP}; then + if [ ! -f ${LOG}/dmesg.today ]; then + [ $rc -lt 1 ] && rc=1 + separator + echo "No ${LOG}/dmesg.today" + cp ${TMP} ${LOG}/dmesg.today || rc=3 + fi + + if ! cmp ${LOG}/dmesg.today ${TMP} >/dev/null 2>&1; then + [ $rc -lt 1 ] && rc=1 + separator + echo "${host} kernel log messages:" + diff -b ${LOG}/dmesg.today ${TMP} | egrep "^>" + mv ${LOG}/dmesg.today ${LOG}/dmesg.yesterday || rc=3 + mv ${TMP} ${LOG}/dmesg.today || rc=3 + fi +fi + +# Show login failures +# +separator +echo "${host} login failures:" +n=$(catmsgs | grep -i "^$yesterday.*login failure" | tee /dev/stderr | wc -l) +[ $n -gt 0 -a $rc -lt 1 ] && rc=1 + +# Show tcp_wrapper warning messages +# +separator +echo "${host} refused connections:" +n=$(catmsgs | grep -i "^$yesterday.*refused connect" | tee /dev/stderr | wc -l) +[ $n -gt 0 -a $rc -lt 1 ] && rc=1 + +# Show denied secondary bind transfer attempts +# +separator +echo "$host checking for denied secondary zone transfers:" +n=$(catmsgs | grep -i "unapproved AXFR from" | tee /dev/stderr | wc -l) +[ $n -gt 0 -a $rc -lt 1 ] && rc=1 + +rm -f ${TMP} + +exit $rc diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile new file mode 100644 index 0000000..822899e --- /dev/null +++ b/etc/sendmail/Makefile @@ -0,0 +1,83 @@ +# @(#)Makefile 8.19 (Berkeley) 1/14/97 +# $FreeBSD$ + +M4= m4 +CHMOD= chmod +ROMODE= 444 +RM= rm -f + +SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail +SMDIR= ${SENDMAIL_DIR}/src +CFDIR= ${SENDMAIL_DIR}/cf + +# this is overkill, but.... +M4FILES!= find ${CFDIR} -type f -name '*.m4' -print + +.SUFFIXES: .mc .cf + +.mc.cf: ${M4FILES} + ${RM} ${.TARGET} + (cd ${.CURDIR} && \ + ${M4} -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} + ${CHMOD} ${ROMODE} ${.TARGET} + +ALL= freebsd.cf + +# Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf. +# Warning! If set, this causes 'make install' to always copy it +# over /etc/mail/sendmail.cf!!! +# Caveat emptor! Be sure you want this before you enable it. +.if defined(SENDMAIL_MC) +INSTALL_CF= ${SENDMAIL_MC:R}.cf +.else +.if defined(SENDMAIL_CF) +INSTALL_CF= ${SENDMAIL_CF} +.endif +.endif + +ALL+= ${INSTALL_CF} + +# Additional .cf files to build +.if defined(SENDMAIL_ADDITIONAL_MC) +ALL+= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g} +.endif + +CLEANFILES+= ${ALL} + +all: ${ALL} + +depend: + +install: ${INSTALL_CF} +.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) + @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" + @false +.endif +.if defined(INSTALL_CF) + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ + ${DESTDIR}/etc/mail/sendmail.cf +.endif + +# Helper for src/etc/Makefile +distribution: freebsd.cf freebsd.mc ${INSTALL_CF} +.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) + @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" + @false +.endif + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \ + ${DESTDIR}/etc/mail/freebsd.mc + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ + ${DESTDIR}/etc/mail/freebsd.cf +.if defined(INSTALL_CF) + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ + ${DESTDIR}/etc/mail/sendmail.cf +.else + ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ + ${DESTDIR}/etc/mail/sendmail.cf +.endif + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \ + ${DESTDIR}/etc/mail/helpfile + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${DESTDIR}/var/log/sendmail.st + +.include <bsd.prog.mk> diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc new file mode 100644 index 0000000..9568fdc --- /dev/null +++ b/etc/sendmail/freebsd.mc @@ -0,0 +1,91 @@ +divert(-1) +# +# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# +# This is a generic configuration file for 4.4 BSD-based systems. +# If you want to customize it, copy it to a name appropriate for your +# environment and do the modifications there. +# +# The best documentation for this .mc file is: +# /usr/share/sendmail/cf/README or +# /usr/src/contrib/sendmail/cf/README +# + +divert(0) +VERSIONID(`$FreeBSD$') +OSTYPE(bsd4.4) +DOMAIN(generic) + +FEATURE(access_db, `hash -o /etc/mail/access') +FEATURE(blacklist_recipients) +FEATURE(local_lmtp) +FEATURE(mailertable, `hash -o /etc/mail/mailertable') +FEATURE(relay_based_on_MX) +FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') + +dnl Uncomment to activate Realtime Blackhole List (recommended!) +dnl information available at http://maps.vix.com/rbl/ +dnl FEATURE(dnsbl) +dnl Alternatively, you can provide your own rejection message for the RBL: +dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `"550 Mail from " $&{client_addr} " rejected, see http://mail-abuse.org/cgi-bin/lookup?" $&{client_addr}') + +dnl Other DNS based black hole lists +dnl -------------------------------- +dnl MAPS Relay Spam Stopper (RSS): http://mail-abuse.org/rss/ +dnl FEATURE(dnsbl, `relays.mail-abuse.org', `"550 Mail from " $&{client_addr} " rejected; see http://mail-abuse.org/cgi-bin/nph-rss?" $&{client_addr}') + +dnl MAPS Dial-up User List (DUL): http://maps.vix.com/dul/ +dnl FEATURE(dnsbl, `dialups.mail-abuse.org', `"550 Mail from dial-up rejected; see http://mail-abuse.org/dul/enduser.htm"') + +dnl ORBS also offers a multitude of DNS based block hole lists. For more +dnl information, visit: http://www.orbs.org/usingindex.html + +dnl Dialup users should uncomment and define this appropriately +dnl define(`SMART_HOST', `your.isp.mail.server') + +dnl Uncomment the first line to change the location of the default +dnl /etc/mail/local-host-names and comment out the second line. +dnl define(`confCW_FILE', `-o /etc/mail/sendmail.cw') +define(`confCW_FILE', `-o /etc/mail/local-host-names') + +dnl Uncomment both of the following lines to listen on IPv6 as well as IPv4 +dnl DAEMON_OPTIONS(`Name=IPv4, Family=inet') +dnl DAEMON_OPTIONS(`Name=IPv6, Family=inet6') + +define(`confMAX_MIME_HEADER_LENGTH', `256/128') +define(`confNO_RCPT_ACTION', `add-to-undisclosed') +define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy') +MAILER(local) +MAILER(smtp) diff --git a/etc/sendmail/freefall.mc b/etc/sendmail/freefall.mc new file mode 100644 index 0000000..2f4480e --- /dev/null +++ b/etc/sendmail/freefall.mc @@ -0,0 +1,53 @@ +divert(-1) +# +# Copyright (c) 1983 Eric P. Allman +# Copyright (c) 1988, 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +# +# This the prototype for a "null client" -- that is, a client that +# does nothing except forward all mail to a mail hub, plus an extra +# line to make the email all appear as coming from "FreeBSD.org". +# + +divert(0)dnl +VERSIONID(`$FreeBSD$') + +OSTYPE(bsd4.4) +FEATURE(nullclient, hub.$m) +FEATURE(`allmasquerade') +FEATURE(`masquerade_envelope') +MASQUERADE_AS(FreeBSD.org) +define(`MAIL_HUB', `hub.$m') +define(`SMART_HOST', `hub.$m') +define(`confFORWARD_PATH', `') + diff --git a/etc/services b/etc/services new file mode 100644 index 0000000..c06ab8a --- /dev/null +++ b/etc/services @@ -0,0 +1,2066 @@ +# +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, most entries here have two entries +# even if the protocol doesn't support UDP operations. +# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). All ports +# are included. +# +# The latest IANA port assignments can be gotten from +# http://www.isi.edu/in-notes/iana/assignments/port-numbers +# The Well Known Ports are those from 0 through 1023. +# The Registered Ports are those from 1024 through 49151 +# The Dynamic and/or Private Ports are those from 49152 through 65535 +# +# Kerberos services are for Kerberos v4, and are unofficial. Sites running +# v5 should uncomment v5 entries and comment v4 entries. +# +# $FreeBSD$ +# From: @(#)services 5.8 (Berkeley) 5/9/91 +# +# WELL KNOWN PORT NUMBERS +# +rtmp 1/ddp #Routing Table Maintenance Protocol +tcpmux 1/tcp #TCP Port Service Multiplexer +tcpmux 1/udp #TCP Port Service Multiplexer +nbp 2/ddp #Name Binding Protocol +compressnet 2/tcp #Management Utility +compressnet 2/udp #Management Utility +compressnet 3/tcp #Compression Process +compressnet 3/udp #Compression Process +echo 4/ddp #AppleTalk Echo Protocol +rje 5/tcp #Remote Job Entry +rje 5/udp #Remote Job Entry +zip 6/ddp #Zone Information Protocol +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users #Active Users +systat 11/udp users #Active Users +daytime 13/tcp +daytime 13/udp +qotd 17/tcp quote #Quote of the Day +qotd 17/udp quote #Quote of the Day +msp 18/tcp #Message Send Protocol +msp 18/udp #Message Send Protocol +chargen 19/tcp ttytst source #Character Generator +chargen 19/udp ttytst source #Character Generator +ftp-data 20/tcp #File Transfer [Default Data] +ftp-data 20/udp #File Transfer [Default Data] +ftp 21/tcp #File Transfer [Control] +ftp 21/udp #File Transfer [Control] +ssh 22/tcp #Secure Shell Login +ssh 22/udp #Secure Shell Login +telnet 23/tcp +telnet 23/udp +# 24/tcp any private mail system +# 24/udp any private mail system +smtp 25/tcp mail #Simple Mail Transfer +smtp 25/udp mail #Simple Mail Transfer +nsw-fe 27/tcp #NSW User System FE +nsw-fe 27/udp #NSW User System FE +msg-icp 29/tcp #MSG ICP +msg-icp 29/udp #MSG ICP +msg-auth 31/tcp #MSG Authentication +msg-auth 31/udp #MSG Authentication +dsp 33/tcp #Display Support Protocol +dsp 33/udp #Display Support Protocol +# 35/tcp any private printer server +# 35/udp any private printer server +time 37/tcp timserver +time 37/udp timserver +rap 38/tcp #Route Access Protocol +rap 38/udp #Route Access Protocol +rlp 39/tcp resource #Resource Location Protocol +rlp 39/udp resource #Resource Location Protocol +graphics 41/tcp +graphics 41/udp +nameserver 42/tcp name #Host Name Server +nameserver 42/udp name #Host Name Server +nicname 43/tcp whois +nicname 43/udp whois +mpm-flags 44/tcp #MPM FLAGS Protocol +mpm-flags 44/udp #MPM FLAGS Protocol +mpm 45/tcp #Message Processing Module [recv] +mpm 45/udp #Message Processing Module [recv] +mpm-snd 46/tcp #MPM [default send] +mpm-snd 46/udp #MPM [default send] +ni-ftp 47/tcp #NI FTP +ni-ftp 47/udp #NI FTP +auditd 48/tcp #Digital Audit Daemon +auditd 48/udp #Digital Audit Daemon +tacacs 49/tcp #Login Host Protocol (TACACS) +tacacs 49/udp #Login Host Protocol (TACACS) +re-mail-ck 50/tcp #Remote Mail Checking Protocol +re-mail-ck 50/udp #Remote Mail Checking Protocol +la-maint 51/tcp #IMP Logical Address Maintenance +la-maint 51/udp #IMP Logical Address Maintenance +xns-time 52/tcp #XNS Time Protocol +xns-time 52/udp #XNS Time Protocol +domain 53/tcp #Domain Name Server +domain 53/udp #Domain Name Server +xns-ch 54/tcp #XNS Clearinghouse +xns-ch 54/udp #XNS Clearinghouse +isi-gl 55/tcp #ISI Graphics Language +isi-gl 55/udp #ISI Graphics Language +xns-auth 56/tcp #XNS Authentication +xns-auth 56/udp #XNS Authentication +mtp 57/tcp # deprecated +#PROBLEMS!============================================================== +# 57/tcp any private terminal access +#PROBLEMS!============================================================== +# 57/udp any private terminal access +xns-mail 58/tcp #XNS Mail +xns-mail 58/udp #XNS Mail +# 59/tcp any private file service +# 59/udp any private file service +ni-mail 61/tcp #NI MAIL +ni-mail 61/udp #NI MAIL +acas 62/tcp #ACA Services +acas 62/udp #ACA Services +whois++ 63/tcp +whois++ 63/udp +covia 64/tcp #Communications Integrator (CI) +covia 64/udp #Communications Integrator (CI) +tacacs-ds 65/tcp #TACACS-Database Service +tacacs-ds 65/udp #TACACS-Database Service +sql*net 66/tcp #Oracle SQL*NET +sql*net 66/udp #Oracle SQL*NET +bootps 67/tcp dhcps #Bootstrap Protocol Server +bootps 67/udp dhcps #Bootstrap Protocol Server +bootpc 68/tcp dhcpc #Bootstrap Protocol Client +bootpc 68/udp dhcpc #Bootstrap Protocol Client +tftp 69/tcp #Trivial File Transfer +tftp 69/udp #Trivial File Transfer +gopher 70/tcp +gopher 70/udp +netrjs-1 71/tcp #Remote Job Service +netrjs-1 71/udp #Remote Job Service +netrjs-2 72/tcp #Remote Job Service +netrjs-2 72/udp #Remote Job Service +netrjs-3 73/tcp #Remote Job Service +netrjs-3 73/udp #Remote Job Service +netrjs-4 74/tcp #Remote Job Service +netrjs-4 74/udp #Remote Job Service +# 75/tcp any private dial out service +# 75/udp any private dial out service +deos 76/tcp #Distributed External Object Store +deos 76/udp #Distributed External Object Store +netrjs 77/tcp +#PROBLEMS!============================================================== +# 77/tcp any private RJE service +#PROBLEMS!============================================================== +# 77/udp any private RJE service +vettcp 78/tcp +vettcp 78/udp +finger 79/tcp +finger 79/udp +http 80/tcp www www-http #World Wide Web HTTP +http 80/udp www www-http #World Wide Web HTTP +hosts2-ns 81/tcp #HOSTS2 Name Server +hosts2-ns 81/udp #HOSTS2 Name Server +xfer 82/tcp #XFER Utility +xfer 82/udp #XFER Utility +mit-ml-dev 83/tcp #MIT ML Device +mit-ml-dev 83/udp #MIT ML Device +ctf 84/tcp #Common Trace Facility +ctf 84/udp #Common Trace Facility +mit-ml-dev 85/tcp #MIT ML Device +mit-ml-dev 85/udp #MIT ML Device +mfcobol 86/tcp #Micro Focus Cobol +mfcobol 86/udp #Micro Focus Cobol +ttylink 87/tcp +#PROBLEMS!=========================================================== +# 87/tcp any private terminal link +#PROBLEMS!=========================================================== +# 87/udp any private terminal link +kerberos-sec 88/tcp kerberos # krb5 # Kerberos (v5) +kerberos-sec 88/udp kerberos # krb5 # Kerberos (v5) +su-mit-tg 89/tcp #SU/MIT Telnet Gateway +su-mit-tg 89/udp #SU/MIT Telnet Gateway +dnsix 90/tcp #DNSIX Securit Attribute Token Map +dnsix 90/udp #DNSIX Securit Attribute Token Map +mit-dov 91/tcp #MIT Dover Spooler +mit-dov 91/udp #MIT Dover Spooler +npp 92/tcp #Network Printing Protocol +npp 92/udp #Network Printing Protocol +dcp 93/tcp #Device Control Protocol +dcp 93/udp #Device Control Protocol +objcall 94/tcp #Tivoli Object Dispatcher +objcall 94/udp #Tivoli Object Dispatcher +supdup 95/tcp +supdup 95/udp +dixie 96/tcp #DIXIE Protocol Specification +dixie 96/udp #DIXIE Protocol Specification +swift-rvf 97/tcp #Swift Remote Virtural File Protocol +swift-rvf 97/udp #Swift Remote Virtural File Protocol +tacnews 98/tcp #TAC News +tacnews 98/udp #TAC News +metagram 99/tcp #Metagram Relay +metagram 99/udp #Metagram Relay +newacct 100/tcp #[unauthorized use] +hostname 101/tcp hostnames #NIC Host Name Server +hostname 101/udp hostnames #NIC Host Name Server +iso-tsap 102/tcp tsap #ISO-TSAP Class 0 +iso-tsap 102/udp tsap #ISO-TSAP Class 0 +gppitnp 103/tcp #Genesis Point-to-Point Trans Net +gppitnp 103/udp #Genesis Point-to-Point Trans Net +acr-nema 104/tcp #ACR-NEMA Digital Imag. & Comm. 300 +acr-nema 104/udp #ACR-NEMA Digital Imag. & Comm. 300 +csnet-ns 105/tcp cso-ns cso #Mailbox Name Nameserver +csnet-ns 105/udp cso-ns cso #Mailbox Name Nameserver +pop3pw 106/tcp 3com-tsmux #Eudora compatible PW changer +3com-tsmux 106/udp +rtelnet 107/tcp #Remote Telnet Service +rtelnet 107/udp #Remote Telnet Service +snagas 108/tcp #SNA Gateway Access Server +snagas 108/udp #SNA Gateway Access Server +pop2 109/tcp postoffice #Post Office Protocol - Version 2 +pop2 109/udp postoffice #Post Office Protocol - Version 2 +pop3 110/tcp #Post Office Protocol - Version 3 +pop3 110/udp #Post Office Protocol - Version 3 +sunrpc 111/tcp rpcbind #SUN Remote Procedure Call +sunrpc 111/udp rpcbind #SUN Remote Procedure Call +mcidas 112/tcp #McIDAS Data Transmission Protocol +mcidas 112/udp #McIDAS Data Transmission Protocol +auth 113/tcp ident tap #Authentication Service +auth 113/udp ident tap #Authentication Service +audionews 114/tcp #Audio News Multicast +audionews 114/udp #Audio News Multicast +sftp 115/tcp #Simple File Transfer Protocol +sftp 115/udp #Simple File Transfer Protocol +ansanotify 116/tcp #ANSA REX Notify +ansanotify 116/udp #ANSA REX Notify +uucp-path 117/tcp #UUCP Path Service +uucp-path 117/udp #UUCP Path Service +sqlserv 118/tcp #SQL Services +sqlserv 118/udp #SQL Services +nntp 119/tcp usenet #Network News Transfer Protocol +nntp 119/udp usenet #Network News Transfer Protocol +cfdptkt 120/tcp +cfdptkt 120/udp +erpc 121/tcp #Encore Expedited Remote Pro.Call +erpc 121/udp #Encore Expedited Remote Pro.Call +smakynet 122/tcp +smakynet 122/udp +ntp 123/tcp #Network Time Protocol +ntp 123/udp #Network Time Protocol +ansatrader 124/tcp #ANSA REX Trader +ansatrader 124/udp #ANSA REX Trader +locus-map 125/tcp #Locus PC-Interface Net Map Ser +locus-map 125/udp #Locus PC-Interface Net Map Ser +unitary 126/tcp #Unisys Unitary Login +unitary 126/udp #Unisys Unitary Login +locus-con 127/tcp #Locus PC-Interface Conn Server +locus-con 127/udp #Locus PC-Interface Conn Server +gss-xlicen 128/tcp #GSS X License Verification +gss-xlicen 128/udp #GSS X License Verification +pwdgen 129/tcp #Password Generator Protocol +pwdgen 129/udp #Password Generator Protocol +cisco-fna 130/tcp #cisco FNATIVE +cisco-fna 130/udp #cisco FNATIVE +cisco-tna 131/tcp #cisco TNATIVE +cisco-tna 131/udp #cisco TNATIVE +cisco-sys 132/tcp #cisco SYSMAINT +cisco-sys 132/udp #cisco SYSMAINT +statsrv 133/tcp #Statistics Service +statsrv 133/udp #Statistics Service +ingres-net 134/tcp #INGRES-NET Service +ingres-net 134/udp #INGRES-NET Service +loc-srv 135/tcp epmap #Location Service +loc-srv 135/udp epmap #Location Service +profile 136/tcp #PROFILE Naming System +profile 136/udp #PROFILE Naming System +netbios-ns 137/tcp #NETBIOS Name Service +netbios-ns 137/udp #NETBIOS Name Service +netbios-dgm 138/tcp #NETBIOS Datagram Service +netbios-dgm 138/udp #NETBIOS Datagram Service +netbios-ssn 139/tcp #NETBIOS Session Service +netbios-ssn 139/udp #NETBIOS Session Service +emfis-data 140/tcp #EMFIS Data Service +emfis-data 140/udp #EMFIS Data Service +emfis-cntl 141/tcp #EMFIS Control Service +emfis-cntl 141/udp #EMFIS Control Service +bl-idm 142/tcp #Britton-Lee IDM +bl-idm 142/udp #Britton-Lee IDM +imap 143/tcp imap2 imap4 #Interim Mail Access Protocol v2 +imap 143/udp imap2 imap4 #Interim Mail Access Protocol v2 +NeWS 144/tcp # Window System +NeWS 144/udp # Window System +#PROBLEMS!============================================================== +#uma 144/tcp #Universal Management Architecture +#uma 144/udp #Universal Management Architecture +#PROBLEMS!============================================================== +uaac 145/tcp #UAAC Protocol +uaac 145/udp #UAAC Protocol +iso-tp0 146/tcp +iso-tp0 146/udp +iso-ip 147/tcp +iso-ip 147/udp +cronus 148/tcp jargon #CRONUS-SUPPORT +cronus 148/udp jargon #CRONUS-SUPPORT +aed-512 149/tcp #AED 512 Emulation Service +aed-512 149/udp #AED 512 Emulation Service +sql-net 150/tcp +sql-net 150/udp +hems 151/tcp +hems 151/udp +bftp 152/tcp #Background File Transfer Program +bftp 152/udp #Background File Transfer Program +sgmp 153/tcp +sgmp 153/udp +netsc-prod 154/tcp +netsc-prod 154/udp +netsc-dev 155/tcp +netsc-dev 155/udp +sqlsrv 156/tcp #SQL Service +sqlsrv 156/udp #SQL Service +knet-cmp 157/tcp #KNET/VM Command/Message Protocol +knet-cmp 157/udp #KNET/VM Command/Message Protocol +pcmail-srv 158/tcp #PCMail Server +pcmail-srv 158/udp #PCMail Server +nss-routing 159/tcp +nss-routing 159/udp +sgmp-traps 160/tcp +sgmp-traps 160/udp +snmp 161/tcp +snmp 161/udp +snmptrap 162/tcp snmp-trap +snmptrap 162/udp snmp-trap +cmip-man 163/tcp #CMIP/TCP Manager +cmip-man 163/udp #CMIP/TCP Manager +cmip-agent 164/tcp #CMIP/TCP Agent +smip-agent 164/udp #CMIP/TCP Agent +xns-courier 165/tcp #Xerox +xns-courier 165/udp #Xerox +s-net 166/tcp #Sirius Systems +s-net 166/udp #Sirius Systems +namp 167/tcp +namp 167/udp +rsvd 168/tcp +rsvd 168/udp +send 169/tcp +send 169/udp +print-srv 170/tcp #Network PostScript +print-srv 170/udp #Network PostScript +multiplex 171/tcp #Network Innovations Multiplex +multiplex 171/udp #Network Innovations Multiplex +cl/1 172/tcp #Network Innovations CL/1 +cl/1 172/udp #Network Innovations CL/1 +xyplex-mux 173/tcp +xyplex-mux 173/udp +mailq 174/tcp +mailq 174/udp +vmnet 175/tcp +vmnet 175/udp +genrad-mux 176/tcp +genrad-mux 176/udp +xdmcp 177/tcp #X Display Manager Control Protocol +xdmcp 177/udp #X Display Manager Control Protocol +NextStep 178/tcp nextstep NeXTStep #NextStep Window Server +NextStep 178/udp nextstep NeXTStep #NextStep Window Server +bgp 179/tcp #Border Gateway Protocol +bgp 179/udp #Border Gateway Protocol +ris 180/tcp #Intergraph +ris 180/udp #Intergraph +unify 181/tcp +unify 181/udp +audit 182/tcp #Unisys Audit SITP +audit 182/udp #Unisys Audit SITP +ocbinder 183/tcp +ocbinder 183/udp +ocserver 184/tcp +ocserver 184/udp +remote-kis 185/tcp +remote-kis 185/udp +kis 186/tcp #KIS Protocol +kis 186/udp #KIS Protocol +aci 187/tcp #Application Communication Interface +aci 187/udp #Application Communication Interface +mumps 188/tcp #Plus Five's MUMPS +mumps 188/udp #Plus Five's MUMPS +qft 189/tcp #Queued File Transport +qft 189/udp #Queued File Transport +gacp 190/tcp #Gateway Access Control Protocol +gacp 190/udp cacp #Gateway Access Control Protocol +prospero 191/tcp #Prospero Directory Service +prospero 191/udp #Prospero Directory Service +osu-nms 192/tcp #OSU Network Monitoring System +osu-nms 192/udp #OSU Network Monitoring System +srmp 193/tcp #Spider Remote Monitoring Protocol +srmp 193/udp #Spider Remote Monitoring Protocol +irc 194/tcp #Internet Relay Chat Protocol +irc 194/udp #Internet Relay Chat Protocol +dn6-nlm-aud 195/tcp #DNSIX Network Level Module Audit +dn6-nlm-aud 195/udp #DNSIX Network Level Module Audit +dn6-smm-red 196/tcp #DNSIX Session Mgt Module Audit Redir +dn6-smm-red 196/udp #DNSIX Session Mgt Module Audit Redir +dls 197/tcp #Directory Location Service +dls 197/udp #Directory Location Service +dls-mon 198/tcp #Directory Location Service Monitor +dls-mon 198/udp #Directory Location Service Monitor +smux 199/tcp +smux 199/udp +src 200/tcp #IBM System Resource Controller +src 200/udp #IBM System Resource Controller +at-rtmp 201/tcp #AppleTalk Routing Maintenance +at-rtmp 201/udp #AppleTalk Routing Maintenance +at-nbp 202/tcp #AppleTalk Name Binding +at-nbp 202/udp #AppleTalk Name Binding +at-3 203/tcp #AppleTalk Unused +at-3 203/udp #AppleTalk Unused +at-echo 204/tcp #AppleTalk Echo +at-echo 204/udp #AppleTalk Echo +at-5 205/tcp #AppleTalk Unused +at-5 205/udp #AppleTalk Unused +at-zis 206/tcp #AppleTalk Zone Information +at-zis 206/udp #AppleTalk Zone Information +at-7 207/tcp #AppleTalk Unused +at-7 207/udp #AppleTalk Unused +at-8 208/tcp #AppleTalk Unused +at-8 208/udp #AppleTalk Unused +qmtp 209/tcp #The Quick Mail Transfer Protocol +qmtp 209/udp #The Quick Mail Transfer Protocol +#PROBLEMS!============================================================== +#tam 209/tcp #Trivial Authenticated Mail Protocol +#tam 209/udp #Trivial Authenticated Mail Protocol +#PROBLEMS!============================================================== +z39.50 210/tcp wais #ANSI Z39.50 +z39.50 210/udp wais #ANSI Z39.50 +914c/g 211/tcp #Texas Instruments 914C/G Terminal +914c/g 211/udp #Texas Instruments 914C/G Terminal +anet 212/tcp #ATEXSSTR +anet 212/udp #ATEXSSTR +ipx 213/tcp +ipx 213/udp +vmpwscs 214/tcp +vmpwscs 214/udp +softpc 215/tcp #Insignia Solutions +softpc 215/udp #Insignia Solutions +CAIlic 216/tcp atls #Computer Associates Int'l License Server +CAIlic 216/udp atls #Computer Associates Int'l License Server +dbase 217/tcp #dBASE Unix +dbase 217/udp #dBASE Unix +mpp 218/tcp #Netix Message Posting Protocol +mpp 218/udp #Netix Message Posting Protocol +uarps 219/tcp #Unisys ARPs +uarps 219/udp #Unisys ARPs +imap3 220/tcp #Interactive Mail Access Protocol v3 +imap3 220/udp #Interactive Mail Access Protocol v3 +fln-spx 221/tcp #Berkeley rlogind with SPX auth +fln-spx 221/udp #Berkeley rlogind with SPX auth +rsh-spx 222/tcp #Berkeley rshd with SPX auth +rsh-spx 222/udp #Berkeley rshd with SPX auth +cdc 223/tcp #Certificate Distribution Center +cdc 223/udp #Certificate Distribution Center +direct 242/tcp +direct 242/udp +sur-meas 243/tcp #Survey Measurement +sur-meas 243/udp #Survey Measurement +dayna 244/tcp +dayna 244/udp +link 245/tcp +link 245/udp +dsp3270 246/tcp #Display Systems Protocol +dsp3270 246/udp #Display Systems Protocol + +subntbcst_tftp 247/tcp #subntbcst_tftp +subntbcst_tftp 247/udp #subntbcst_tftp +bhfhs 248/tcp +bhfhs 248/udp +# 249-255 reserved +rap 256/tcp +rap 256/udp +set 257/tcp #secure electronic transaction +set 257/udp #secure electronic transaction +yak-chat 258/tcp #yak winsock personal chat +yak-chat 258/udp #yak winsock personal chat +esro-gen 259/tcp #efficient short remote operations +esro-gen 259/udp #efficient short remote operations +openport 260/tcp +openport 260/udp +nsiiops 261/tcp #iiop name service over tls/ssl +nsiiops 261/udp #iiop name service over tls/ssl +arcisdms 262/tcp +arcisdms 262/udp +hdap 263/tcp +hdap 263/udp +bgmp 264/tcp +bgmp 264/udp +# 265-279 unassigned +http-mgmt 280/tcp +http-mgmt 280/udp +personal-link 281/tcp +personal-link 281/udp +cableport-ax 282/tcp #cable port a/x +cableport-ax 282/udp #cable port a/x +# 283-307 unassigned +novastorbakcup 308/tcp #novastor backup +novastorbakcup 308/udp #novastor backup +entrusttime 309/tcp +entrusttime 309/udp +bhmds 310/tcp +bhmds 310/udp +asip-webadmin 311/tcp #appleshare ip webadmin +asip-webadmin 311/udp #appleshare ip webadmin +vslmp 312/tcp +vslmp 312/udp +magenta-logic 313/tcp +magenta-logic 313/udp +opalis-robot 314/tcp +opalis-robot 314/udp +dpsi 315/tcp +dpsi 315/udp +decauth 316/tcp +decauth 316/udp +zannet 317/tcp +zannet 317/udp +# 318-320 #unassigned +pip 321/tcp +pip 321/udp +# 322-343 #unassigned +pdap 344/tcp #Prospero Data Access Protocol +pdap 344/udp #Prospero Data Access Protocol +pawserv 345/tcp #Perf Analysis Workbench +pawserv 345/udp #Perf Analysis Workbench +zserv 346/tcp #Zebra server +zserv 346/udp #Zebra server +fatserv 347/tcp #Fatmen Server +fatserv 347/udp #Fatmen Server +csi-sgwp 348/tcp #Cabletron Management Protocol +csi-sgwp 348/udp #Cabletron Management Protocol + + +mftp 349/tcp +mftp 349/udp +matip-type-a 350/tcp #MATIP Type A +matip-type-a 350/udp +matip-type-b 351/tcp #MATIP Type B +matip-type-b 351/udp +bhoetty 351/tcp #unassigned but widespread use +bhoetty 351/udp #unassigned but widespread use +dtag-ste-sb 352/tcp #DTAG +dtag-ste-sb 352/udp #DTAG +bhoedap4 352/tcp #unassigned but widespread use +bhoedap4 352/udp #unassigned but widespread use +ndsauth 353/tcp +ndsauth 353/udp +bh611 354/tcp +bh611 354/udp +datex-asn 355/tcp +datex-asn 355/udp +cloanto-net-1 356/tcp #Cloanto Net 1 +cloanto-net-1 356/udp +bhevent 357/tcp +bhevent 357/udp +shrinkwrap 358/tcp +shrinkwrap 358/udp +tenebris_nts 359/tcp #Tenebris Network Trace Service +tenebris_nts 359/udp #Tenebris Network Trace Service +scoi2odialog 360/tcp +scoi2odialog 360/udp +semantix 361/tcp +semantix 361/udp +srssend 362/tcp #SRS Send +srssend 362/udp #SRS Send +rsvp_tunnel 363/tcp +rsvp_tunnel 363/udp +aurora-cmgr 364/tcp +aurora-cmgr 364/udp +dtk 365/tcp #Deception Tool Kit - Fred Cohen <fc@all.net> +dtk 365/udp #Deception Tool Kit - Fred Cohen <fc@all.net> +odmr 366/tcp +odmr 366/udp +mortgageware 367/tcp +mortgageware 367/udp +qbikgdp 368/tcp #QbikGDP +qbikgdp 368/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp +codaauth2 370/tcp +codaauth2 370/udp +clearcase 371/tcp +clearcase 371/udp +ulistserv 372/tcp ulistproc #Unix Listserv +ulistserv 372/udp ulistproc #Unix Listserv +legent-1 373/tcp #Legent Corporation (now Computer Associates Intl.) +legent-1 373/udp #Legent Corporation (now Computer Associates Intl.) +legent-2 374/tcp #Legent Corporation (now Computer Associates Intl.) +legent-2 374/udp #Legent Corporation (now Computer Associates Intl.) +hassle 375/tcp +hassle 375/udp +nip 376/tcp #Amiga Envoy Network Inquiry Proto +nip 376/udp #Amiga Envoy Network Inquiry Proto +tnETOS 377/tcp #NEC Corporation +tnETOS 377/udp #NEC Corporation +dsETOS 378/tcp #NEC Corporation +dsETOS 378/udp #NEC Corporation +is99c 379/tcp #TIA/EIA/IS-99 modem client +is99c 379/udp #TIA/EIA/IS-99 modem client +is99s 380/tcp #TIA/EIA/IS-99 modem server +is99s 380/udp #TIA/EIA/IS-99 modem server +hp-collector 381/tcp #hp performance data collector +hp-collector 381/udp #hp performance data collector +hp-managed-node 382/tcp #hp performance data managed node +hp-managed-node 382/udp #hp performance data managed node +hp-alarm-mgr 383/tcp #hp performance data alarm manager +hp-alarm-mgr 383/udp #hp performance data alarm manager +arns 384/tcp #A Remote Network Server System +arns 384/udp #A Remote Network Server System +ibm-app 385/tcp #IBM Application +ibm-app 385/udp #IBM Application +asa 386/tcp #ASA Message Router Object Def. +asa 386/udp #ASA Message Router Object Def. +aurp 387/tcp #Appletalk Update-Based Routing Pro. +aurp 387/udp #Appletalk Update-Based Routing Pro. +unidata-ldm 388/tcp #Unidata LDM Version 4 +unidata-ldm 388/udp #Unidata LDM Version 4 +ldap 389/tcp #Lightweight Directory Access Protocol +ldap 389/udp #Lightweight Directory Access Protocol +uis 390/tcp +uis 390/udp +synotics-relay 391/tcp #SynOptics SNMP Relay Port +synotics-relay 391/udp #SynOptics SNMP Relay Port +synotics-broker 392/tcp #SynOptics Port Broker Port +synotics-broker 392/udp #SynOptics Port Broker Port +dis 393/tcp #Data Interpretation System +dis 393/udp #Data Interpretation System +embl-ndt 394/tcp #EMBL Nucleic Data Transfer +embl-ndt 394/udp #EMBL Nucleic Data Transfer +netcp 395/tcp #NETscout Control Protocol +netcp 395/udp #NETscout Control Protocol +netware-ip 396/tcp #Novell Netware over IP +netware-ip 396/udp #Novell Netware over IP +mptn 397/tcp #Multi Protocol Trans. Net. +mptn 397/udp #Multi Protocol Trans. Net. +kryptolan 398/tcp +kryptolan 398/udp +iso-tsap-c2 399/tcp #ISO-TSAP Class 2 +iso-tsap-c2 399/udp #ISO-TSAP Class 2 +work-sol 400/tcp #Workstation Solutions +work-sol 400/udp #Workstation Solutions +ups 401/tcp #Uninterruptible Power Supply +ups 401/udp #Uninterruptible Power Supply +genie 402/tcp #Genie Protocol +genie 402/udp #Genie Protocol +decap 403/tcp +decap 403/udp +nced 404/tcp +nced 404/udp +ncld 405/tcp +ncld 405/udp +imsp 406/tcp #Interactive Mail Support Protocol +imsp 406/udp #Interactive Mail Support Protocol +timbuktu 407/tcp +timbuktu 407/udp +prm-sm 408/tcp #Prospero Resource Manager Sys. Man. +prm-sm 408/udp #Prospero Resource Manager Sys. Man. +prm-nm 409/tcp #Prospero Resource Manager Node Man. +prm-nm 409/udp #Prospero Resource Manager Node Man. +decladebug 410/tcp #DECLadebug Remote Debug Protocol +decladebug 410/udp #DECLadebug Remote Debug Protocol +rmt 411/tcp #Remote MT Protocol +rmt 411/udp #Remote MT Protocol +synoptics-trap 412/tcp #Trap Convention Port +synoptics-trap 412/udp #Trap Convention Port +smsp 413/tcp +smsp 413/udp +infoseek 414/tcp +infoseek 414/udp +bnet 415/tcp +bnet 415/udp +silverplatter 416/tcp +silverplatter 416/udp +onmux 417/tcp +onmux 417/udp +hyper-g 418/tcp +hyper-g 418/udp +ariel1 419/tcp +ariel1 419/udp +smpte 420/tcp +smpte 420/udp +ariel2 421/tcp +ariel2 421/udp +ariel3 422/tcp +ariel3 422/udp +opc-job-start 423/tcp #IBM Operations Planning and Control Start +opc-job-start 423/udp #IBM Operations Planning and Control Start +opc-job-track 424/tcp #IBM Operations Planning and Control Track +opc-job-track 424/udp #IBM Operations Planning and Control Track +icad-el 425/tcp +icad-el 425/udp +smartsdp 426/tcp +smartsdp 426/udp +svrloc 427/tcp #Server Location +svrloc 427/udp #Server Location +ocs_cmu 428/tcp +ocs_cmu 428/udp +ocs_amu 429/tcp +ocs_amu 429/udp +utmpsd 430/tcp +utmpsd 430/udp +utmpcd 431/tcp +utmpcd 431/udp +iasd 432/tcp +iasd 432/udp +nnsp 433/tcp +nnsp 433/udp +mobileip-agent 434/tcp +mobileip-agent 434/udp +mobilip-mn 435/tcp +mobilip-mn 435/udp +dna-cml 436/tcp +dna-cml 436/udp +comscm 437/tcp +comscm 437/udp +dsfgw 438/tcp +dsfgw 438/udp +dasp 439/tcp +dasp 439/udp +sgcp 440/tcp +sgcp 440/udp +decvms-sysmgt 441/tcp +decvms-sysmgt 441/udp +cvc_hostd 442/tcp +cvc_hostd 442/udp +https 443/tcp +https 443/udp +snpp 444/tcp #Simple Network Paging Protocol +snpp 444/udp #Simple Network Paging Protocol +# [RFC1568] +microsoft-ds 445/tcp +microsoft-ds 445/udp +ddm-rdb 446/tcp +ddm-rdb 446/udp +ddm-dfm 447/tcp +ddm-dfm 447/udp +ddm-ssl 448/tcp ddm-byte +ddm-ssl 448/udp ddm-byte +as-servermap 449/tcp #AS Server Mapper +as-servermap 449/udp #AS Server Mapper +tserver 450/tcp +tserver 450/udp +sfs-smp-net 451/tcp #Cray Network Semaphore server +sfs-smp-net 451/udp #Cray Network Semaphore server +sfs-config 452/tcp #Cray SFS config server +sfs-config 452/udp #Cray SFS config server +creativeserver 453/tcp #CreativeServer +creativeserver 453/udp #CreativeServer +contentserver 454/tcp #ContentServer +contentserver 454/udp #ContentServer +creativepartnr 455/tcp #CreativePartnr +creativepartnr 455/udp #CreativePartnr +macon-tcp 456/tcp +macon-udp 456/udp +scohelp 457/tcp +scohelp 457/udp +appleqtc 458/tcp #apple quick time +appleqtc 458/udp #apple quick time +ampr-rcmd 459/tcp +ampr-rcmd 459/udp +skronk 460/tcp +skronk 460/udp +datasurfsrv 461/tcp +datasurfsrv 461/udp +datasurfsrvsec 462/tcp +datasurfsrvsec 462/udp +alpes 463/tcp +alpes 463/udp +# +kpasswd5 464/tcp # Kerberos (v5) +kpasswd5 464/udp # Kerberos (v5) +#PROBLEMS!============================================================== +# IANA has offically assigned these two ports as ``kpasswd'' +#kpasswd 464/tcp # Kerberos (v5) +#kpasswd 464/udp # Kerberos (v5) +#PROBLEMS!============================================================== +smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp) +smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp) +digital-vrc 466/tcp +digital-vrc 466/udp +mylex-mapd 467/tcp +mylex-mapd 467/udp +photuris 468/tcp +photuris 468/udp +rcp 469/tcp #Radio Control Protocol +rcp 469/udp #Radio Control Protocol +scx-proxy 470/tcp +scx-proxy 470/udp +mondex 471/tcp +mondex 471/udp +ljk-login 472/tcp +ljk-login 472/udp +hybrid-pop 473/tcp +hybrid-pop 473/udp +tn-tl-w1 474/tcp +tn-tl-w2 474/udp +tcpnethaspsrv 475/tcp +tcpnethaspsrv 475/udp +tn-tl-fd1 476/tcp +tn-tl-fd1 476/udp +ss7ns 477/tcp +ss7ns 477/udp +spsc 478/tcp +spsc 478/udp +iafserver 479/tcp +iafserver 479/udp +iafdbase 480/tcp +iafdbase 480/udp +ph 481/tcp +ph 481/udp +bgs-nsi 482/tcp +bgs-nsi 482/udp +ulpnet 483/tcp +ulpnet 483/udp +integra-sme 484/tcp #Integra Software Management Environment +integra-sme 484/udp #Integra Software Management Environment +powerburst 485/tcp #Air Soft Power Burst +powerburst 485/udp #Air Soft Power Burst +avian 486/tcp +avian 486/udp +saft 487/tcp #saft Simple Asynchronous File Transfer +saft 487/udp #saft Simple Asynchronous File Transfer +gss-http 488/tcp +gss-http 488/udp +nest-protocol 489/tcp +nest-protocol 489/udp +micom-pfs 490/tcp +micom-pfs 490/udp +go-login 491/tcp +go-login 491/udp +ticf-1 492/tcp #Transport Independent Convergence for FNA +ticf-1 492/udp #Transport Independent Convergence for FNA +ticf-2 493/tcp #Transport Independent Convergence for FNA +ticf-2 493/udp #Transport Independent Convergence for FNA +pov-ray 494/tcp +pov-ray 494/udp +intecourier 495/tcp +intecourier 495/udp +pim-rp-disc 496/tcp +pim-rp-disc 496/udp +dantz 497/tcp +dantz 497/udp +siam 498/tcp +siam 498/udp +iso-ill 499/tcp #ISO ILL Protocol +iso-ill 499/udp #ISO ILL Protocol +isakmp 500/tcp +isakmp 500/udp +stmf 501/tcp +stmf 501/udp +asa-appl-proto 502/tcp +asa-appl-proto 502/udp +intrinsa 503/tcp +intrinsa 503/udp +citadel 504/tcp +citadel 504/udp +mailbox-lm 505/tcp +mailbox-lm 505/udp +ohimsrv 506/tcp +ohimsrv 506/udp +crs 507/tcp +crs 507/udp +xvttp 508/tcp +xvttp 508/udp +snare 509/tcp +snare 509/udp +fcp 510/tcp #FirstClass Protocol +fcp 510/udp #FirstClass Protocol +passgo 511/tcp +passgo 511/udp +# +# Berkeley-specific services +# +exec 512/tcp #remote process execution; +# authentication performed using +# passwords and UNIX login names +biff 512/udp comsat #used by mail system to notify users +# of new mail received; currently +# receives messages only from +# processes on the same machine +login 513/tcp #remote login a la telnet; +# automatic authentication performed +# based on priviledged port numbers +# and distributed data bases which +# identify "authentication domains" +who 513/udp whod #maintains data bases showing who's +# logged in to machines on a local +# net and the load average of the +# machine +shell 514/tcp cmd #like exec, but automatic +# authentication is performed as for +# login server +syslog 514/udp +printer 515/tcp spooler +printer 515/udp spooler +videotex 516/tcp +videotex 516/udp +talk 517/tcp #like tenex link, but across +# machine - unfortunately, doesn't +# use link protocol (this is actually +# just a rendezvous port from which a +# tcp connection is established) +talk 517/udp #like tenex link, but across +# machine - unfortunately, doesn't +# use link protocol (this is actually +# just a rendezvous port from which a +# tcp connection is established) +ntalk 518/tcp +ntalk 518/udp +utime 519/tcp unixtime +utime 519/udp unixtime +efs 520/tcp #extended file name server +router 520/udp route routed #local routing process (on site); +# uses variant of Xerox NS routing +# information protocol +ripng 521/tcp +ripng 521/udp +ulp 522/tcp +ulp 522/udp +ibm-db2 523/tcp +ibm-db2 523/udp +ncp 524/tcp +ncp 524/udp +timed 525/tcp timeserver +timed 525/udp timeserver +tempo 526/tcp newdate +tempo 526/udp newdate +stx 527/tcp #Stock IXChange +stx 527/udp #Stock IXChange +custix 528/tcp #Customer IXChange +custix 528/udp #Customer IXChange +irc-serv 529/tcp +irc-serv 529/udp +courier 530/tcp rpc +courier 530/udp rpc +conference 531/tcp chat +conference 531/udp chat +netnews 532/tcp readnews +netnews 532/udp readnews +netwall 533/tcp #for emergency broadcasts +netwall 533/udp #for emergency broadcasts +mm-admin 534/tcp #MegaMedia Admin +mm-admin 534/udp #MegaMedia Admin +iiop 535/tcp +iiop 535/udp +opalis-rdv 536/tcp +opalis-rdv 536/udp +nmsp 537/tcp #Networked Media Streaming Protocol +nmsp 537/udp #Networked Media Streaming Protocol +gdomap 538/tcp +gdomap 538/udp +apertus-ldp 539/tcp #Apertus Technologies Load Determination +apertus-ldp 539/udp #Apertus Technologies Load Determination +uucp 540/tcp uucpd +uucp 540/udp uucpd +uucp-rlogin 541/tcp +uucp-rlogin 541/udp +commerce 542/tcp +commerce 542/udp +klogin 543/tcp # Kerberos (v4/v5) +klogin 543/udp # Kerberos (v4/v5) +kshell 544/tcp krcmd # Kerberos (v4/v5) +kshell 544/udp krcmd # Kerberos (v4/v5) +appleqtcsrvr 545/tcp +appleqtcsrvr 545/udp +dhcpv6-client 546/tcp #DHCPv6 Client +dhcpv6-client 546/udp #DHCPv6 Client +dhcpv6-server 547/tcp #DHCPv6 Server +dhcpv6-server 547/udp #DHCPv6 Server +afpovertcp 548/tcp #AFP over TCP +afpovertcp 548/udp #AFP over TCP +idfp 549/tcp +idfp 549/udp +new-rwho 550/tcp new-who +new-rwho 550/udp new-who +cybercash 551/tcp +cybercash 551/udp +deviceshare 552/tcp +deviceshare 552/udp +pirp 553/tcp +pirp 553/udp +rtsp 554/tcp #Real Time Stream Control Protocol +rtsp 554/udp #Real Time Stream Control Protocol +dsf 555/tcp +dsf 555/udp +remotefs 556/tcp rfs rfs_server # Brunhoff remote filesystem +remotefs 556/udp rfs rfs_server # Brunhoff remote filesystem +openvms-sysipc 557/tcp +openvms-sysipc 557/udp +sdnskmp 558/tcp +sdnskmp 558/udp +teedtap 559/tcp +teedtap 559/udp +rmonitor 560/tcp rmonitord +rmonitor 560/udp rmonitord +monitor 561/tcp +monitor 561/udp +chshell 562/tcp chcmd +chshell 562/udp chcmd +nntps 563/tcp snntp #nntp protocol over TLS/SSL +nntps 563/udp snntp #nntp protocol over TLS/SSL +9pfs 564/tcp #plan 9 file service +9pfs 564/udp #plan 9 file service +whoami 565/tcp +whoami 565/udp +streettalk 566/tcp +banyan-rpc 567/tcp +banyan-rpc 567/udp +ms-shuttle 568/tcp #Microsoft shuttle +ms-shuttle 568/udp #Microsoft shuttle +ms-rome 569/tcp #Microsoft rome +ms-rome 569/udp #Microsoft rome +meter 570/tcp #demon +meter 570/udp #demon +umeter 571/tcp #udemon +umeter 571/udp #udemon + + + +sonar 572/tcp +sonar 572/udp +banyan-vip 573/tcp +banyan-vip 573/udp +ftp-agent 574/tcp #FTP Software Agent System +ftp-agent 574/udp #FTP Software Agent System +vemmi 575/tcp +vemmi 575/udp +ipcd 576/tcp +ipcd 576/udp +vnas 577/tcp +vnas 577/udp +ipdd 578/tcp +ipdd 578/udp +decbsrv 579/tcp +decbsrv 579/udp +sntp-heartbeat 580/tcp +sntp-heartbeat 580/udp +bdp 581/tcp #Bundle Discovery Protocol +bdp 581/udp #Bundle Discovery Protocol +scc-security 582/tcp +scc-security 582/udp +philips-vc 583/tcp #Philips Video-Conferencing +philips-vc 583/udp #Philips Video-Conferencing +keyserver 584/tcp +keyserver 584/udp +imap4-ssl 585/tcp #IMAP4+SSL (use of 585 is not recommended, +imap4-ssl 585/udp # use 993 instead) +password-chg 586/tcp +password-chg 586/udp +submission 587/tcp +submission 587/udp +cal 588/tcp +cal 588/udp +eyelink 589/tcp +eyelink 589/udp +tns-cml 590/tcp +tns-cml 590/udp +http-alt 591/tcp #FileMaker, Inc. - HTTP Alternate (see Port 80) +http-alt 591/udp #FileMaker, Inc. - HTTP Alternate (see Port 80) +eudora-set 592/tcp +eudora-set 592/udp +http-rpc-epmap 593/tcp #HTTP RPC Ep Map +http-rpc-epmap 593/udp #HTTP RPC Ep Map +tpip 594/tcp +tpip 594/udp +cab-protocol 595/tcp +cab-protocol 595/udp +smsd 596/tcp +smsd 596/udp +ptcnameservice 597/tcp #PTC Name Service +ptcnameservice 597/udp #PTC Name Service +sco-websrvrmg3 598/tcp #SCO Web Server Manager 3 +sco-websrvrmg3 598/udp #SCO Web Server Manager 3 +acp 599/tcp #Aeolon Core Protocol +acp 599/udp #Aeolon Core Protocol +ipcserver 600/tcp #Sun IPC server +ipcserver 600/udp #Sun IPC server +nqs 607/tcp +nqs 607/udp +urm 606/tcp #Cray Unified Resource Manager +urm 606/udp #Cray Unified Resource Manager +sift-uft 608/tcp #Sender-Initiated/Unsolicited File Transfer +sift-uft 608/udp #Sender-Initiated/Unsolicited File Transfer +npmp-trap 609/tcp +npmp-trap 609/udp +npmp-local 610/tcp +npmp-local 610/udp +npmp-gui 611/tcp +npmp-gui 611/udp +ginad 634/tcp +ginad 634/udp +mdqs 666/tcp +mdqs 666/udp +#PROBLEMS!=============================================== +doom 666/tcp #doom Id Software +doom 666/udp #doom Id Software +#PROBLEMS!=============================================== +acap 674/tcp #Application Configuration Access Protocol +acap 674/udp #Application Configuration Access Protocol +elcsd 704/tcp #errlog copy/server daemon +elcsd 704/udp #errlog copy/server daemon +entrustmanager 709/tcp #EntrustManager +entrustmanager 709/udp #EntrustManager +netviewdm1 729/tcp #IBM NetView DM/6000 Server/Client +netviewdm1 729/udp #IBM NetView DM/6000 Server/Client +netviewdm2 730/tcp #IBM NetView DM/6000 send/tcp +netviewdm2 730/udp #IBM NetView DM/6000 send/tcp +netviewdm3 731/tcp #IBM NetView DM/6000 receive/tcp +netviewdm3 731/udp #IBM NetView DM/6000 receive/tcp +netgw 741/tcp +netgw 741/udp +netrcs 742/tcp #Network based Rev. Cont. Sys. +netrcs 742/udp #Network based Rev. Cont. Sys. +flexlm 744/tcp #Flexible License Manager +flexlm 744/udp #Flexible License Manager +fujitsu-dev 747/tcp #Fujitsu Device Control +fujitsu-dev 747/udp #Fujitsu Device Control +ris-cm 748/tcp #Russell Info Sci Calendar Manager +ris-cm 748/udp #Russell Info Sci Calendar Manager +#kerberos-adm 749/tcp #Kerberos administration (v5) +#kerberos-adm 749/udp #Kerberos administration (v5) +kerberos-iv 750/udp kdc # Kerberos (v4) +kerberos-iv 750/tcp kdc # Kerberos (v4) +#PROBLEMS!======================================================== +#rfile 750/tcp +#loadav 750/udp +#PROBLEMS!======================================================== +kerberos_master 751/tcp # Kerberos `kadmin' (v4) +kerberos_master 751/udp # Kerberos `kadmin' (v4) +#PROBLEMS!======================================================== +pump 751/tcp +pump 751/udp +#PROBLEMS!======================================================== +qrh 752/tcp +qrh 752/udp +rrh 753/tcp +rrh 753/udp +krb_prop 754/tcp krb5_prop # kerberos/v5 server propagation +#PROBLEMS!======================================================== +tell 754/tcp #send +#PROBLEMS!======================================================== +tell 754/udp #send +nlogin 758/tcp +nlogin 758/udp +con 759/tcp +con 759/udp +krbupdate 760/tcp kreg # Kerberos (v4) registration +#PROBLEMS!======================================================== +ns 760/tcp +#PROBLEMS!======================================================== +ns 760/udp +kpasswd 761/tcp kpwd # Kerberos (v4) "passwd" +#PROBLEMS!======================================================== +rxe 761/tcp +#PROBLEMS!======================================================== +rxe 761/udp +quotad 762/tcp +quotad 762/udp +cycleserv 763/tcp +cycleserv 763/udp +omserv 764/tcp +omserv 764/udp +webster 765/tcp +webster 765/udp +phonebook 767/tcp #phone +phonebook 767/udp #phone +vid 769/tcp +vid 769/udp +cadlock 770/tcp +cadlock 770/udp +rtip 771/tcp +rtip 771/udp +cycleserv2 772/tcp +cycleserv2 772/udp +submit 773/tcp +notify 773/udp +rpasswd 774/tcp +acmaint_dbd 774/udp +entomb 775/tcp +acmaint_transd 775/udp +wpages 776/tcp +wpages 776/udp +wpgs 780/tcp +wpgs 780/udp +concert 786/tcp +concert 786/udp +mdbs_daemon 800/tcp +mdbs_daemon 800/udp +device 801/tcp +device 801/udp +supfilesrv 871/tcp # for SUP +accessbuilder 888/tcp +accessbuilder 888/udp +telnets 992/tcp +imaps 993/tcp +pop3s 995/tcp +vsinet 996/tcp +vsinet 996/udp +maitrd 997/tcp +maitrd 997/udp +busboy 998/tcp +puparp 998/udp +garcon 999/tcp +applix 999/udp #Applix ac +puprouter 999/tcp +puprouter 999/udp +cadlock 1000/tcp +ock 1000/udp +# +# REGISTERED PORT NUMBERS +# +blackjack 1025/tcp #network blackjack +blackjack 1025/udp #network blackjack +iad1 1030/tcp #BBN IAD +iad1 1030/udp #BBN IAD +iad2 1031/tcp #BBN IAD +iad2 1031/udp #BBN IAD +iad3 1032/tcp #BBN IAD +iad3 1032/udp #BBN IAD +nim 1058/tcp +nim 1058/udp +nimreg 1059/tcp +nimreg 1059/udp +instl_boots 1067/tcp #Installation Bootstrap Proto. Serv. +instl_boots 1067/udp #Installation Bootstrap Proto. Serv. +instl_bootc 1068/tcp #Installation Bootstrap Proto. Cli. +instl_bootc 1068/udp #Installation Bootstrap Proto. Cli. +socks 1080/tcp +socks 1080/udp +ansoft-lm-1 1083/tcp #Anasoft License Manager +ansoft-lm-1 1083/udp #Anasoft License Manager +ansoft-lm-2 1084/tcp #Anasoft License Manager +ansoft-lm-2 1084/udp #Anasoft License Manager +nfsd-status 1110/tcp #Cluster status info +nfsd-keepalive 1110/udp #Client status info +supfiledbg 1127/tcp # for SUP +nfa 1155/tcp #Network File Access +nfa 1155/udp #Network File Access +phone 1167/udp #conference calling +skkserv 1178/tcp #SKK (kanji input) +lupa 1212/tcp +lupa 1212/udp +nerv 1222/tcp #SNI R&D network +nerv 1222/udp #SNI R&D network +hermes 1248/tcp +hermes 1248/udp +healthd 1281/tcp #healthd +healthd 1281/udp #healthd +alta-ana-lm 1346/tcp #Alta Analytics License Manager +alta-ana-lm 1346/udp #Alta Analytics License Manager +bbn-mmc 1347/tcp #multi media conferencing +bbn-mmc 1347/udp #multi media conferencing +bbn-mmx 1348/tcp #multi media conferencing +bbn-mmx 1348/udp #multi media conferencing +sbook 1349/tcp #Registration Network Protocol +sbook 1349/udp #Registration Network Protocol +editbench 1350/tcp #Registration Network Protocol +editbench 1350/udp #Registration Network Protocol +equationbuilder 1351/tcp #Digital Tool Works (MIT) +equationbuilder 1351/udp #Digital Tool Works (MIT) +lotusnote 1352/tcp #Lotus Note +lotusnote 1352/udp #Lotus Note +relief 1353/tcp #Relief Consulting +relief 1353/udp #Relief Consulting +rightbrain 1354/tcp #RightBrain Software +rightbrain 1354/udp #RightBrain Software +intuitive-edge 1355/tcp #Intuitive Edge +intuitive-edge 1355/udp #Intuitive Edge +cuillamartin 1356/tcp #CuillaMartin Company +cuillamartin 1356/udp #CuillaMartin Company +pegboard 1357/tcp #Electronic PegBoard +pegboard 1357/udp #Electronic PegBoard +connlcli 1358/tcp +connlcli 1358/udp +ftsrv 1359/tcp +ftsrv 1359/udp +mimer 1360/tcp +mimer 1360/udp +linx 1361/tcp +linx 1361/udp +timeflies 1362/tcp +timeflies 1362/udp +ndm-requester 1363/tcp #Network DataMover Requester +ndm-requester 1363/udp #Network DataMover Requester +ndm-server 1364/tcp #Network DataMover Server +ndm-server 1364/udp #Network DataMover Server +adapt-sna 1365/tcp #Network Software Associates +adapt-sna 1365/udp #Network Software Associates +netware-csp 1366/tcp #Novell NetWare Comm Service Platform +netware-csp 1366/udp #Novell NetWare Comm Service Platform +dcs 1367/tcp +dcs 1367/udp +screencast 1368/tcp +screencast 1368/udp +gv-us 1369/tcp #GlobalView to Unix Shell +gv-us 1369/udp #GlobalView to Unix Shell +us-gv 1370/tcp #Unix Shell to GlobalView +us-gv 1370/udp #Unix Shell to GlobalView +fc-cli 1371/tcp #Fujitsu Config Protocol +fc-cli 1371/udp #Fujitsu Config Protocol +fc-ser 1372/tcp #Fujitsu Config Protocol +fc-ser 1372/udp #Fujitsu Config Protocol +chromagrafx 1373/tcp +chromagrafx 1373/udp +molly 1374/tcp #EPI Software Systems +molly 1374/udp #EPI Software Systems +bytex 1375/tcp +bytex 1375/udp +ibm-pps 1376/tcp #IBM Person to Person Software +ibm-pps 1376/udp #IBM Person to Person Software +cichlid 1377/tcp #Cichlid License Manager +cichlid 1377/udp #Cichlid License Manager +elan 1378/tcp #Elan License Manager +elan 1378/udp #Elan License Manager +dbreporter 1379/tcp #Integrity Solutions +dbreporter 1379/udp #Integrity Solutions +telesis-licman 1380/tcp #Telesis Network License Manager +telesis-licman 1380/udp #Telesis Network License Manager +apple-licman 1381/tcp #Apple Network License Manager +apple-licman 1381/udp #Apple Network License Manager +#udt_os 1382/tcp +#udt_os 1382/udp +gwha 1383/tcp #GW Hannaway Network License Manager +gwha 1383/udp #GW Hannaway Network License Manager +os-licman 1384/tcp #Objective Solutions License Manager +os-licman 1384/udp #Objective Solutions License Manager +atex_elmd 1385/tcp #Atex Publishing License Manager +atex_elmd 1385/udp #Atex Publishing License Manager +checksum 1386/tcp #CheckSum License Manager +checksum 1386/udp #CheckSum License Manager +cadsi-lm 1387/tcp #Computer Aided Design Software Inc LM +cadsi-lm 1387/udp #Computer Aided Design Software Inc LM +objective-dbc 1388/tcp #Objective Solutions DataBase Cache +objective-dbc 1388/udp #Objective Solutions DataBase Cache +iclpv-dm 1389/tcp #Document Manager +iclpv-dm 1389/udp #Document Manager +iclpv-sc 1390/tcp #Storage Controller +iclpv-sc 1390/udp #Storage Controller +iclpv-sas 1391/tcp #Storage Access Server +iclpv-sas 1391/udp #Storage Access Server +iclpv-pm 1392/tcp #Print Manager +iclpv-pm 1392/udp #Print Manager +iclpv-nls 1393/tcp #Network Log Server +iclpv-nls 1393/udp #Network Log Server +iclpv-nlc 1394/tcp #Network Log Client +iclpv-nlc 1394/udp #Network Log Client +iclpv-wsm 1395/tcp #PC Workstation Manager software +iclpv-wsm 1395/udp #PC Workstation Manager software +dvl-activemail 1396/tcp #DVL Active Mail +dvl-activemail 1396/udp #DVL Active Mail +audio-activmail 1397/tcp #Audio Active Mail +audio-activmail 1397/udp #Audio Active Mail +video-activmail 1398/tcp #Video Active Mail +video-activmail 1398/udp #Video Active Mail +cadkey-licman 1399/tcp #Cadkey License Manager +cadkey-licman 1399/udp #Cadkey License Manager +cadkey-tablet 1400/tcp #Cadkey Tablet Daemon +cadkey-tablet 1400/udp #Cadkey Tablet Daemon +goldleaf-licman 1401/tcp #Goldleaf License Manager +goldleaf-licman 1401/udp #Goldleaf License Manager +prm-sm-np 1402/tcp #Prospero Resource Manager +prm-sm-np 1402/udp #Prospero Resource Manager +prm-nm-np 1403/tcp #Prospero Resource Manager +prm-nm-np 1403/udp #Prospero Resource Manager +igi-lm 1404/tcp #Infinite Graphics License Manager +igi-lm 1404/udp #Infinite Graphics License Manager +ibm-res 1405/tcp #IBM Remote Execution Starter +ibm-res 1405/udp #IBM Remote Execution Starter +netlabs-lm 1406/tcp #NetLabs License Manager +netlabs-lm 1406/udp #NetLabs License Manager +dbsa-lm 1407/tcp #DBSA License Manager +dbsa-lm 1407/udp #DBSA License Manager +sophia-lm 1408/tcp #Sophia License Manager +sophia-lm 1408/udp #Sophia License Manager +here-lm 1409/tcp #Here License Manager +here-lm 1409/udp #Here License Manager +hiq 1410/tcp #HiQ License Manager +hiq 1410/udp #HiQ License Manager +af 1411/tcp #AudioFile +af 1411/udp #AudioFile +innosys 1412/tcp +innosys 1412/udp +innosys-acl 1413/tcp +innosys-acl 1413/udp +ibm-mqseries 1414/tcp #IBM MQSeries +ibm-mqseries 1414/udp #IBM MQSeries +dbstar 1415/tcp +dbstar 1415/udp +novell-lu6.2 1416/tcp #Novell LU6.2 +novell-lu6.2 1416/udp #Novell LU6.2 +timbuktu-srv1 1417/tcp #Timbuktu Service 1 Port +timbuktu-srv1 1417/udp #Timbuktu Service 1 Port +timbuktu-srv2 1418/tcp #Timbuktu Service 2 Port +timbuktu-srv2 1418/udp #Timbuktu Service 2 Port +timbuktu-srv3 1419/tcp #Timbuktu Service 3 Port +timbuktu-srv3 1419/udp #Timbuktu Service 3 Port +timbuktu-srv4 1420/tcp #Timbuktu Service 4 Port +timbuktu-srv4 1420/udp #Timbuktu Service 4 Port +gandalf-lm 1421/tcp #Gandalf License Manager +gandalf-lm 1421/udp #Gandalf License Manager +autodesk-lm 1422/tcp #Autodesk License Manager +autodesk-lm 1422/udp #Autodesk License Manager +essbase 1423/tcp #Essbase Arbor Software +essbase 1423/udp #Essbase Arbor Software +hybrid 1424/tcp #Hybrid Encryption Protocol +hybrid 1424/udp #Hybrid Encryption Protocol +zion-lm 1425/tcp #Zion Software License Manager +zion-lm 1425/udp #Zion Software License Manager +sas-1 1426/tcp #Satellite-data Acquisition System 1 +sas-1 1426/udp #Satellite-data Acquisition System 1 +mloadd 1427/tcp #mloadd monitoring tool +mloadd 1427/udp #mloadd monitoring tool +informatik-lm 1428/tcp #Informatik License Manager +informatik-lm 1428/udp #Informatik License Manager +nms 1429/tcp #Hypercom NMS +nms 1429/udp #Hypercom NMS +tpdu 1430/tcp #Hypercom TPDU +tpdu 1430/udp #Hypercom TPDU +rgtp 1431/tcp #Reverse Gossip Transport +rgtp 1431/udp #Reverse Gossip Transport +blueberry-lm 1432/tcp #Blueberry Software License Manager +blueberry-lm 1432/udp #Blueberry Software License Manager +ms-sql-s 1433/tcp #Microsoft-SQL-Server +ms-sql-s 1433/udp #Microsoft-SQL-Server +ms-sql-m 1434/tcp #Microsoft-SQL-Monitor +ms-sql-m 1434/udp #Microsoft-SQL-Monitor +ibm-cics 1435/tcp +ibm-cics 1435/udp +sas-2 1436/tcp #Satellite-data Acquisition System 2 +sas-2 1436/udp #Satellite-data Acquisition System 2 +tabula 1437/tcp +tabula 1437/udp +eicon-server 1438/tcp #Eicon Security Agent/Server +eicon-server 1438/udp #Eicon Security Agent/Server +eicon-x25 1439/tcp #Eicon X25/SNA Gateway +eicon-x25 1439/udp #Eicon X25/SNA Gateway +eicon-slp 1440/tcp #Eicon Service Location Protocol +eicon-slp 1440/udp #Eicon Service Location Protocol +cadis-1 1441/tcp #Cadis License Management +cadis-1 1441/udp #Cadis License Management +cadis-2 1442/tcp #Cadis License Management +cadis-2 1442/udp #Cadis License Management +ies-lm 1443/tcp #Integrated Engineering Software +ies-lm 1443/udp #Integrated Engineering Software +marcam-lm 1444/tcp #Marcam License Management +marcam-lm 1444/udp #Marcam License Management +proxima-lm 1445/tcp #Proxima License Manager +proxima-lm 1445/udp #Proxima License Manager +ora-lm 1446/tcp #Optical Research Associates License Manager +ora-lm 1446/udp #Optical Research Associates License Manager +apri-lm 1447/tcp #Applied Parallel Research LM +apri-lm 1447/udp #Applied Parallel Research LM +oc-lm 1448/tcp #OpenConnect License Manager +oc-lm 1448/udp #OpenConnect License Manager +peport 1449/tcp +peport 1449/udp +dwf 1450/tcp #Tandem Distributed Workbench Facility +dwf 1450/udp #Tandem Distributed Workbench Facility +infoman 1451/tcp #IBM Information Management +infoman 1451/udp #IBM Information Management +gtegsc-lm 1452/tcp #GTE Government Systems License Man +gtegsc-lm 1452/udp #GTE Government Systems License Man +genie-lm 1453/tcp #Genie License Manager +genie-lm 1453/udp #Genie License Manager +interhdl_elmd 1454/tcp #interHDL License Manager +interhdl_elmd 1454/udp #interHDL License Manager +esl-lm 1455/tcp #ESL License Manager +esl-lm 1455/udp #ESL License Manager +dca 1456/tcp +dca 1456/udp +valisys-lm 1457/tcp #Valisys License Manager +valisys-lm 1457/udp #Valisys License Manager +nrcabq-lm 1458/tcp #Nichols Research Corp. +nrcabq-lm 1458/udp #Nichols Research Corp. +proshare1 1459/tcp #Proshare Notebook Application +proshare1 1459/udp #Proshare Notebook Application +proshare2 1460/tcp #Proshare Notebook Application +proshare2 1460/udp #Proshare Notebook Application +ibm_wrless_lan 1461/tcp #IBM Wireless LAN +ibm_wrless_lan 1461/udp #IBM Wireless LAN +world-lm 1462/tcp #World License Manager +world-lm 1462/udp #World License Manager +nucleus 1463/tcp +nucleus 1463/udp +msl_lmd 1464/tcp #MSL License Manager +msl_lmd 1464/udp #MSL License Manager +pipes 1465/tcp #Pipes Platform +pipes 1465/udp #Pipes Platform mfarlin@peerlogic.com +oceansoft-lm 1466/tcp #Ocean Software License Manager +oceansoft-lm 1466/udp #Ocean Software License Manager +csdmbase 1467/tcp +csdmbase 1467/udp +csdm 1468/tcp +csdm 1468/udp +aal-lm 1469/tcp #Active Analysis Limited License Manager +aal-lm 1469/udp #Active Analysis Limited License Manager +uaiact 1470/tcp #Universal Analytics +uaiact 1470/udp #Universal Analytics +csdmbase 1471/tcp +csdmbase 1471/udp +csdm 1472/tcp +csdm 1472/udp +openmath 1473/tcp +openmath 1473/udp +telefinder 1474/tcp +telefinder 1474/udp +taligent-lm 1475/tcp #Taligent License Manager +taligent-lm 1475/udp #Taligent License Manager +clvm-cfg 1476/tcp +clvm-cfg 1476/udp +ms-sna-server 1477/tcp +ms-sna-server 1477/udp +ms-sna-base 1478/tcp +ms-sna-base 1478/udp +dberegister 1479/tcp +dberegister 1479/udp +pacerforum 1480/tcp +pacerforum 1480/udp +airs 1481/tcp +airs 1481/udp +miteksys-lm 1482/tcp #Miteksys License Manager +miteksys-lm 1482/udp #Miteksys License Manager +afs 1483/tcp #AFS License Manager +afs 1483/udp #AFS License Manager +confluent 1484/tcp #Confluent License Manager +confluent 1484/udp #Confluent License Manager +lansource 1485/tcp +lansource 1485/udp +nms_topo_serv 1486/tcp +nms_topo_serv 1486/udp +localinfosrvr 1487/tcp +localinfosrvr 1487/udp +docstor 1488/tcp +docstor 1488/udp +dmdocbroker 1489/tcp +dmdocbroker 1489/udp +insitu-conf 1490/tcp +insitu-conf 1490/udp +anynetgateway 1491/tcp +anynetgateway 1491/udp +stone-design-1 1492/tcp +stone-design-1 1492/udp +netmap_lm 1493/tcp +netmap_lm 1493/udp +ica 1494/tcp +ica 1494/udp +cvc 1495/tcp +cvc 1495/udp +liberty-lm 1496/tcp +liberty-lm 1496/udp +rfx-lm 1497/tcp +rfx-lm 1497/udp +watcom-sql 1498/tcp +watcom-sql 1498/udp +fhc 1499/tcp #Federico Heinz Consultora +fhc 1499/udp #Federico Heinz Consultora +vlsi-lm 1500/tcp #VLSI License Manager +vlsi-lm 1500/udp #VLSI License Manager +sas-3 1501/tcp #Satellite-data Acquisition System 3 +sas-3 1501/udp #Satellite-data Acquisition System 3 +shivadiscovery 1502/tcp #Shiva +shivadiscovery 1502/udp #Shiva +imtc-mcs 1503/tcp #Databeam +imtc-mcs 1503/udp #Databeam +evb-elm 1504/tcp #EVB Software Engineering License Manager +evb-elm 1504/udp #EVB Software Engineering License Manager +funkproxy 1505/tcp #Funk Software, Inc. +funkproxy 1505/udp #Funk Software, Inc. +utcd 1506/tcp #Universal Time daemon (utcd) +utcd 1506/udp #Universal Time daemon (utcd) +symplex 1507/tcp +symplex 1507/udp +diagmond 1508/tcp +diagmond 1508/udp +robcad-lm 1509/tcp #Robcad, Ltd. License Manager +robcad-lm 1509/udp #Robcad, Ltd. License Manager +mvx-lm 1510/tcp #Midland Valley Exploration Ltd. Lic. Man. +mvx-lm 1510/udp #Midland Valley Exploration Ltd. Lic. Man. +3l-l1 1511/tcp +3l-l1 1511/udp +wins 1512/tcp #Microsoft's Windows Internet Name Service +wins 1512/udp #Microsoft's Windows Internet Name Service +fujitsu-dtc 1513/tcp #Fujitsu Systems Business of America, Inc +fujitsu-dtc 1513/udp #Fujitsu Systems Business of America, Inc +fujitsu-dtcns 1514/tcp #Fujitsu Systems Business of America, Inc +fujitsu-dtcns 1514/udp #Fujitsu Systems Business of America, Inc +ifor-protocol 1515/tcp +ifor-protocol 1515/udp +vpad 1516/tcp #Virtual Places Audio data +vpad 1516/udp #Virtual Places Audio data +vpac 1517/tcp #Virtual Places Audio control +vpac 1517/udp #Virtual Places Audio control +vpvd 1518/tcp #Virtual Places Video data +vpvd 1518/udp #Virtual Places Video data +vpvc 1519/tcp #Virtual Places Video control +vpvc 1519/udp #Virtual Places Video control +atm-zip-office 1520/tcp #atm zip office +atm-zip-office 1520/udp #atm zip office +ncube-lm 1521/tcp #nCube License Manager +ncube-lm 1521/udp #nCube License Manager +rna-lm 1522/tcp #Ricardo North America License Manager +rna-lm 1522/udp #Ricardo North America License Manager +cichild-lm 1523/tcp +cichild-lm 1523/udp +ingreslock 1524/tcp #ingres +ingreslock 1524/udp #ingres +prospero-np 1525/tcp #Prospero Directory Service non-priv +prospero-np 1525/udp #Prospero Directory Service non-priv +#PROBLEMS!======================================================== +orasrv 1525/tcp #oracle +orasrv 1525/udp #oracle +#PROBLEMS!======================================================== +pdap-np 1526/tcp #Prospero Data Access Prot non-priv +pdap-np 1526/udp #Prospero Data Access Prot non-priv +tlisrv 1527/tcp #oracle +tlisrv 1527/udp #oracle +mciautoreg 1528/tcp +mciautoreg 1528/udp +support 1529/tcp prmsd gnatsd # cygnus bug tracker +coauthor 1529/tcp #oracle +coauthor 1529/udp #oracle +rap-service 1530/tcp +rap-service 1530/udp +rap-listen 1531/tcp +rap-listen 1531/udp +miroconnect 1532/tcp +miroconnect 1532/udp +virtual-places 1533/tcp #Virtual Places Software +virtual-places 1533/udp #Virtual Places Software +micromuse-lm 1534/tcp +micromuse-lm 1534/udp +ampr-info 1535/tcp +ampr-info 1535/udp +ampr-inter 1536/tcp +ampr-inter 1536/udp +sdsc-lm 1537/tcp +sdsc-lm 1537/udp +3ds-lm 1538/tcp +3ds-lm 1538/udp +intellistor-lm 1539/tcp #Intellistor License Manager +intellistor-lm 1539/udp #Intellistor License Manager +rds 1540/tcp +rds 1540/udp +rds2 1541/tcp +rds2 1541/udp +gridgen-elmd 1542/tcp +gridgen-elmd 1542/udp +simba-cs 1543/tcp +simba-cs 1543/udp +aspeclmd 1544/tcp +aspeclmd 1544/udp +vistium-share 1545/tcp +vistium-share 1545/udp +abbaccuray 1546/tcp +abbaccuray 1546/udp +laplink 1547/tcp +laplink 1547/udp +axon-lm 1548/tcp #Axon License Manager +axon-lm 1548/udp #Axon License Manager +shivahose 1549/tcp #Shiva Hose +shivasound 1549/udp #Shiva Sound +3m-image-lm 1550/tcp #Image Storage license manager 3M Company +3m-image-lm 1550/udp #Image Storage license manager 3M Company +hecmtl-db 1551/tcp +hecmtl-db 1551/udp +pciarray 1552/tcp +pciarray 1552/udp +issd 1600/tcp +issd 1600/udp +# IMPORTANT NOTE: Ports 1645/1646 are the traditional radius ports used by +# many vendors without obtaining official IANA assignment. The official +# assignment is now ports 1812/1813 and users are encouraged to migrate +# when possible to these new ports. +#radius 1645/udp #RADIUS authentication protocol (old) +#radacct 1646/udp #RADIUS accounting protocol (old) +nkd 1650/tcp +nkd 1650/udp +shiva_confsrvr 1651/tcp +shiva_confsrvr 1651/udp +xnmp 1652/tcp +xnmp 1652/udp +netview-aix-1 1661/tcp +netview-aix-1 1661/udp +netview-aix-2 1662/tcp +netview-aix-2 1662/udp +netview-aix-3 1663/tcp +netview-aix-3 1663/udp +netview-aix-4 1664/tcp +netview-aix-4 1664/udp +netview-aix-5 1665/tcp +netview-aix-5 1665/udp +netview-aix-6 1666/tcp +netview-aix-6 1666/udp +netview-aix-7 1667/tcp +netview-aix-7 1667/udp +netview-aix-8 1668/tcp +netview-aix-8 1668/udp +netview-aix-9 1669/tcp +netview-aix-9 1669/udp +netview-aix-10 1670/tcp +netview-aix-10 1670/udp +netview-aix-11 1671/tcp +netview-aix-11 1671/udp +netview-aix-12 1672/tcp +netview-aix-12 1672/udp +pptp 1723/tcp #Point-to-point tunnelling protocol +# IMPORTANT NOTE: See comments for ports 1645/1646 when using older equipment +radius 1812/udp #RADIUS authentication protocol (IANA sanctioned) +radacct 1813/udp #RADIUS accounting protocol (IANA sanctioned) +licensedaemon 1986/tcp #cisco license management +licensedaemon 1986/udp #cisco license management +tr-rsrb-p1 1987/tcp #cisco RSRB Priority 1 port +tr-rsrb-p1 1987/udp #cisco RSRB Priority 1 port +tr-rsrb-p2 1988/tcp #cisco RSRB Priority 2 port +tr-rsrb-p2 1988/udp #cisco RSRB Priority 2 port +tr-rsrb-p3 1989/tcp #cisco RSRB Priority 3 port +tr-rsrb-p3 1989/udp #cisco RSRB Priority 3 port +#PROBLEMS!=================================================== +mshnet 1989/tcp #MHSnet system +mshnet 1989/udp #MHSnet system +#PROBLEMS!=================================================== +stun-p1 1990/tcp #cisco STUN Priority 1 port +stun-p1 1990/udp #cisco STUN Priority 1 port +stun-p2 1991/tcp #cisco STUN Priority 2 port +stun-p2 1991/udp #cisco STUN Priority 2 port +stun-p3 1992/tcp #cisco STUN Priority 3 port +stun-p3 1992/udp #cisco STUN Priority 3 port +#PROBLEMS!=================================================== +ipsendmsg 1992/tcp +ipsendmsg 1992/udp +#PROBLEMS!=================================================== +snmp-tcp-port 1993/tcp #cisco SNMP TCP port +snmp-tcp-port 1993/udp #cisco SNMP TCP port +stun-port 1994/tcp #cisco serial tunnel port +stun-port 1994/udp #cisco serial tunnel port +perf-port 1995/tcp #cisco perf port +perf-port 1995/udp #cisco perf port +tr-rsrb-port 1996/tcp #cisco Remote SRB port +tr-rsrb-port 1996/udp #cisco Remote SRB port +gdp-port 1997/tcp #cisco Gateway Discovery Protocol +gdp-port 1997/udp #cisco Gateway Discovery Protocol +x25-svc-port 1998/tcp #cisco X.25 service (XOT) +x25-svc-port 1998/udp #cisco X.25 service (XOT) +tcp-id-port 1999/tcp #cisco identification port +tcp-id-port 1999/udp #cisco identification port +callbook 2000/tcp +callbook 2000/udp +dc 2001/tcp +wizard 2001/udp #curry +globe 2002/tcp +globe 2002/udp +cfingerd 2003/tcp #GNU finger +mailbox 2004/tcp +emce 2004/udp #CCWS mm conf +berknet 2005/tcp +oracle 2005/udp +invokator 2006/tcp +raid-cc 2006/udp #raid +dectalk 2007/tcp +raid-am 2007/udp +conf 2008/tcp +terminaldb 2008/udp +news 2009/tcp +whosockami 2009/udp +search 2010/tcp +pipe_server 2010/udp +raid-cc 2011/tcp #raid +servserv 2011/udp +ttyinfo 2012/tcp +raid-ac 2012/udp +raid-am 2013/tcp +raid-cd 2013/udp +troff 2014/tcp +raid-sf 2014/udp +cypress 2015/tcp +raid-cs 2015/udp +bootserver 2016/tcp +bootserver 2016/udp +cypress-stat 2017/tcp +bootclient 2017/udp +terminaldb 2018/tcp +rellpack 2018/udp +whosockami 2019/tcp +about 2019/udp +xinupageserver 2020/tcp +xinupageserver 2020/udp +servexec 2021/tcp +xinuexpansion1 2021/udp +down 2022/tcp +xinuexpansion2 2022/udp +xinuexpansion3 2023/tcp +xinuexpansion3 2023/udp +xinuexpansion4 2024/tcp +xinuexpansion4 2024/udp +ellpack 2025/tcp +xribs 2025/udp +scrabble 2026/tcp +scrabble 2026/udp +shadowserver 2027/tcp +shadowserver 2027/udp +submitserver 2028/tcp +submitserver 2028/udp +device2 2030/tcp +device2 2030/udp +blackboard 2032/tcp +blackboard 2032/udp +glogger 2033/tcp +glogger 2033/udp +scoremgr 2034/tcp +scoremgr 2034/udp +imsldoc 2035/tcp +imsldoc 2035/udp +objectmanager 2038/tcp +objectmanager 2038/udp +lam 2040/tcp +lam 2040/udp +interbase 2041/tcp +interbase 2041/udp +isis 2042/tcp +isis 2042/udp +isis-bcast 2043/tcp +isis-bcast 2043/udp +rimsl 2044/tcp +rimsl 2044/udp +cdfunc 2045/tcp +cdfunc 2045/udp +sdfunc 2046/tcp +sdfunc 2046/udp +#dls 2047/tcp +#dls 2047/udp +dls-monitor 2048/tcp +dls-monitor 2048/udp +nfsd 2049/tcp nfs # NFS server daemon +nfsd 2049/udp nfs # NFS server daemon +#PROBLEMS!============================================================= +#shilp 2049/tcp +#shilp 2049/udp +#PROBLEMS!============================================================= +dlsrpn 2065/tcp #Data Link Switch Read Port Number +dlsrpn 2065/udp #Data Link Switch Read Port Number +dlswpn 2067/tcp #Data Link Switch Write Port Number +dlswpn 2067/udp #Data Link Switch Write Port Number +zephyr-clt 2103/udp #Zephyr serv-hm connection +zephyr-hm 2104/udp #Zephyr hostmanager +#PROBLEMS!============================================================= +#zephyr-hm-srv 2105/udp #Zephyr hm-serv connection +#PROBLEMS!============================================================= +eklogin 2105/tcp #Kerberos (v4) encrypted rlogin +eklogin 2105/udp #Kerberos (v4) encrypted rlogin +ekshell 2106/tcp #Kerberos (v4) encrypted rshell +ekshell 2106/udp #Kerberos (v4) encrypted rshell +rkinit 2108/tcp #Kerberos (v4) remote initialization +rkinit 2108/udp #Kerberos (v4) remote initialization +ats 2201/tcp #Advanced Training System Program +ats 2201/udp #Advanced Training System Program +ivs-video 2232/tcp #IVS Video default +ivs-video 2232/udp #IVS Video default +ivsd 2241/tcp #IVS Daemon +ivsd 2241/udp #IVS Daemon +pehelp 2307/tcp +pehelp 2307/udp +cvspserver 2401/tcp #CVS network server +cvspserver 2401/udp #CVS network server +venus 2430/tcp #venus +venus 2430/udp #venus +venus-se 2431/tcp #venus-se +venus-se 2431/udp #venus-se +codasrv 2432/tcp #codasrv +codasrv 2432/udp #codasrv +codasrv-se 2433/tcp #codasrv-se +codasrv-se 2433/udp #codasrv-se +rtsserv 2500/tcp #Resource Tracking system server +rtsserv 2500/udp #Resource Tracking system server +rtsclient 2501/tcp #Resource Tracking system client +rtsclient 2501/udp #Resource Tracking system client +hp-3000-telnet 2564/tcp #HP 3000 NS/VT block mode telnet +zebrasrv 2600/tcp #zebra service +zebra 2601/tcp #zebra vty +ripd 2602/tcp #RIPd vty +ripngd 2603/tcp #RIPngd vty +ospfd 2604/tcp #OSPFd vty +bgpd 2605/tcp #BGPd vty +listen 2766/tcp #System V listener port +www-dev 2784/tcp #world wide web - development +www-dev 2784/udp #world wide web - development +NSWS 3049/tcp +NSWS 3049/udp +sj3 3086/tcp #SJ3 (kanji input) +vmodem 3141/tcp +vmodem 3141/udp +ccmail 3264/tcp #cc:mail/lotus +ccmail 3264/udp #cc:mail/lotus +dec-notes 3333/tcp #DEC Notes +dec-notes 3333/udp #DEC Notes +rsvp-encap 3455/udp #RSVP encapsulated in UDP +mapper-nodemgr 3984/tcp #MAPPER network node manager +mapper-nodemgr 3984/udp #MAPPER network node manager +mapper-mapethd 3985/tcp #MAPPER TCP/IP server +mapper-mapethd 3985/udp #MAPPER TCP/IP server +mapper-ws_ethd 3986/tcp #MAPPER workstation server +mapper-ws_ethd 3986/udp #MAPPER workstation server +bmap 3421/tcp #Bull Apprise portmapper +bmap 3421/udp #Bull Apprise portmapper +prsvp 3455/tcp #RSVP Port +prsvp 3455/udp #RSVP Port +vat 3456/tcp #VAT default data +vat 3456/udp #VAT default data +vat-control 3457/tcp #VAT default control +vat-control 3457/udp #VAT default control +udt_os 3900/tcp #Unidata UDT OS +udt_os 3900/udp #Unidata UDT OS +netcheque 4008/tcp #NetCheque accounting +netcheque 4008/udp #NetCheque accounting +lockd 4045/udp # NFS lock daemon/manager +lockd 4045/tcp +nuts_dem 4132/tcp #NUTS Daemon +nuts_dem 4132/udp #NUTS Daemon +nuts_bootp 4133/tcp #NUTS Bootp Server +nuts_bootp 4133/udp #NUTS Bootp Server +rwhois 4321/tcp #Remote Who Is +rwhois 4321/udp #Remote Who Is +unicall 4343/tcp +unicall 4343/udp +krb524 4444/tcp +krb524 4444/udp +# PROBLEM krb524 assigned the port, +# PROBLEM nv used it without an assignment +nv-video 4444/tcp #NV Video default +nv-video 4444/udp #NV Video default +sae-urn 4500/tcp +sae-urn 4500/udp +fax 4557/tcp #FAX transmission service +hylafax 4559/tcp #HylaFAX client-server protocol +rfa 4672/tcp #remote file access server +rfa 4672/udp #remote file access server +commplex-main 5000/tcp +commplex-main 5000/udp +commplex-link 5001/tcp +commplex-link 5001/udp +rfe 5002/tcp #radio free ethernet +rfe 5002/udp #radio free ethernet +telelpathstart 5010/tcp +telelpathstart 5010/udp +telelpathattack 5011/tcp +telelpathattack 5011/udp +mmcc 5050/tcp #multimedia conference control tool +mmcc 5050/udp #multimedia conference control tool +rmonitor_secure 5145/tcp +rmonitor_secure 5145/udp +aol 5190/tcp #America-Online +aol 5190/udp #America-Online +aol-1 5191/tcp #AmericaOnline1 +aol-1 5191/udp #AmericaOnline1 +aol-2 5192/tcp #AmericaOnline2 +aol-2 5192/udp #AmericaOnline2 +aol-3 5193/tcp #AmericaOnline3 +aol-3 5193/udp #AmericaOnline3 +padl2sim 5236/tcp +padl2sim 5236/udp +hacl-hb 5300/tcp # HA cluster heartbeat +hacl-hb 5300/udp # HA cluster heartbeat +hacl-gs 5301/tcp # HA cluster general services +hacl-gs 5301/udp # HA cluster general services +hacl-cfg 5302/tcp # HA cluster configuration +hacl-cfg 5302/udp # HA cluster configuration +hacl-probe 5303/tcp # HA cluster probing +hacl-probe 5303/udp # HA cluster probing +hacl-local 5304/tcp +hacl-local 5304/udp +hacl-test 5305/tcp +hacl-test 5305/udp +cfengine 5308/tcp +cfengine 5308/udp +rplay 5555/udp +canna 5680/tcp #Canna (Japanese Input) +proshareaudio 5713/tcp #proshare conf audio +proshareaudio 5713/udp #proshare conf audio +prosharevideo 5714/tcp #proshare conf video +prosharevideo 5714/udp #proshare conf video +prosharedata 5715/tcp #proshare conf data +prosharedata 5715/udp #proshare conf data +prosharerequest 5716/tcp #proshare conf request +prosharerequest 5716/udp #proshare conf request +prosharenotify 5717/tcp #proshare conf notify +prosharenotify 5717/udp #proshare conf notify +cvsup 5999/tcp #CVSup file transfer/John Polstra/FreeBSD +#x11 6000-6063/tcp X Window System +#x11 6000-6063/udp X Window System +softcm 6110/tcp #HP SoftBench CM +softcm 6110/udp #HP SoftBench CM +spc 6111/tcp #HP SoftBench Sub-Process Control +spc 6111/udp #HP SoftBench Sub-Process Control +meta-corp 6141/tcp #Meta Corporation License Manager +meta-corp 6141/udp #Meta Corporation License Manager +aspentec-lm 6142/tcp #Aspen Technology License Manager +aspentec-lm 6142/udp #Aspen Technology License Manager +watershed-lm 6143/tcp #Watershed License Manager +watershed-lm 6143/udp #Watershed License Manager +statsci1-lm 6144/tcp #StatSci License Manager - 1 +statsci1-lm 6144/udp #StatSci License Manager - 1 +statsci2-lm 6145/tcp #StatSci License Manager - 2 +statsci2-lm 6145/udp #StatSci License Manager - 2 +lonewolf-lm 6146/tcp #Lone Wolf Systems License Manager +lonewolf-lm 6146/udp #Lone Wolf Systems License Manager +montage-lm 6147/tcp #Montage License Manager +montage-lm 6147/udp #Montage License Manager +ricardo-lm 6148/tcp #Ricardo North America License Manager +ricardo-lm 6148/udp #Ricardo North America License Manager +xdsxdm 6558/tcp +xdsxdm 6558/udp +acmsoda 6969/tcp +acmsoda 6969/udp +afs3-fileserver 7000/tcp #file server itself +afs3-fileserver 7000/udp #file server itself +afs3-callback 7001/tcp #callbacks to cache managers +afs3-callback 7001/udp #callbacks to cache managers +afs3-prserver 7002/tcp #users & groups database +afs3-prserver 7002/udp #users & groups database +afs3-vlserver 7003/tcp #volume location database +afs3-vlserver 7003/udp #volume location database +afs3-kaserver 7004/tcp #AFS/Kerberos authentication service +afs3-kaserver 7004/udp #AFS/Kerberos authentication service +afs3-volser 7005/tcp #volume management server +afs3-volser 7005/udp #volume management server +afs3-errors 7006/tcp #error interpretation service +afs3-errors 7006/udp #error interpretation service +afs3-bos 7007/tcp #basic overseer process +afs3-bos 7007/udp #basic overseer process +afs3-update 7008/tcp #server-to-server updater +afs3-update 7008/udp #server-to-server updater +afs3-rmtsys 7009/tcp #remote cache manager service +afs3-rmtsys 7009/udp #remote cache manager service +ups-onlinet 7010/tcp #onlinet uninterruptable power supplies +ups-onlinet 7010/udp #onlinet uninterruptable power supplies +font-service 7100/tcp #X Font Service +font-service 7100/udp #X Font Service +fodms 7200/tcp #FODMS FLIP +fodms 7200/udp #FODMS FLIP +dlip 7201/tcp +dlip 7201/udp +natd 8668/divert # Network Address Translation +jetdirect 9100/tcp #HP JetDirect card +man 9535/tcp +man 9535/udp +sd 9876/tcp #Session Director +sd 9876/udp #Session Director +amanda 10080/udp #Dump server control +amandaidx 10082/tcp #Amanda indexing +amidxtape 10083/tcp #Amanda tape indexing +isode-dua 17007/tcp +isode-dua 17007/udp +biimenu 18000/tcp #Beckman Instruments, Inc. +biimenu 18000/udp #Beckman Instruments, Inc. +dbbrowse 47557/tcp #Databeam Corporation +dbbrowse 47557/udp #Databeam Corporation +wnn4 22273/tcp #Wnn4 (Japanese input) +wnn4_Cn 22289/tcp #Wnn4 (Chinese input) +wnn4_Tw 22321/tcp #Wnn4 (Taiwanse input) +wnn4_Kr 22305/tcp #Wnn4 (Korean input) +wnn6 22273/tcp #Wnn6 (Japanese input) +wnn6_Cn 22289/tcp #Wnn6 (Chinese input) +wnn6_Tw 22321/tcp #Wnn6 (Taiwanse input) +wnn6_Kr 22305/tcp #Wnn6 (Korean input) +wnn6_DS 26208/tcp #Wnn6 (Dserver) diff --git a/etc/shells b/etc/shells new file mode 100644 index 0000000..fe1e029 --- /dev/null +++ b/etc/shells @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# List of acceptable shells for chpass(1). +# Ftpd will not allow users to connect who are not using +# one of these shells. + +/bin/sh +/bin/csh +/bin/tcsh diff --git a/etc/sysctl.conf b/etc/sysctl.conf new file mode 100644 index 0000000..e3b25b9 --- /dev/null +++ b/etc/sysctl.conf @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# This file is read when going to multi-user and its contents piped thru +# ``sysctl -w'' to adjust kernel values. ``man 5 sysctl.conf'' for details. +# diff --git a/etc/syslog.conf b/etc/syslog.conf new file mode 100644 index 0000000..425ab72 --- /dev/null +++ b/etc/syslog.conf @@ -0,0 +1,28 @@ +# $FreeBSD$ +# +# Spaces are NOT valid field separators in this file. +# Consult the syslog.conf(5) manpage. +*.err;kern.debug;auth.notice;mail.crit /dev/console +*.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages +security.* /var/log/security +mail.info /var/log/maillog +lpr.info /var/log/lpd-errs +cron.* /var/log/cron +*.err root +*.notice;news.err root +*.alert root +*.emerg * +# uncomment this to log all writes to /dev/console to /var/log/console.log +#console.info /var/log/console.log +# uncomment this to enable logging of all log messages to /var/log/all.log +#*.* /var/log/all.log +# uncomment this to enable logging to a remote loghost named loghost +#*.* @loghost +# uncomment these if you're running inn +# news.crit /var/log/news/news.crit +# news.err /var/log/news/news.err +# news.notice /var/log/news/news.notice +!startslip +*.* /var/log/slip.log +!ppp +*.* /var/log/ppp.log diff --git a/etc/termcap.small b/etc/termcap.small new file mode 100644 index 0000000..1c21688 --- /dev/null +++ b/etc/termcap.small @@ -0,0 +1,224 @@ +# Copyright (c) 1980, 1985, 1989 The Regents of the University of California. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)termcap.src 5.88 (Berkeley) 4/30/91 +# $FreeBSD$ +# +# for syscons +# common entry without semigraphics +cons25w|ansiw|ansi80x25-raw:\ + :al=\E[L:am:bs:NP:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:co#80:\ + :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:cb=\E[1K:\ + :ms:nd=\E[C:pt:rs=\Ec:so=\E[7m:se=\E[27m:up=\E[A:\ + :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:sc=\E7:rc=\E8:\ + :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\ + :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\ + :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:eo:sf=\E[S:sr=\E[T:\ + :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\177:kB=\E[Z:\ + :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\ + :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:bw:\ + :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:bl=^G:ut:it#8:km: +cons25|ansis|ansi80x25:\ + :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\ + :tc=cons25w: +cons25-m|ansis-mono|ansi80x25-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25: +cons30|ansi80x30:\ + :li#30:tc=cons25: +cons30-m|ansi80x30-mono:\ + :li#30:tc=cons25-m: +cons43|ansi80x43:\ + :li#43:tc=cons25: +cons43-m|ansi80x43-mono:\ + :li#43:tc=cons25-m: +cons50|ansil|ansi80x50:\ + :li#50:tc=cons25: +cons50-m|ansil-mono|ansi80x50-mono:\ + :li#50:tc=cons25-m: +cons60|ansi80x60:\ + :li#60:tc=cons25: +cons60-m|ansi80x60-mono:\ + :li#60:tc=cons25-m: +# KOI8-R FreeBSD console with ACS support +cons25r|pc3r|ibmpc3r|cons25-koi8-r:\ + :ac=q\200x\201m\204v\211j\205t\206n\212u\207l\202w\210k\203y\230z\231f\234~\225a\220h\221`^D.^Y-^Xi^U0\215:\ + :tc=cons25w: +cons25r-m|pc3r-m|ibmpc3r-mono|cons25-koi8-r-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25r: +cons30r|cons30-koi8-r:\ + :li#30:tc=cons25r: +cons30r-m|cons30-koi8-r-mono:\ + :li#30:tc=cons25r-m: +cons43r|cons43-koi8-r:\ + :li#43:tc=cons25r: +cons43r-m|cons43-koi8-r-mono:\ + :li#43:tc=cons25r-m: +cons50r|cons50-koi8-r:\ + :li#50:tc=cons25r: +cons50r-m|cons50-koi8-r-mono:\ + :li#50:tc=cons25r-m: +cons60r|cons60-koi8-r:\ + :li#60:tc=cons25r: +cons60r-m|cons60-koi8-r-mono:\ + :li#60:tc=cons25r-m: +# ISO 8859-2 FreeBSD console with ACS support +cons25l2|cons25-iso8859-2:\ + :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237,\206.\204-\203h\212+\205i\2110\200y\232z\233{\234|\235}\236:\ + :tc=cons25w: +cons25l2-m|cons25-iso8859-2-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25l2: +cons30l2|cons30-iso8859-2:\ + :li#30:tc=cons25l2: +cons30l2-m|cons30-iso8859-2-mono:\ + :li#30:tc=cons25l2-m: +cons43l2|cons43-iso8859-2:\ + :li#43:tc=cons25l2: +cons43l2-m|cons43-iso8859-2-mono:\ + :li#43:tc=cons25l2-m: +cons50l2|cons50-iso8859-2:\ + :li#50:tc=cons25l2: +cons50l2-m|cons50-iso8859-2-mono:\ + :li#50:tc=cons25l2-m: +cons60l2|cons60-iso8859-2:\ + :li#60:tc=cons25l2: +cons60l2-m|cons60-iso8859-2-mono:\ + :li#60:tc=cons25l2-m: +# ISO 8859-1 FreeBSD console with ACS support +cons25l1|cons25-iso8859-1:\ + :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237.^Y-^X+\253,\273i\247y\232z\233:\ + :tc=cons25w: +cons25l1-m|cons25-iso8859-1-mono:\ + :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25l1: +cons30l1|cons30-iso8859-1:\ + :li#30:tc=cons25l1: +cons30l1-m|cons30-iso8859-1-mono:\ + :li#30:tc=cons25l1-m: +cons43l1|cons43-iso8859-1:\ + :li#43:tc=cons25l1: +cons43l1-m|cons43-iso8859-1-mono:\ + :li#43:tc=cons25l1-m: +cons50l1|cons50-iso8859-1:\ + :li#50:tc=cons25l1: +cons50l1-m|cons50-iso8859-1-mono:\ + :li#50:tc=cons25l1-m: +cons60l1|cons60-iso8859-1:\ + :li#60:tc=cons25l1: +cons60l1-m|cons60-iso8859-1-mono:\ + :li#60:tc=cons25l1-m: +# +dosansi|ANSI.SYS standard crt:\ + :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\ + :do=\E[B:li#25:mi:nd=\E[C:\ + :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\ + :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ + :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\ + :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\ + :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED: + +# The following is a version of the ibm-pc entry distributed with PC/IX, +# (Interactive Systems' System 3 for the Big Blue), modified by Richard +# McIntosh at UCB/CSM. The :pt: and :uc: have been removed from the original, +# (the former is untrue, and the latter failed under UCB/man); standout and +# underline modes have been added. Note: this entry describes the "native" +# capabilities of the PC monochrome display, without ANY emulation; most +# communications packages (but NOT PC/IX connect) do some kind of emulation. +pc|ibmpc|ibm pc PC/IX:\ + :li#24:co#80:am:bs:bw:eo:\ + :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\ + :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m: +pc3mono|IBM PC 386BSD Console with monochrome monitor:\ + :so=\E[0;1r\E[m:tc=pc3: +pc3|ibmpc3|IBM PC 386BSD Console:\ + :Co#8:\ + :DO=\E[%dB:\ + :F1=\E[W:\ + :F2=\E[X:\ + :K1=\E[H:\ + :K2=\E[I:\ + :K3=\E[E:\ + :K4=\E[F:\ + :K5=\E[G:\ + :LE=\E[%dD:\ + :RI=\E[%dC:\ + :Sb=\E[1;%dx:\ + :Sf=\E[2;%dx:\ + :UP=\E[%dA:\ + :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\ + :am:\ + :bl=^G:\ + :bs:\ + :cb=\E[1K:\ + :cd=\E[J:\ + :ce=\E[K:\ + :cl=\E[H\E[J:\ + :cm=\E[%i%d;%dH:\ + :co#80:\ + :cr=^M:\ + :do=\E[B:\ + :ho=\E[H:\ + :is=\E[m:\ + :it#8:\ + :k;=\E[V:\ + :k1=\E[M:\ + :k2=\E[N:\ + :k3=\E[O:\ + :k4=\E[P:\ + :k5=\E[Q:\ + :k6=\E[R:\ + :k7=\E[S:\ + :k8=\E[T:\ + :k9=\E[U:\ + :kD=\177:\ + :@7=\E[F:\ + :kN=\E[G:\ + :kP=\E[I:\ + :kb=\177:\ + :kd=\E[B:\ + :kh=\E[H:\ + :kl=\E[D:\ + :kr=\E[C:\ + :ku=\E[A:\ + :le=^H:\ + :li#25:\ + :ms:\ + :nd=\E[C:\ + :op=\E[x:\ + :pa#64:\ + :rs=\E[m:\ + :se=\E[m:\ + :sf=\E[S:\ + :so=\E[7;1r\E[7m:\ + :sr=\E[T:\ + :ta=^I:\ + :te=\E[m:\ + :ti=\E[m:\ + :up=\E[A:\ + :ut: diff --git a/etc/usbd.conf b/etc/usbd.conf new file mode 100644 index 0000000..1463666 --- /dev/null +++ b/etc/usbd.conf @@ -0,0 +1,44 @@ +# Configuration file the USB daemon. +# +# See usbd.conf(5) for the description of the format of the file. +# +# $FreeBSD$ + +# Firmware download into the ActiveWire board. After the firmware download is +# done the device detaches and reappears as something new and shiny automatically. +# +device "ActiveWire board, firmware download" + vendor 0x0854 + product 0x0100 + release 0x0000 + attach "/usr/local/bin/ezdownload -f /usr/local/share/usb/firmware/0854.0100.0_01.hex ${DEVNAME}" + +# Firmware download for Entrega Serial DB25 adapter. +# +device "Entrega Serial with UART" + product 0x8001 + vendor 0x1645 + release 0x0101 + attach "if ! kldstat -n usio > /dev/null 2>&1 ; then kldload usio; fi" + attach "/usr/sbin/ezdownload -v -f /usr/share/usb/firmware/1645.8001.0101 /dev/${DEVNAME}" + +# The entry below starts and stops dhclient when an ethernet device is inserted +# Caveat: It does not support multiple interfaces (but neither does pccardd, +# it shouldn't be too big a deal :-) +# +device "USB ethernet" + devname "[ack]ue[0-9]+" + attach "/etc/pccard_ether ${DEVNAME} start" + detach "/etc/pccard_ether ${DEVNAME} stop" + +# The entry below starts moused when a mouse is plugged in. Moused +# stops automatically (actually it bombs :) when the device disappears. +# +device "Mouse" + devname "ums[0-9]+" + attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid" + +# The fallthrough entry: Nothing is specified, nothing is done. And it isn't +# necessary at all :-). Just for pretty printing in debugging mode. +# +device "USB device" |