Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,6 +1,6 @@ -.include "mrc.conf" +.include "/etc/mrc.conf" .if defined(AUTOBOOT) SCRIPTS!=ls *.init *.service .else SCRIPTS!=ls *.service ADDED bootfs.init Index: bootfs.init ================================================================== --- /dev/null +++ bootfs.init @@ -0,0 +1,5 @@ +# vim:ft=make: + +bootfs: + : Checking whether we need /boot mounted. + mount -vadr | grep -q ' /boot$' && mount -r /boot || exit 0 ADDED hostname.init Index: hostname.init ================================================================== --- /dev/null +++ hostname.init @@ -0,0 +1,7 @@ +# vim:ft=make: + +HOSTNAME?=Amnesiac + +hostname: + : Setting hostname. + hostname ${HOSTNAME} Index: ifconfig.init ================================================================== --- ifconfig.init +++ ifconfig.init @@ -1,3 +1,10 @@ # vim:ft=make: -ifconfig: adjkerntz +IFCONFIG_IFACES?=lo0 +IFCONFIG_lo0?=inet 127.0.0.1/8 up + +ifconfig: adjkerntz wlans + : Starting interfaces. +.for iface in ${IFCONFIG_IFACES} + ifconfig ${IFCONFIG_${iface}} +.endfor ADDED kld.init Index: kld.init ================================================================== --- /dev/null +++ kld.init @@ -0,0 +1,6 @@ +# vim:ft=make: + +kld: bootfs +.if defined(KLD_LIST) + kldload -n ${KLD_LIST} +.endif Index: mrc.conf ================================================================== --- mrc.conf +++ mrc.conf @@ -1,1 +1,19 @@ # vim:ft=make: + +# random +# ENTROPY_FILE=/var/db/entropy/random +# ENTROPY_DIR=/var/db/entropy + +# hostname +# HOSTNAME=Amnesiac + +# ifconfig +# IFCONFIG_IFACES=lo0 +# IFCONFIG_lo0=inet 127.0.0.1/8 up + +# kld +# KLD_LIST=### ### ### + +# wlans +# WLANS_###=wlan# +# WLANS_wlan#_ARGS=ssid FreeWifi ADDED wlans.init Index: wlans.init ================================================================== --- /dev/null +++ wlans.init @@ -0,0 +1,12 @@ +# vim:ft=make: + +wlans: kld + : Configuring wlans. +.for dev in ${:!sysctl -n net.wlan.devices!} +.for wlan in ${WLANS_${dev}} +.if defined(${WLANS_${wlan}_ARGS}) + ifconfig ${wlan} wlandev ${dev} ${WLANS_${wlan}_ARGS} + ifconfig ${wlan} up +.endif +.endfor +.endfor