DragonFly BSD
DragonFly submit List (threaded) for 2004-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: motd update


From: Dylan Reinhold <dylan@xxxxxxxxxxxxxxxx>
Date: Mon, 02 Feb 2004 19:21:40 -0800

onflybsd.org> <401ecf9d$0$183$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <401ee202$0$181$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <401f06da$0$181$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <401f06da$0$181$415eb37d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 64
Message-ID: <401f1387$0$182$415eb37d@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




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]