Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684878 - sys-apps/pcsc-lite - 99-pcscd-hotplug.rules should check whether the service is already started before attempting to start it
Summary: sys-apps/pcsc-lite - 99-pcscd-hotplug.rules should check whether the service ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mikle Kolyada
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-05-01 13:04 UTC by Maciej S. Szmigiero
Modified: 2020-01-08 18:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed fix (pcscd-hotplug-service-start-fix.patch,550 bytes, patch)
2019-05-01 13:05 UTC, Maciej S. Szmigiero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2019-05-01 13:04:16 UTC
sys-apps/pcsc-lite udev rule does not check whether the pcsc service is already
started before attempting to start it resulting in errors like:
"systemd-udevd[1234]: Process '/bin/env IN_HOTPLUG=1 /etc/init.d/pcscd --quiet start' failed with exit code 1."
getting logged each time a smart card reader gets connected to the system.

The proposed patch fixes the issue for me by checking whether the service is
already started before attempting to start it.
Comment 1 Maciej S. Szmigiero 2019-05-01 13:05:17 UTC
Created attachment 574908 [details, diff]
proposed fix
Comment 2 Alon Bar-Lev gentoo-dev 2019-05-01 16:46:45 UTC
Have you followed the instructions and put rc_hotplug="pcscd" in /etc/rc.conf?
Comment 3 Maciej S. Szmigiero 2019-05-01 19:16:39 UTC
(In reply to Alon Bar-Lev from comment #2)
> Have you followed the instructions and put rc_hotplug="pcscd" in
> /etc/rc.conf?

I have rc_hotplug="*" in /etc/rc.conf.

Please note that this bug is not about a failure to start pcscd service,
but about an error that is logged when this service is already running
(for whatever reason, for example due to earlier hotplug event)
and a new smart card reader gets connected.
Comment 4 Alon Bar-Lev gentoo-dev 2019-05-01 19:26:25 UTC
Hello openrc,

We see that:

IN_HOTPLUG=1 /etc/init.d/pcscd start

Exits with success on first start, then fails as service is already started.

Maybe this case openrc should return success as well? Or maybe usage is incorrect...

Please advise.

Thanks!