In this file we create a new test.target and then via the symlink from default.target we specify it as the system default target. (Would there be interest in ignition/butane handling this case natively? I.e. default: true for a target configuration)
Because of it becoming the default target, an [Install] section is not required as there are no WantedBy's to fulfill, or any other option to add for this to work.
In this configuration it seems the right setup to have it enabled, the symlink seems to yeld odd failures if the target is not enabled too at the ignition step, despite the unit file being placed in the same location, although I suspect that is a different issue and I am in the process of debugging that further.
That aside, the problem is evident when creating an ignition file with the --strict option passed:
# butane --strict < test.bu
warning at $.systemd.units.0.contents, line 8 col 21: unit "test.target" is enabled, but has no install section so enable does nothing
Config produced warnings and --strict was specified
It seems that by not containing a valid [Install] section the check fails, this makes sense for service files or other units, however for targets this is not necessarily a requirement.
Let me know if I've misunderstood this property, or if you need any further information from me, thank you. 😄
Creating systemd objects like targets can cause confusing errors where enable is true but an install section is missing under
--strict
checking.Take the following example butane:
In this file we create a new
test.target
and then via the symlink fromdefault.target
we specify it as the system default target. (Would there be interest in ignition/butane handling this case natively? I.e.default: true
for a target configuration)Because of it becoming the default target, an
[Install]
section is not required as there are noWantedBy
's to fulfill, or any other option to add for this to work.In this configuration it seems the right setup to have it enabled, the symlink seems to yeld odd failures if the target is not enabled too at the ignition step, despite the unit file being placed in the same location, although I suspect that is a different issue and I am in the process of debugging that further.
That aside, the problem is evident when creating an ignition file with the
--strict
option passed:It seems that by not containing a valid
[Install]
section the check fails, this makes sense for service files or other units, however for targets this is not necessarily a requirement.Let me know if I've misunderstood this property, or if you need any further information from me, thank you. 😄