diff options
author | luigi <luigi@FreeBSD.org> | 2002-03-09 18:27:02 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-03-09 18:27:02 +0000 |
commit | 2731e7d254920adf7f3097194cd2a70da6d4a974 (patch) | |
tree | 502f6ffb714d45bcbd150fb03adb46730c5215c1 /release/picobsd | |
parent | 0e4b6e5e8ffb4491cb9ce3bd3864c8b257932f6d (diff) | |
download | FreeBSD-src-2731e7d254920adf7f3097194cd2a70da6d4a974.zip FreeBSD-src-2731e7d254920adf7f3097194cd2a70da6d4a974.tar.gz |
Remove host.conf, and introduce a way to override the content
of selected files (at the moment /etc/host.conf and /etc/resolv.conf)
from /etc/rc.conf , so the number of places to customize is
reduced.
Diffstat (limited to 'release/picobsd')
-rw-r--r-- | release/picobsd/floppy.tree/etc/host.conf | 3 | ||||
-rw-r--r-- | release/picobsd/floppy.tree/etc/rc.conf.defaults | 9 | ||||
-rw-r--r-- | release/picobsd/floppy.tree/etc/rc1 | 10 |
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 7531124..0000000 --- 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 6cb1131..8b8bdf3 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 07051a9..a49e0b4 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 '' |