From nobody@FreeBSD.ORG Fri Jul  2 14:55:16 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 6F4B114C42; Fri,  2 Jul 1999 14:55:16 -0700 (PDT)
Message-Id: <19990702215516.6F4B114C42@hub.freebsd.org>
Date: Fri,  2 Jul 1999 14:55:16 -0700 (PDT)
From: larse@isi.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: /sbin/route exits with 0 on some errors
X-Send-Pr-Version: www-1.0

>Number:         12489
>Category:       bin
>Synopsis:       /sbin/route exits with 0 on some errors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul  2 15:00:01 PDT 1999
>Closed-Date:    Thu Jun 7 06:43:23 PDT 2001
>Last-Modified:  Thu Jun 07 06:52:31 PDT 2001
>Originator:     Lars Eggert
>Release:        3.1-RELEASE
>Organization:
USC/ISI
>Environment:
FreeBSD tan-e.isi.edu 3.1-RELEASE FreeBSD 3.1-RELEASE #2: Wed Jun 30 13:03:07 PDT 1999     larse@tan-e.isi.edu:/usr/src/sys/compile/XBONE-KAME-063099  i386

>Description:
route returns 0, even when exiting with an error.
This makes it difficult to use it in scripts.
>How-To-Repeat:
tan-e# route add 10.10.10.10 -interface lo0
add host 10.10.10.10: gateway lo0
tan-e# route add 10.10.10.10 -interface lo0
route: writing to routing socket: File exists
add host 10.10.10.10: gateway lo0: File exists
tan-e# echo $status
0

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu Jun 7 06:43:23 PDT 2001 
State-Changed-Why:  
Fixed in route.c,v 1.45 and documented in route.8,v 1.23. 
(The route(8) utility now exits 1 if an error occurs.) 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Jun 7 06:43:23 PDT 2001 
Responsible-Changed-Why:  
The fixes were mine. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12489 
>Unformatted:
