I've been playing with nanobsd for the last couple weeks. I thought it would be useful to share some of the custom functions I came up with.
First up, this one adjusts the serial console, ttyu0, to use the vt100 terminal type. This ensures that things like vi work properly on the serial console:
Second up, this one adjusts /etc/syslog.conf so that console output is directed to /var/log/console.log:
Hope this helps some people out. Feel free to share any functions you may have.
First up, this one adjusts the serial console, ttyu0, to use the vt100 terminal type. This ensures that things like vi work properly on the serial console:
Code:
cust_settermtype () (
# set vt100 term type on console
sed -i "" -e /tty[du]0/s/dialup/vt100/ ${NANO_WORLDDIR}/etc/ttys
)
customize_cmd cust_comconsole
Second up, this one adjusts /etc/syslog.conf so that console output is directed to /var/log/console.log:
Code:
cust_syslog() (
sed -i "" -e /#console.info/s/#// ${NANO_WORLDDIR}/etc/syslog.conf
touch ${NANO_WORLDDIR}/var/log/console.log
chmod 644 ${NANO_WORLDDIR}/var/log/console.log
)
customize_cmd cust_syslog
Hope this helps some people out. Feel free to share any functions you may have.