pptp-linux-1.7.2-ip-path.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 00b9e2615191439a6c7db960d169129479ac633b Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Thu, 21 Oct 2010 11:01:25 -0300
  4. Subject: [PATCH] The ip tool is in /sbin rather that /bin, fix it
  5. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  6. ---
  7. routing.c | 6 +++---
  8. 1 files changed, 3 insertions(+), 3 deletions(-)
  9. diff --git a/routing.c b/routing.c
  10. index ab20a03..7fb4277 100644
  11. --- a/routing.c
  12. +++ b/routing.c
  13. @@ -55,7 +55,7 @@ regardless (not yet implemented).
  14. void routing_init(char *ip) {
  15. char buf[256];
  16. - snprintf(buf, 255, "/bin/ip route get %s", ip);
  17. + snprintf(buf, 255, "/sbin/ip route get %s", ip);
  18. FILE *p = popen(buf, "r");
  19. fgets(buf, 255, p);
  20. /* TODO: check for failure of fgets */
  21. @@ -66,14 +66,14 @@ void routing_init(char *ip) {
  22. void routing_start() {
  23. char buf[256];
  24. - snprintf(buf, 255, "/bin/ip route replace %s", route);
  25. + snprintf(buf, 255, "/sbin/ip route replace %s", route);
  26. FILE *p = popen(buf, "r");
  27. pclose(p);
  28. }
  29. void routing_end() {
  30. char buf[256];
  31. - snprintf(buf, 255, "/bin/ip route delete %s", route);
  32. + snprintf(buf, 255, "/sbin/ip route delete %s", route);
  33. FILE *p = popen(buf, "r");
  34. pclose(p);
  35. }
  36. --
  37. 1.7.2.2