SUMMARY: Re: routed error at boot (fwd)

From: Tom Linden <tom_at_kednos.com>
Date: Wed, 27 Jan 1999 12:41:03 -0800 (PST)

As John had suggested, there was a null line after the one line entry.
Removing this line resolved the problem.

However, in my view, either the script or route should have rejected the
line.

Thanks for the help


Tom Linden Support of PL/I for VMS, Open VMS and
Kednos Corporation Digital Unix.
tel 650 949 1249

---------- Forwarded message ----------
Date: Wed, 27 Jan 1999 15:26:25 -0500
From: John Francini <francini_at_nashua.progress.com>
To: Tom Linden <tom_at_kednos.com>
Subject: Re: routed error at boot

Make sure there are no blank lines after the first line's newline. I was able
to reproduce your problem by inserting a single extra newline at the end of the
/etc/routes file. You see, the code to add the contents of /etc/routes looks
like this in /sbin/rc3.d/S12route:


               if [ -f /etc/routes ]; then
                        cat /etc/routes | while read line
                        do
                                /usr/sbin/route add $line
                        done
                fi

So the while loop ends up executing the line

                /usr/sbin/route add default 198.68.96.1

which succeeds. Since the routes file is not at EOF, the while loop then reads
the next line from the file (since there's an extra newline), and trying to
execute the line

                /usr/sbin/route add

which fails (of course).


Hope this helps,

John Francini

-- 
John Francini, francini_at_progress.com
+---------------------------------------------------------------------------+
| "I have come to the conclusion that one useless man is called a disgrace; |
|  that two or more are called a law firm; and that three or more become    |
|  a Congress.  And by God I have had _this_ Congress!"                     |
|                                                    -- John Adams in "1776"|
+---------------------------------------------------------------------------+
Received on Wed Jan 27 1999 - 20:41:05 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT