diff options
| author | Andrew Jeffery <andrew@aj.id.au> | 2023-06-08 09:22:40 +0300 |
|---|---|---|
| committer | Andrew Jeffery <andrew@aj.id.au> | 2023-06-13 00:53:07 +0300 |
| commit | 1dc30e8b30f95f6c5a4fbe91ec6e68857857c320 (patch) | |
| tree | 6965215e1c4d2074b335f44003614e57fc0d22fc /meta-openembedded/meta-python/recipes-devtools/python/python3-ptyprocess_0.7.0.bb | |
| parent | b5251ae29cc31b078c6b8ca00aaa441a20710596 (diff) | |
| download | openbmc-1dc30e8b30f95f6c5a4fbe91ec6e68857857c320.tar.xz | |
meta-ibm: first-boot-disable-ipmi-net: Fix unit condition
The [Service] section specifies:
```
ExecStart=/bin/touch /var/lib/ipmi-net-disable-one-time
```
However, the [Unit] section specifies the following condition:
```
ConditionFileNotEmpty=!/var/lib/ipmi-net-disable-one-time
```
The documentation for ConditionFileNotEmpty[1] states:
> ConditionFileNotEmpty= is similar to ConditionPathExists= but verifies
> that a certain path exists and refers to a regular file with a
> non-zero size.
[1]: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#ConditionFileNotEmpty=
And the documentation for `touch`[2] states:
> A FILE argument that does not exist is created empty, unless -c or -h
> is supplied.
[2]: https://www.man7.org/linux/man-pages/man1/touch.1.html
Neither `-c` nor `-h` are supplied, therefore the ExecStart= directive
will create an empty file. As the ConditionFileNotEmpty= directive is
negated the condition will always pass: Either the file doesn't exist,
or it does exist and is empty. Therefore, as configured, this unit
always runs.
Always running the unit is counter to its 'one-time' name. Switch to
`ConditionPathExists=`[3] to enforce the one-time nature.
[3]: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#ConditionPathExists=
Change-Id: I1a8418a03c4fb9c6754f72f8651384b2f7e17715
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-ptyprocess_0.7.0.bb')
0 files changed, 0 insertions, 0 deletions
