Files
systemd/test/test-fstab-generator/test-18-options.fstab.expected.sysroot/mnt-requires.mount
T
nikhilnrr 9d27286214 test-fstab-generator: fix inverted /mnt symlink guard
The test-18-options.fstab.input scenario was guarded by
"$(readlink /mnt)" != "/mnt", which is true on any normal system
since readlink prints nothing for a plain directory. This meant the
scenario was always skipped, and its fixtures were never actually
compared against generator output.

Fix the guard to check whether /mnt is a symlink directly, and repair
the pre-existing fixtures that had drifted while the scenario was
dead:

  - mnt-wantedby-automount.mount had a stale Where= value and was
    missing the escaping the generator emits for the hyphen in
    /mnt/wantedby-automount.
  - mnt-requires.mount had Requires=/After= in the wrong order.

Also extend the backslash-stripping workaround loop (used because the
.deb packager dislikes files named with a backslash) to cover
.automount units in addition to .mount/.swap, and fix an ordering bug
where -f was checked before -L, which could leave a dangling symlink
when both a unit and its drop-in symlink needed stripping.
2026-09-22 18:48:23 +02:00

15 lines
317 B
SYSTEMD

# Automatically generated by systemd-fstab-generator
[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/etc/fstab
Requires=foo.service
After=foo.service
Before=local-fs.target
After=blockdev@dev-sdx5.target
[Mount]
What=/dev/sdx5
Where=/mnt/requires
Options=x-systemd.requires=foo.service