View | Details | Raw Unified | Return to bug 13005
Collapse All | Expand All

(-)rc (-7 / +10 lines)
Lines 400-412 Link Here
400
fi
400
fi
401
401
402
if [ "X${update_motd}" != X"NO" ]; then
402
if [ "X${update_motd}" != X"NO" ]; then
403
	T=/tmp/_motd
403
	T=`mktemp -q /tmp/_motd.XXXXXX`
404
	rm -rf $T
404
	if [ $? -eq 0 ]; then
405
	uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > $T
405
		uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' >> $T
406
	awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
406
		awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> $T
407
	cp $T /etc/motd
407
		cp $T /etc/motd
408
	chmod 644 /etc/motd
408
		chmod 644 /etc/motd
409
	rm -rf $T
409
		rm -rf $T
410
	else
411
		echo "Could not create temporary file $T for motd update!"
412
	fi
410
fi
413
fi
411
414
412
# Run rc.devfs if present to customify devfs
415
# Run rc.devfs if present to customify devfs

Return to bug 13005