diff options
author | Rob Austein <sra@hactrn.net> | 2013-02-02 19:02:11 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-02-02 19:02:11 +0000 |
commit | 6ef867d68cc340f7322e9ae5d29af55900dca69f (patch) | |
tree | 65277f8a8ff244f36a727206ab71aff53c2beed3 /rtr-origin | |
parent | 7561cc5559dc90a666dc974519d3ae6513d00bbd (diff) |
Wire installed location of scan_roas into installed rtr-origin, so
that we can stop fighting with FreeBSD's odd habit of installing
packaged software in /usr/local/bin while excluding /usr/local/bin
from the default $PATH in system cron jobs and shell scripts.
svn path=/branches/tk377/; revision=5013
Diffstat (limited to 'rtr-origin')
-rw-r--r-- | rtr-origin/Makefile.in | 6 | ||||
-rwxr-xr-x | rtr-origin/rtr-origin.py | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/rtr-origin/Makefile.in b/rtr-origin/Makefile.in index 8a50e528..39bd1994 100644 --- a/rtr-origin/Makefile.in +++ b/rtr-origin/Makefile.in @@ -39,9 +39,9 @@ distclean: clean rm -f Makefile ${BIN} : ${SRC} - echo >$@ '#!${PYTHON}' - cat >>$@ ${SRC} - chmod a+x ${BIN} + AC_PYTHON_INTERPRETER='${PYTHON}' AC_SCAN_ROAS='${bindir}/scan_roas' \ + ${PYTHON} ${abs_top_srcdir}/buildtools/make-rcynic-script.py <${SRC} >$@ + chmod a+x $@ test: @true diff --git a/rtr-origin/rtr-origin.py b/rtr-origin/rtr-origin.py index 95bef50e..70a0bb1d 100755 --- a/rtr-origin/rtr-origin.py +++ b/rtr-origin/rtr-origin.py @@ -9,7 +9,7 @@ # # $Id$ # -# Copyright (C) 2009-2012 Internet Systems Consortium ("ISC") +# Copyright (C) 2009-2013 Internet Systems Consortium ("ISC") # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -1805,9 +1805,15 @@ def bgpdump_server_main(argv): except KeyboardInterrupt: sys.exit(0) - -scan_roas = os.path.normpath(os.path.join(sys.path[0], "..", "utils", - "scan_roas", "scan_roas")) +# Figure out where the scan_roas utility program is today +try: + # Set from autoconf + scan_roas = ac_scan_roas +except NameError: + # Source directory + scan_roas = os.path.normpath(os.path.join(sys.path[0], "..", "utils", + "scan_roas", "scan_roas")) +# If that didn't work, use $PATH and hope for the best if not os.path.exists(scan_roas): scan_roas = "scan_roas" |