[systemd-bugs] [Bug 52580] New: device alias doesn't work in BindTo/After

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 27 02:59:29 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52580

             Bug #: 52580
           Summary: device alias doesn't work in BindTo/After
    Classification: Unclassified
           Product: systemd
           Version: unspecified
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: systemd-bugs at lists.freedesktop.org
        ReportedBy: rodrigorivascosta at gmail.com
         QAContact: systemd-bugs at lists.freedesktop.org


Hi!

I've been trying to write a unit template to configure the network (systemd
version: 187):

File: net-static at .service

[Unit]
Description=Static interface
Wants=network.target
Before=network.target
#BindTo=sys-subsystem-net-devices-%i.device
#After=sys-subsystem-net-devices-%i.device

[Service]
...


Now, if I uncomment any of the lines that make a reference to the device alias,
then the alias itself disappears!

When I say that the alias disappears, I mean that it is no longer an alias of
the real device, instead it looks like systemd believes it is a proper unit in
its own, and I can see it in the output of `systemctl --all`: loaded inactive
dead, without meaningful description.

If the BindTo is uncommented, that means that this unit cannot start: it tries
to start the sys-subsystem-net-devices-eth0.device unit, and it times out.

If only the After is uncommented, then this unit is started anyway.

However, if I write the BindTo/After using the full name of the device
(BindTo=sys-devices-pci0000:00-0000:00:03.0-net-eth0.device) then it works as
expected). But that's not so useful, because I'm writing a template so I really
need to use the alias.

Is my unit expected to work or am I totally misunderstanding aliases?

Regards
-- 
Rodrigo

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the systemd-bugs mailing list