summaryrefslogtreecommitdiffstats
path: root/release/picobsd/floppy.tree/etc/rc1
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-03-09 18:27:02 +0000
committerluigi <luigi@FreeBSD.org>2002-03-09 18:27:02 +0000
commit2731e7d254920adf7f3097194cd2a70da6d4a974 (patch)
tree502f6ffb714d45bcbd150fb03adb46730c5215c1 /release/picobsd/floppy.tree/etc/rc1
parent0e4b6e5e8ffb4491cb9ce3bd3864c8b257932f6d (diff)
downloadFreeBSD-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/floppy.tree/etc/rc1')
-rw-r--r--release/picobsd/floppy.tree/etc/rc110
1 files changed, 8 insertions, 2 deletions
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 ''
OpenPOWER on IntegriCloud