[arch-projects] [netctl][PATCH] Add EnvironmentFile into the netctl at .service

Ivan Shapovalov intelfx100 at gmail.com
Tue Feb 3 04:34:17 UTC 2015

On 2015-02-01 at 11:48 +0000, Jiri Tyr wrote:
> This patch adds the ability to pass environment variables to the network
> script. This allows to enable debugging by adding the "NETCTL_DEBUG=yes" into
> the /etc/conf.d/netctl file.
> [...]

I think that this can be achieved (apart from using /etc/netctl/hooks)
more elegantly by using systemd drop-ins:

# cat > /etc/systemd/system/netctl at .service.d/env.conf <<EOF

# cat > /etc/systemd/system/netctl@$PROFILE.service.d/env.conf <<EOF

Or, one can use systemctl(1) to invoke an editor on the right file:

# systemctl edit netctl at .service
<type in the above lines>

# systemctl edit netctl@$PROFILE.service
<type in the above lines>

Or, in the latter case, one can also use systemctl(1) to set the
environment non-interactively:

# systemctl set-property netctl@$PROFILE.service Environment=...

Ivan Shapovalov / intelfx /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <https://lists.archlinux.org/pipermail/arch-projects/attachments/20150203/49cabfb5/attachment.asc>

More information about the arch-projects mailing list