strongswan module: make it work with ipsec l2tp
l2tp saves its secrets into /etc/ipsec.d but strongswan would not read them. l2tp checks for /etc/ipsec.secrets includes /etc/ipsec.d and if not tries to write into it. Solution: Have the strongswan module create /etc/ipsec.d and /etc/ipsec.secrets when networkmanager_l2tp is installed. Include /etc/ipsec.secrets in /nix/store/hash-strongswan/etc/ipsec.secrets so that it can find l2tp secrets. Also when the ppp 'nopeerdns' option is used, the DNS resolver tries to write into an alternate file /etc/ppp/resolv.conf. This fails when /etc/ppp does not exist so the module creates it by default.
This commit is contained in:
@@ -76,6 +76,11 @@ stdenv.mkDerivation rec {
|
||||
"--enable-sqlite" ]
|
||||
++ optional enableNetworkManager "--enable-nm";
|
||||
|
||||
postInstall = ''
|
||||
# this is needed for l2tp
|
||||
echo "include /etc/ipsec.secrets" >> $out/etc/ipsec.secrets
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = "-lgcc_s" ;
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user