Comments (5)
The reason we use the Linux-standard hard-coded full paths is to avoid relying on $PATH, which could be missing or malformed or not include the route or ip commands.
Your suggestion roughly boils down to using PATH again, which is not what we want to do.
I would be willing to consider a patch that optionally used environment variables such as JACKPAL_GATEWAY_IP and JACKPAL_GATEWAY_ROUTE to let people override the default locations / program names.
from gateway.
👍 for some kind of solution to the hard coding.
Perhaps a good solution would be use the path, and if not found then use the hard coded? Or vice versa?
from gateway.
I've hit this problem too.
How about trying a hard coded list of paths? There are unlikely to be more than about 4 possibilities.
If this sounds okay, I'd be happy to make the change and submit a PR.
from gateway.
from gateway.
Gave up on hard coding the paths to ip and bin.
from gateway.
Related Issues (14)
- Update solaris and freebsd code to have full paths to their executables. HOT 2
- Please tag new release HOT 1
- Will not working on windows of non-Englisht language HOT 2
- Win32 API version HOT 7
- Please create a new (dot) release HOT 1
- DiscoverInterface not in go package HOT 2
- better BSD detection without calling external commands HOT 1
- Windows implementation doesn't consider multiple default GW with different MTUs
- Retrieving router on OSX no longer working
- v1.0.9 build error on linux HOT 1
- please tag and version this project HOT 3
- Panics on Windows when there is no default gateway
- tests now hang in limited debian chroot HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway.