diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch')
-rw-r--r-- | recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch b/recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch new file mode 100644 index 0000000000..c22d8cc085 --- /dev/null +++ b/recipes/ppp/ppp-2.4.3/pppd-resolv-varrun.patch @@ -0,0 +1,43 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- ppp-2.4.3/pppd/ipcp.c~pppd-resolv-varrun.patch ++++ ppp-2.4.3/pppd/ipcp.c +@@ -55,6 +55,8 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> ++#include <sys/stat.h> ++#include <unistd.h> + + #include "pppd.h" + #include "fsm.h" +@@ -2032,6 +2034,14 @@ + u_int32_t peerdns1, peerdns2; + { + FILE *f; ++ struct stat dirinfo; ++ ++ if(stat(_PATH_OUTDIR, &dirinfo)) { ++ if(mkdir(_PATH_OUTDIR, 0775)) { ++ error("Failed to create directory %s: %m", _PATH_OUTDIR); ++ return; ++ } ++ } + + f = fopen(_PATH_RESOLV, "w"); + if (f == NULL) { +--- ppp-2.4.3/pppd/pathnames.h~pppd-resolv-varrun.patch ++++ ppp-2.4.3/pppd/pathnames.h +@@ -29,7 +29,8 @@ + #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." + #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" + #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" +-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" ++#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp" ++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" |