mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
netns: fix error msg when starting netns
Previously, the failing initial `netns delete` resulted in a "Cannot remove namespace file ..." error visible in the journal and status output.
This commit is contained in:
parent
67068afd6b
commit
25639cec42
@ -151,6 +151,7 @@ in {
|
||||
requiredBy = bindsTo;
|
||||
before = bindsTo;
|
||||
script = ''
|
||||
${ip} netns delete ${netnsName} 2> /dev/null || true
|
||||
${ip} netns add ${netnsName}
|
||||
${ipNetns} link set lo up
|
||||
${ip} link add ${veth} type veth peer name ${peer}
|
||||
@ -179,7 +180,6 @@ in {
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
ExecStartPre = "-${ip} netns delete ${netnsName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user