[misc/183407] Routing restart returns non-zero exitcode

From: Abhishek [ABK] Kumar <abhikumar163_at_gmail.com>
Date: Tue, 29 Oct 2013 23:53:39 +0530
misc/183407: Routing restart returns non-zero exitcode in case of no extra
routing parameter or missing atm/ipx


*Environment*
FreeBSD h4ck3r.freebsd.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu
Sep 26 22:50:31 UTC 2013 root_at_bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC
amd64


*Description*
Current "/etc/rc.d/routing" script is as such it returns non-zero exitcode
on restart in very common cases.

There are 2 issues in total...

Issue#1. It unsets a var and only in case any additional routing options of
the provided communication channel (inet, inet6, atm, ipx) is to be turned
on, it gets set. It fails for us as we don't have any extra routing
options. For now I've patched it not to fail in case of no additional
routing options.
Do check if any additional routing option is required or not.

Issue#2. There is also error in default case of routing start, where it
tries to setroute for all (inet, inet6, atm, ipx) modes. Before that it
checks if it's present or not and fails for atm and ipx not being present.

Since script is resilient enough, the required configuration gets applied.
But the exitcode is erroneous which fails our configuration management
tools by making them think the run failed itself.

*How-To-Repeat*
Shall happend for any install. But to be sure install it on a Virtualbox or
any virtualization platform (have myself tried it on Xen and VirtualBox).

Perform
`/etc/rc.d/routing restart ; echo $?`

This will show a non-zero exitcode for routing service restart action.

*Fix:* attached patch file

http://www.freebsd.org/cgi/query-pr.cgi?pr=183407


~ Regards,
Abhishek Kumar
http://twitter.com/abionic
http://github.com/abhishekkr
http://abhishekkr.wordpress.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~=ABK=~

Received on Tue Oct 29 2013 - 17:24:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:43 UTC