fix(systemd): remove any existing unit when calling mask

This commit is contained in:
Jonathan Boulle
2014-05-21 11:03:52 -07:00
parent e317c7eb9a
commit 786e4bef65
3 changed files with 34 additions and 8 deletions

View File

@@ -123,6 +123,7 @@ The `coreos.units.*` parameters define a list of arbitrary systemd units to star
- **enable**: Boolean indicating whether or not to handle the [Install] section of the unit file. This is similar to running `systemctl enable <name>`. Default value is false.
- **content**: Plaintext string representing entire unit file. If no value is provided, the unit is assumed to exist already.
- **command**: Command to execute on unit: start, stop, reload, restart, try-restart, reload-or-restart, reload-or-try-restart. Default value is restart.
- **mask**: Whether to mask the unit file by symlinking it to `/dev/null` (analogous to `systemctl mask <name>`). Note that unlike `systemctl mask`, **this will destructively remove any existing unit file** located at `/etc/systemd/system/<unit>`, to ensure that the mask succeeds. Default value is false.
**NOTE:** The command field is ignored for all network, netdev, and link units. The systemd-networkd.service unit will be restarted in their place.