diff options
author | Benjamin Drung <benjamin.drung@profitbricks.com> | 2016-11-08 20:31:00 +0300 |
---|---|---|
committer | Benjamin Drung <benjamin.drung@profitbricks.com> | 2016-11-08 20:31:00 +0300 |
commit | b47fd57c1a4d9d52b553cc0be13be9fcc64943fc (patch) | |
tree | 806cf52cb9e06816b1bab5bbcf0ab2ec0e30112c | |
parent | ca24918f57c53f128741398a5255d6aa6c95ca34 (diff) |
Just test that config file is readable
Test that the config file is readable (ie. "-e") before dying, not
strictly a file ("-f").
This allows one to more-easily generate dynamic configuration files
and pass them via `apt-mirror /dev/stdin` rather than having to create
temporary files.
Closes: #824493
-rwxr-xr-x | apt-mirror | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -135,7 +135,7 @@ my %clean_directory = (); $config_file = "/etc/apt/mirror.list"; # Default value if ( $_ = shift ) { - die("apt-mirror: invalid config file specified") unless -f $_; + die("apt-mirror: invalid config file specified") unless -e $_; $config_file = $_; } |