On Thu, Oct 5, 2017 at 7:51 AM, sdrb <s...@onet.eu> wrote: > Hi, > > I'd like to ask how to achieve following functionality in systemd: > > I'd like to start alsa-restore.service only once just after one of the > specified files appears. Those file matches: /dev/snd/control*. > > For now I have something like this: > > [Unit] > Description=Save/Restore Sound Card State > ConditionPathExistsGlob=/dev/snd/control* > After=sysinit.target > > [Service] > Type=oneshot > RemainAfterExit=true > ExecStart=-/sbin/alsactl restore -f /etc/asound.state > > [Install] > WantedBy=multi-user.target > > > but during the start when there is no any of /dev/snd/control* files - the > condition is not meet and the service is not going up. > Those files appears later. > > So that what I'd like to achieve is to wait for appearing of those files > and then starting alsa-restore service. >
Isn't that exactly what ALSA's standard /usr/lib/udev/rules.d/90-alsa-restore.rules does? -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel