diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
| commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
| tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch | |
| parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
| download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz | |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch')
| -rw-r--r-- | meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch b/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch new file mode 100644 index 0000000000..c22d8cc085 --- /dev/null +++ b/meta/packages/ppp/ppp-2.4.3/pppd-resolv-varrun.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
| 4 | # | ||
| 5 | |||
| 6 | --- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch | ||
| 7 | +++ ppp-2.4.3/pppd/ipcp.c | ||
| 8 | @@ -55,6 +55,8 @@ | ||
| 9 | #include <sys/socket.h> | ||
| 10 | #include <netinet/in.h> | ||
| 11 | #include <arpa/inet.h> | ||
| 12 | +#include <sys/stat.h> | ||
| 13 | +#include <unistd.h> | ||
| 14 | |||
| 15 | #include "pppd.h" | ||
| 16 | #include "fsm.h" | ||
| 17 | @@ -2032,6 +2034,14 @@ | ||
| 18 | u_int32_t peerdns1, peerdns2; | ||
| 19 | { | ||
| 20 | FILE *f; | ||
| 21 | + struct stat dirinfo; | ||
| 22 | + | ||
| 23 | + if(stat(_PATH_OUTDIR, &dirinfo)) { | ||
| 24 | + if(mkdir(_PATH_OUTDIR, 0775)) { | ||
| 25 | + error("Failed to create directory %s: %m", _PATH_OUTDIR); | ||
| 26 | + return; | ||
| 27 | + } | ||
| 28 | + } | ||
| 29 | |||
| 30 | f = fopen(_PATH_RESOLV, "w"); | ||
| 31 | if (f == NULL) { | ||
| 32 | --- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch | ||
| 33 | +++ ppp-2.4.3/pppd/pathnames.h | ||
| 34 | @@ -29,7 +29,8 @@ | ||
| 35 | #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." | ||
| 36 | #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" | ||
| 37 | #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" | ||
| 38 | -#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" | ||
| 39 | +#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp" | ||
| 40 | +#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf" | ||
| 41 | |||
| 42 | #define _PATH_USEROPT ".ppprc" | ||
| 43 | #define _PATH_PSEUDONYM ".ppp_pseudonym" | ||
