diff options
-rw-r--r-- | doc/pies.texi | 4 | ||||
-rw-r--r-- | src/piesctl-cl.opt | 6 | ||||
-rw-r--r-- | src/piesctl.c | 2 | ||||
-rw-r--r-- | tests/env.at | 4 | ||||
-rw-r--r-- | tests/respawn.at | 2 | ||||
-rw-r--r-- | tests/shell.at | 2 | ||||
-rw-r--r-- | tests/shutdown.at | 4 | ||||
-rw-r--r-- | tests/startup.at | 4 |
8 files changed, 20 insertions, 8 deletions
diff --git a/doc/pies.texi b/doc/pies.texi index 1a798e1..b77a40c 100644 --- a/doc/pies.texi +++ b/doc/pies.texi | |||
@@ -3024,6 +3024,10 @@ purposes. | |||
3024 | @itemx --instance=@var{inst} | 3024 | @itemx --instance=@var{inst} |
3025 | Talk to @command{pies} instance @var{inst}. | 3025 | Talk to @command{pies} instance @var{inst}. |
3026 | 3026 | ||
3027 | @item --no-netc | ||
3028 | @itemx -N | ||
3029 | Don't read @file{~/.netrc} file. | ||
3030 | |||
3027 | @item -u @var{url} | 3031 | @item -u @var{url} |
3028 | @itemx --url=@var{url} | 3032 | @itemx --url=@var{url} |
3029 | Specifies the URL of the communication socket. @xref{piesctl url}, | 3033 | Specifies the URL of the communication socket. @xref{piesctl url}, |
diff --git a/src/piesctl-cl.opt b/src/piesctl-cl.opt index f7eaf2a..ebdfec4 100644 --- a/src/piesctl-cl.opt +++ b/src/piesctl-cl.opt | |||
@@ -69,6 +69,12 @@ BEGIN | |||
69 | } | 69 | } |
70 | END | 70 | END |
71 | 71 | ||
72 | OPTION(no-netrc,N,, | ||
73 | [<don't read ~/.netrc file>]) | ||
74 | BEGIN | ||
75 | no_netrc_option = 1; | ||
76 | END | ||
77 | |||
72 | GROUP(Preprocessor) | 78 | GROUP(Preprocessor) |
73 | 79 | ||
74 | OPTION(include-directory,I,DIR, | 80 | OPTION(include-directory,I,DIR, |
diff --git a/src/piesctl.c b/src/piesctl.c index 0cd2736..4c777d7 100644 --- a/src/piesctl.c +++ b/src/piesctl.c | |||
@@ -49,6 +49,7 @@ char const *instance = "pies"; | |||
49 | char *config_file; | 49 | char *config_file; |
50 | char default_config_file[] = SYSCONFDIR "/piesctl.conf"; | 50 | char default_config_file[] = SYSCONFDIR "/piesctl.conf"; |
51 | int preprocess_only; | 51 | int preprocess_only; |
52 | int no_netrc_option; | ||
52 | int verbose; | 53 | int verbose; |
53 | int dump; | 54 | int dump; |
54 | 55 | ||
@@ -543,6 +544,7 @@ shttp_connect (struct pies_url *url, struct grecs_sockaddr *source_addr) | |||
543 | if (pies_url_copy (&conn->url, url)) | 544 | if (pies_url_copy (&conn->url, url)) |
544 | grecs_alloc_die (); | 545 | grecs_alloc_die (); |
545 | 546 | ||
547 | if (!no_netrc_option) | ||
546 | netrc_scan (conn->url); | 548 | netrc_scan (conn->url); |
547 | 549 | ||
548 | return conn; | 550 | return conn; |
diff --git a/tests/env.at b/tests/env.at index c293c65..18b0e52 100644 --- a/tests/env.at +++ b/tests/env.at | |||
@@ -15,12 +15,12 @@ component envtest { | |||
15 | stdout file "$PWD/log"; | 15 | stdout file "$PWD/log"; |
16 | return-code 0 { | 16 | return-code 0 { |
17 | action disable; | 17 | action disable; |
18 | exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; | 18 | exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; |
19 | } | 19 | } |
20 | } | 20 | } |
21 | _EOT | 21 | _EOT |
22 | 22 | ||
23 | to 3 \ | 23 | to 5 \ |
24 | envtest -exec \ | 24 | envtest -exec \ |
25 | $abs_top_builddir/src/pies --foreground --stderr \ | 25 | $abs_top_builddir/src/pies --foreground --stderr \ |
26 | --config-file control.conf --config-file envtest.conf 2>errlog | 26 | --config-file control.conf --config-file envtest.conf 2>errlog |
diff --git a/tests/respawn.at b/tests/respawn.at index 0ba60dc..ab29f11 100644 --- a/tests/respawn.at +++ b/tests/respawn.at | |||
@@ -27,7 +27,7 @@ component test { | |||
27 | chdir $PWD; | 27 | chdir $PWD; |
28 | return-code 1 { | 28 | return-code 1 { |
29 | action disable; | 29 | action disable; |
30 | exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; | 30 | exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; |
31 | } | 31 | } |
32 | } | 32 | } |
33 | _EOT | 33 | _EOT |
diff --git a/tests/shell.at b/tests/shell.at index e3d104b..b459d02 100644 --- a/tests/shell.at +++ b/tests/shell.at | |||
@@ -29,7 +29,7 @@ component test { | |||
29 | chdir $PWD; | 29 | chdir $PWD; |
30 | return-code 1 { | 30 | return-code 1 { |
31 | action disable; | 31 | action disable; |
32 | exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; | 32 | exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; |
33 | } | 33 | } |
34 | } | 34 | } |
35 | _EOT | 35 | _EOT |
diff --git a/tests/shutdown.at b/tests/shutdown.at index 1c2a4ef..24a4504 100644 --- a/tests/shutdown.at +++ b/tests/shutdown.at | |||
@@ -29,7 +29,7 @@ component test { | |||
29 | chdir $PWD; | 29 | chdir $PWD; |
30 | return-code 1 { | 30 | return-code 1 { |
31 | action disable; | 31 | action disable; |
32 | exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; | 32 | exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; |
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
@@ -42,7 +42,7 @@ _EOT | |||
42 | set -e | 42 | set -e |
43 | to 5 \ | 43 | to 5 \ |
44 | pies --foreground --stderr \ | 44 | pies --foreground --stderr \ |
45 | --config-file control.conf --config-file pies.conf 2>errlog | 45 | --config-file control.conf --config-file pies.conf --debug 1 2>errlog |
46 | 46 | ||
47 | cat shutdown | 47 | cat shutdown |
48 | ], | 48 | ], |
diff --git a/tests/startup.at b/tests/startup.at index 22ad25b..b65f9f6 100644 --- a/tests/startup.at +++ b/tests/startup.at | |||
@@ -39,7 +39,7 @@ component test { | |||
39 | stderr file "log.err"; | 39 | stderr file "log.err"; |
40 | return-code * { | 40 | return-code * { |
41 | action disable; | 41 | action disable; |
42 | exec "piesctl --url unix:///$PWD/pies.ctl shutdown"; | 42 | exec "piesctl --url unix:///$PWD/pies.ctl --no-netrc shutdown"; |
43 | } | 43 | } |
44 | } | 44 | } |
45 | _EOT | 45 | _EOT |
@@ -47,7 +47,7 @@ _EOT | |||
47 | set -e | 47 | set -e |
48 | to 5 \ | 48 | to 5 \ |
49 | pies --foreground --stderr \ | 49 | pies --foreground --stderr \ |
50 | --config-file control.conf --config-file pies.conf 2>errlog | 50 | --config-file control.conf --config-file pies.conf --debug 1 2>errlog |
51 | 51 | ||
52 | cat log.out | 52 | cat log.out |
53 | cat log.err >&2 | 53 | cat log.err >&2 |