Commit 326bb465 authored by Mike Hibler's avatar Mike Hibler
Browse files

FreeBSD 5 specific versions for files for boot CD

parent 98fb3494
# PROVIDE: cdroot
# BEFORE: disks
# KEYWORD: FreeBSD
#
# rc.cdroot
# Inspired by FreeBSD 4.x rc.cdroot and FreesBIE cdboot for 5.x
#
hier=/usr/local/bin/hier
if [ ! -x $hier ]; then
hier=/usr/site/bin/hier
if [ ! -x $hier ]; then
echo "no hier: dropping into /bin/sh"
/bin/sh
fi
fi
# 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
}
mkmfs() {
FS=$1
FSSIZE=$2
DOFSCOPY=$3
if [ $DOFSCOPY -eq 1 ]; then
$hier cp $FS /tmp/$FS
chkerr $? "${FS}: hier save"
fi
echo "Generating ${FS} via md"
MDDEVICE=`/sbin/mdconfig -a -t malloc -s ${FSSIZE}m`
/sbin/newfs -i 1024 /dev/${MDDEVICE} > /dev/null
chkerr $? "${FS}: newfs"
/sbin/mount /dev/${MDDEVICE} ${FS}
chkerr $? "${FS}: mount"
if [ $DOFSCOPY -eq 1 ]; then
$hier mv /tmp/$FS $FS
chkerr $? "${FS}: hier restore"
fi
}
mkmfs /tmp 4 0
mkmfs /etc 4 1
mkmfs /var 4 1
mkmfs /proj 1 0
mkmfs /users 1 0
mkmfs /groups 1 0
exit 0
# Device Mountpoint FStype Options Dump Pass#
/dev/acd0 / cd9660 ro 0 0
proc /proc procfs rw 0 0
userconfig_script_load="YES"
autoboot_delay="0"
console="comconsole"
beastie_disable="YES"
# wireless interfaces
if_ath_load="YES"
sendmail_enable="NONE"
sshd_enable="YES"
nfs_client_enable="YES"
usbd_enable="NO"
ntpd_enable="NO"
ntpdate_enable="YES"
ntpdate_flags="-b boss.emulab.net"
syslogd_enable="YES"
inetd_enable="NO"
cron_enable="NO"
ldconfig_paths="/usr/local/lib"
ldconfig_paths_aout=""
blanktime="NO"
update_motd="NO"
rc_info="YES"
#
# FreeBSD has no way to say "DHCP on all available interfaces" without
# spelling out here what all those interfaces are. So here we just say
# to (statically) configure the loopback device. The real network
# interfaces are identified in rc.conf.d/dhclient for use by the
# rc.d/dhclient script.
#
network_interfaces="lo0"
# For CD
root_rw_mount="NO"
background_fsck="NO"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment