Page MenuHomeFreeBSD

D20701.id58803.diff
No OneTemporary

D20701.id58803.diff

Index: libexec/rc/rc.d/motd
===================================================================
--- libexec/rc/rc.d/motd
+++ libexec/rc/rc.d/motd
@@ -37,11 +37,14 @@
uname -v | sed -e 's,^\([^#]*\) #\(.* [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T}
awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print "\n"$0}} else {print}}' < /etc/motd >> ${T}
- cmp -s $T /etc/motd || {
- cp $T /etc/motd
+ if ! cmp -s $T /etc/motd; then
+ fsync $T
+ mv $T /etc/motd
chmod ${PERMS} /etc/motd
- }
- rm -f $T
+ fsync /etc
+ else
+ rm -f $T
+ fi
check_startmsgs && echo '.'
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 11, 8:42 AM (8 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31280032
Default Alt Text
D20701.id58803.diff (598 B)

Event Timeline