FreeBSD Bugzilla – Attachment 5441 Details for
Bug 13005
make rc use mktemp for temporary motd file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 858 bytes, created by
nbm
on 1999-08-06 21:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
nbm
Created:
1999-08-06 21:20:00 UTC
Size:
858 bytes
patch
obsolete
>--- rc.orig Fri Aug 6 19:15:16 1999 >+++ rc Fri Aug 6 22:02:34 1999 >@@ -400,13 +400,16 @@ > fi > > if [ "X${update_motd}" != X"NO" ]; then >- T=/tmp/_motd >- rm -rf $T >- 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 >- cp $T /etc/motd >- chmod 644 /etc/motd >- rm -rf $T >+ T=`mktemp -q /tmp/_motd.XXXXXX` >+ if [ $? -eq 0 ]; then >+ 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 >+ cp $T /etc/motd >+ chmod 644 /etc/motd >+ rm -rf $T >+ else >+ echo "Could not create temporary file $T for motd update!" >+ fi > fi > > # Run rc.devfs if present to customify devfs
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13005
: 5441