Menu

[r8889]: / legacy / etc / rc.d / motd  Maximize  Restore  History

Download this file

27 lines (19 with data), 553 Bytes

#!/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
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.