FreeNAS Code
This project has moved to github - see https://github.com/freenas
Brought to you by:
cochard,
mattolander
#!/bin/sh # Copyright (c) 2008-2009 Volker Theile (votdev@gmx.de) # All rights reserved. # PROVIDE: motd # REQUIRE: mountcritremote # BEFORE: LOGIN . /etc/rc.subr . /etc/configxml.subr name="motd" load_rc_config "$name" # Defaults motd_config=${motd_config:-"/etc/motd"} echo "Generating message of the day." # Create the /etc/motd file /usr/local/bin/xml sel -t \ -v //system/motd \ ${configxml_file} | /usr/local/bin/xml unesc > ${motd_config}.tmp /usr/bin/uudecode -m -p -r ${motd_config}.tmp > ${motd_config} /bin/rm -f ${motd_config}.tmp