motd update

Robert Garrett rg70 at sbcglobal.net
Mon Feb 2 18:26:24 PST 2004


onflybsd.org> <401ecf9d$0$183$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <401ee202$0$181$415eb37d at xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-Agent: KNode/0.7.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 50
NNTP-Posting-Host: 64.217.143.154
X-Trace: 1075775195 crater_reader.dragonflybsd.org 181 64.217.143.154
Xref: crater_reader.dragonflybsd.org dragonfly.submit:691

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







More information about the Submit mailing list