0f33c9fb91
using make instead of custom scripts) and two floppies instead of one. The resultant floppy can do everything that the individual floppies (dial, net, install, isp, router) could do, modulo some bit rot that has occurred since PicoBSD last compiled. It also includes all the programs on the fixit floppy, which could thus also die. /bin currently contains the following files: -sh dump ln ns sps [ ed login ping stty badsect ex ls ps swapon cat expr mkdir pwd sync chgrp fdisk mknod pwd_mkdb sysctl chmod find more rdump syslogd chown fsck mount reboot tar chroot ftp mount_cd9660 restore telnet clri getty mount_msdos rlogin telnetd cp grep mount_nfs rm test date gunzip mount_std rmdir traceroute dd gzip msg route umount dev_mkdb hostname mt routed vi df ifconfig mv rrestore view dhclient inetd natd rsh vm dhclient-script init netstat sed w disklabel kget newfs sh zcat dmesg kill nfs sleep Structure is in place for using the same build for the other directories, but I'm no longer sure we need this. The current first floppy will run fine by itself, but the size of a compressed kernel has increased by nearly 50% since 3.2, and there's not much space for anything useful on the remainder of the floppy. The current method creates a larger mfs and can read as many floppies as the user can stand. The footprint appears to be round 14 MB.
80 lines
2.4 KiB
Bash
80 lines
2.4 KiB
Bash
#!/bin/sh -
|
|
# $FreeBSD$
|
|
network_pass1() {
|
|
echo -n 'Doing initial network setup:'
|
|
# Set the host name if it is not already set
|
|
if [ -z "`hostname -s`" ] ; then
|
|
hostname $hostname
|
|
echo ' hostname'
|
|
fi
|
|
# Set up all the network interfaces, calling startup scripts if needed
|
|
for ifn in ${network_interfaces}; do
|
|
if [ -e /etc/start_if.${ifn} ]; then
|
|
. /etc/start_if.${ifn}
|
|
fi
|
|
# Do the primary ifconfig if specified
|
|
eval ifconfig_args=\$ifconfig_${ifn}
|
|
if [ -n "${ifconfig_args}" ] ; then
|
|
ifconfig ${ifn} ${ifconfig_args}
|
|
fi
|
|
# Check to see if aliases need to be added
|
|
alias=0
|
|
while :
|
|
do
|
|
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
|
|
if [ -n "${ifconfig_args}" ]; then
|
|
ifconfig ${ifn} ${ifconfig_args} alias
|
|
alias=`expr ${alias} + 1`
|
|
else
|
|
break;
|
|
fi
|
|
done
|
|
ifconfig ${ifn}
|
|
done
|
|
# Load the filters if required
|
|
if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
|
|
"x$firewall_enable" = "xYES" ] ; then
|
|
. /etc/rc.firewall
|
|
echo "Firewall rules loaded."
|
|
else
|
|
echo "Warning: kernel has firewall functionality, but firewall rules weren't loaded."
|
|
echo " All ip services are ENABLED by default."
|
|
fi
|
|
# Configure routing
|
|
if [ "x$defaultrouter" != "xNO" ] ; then
|
|
static_routes="default ${static_routes}"
|
|
route_default="default ${defaultrouter}"
|
|
fi
|
|
# Set up any static routes. This should be done before router discovery.
|
|
if [ "x${static_routes}" != "x" ]; then
|
|
for i in ${static_routes}; do
|
|
eval route_args=\$route_${i}
|
|
route add ${route_args}
|
|
done
|
|
fi
|
|
echo -n 'Additional routing options:'
|
|
if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
|
|
echo -n ' tcp_extensions=NO'
|
|
sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
|
|
sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
|
|
fi
|
|
if [ "X$gateway_enable" = X"YES" ]; then
|
|
echo -n ' IP_gateway=YES'
|
|
sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
|
|
fi
|
|
if [ "X$arpproxy_all" = X"YES" ]; then
|
|
echo -n ' turning on ARP_PROXY_ALL: '
|
|
sysctl -w net.link.ether.inet.proxyall=1 2>&1
|
|
fi
|
|
echo '.'
|
|
network_pass1_done=YES # Let future generations know we made it.
|
|
}
|
|
|
|
network_pass2() {
|
|
network_pass2_done=YES
|
|
}
|
|
|
|
network_pass3() {
|
|
network_pass3_done=YES
|
|
}
|