motd update
Dylan Reinhold
dylan at ocnetworking.com
Mon Feb 2 19:21:40 PST 2004
onflybsd.org> <401ecf9d$0$183$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <401ee202$0$181$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <401f06da$0$181$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <401f06da$0$181$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 64
Message-ID: <401f1387$0$182$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
NNTP-Posting-Host: 68.4.231.87
X-Trace: 1075778439 crater_reader.dragonflybsd.org 182 68.4.231.87
Xref: crater_reader.dragonflybsd.org dragonfly.submit:692
Robert Garrett wrote:
> Dylan Reinhold wrote:
>
>
>>Robert Garrett wrote:
>>
>>
>>>Dylan Reinhold wrote:
>>>
>>>
>>>
>>>>>committed
>>>>
>>>>Robert the diff did not apply properly, the current file in cvs is
>>>>broken... Do you want me to send you another diff on the broken version?
>>>>
>>>>Thanks,
>>>>Dylan
>>>
>>>yes
>>
>>Ok here is a diff from the version in cvs to the working one..
>>
>>Dylan
>
>
>
> Dylan,
> if [ ! -f /etc/motd ]; then
> install -c -o root -g wheel -m ${PERMS} /dev/null /etc/motd
> fi
> T1='mktemp -t motd'
> awk 'NR == 1{if ($1 == "DragonFly") {print} else {exit 1}}' <
> /etc/motd > $t1 && {
>
> T2=`mktemp -t motd`
> uname -v | sed -e 's,^\([^#]*\) #\(.*
> [1-2][0-9][0-9][0-9]\).*/\([^\]*\) $,\1 (\3) #\2,' > ${T2}
> cmp -s $T1 $T2 || {
> awk '{if (NR == 1) {next} else {print}}' < /etc/motd
>
>>>${T2}
>
> cp $T2 /etc/motd
> chmod ${PERMS} /etc/motd
> rm -f $T2
> }
> }
> rm -f $T1
> }
>
> did I miss anything ?
>
> rob
>
>
Sorry Robert,
I did a cut and paste and the tabs became spaces...
The working diff is here....
http://dragonfly.ocnetworking.com/diffs/motd.diff
Thanks for you time....
Dylan
More information about the Submit
mailing list