Jon LaBadie <[email protected]> (Di 11 Jul 2017 22:28:56 CEST): > On Tue, Jul 11, 2017 at 03:36:48PM +0200, Heiko Schlittermann wrote: > > Jon LaBadie <[email protected]> (Di 11 Jul 2017 15:27:47 CEST): > > > > > BTW the dash after ENVIRONMENT_FILE= is a typo? > > > Or some systemd syntax. > > > > No, in is just a "conditional", if the file does not exist, it is not > > treated as an error (as it would be without the dash). > > > With your normal accuracy I thought it might be some special syntax.
Sorry, probably I'm misinterpreting you…
It *is* special syntax for systemd's EnvironmentFile option.
EnvironmentFile=/etc/default/amanda
*requires* the file to exist. But
EnvironmentFile=-/etc/default/amanda
silently ignores the non-existing file (resulting in unset variables,
probably)
> > And, the Amanda Version I use (3.3.9) doesn't work with
> > ListenStream=10080
> > As the socket is an "combined" ipv4/ipv6 socket and probaby the client
> > doesn't use the proper function calls to get the peer address.
> > ListenStream=0.0.0.0:10080
> > solved this for me. One should investigate it a bit more probably.
>
> On these systems the null address is not needed.
> Perhaps because I've done nothing with IPv6.
I wrote a short Perl script to find the peers address on two of my systems
(both Debian9, using systemd 232) and put in there in place of amandad.
(Because with ListenStream=10080 amandad complained about the peer
address being 0.0.0.0, which is nonsens.)
#!/usr/bin/perl
use 5.24.1;
use strict;
use warnings;
use IO::Socket::INET;
use IO::Socket::INET6;
$| = 1;
eval { say 'v6: ', IO::Socket::INET6->new_from_fd(0, 'r+')->peerhost };
say "error: $@" if $@;
eval { say 'v4: ', IO::Socket::INET->new_from_fd(0, 'r+')->peerhost };
say "error: $@" if $@;
With ListenStream=<PORT> I get an eval error for the INET socket. With
ListenStream=0.0.0.0:<PORT> I get the peers IPv4 address in both cases
(IO::Socket::INET6 internally uses functions for both address families,
wheras IO::Socket::INET only expects AF_INET (ant not AF_INET6). I
think(!), amdand does about the same.
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -
! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -
signature.asc
Description: PGP signature
