Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151736534
D20701.id58803.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
598 B
Referenced Files
None
Subscribers
None
D20701.id58803.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20701: rc.d/motd: Update motd more robustly
Attached
Detach File
Event Timeline
Log In to Comment