summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2002-03-09 18:27:02 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2002-03-09 18:27:02 +0000
commit4814d31422aa559d9504149ab1b97db428ac1352 (patch)
tree502f6ffb714d45bcbd150fb03adb46730c5215c1
parent1145fadb26333d3f6352fad59c127b5f51080604 (diff)
Notes
-rw-r--r--release/picobsd/floppy.tree/etc/host.conf3
-rw-r--r--release/picobsd/floppy.tree/etc/rc.conf.defaults9
-rw-r--r--release/picobsd/floppy.tree/etc/rc110
3 files changed, 16 insertions, 6 deletions
diff --git a/release/picobsd/floppy.tree/etc/host.conf b/release/picobsd/floppy.tree/etc/host.conf
deleted file mode 100644
index 753112455a69..000000000000
--- a/release/picobsd/floppy.tree/etc/host.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# $FreeBSD$
-hosts
-bind
diff --git a/release/picobsd/floppy.tree/etc/rc.conf.defaults b/release/picobsd/floppy.tree/etc/rc.conf.defaults
index 6cb11310008c..8b8bdf3f0e96 100644
--- a/release/picobsd/floppy.tree/etc/rc.conf.defaults
+++ b/release/picobsd/floppy.tree/etc/rc.conf.defaults
@@ -31,11 +31,18 @@ gateway_enable="NO" # Set to YES if this host will be a gateway.
arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
default_mask="0xffffff00"
-# Other network features
+### Other network features
firewall_enable="NO"
firewall_quiet="NO" # be quiet if set.
firewall_type="" # Standard types or absolute pathname.
tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+
+### Overrides for some files in /etc. Leave empty if no override,
+### set variable (remember to use multiple lines) to override content.
+
+host_conf="hosts
+bind"
+resolv_conf=""
}
# Try to identify the system by using the MAC address and name of the
diff --git a/release/picobsd/floppy.tree/etc/rc1 b/release/picobsd/floppy.tree/etc/rc1
index 07051a9cb383..a49e0b4d5078 100644
--- a/release/picobsd/floppy.tree/etc/rc1
+++ b/release/picobsd/floppy.tree/etc/rc1
@@ -2,8 +2,6 @@
# $FreeBSD$
### rc1, next stage 'rc' for PicoBSD -- THIS IS NOT THE NORMAL /etc/rc
-pwd_mkdb -p ./master.passwd
-
. /etc/rc.conf.defaults # Load default procedures
rc_conf_set_defaults # Assign default values to variables.
find_system_id # Set $main_eth $main_if
@@ -16,6 +14,13 @@ set_all_interfaces # Set ${ifconfig_${if}} for other interfaces.
[ -f /etc/rc.conf ] && . /etc/rc.conf
[ -f /etc/rc.conf.local ] && . /etc/rc.conf.local
+### Now use some variables to override files in /etc ###
+( IFS=''
+[ -n ${host_conf} ] && echo ${host_conf} > /etc/host.conf
+[ -n ${resolv_conf} ] && echo ${resolv_conf} > /etc/resolv.conf
+unset IFS
+)
+
rm -f /var/run/*
if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
echo "Adding $swapfile as additional swap."
@@ -45,6 +50,7 @@ chmod 666 /dev/tty[pqrsPQRS]*
[ "${sshd_enable}" = "YES" -a -f /stand/sshd ] && \
{ echo "Starting sshd..." ; sshd -f /etc/sshd_config ; }
+pwd_mkdb -p ./master.passwd
dev_mkdb
echo ''