On 2 December 2015 at 13:14, Colin Watson <[email protected]> wrote: > On Mon, Nov 30, 2015 at 05:29:35PM +0200, Tom H wrote: >> 1) How does the unit now what "%f" is? > > See the "SPECIFIERS" section of the systemd.unit(5) manual page. > >> 2) "%i" is, in the case that I set up a few weeks ago, >> "sys-devices-pci0000:00-0000:00:0d.0-ata4-host3-target3:0:0-3:0:0:0-block-sdb-sdb1". >> Should it have "sdb" in it since it's supposed to be an unstable name? > > There doesn't seem any particular reason for the various %i.device units > that this particular service is bound to to need stable names. The > purpose of [email protected] is just to run fsck on all your block > devices; it doesn't much matter what they're called. > > Jobs that need to run on only particular block devices would typically > be udev rules rather than systemd units, I think; but if need be a > systemd unit could always use udevadm to inspect the udev database for > information about a particular device. (There may be some better way.) >
udev rules can add magic variables to trigger systemd units. Thus e.g. leave a systemd unit inert and use udev rules to add systemd_wants= variables et.al. see http://www.freedesktop.org/software/systemd/man/systemd.device.html -- Regards, Dimitri. -- Ubuntu-devel-discuss mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
