Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 May 1997 23:41:55 +0100
From:      Brian Somers <brian@awfulhak.org>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        Curt Sampson <cjs@portal.ca>, Michael Smith <msmith@atrad.adelaide.edu.au>, hackers@FreeBSD.ORG
Subject:   Re: /etc/netstart bogons.. 
Message-ID:  <199705012241.XAA13307@awfulhak.demon.co.uk>
In-Reply-To: Your message of "Thu, 24 Apr 1997 12:09:10 PDT." <387.861908950@time.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for the lag - better late than never....

> OK, I haven't done anything with DEFAULT so far but here's the
> rest of my changes relative to FreeBSD.
> 
> There are two files added (rc.conf and rc.network) and two files
> deleted (sysconfig and netstart), so it's probably easiest for folks
> to move the two deleted files out the way and unpack the attached shar
> file into their /usr/src/etc directories, applying the patches as well
> and then installing the relevant bits into /etc.  You should then
> customize the new rc.conf file to taste using the old sysconfig file
> as a guide.
> 
> If this meets with general approval, I then (boy scout's honor)
> promise to also write (and commit with the rest of the stuff) an
> rc.conf(8) man page which contains the much longer and more detailed
> information that sysconfig used to but which also made sysconfig
> unreadable and that much more difficult to customize.
[.....]
> Xswapfile=NO		# Set to name of swapfile if aux swapfile desired.
> Xapm_enable=NO		# Set to YES if you want APM enabled.
> Xpccard_enable=NO	# Set to YES if you want to configure PCCARD devices.
> Xpccard_mem=DEFAULT	# If pccard_enable=YES, this is card memory address.
> Xpccard_ifconfig=NO	# Specialized pccard ethernet configuration (or NO).
> Xlocal_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
> X
> X
> X##############################################################
> X###  Network configuration sub-section  ######################
> X##############################################################
> X
> X### Basic network options: ###
> Xhostname=myname.my.domain	# Set this!
> Xnisdomainname=NO		# Set to NIS domain if using NIS (or NO).
> Xfirewall=NO			# Set to firewall type or NO for none.
> Xtcp_extentions=YES		# Allow RFC1323 & RFC1544 extentions (or NO).
> Xnetwork_interfaces="lo0"	# List of network interfaces (lo0 is loopback).
> Xifconfig_lo0="inet 127.0.0.1"	# default loopback device configuration.

ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff"
would be nice - to remind people that it's possible.

> X
> X### Network daemon (miscellaneous) & NFS options: ###
> Xsyslogd_enable=YES		# Run syslog daemon (or NO).
> Xsyslogd_flags=""		# Flags to syslogd (if enabled).
> Xnamed_enable=NO			# Run named, the DNS server (or NO).
> Xnamed_flags=""			# Flags to named (if enabled).

Good so far.

> Xkerberos_server_enable=NO	# Run a kerberos master server (or NO).

kerberos_server_flags=""
kadmind_flags="-n"

> Xrwhod_enable=NO			# Run the rwho daemon (or NO).

rwhod_flags=""

> Xamd_enable=NO			# Run amd service with $amd_flags (or NO).
> Xamd_flags="-a /net -c 1800 -k i386 -d my.domain -l syslog /host /etc/amd.map"
> Xnfs_client_enable=NO		# This host is an NFS client (or NO).

nfs_client_flags="-n 4"

> Xnfs_server_enable=NO		# This host is an NFS server (or NO).

mountd_flags=""
nfs_server_flags="-u -t 4"

> Xweak_mountd_authentication=NO	# Running PCNFSD / other non-root nfsd (or NO).
This is inconsistent - I think mountd_flags should be used (it's already
assigned in rc.networks....)

> Xnfs_reserved_port_only=NO	# Provide NFS only on secure port (or NO).
> Xrpc_lockd_enable=NO		# Run NFS rpc.lockd (*broken!*) if nfs_server.

rpc_lockd_flags=""

> Xrpc_statd_enable=YES		# Run NFS rpc.statd if nfs_server (or NO).

rpc_statd_flags=""

> Xportmap_enable=YES		# Run the portmapper service (or NO).
> Xportmap_flags=""		# Flags to portmap (if enabled).
> Xxtend_enable=NO			# Run the X-10 power controller daemon.
> Xxtend_flags=""			# Flags to xtend (if enabled).
> X
> X### Network Time Services options: ###
> Xtimed_enabled=NO		# Run the time daemon (or NO).
> Xtimed_flags=""			# Flags to timed (if enabled).
> Xntpdate_enable=NO		# Run the ntpdate to sync time (or NO).
> Xntpdate_flags=""		# Flags to ntpdate (if enabled).
> Xxntpd_enable=NO			# Run xntpd Network Time Protocol (or NO).
> Xxntpd_flags=""			# Flags to xntpd (if enabled).
> Xtickadj_enable=YES		# If xntp is enabled, also run tickadj.
> Xtickadj_flags="-Aq"		# Flags to tickadj (if enabled).
> X
> X# Network Information Services (NIS) options: ###
> Xnis_client_enable=NO		# We're an NIS client (or NO)
> Xnis_client_flags=""		# Flags to ypbind (if enabled).
> Xnis_ypset_enable=NO		# Run ypset at boot time (or NO).
> Xnis_ypset_flags=""		# Flags to ypset (if enabled).
> Xnis_server_enable=NO		# We're an NIS server (or NO)
> Xnis_server_flags=""		# Flags to ypserv (if enabled).
> Xnis_ypxfrd_enable=NO		# Run rpc.ypxfrd at boot time (or NO).
> Xnis_ypxfrd_flags=""		# Flags to rpc.ypxfrd (if enabled).
> Xnis_yppasswd_enable=NO		# Run rpc.yppasswd at boot time (or NO).
> Xnis_yppasswd_flags=""		# Flags to rpc.yppasswd (if enabled).
> X
> X### Network routing options: ###
> Xdefaultrouter=NO		# Set to default gateway (or NO).
> Xstatic_routes=""		# Set to static route list (or leave empty).
> Xgateway_enable=NO		# Set to YES if this host will be a gateway.
> Xrouter_enable=YES		# Set to YES to enable a routing daemon.
> Xrouter=routed			# Name of routing daemon to use if enabled.
> Xrouter_flags=-q			# Flags for routing daemon.
> Xmrouted_enable=NO		# Do multicast routing (see /etc/mrouted.conf)

mrouted_flags=""
This variable is already used in rc.network, but not mentioned here (yet).

> Xipxgateway_enable=NO		# Set to YES to enable IPX routing.
> Xipxrouted_enable=NO		# Set to YES to run the IPX routing daemon.
> Xipxrouted_flags=""		# Flags for IPX routing daemon.
> X
> X
> X##############################################################
> X###  System console options  #################################
> X##############################################################
> X
> Xkeymap=NO		# keymap in /usr/share/syscons/keymaps/* (or NO).
> Xkeyrate=NO		# Keyboard rate to: slow, normal, fast (or NO).
> Xkeychange=NO		# function keys default values (or NO).
> Xcursor=NO		# cursor type {normal|blink|destructive} (or NO).
> Xscrnmap=NO		# screen map in /usr/share/syscons/scrnmaps/* (or NO).
> Xfont8x16=NO		# font 8x16 from /usr/share/syscons/fonts/* (or NO).
> Xfont8x14=NO		# font 8x14 from /usr/share/syscons/fonts/* (or NO).
> Xfont8x8=NO		# font 8x8 from /usr/share/syscons/fonts/* (or NO).
> Xblanktime=NO		# blank time (in seconds) or "NO" to turn it off.
> Xsaver=NO		# screen saver desired: blank/green/snake/star/NO.

moused_enable="NO"
moused_flags="-p /dev/cuaa0 -t ps/2"

> Xmousedtype=NO		# See man page for rc.conf(8) for available settings.
> Xmousedport=/dev/cuaa0	# Set to your mouse port (required if mousetype set)
> Xmousedflags=""		# Any additional flags to moused.
Nope, nope, nope.  The last three lines are inconsistent.

> X
> X
> X##############################################################
> X###  Miscellaneous administrative options  ###################
> X##############################################################
> X
> Xlpd=YES			# Run the line printer daemon
Nope.

lpd_enable="YES"
lpd_flags=""


> Xsendmail_enable=YES	# Run the sendmail daemon (or NO).
> Xsendmail_flags="-bd -q30m" # -bd is pretty mandatory
> Xsavecore_enable=NO	# Save kernel crashdumps for debugging (or NO).

savecore_flags="/var/crash"

> Xdumpdev=NO		# Device name to crashdump to (if enabled).
> Xcheck_quotas=NO		# Check quotas (or NO).
> Xaccounting=NO		# Turn on process accounting (or NO).
> Xibcs2_enable=NO		# Ibcs2 (SCO) emulation loaded at startup (or NO).

This must be the only server without any possible flags, but I
think it's worth staying consistent:
ibcs2_flags=""

> Xlinux_aout_enable=NO	# Linux a.out emulation loaded at startup (or NO).
> Xrand_irqs="NO"		# Stir the entropy pool (or NO).
> END-of-rc.conf
> echo x - rc.network
> sed 's/^X//' >rc.network << 'END-of-rc.network'
> X#!/bin/sh -
> X#
> X#	$Id$
> X#	From: @(#)netstart	5.9 (Berkeley) 3/30/91
> X
> X# Note that almost all the user-configurable behavior is no longer in
> X# this file, but rather in /etc/rc.conf.  Please check that file
> X# first before contemplating any changes here.  If you do need to change
> X# this file for some reason, we would like to know about it.
> X
> X# First pass startup stuff.
[.....]

I definitely prefer the syntax

    if [ "${lpd_enable-YES}" = YES ]; then
        echo -n lpd; lpd $lpd_flags
    fi
    if [ "${ipxrouted_enable-NO} = YES ]; then
        echo -n ipxrouted; ipxrouted $ipxrouted_flags
    fi

It makes it clearer what's going on.  I don't think the difference
between "if var isn't NO" and "if var is YES" is good at all - you
have to double-take to figure out what's going on.

My $0.02.
-- 
Brian <brian@awfulhak.org>, <brian@freebsd.org>
      <http://www.awfulhak.org>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705012241.XAA13307>