-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement OpenRC service #227
base: master
Are you sure you want to change the base?
Conversation
Issue: #210 |
893c9ca
to
881f59a
Compare
What's the status of this? |
Oh, I am sorry it took me so long, still being on vacation I haven't got the chance to actually test the commit. I will be able to fully work on this in two weeks. The reason why it is still a draft in the lack of proper testing. This is based on master, which requires libimobiledevire-glue that is not yet packaged by Gentoo (which itself depends on libplist 2.3.0 that also happens to not be packaged), so you know. But it does look good when is installed to a One thing left, which does not depend on me is the flags used in the service script. Could you confirm/verify I used the correct ones? Line 8 in 881f59a
In addition to that I would also like to get some feedback on code styling and change what is deemed necessary |
Yes, that is correct. It's
Looks good to me. |
FYI, libimobiledevice-glue is here: Hope to see some progress soon. |
I checked the code I realised that you run "/etc/init.d/usbmuxd start" from udev rule? This is just wow ... |
udev(7) specifies the only way to run daemons from udev and that is using SYSTEMD_WANTS property, which, logically, has no effect on OpenRC system (or any non-systemd init system).
/etc/init.d/usbmuxd is a short-running process that immediately exits after starting the daemon (the daemon itself is not child of the udev process but of the OpenRC service system). I might be mistaken somewhere, so feel free to correct me if it is the case. From my testing with this patch applied to usbmuxd-1.1.1, it seems to have no effect on the occurrence of the bug. Yet, this seems to be much more compliant way to execute daemons with udev and should theoretically be merged. |
And the commit itself should be cleaned up a bit... |
98601f5
to
7fbeafe
Compare
I suppose this is ready to be reviewed |
7fbeafe
to
507cf94
Compare
ok, maybe I'm wrong about running openrc. I was sure that udev script should execute its own /lib/udev/ only. But I found sys-apps/pcsc-lite, as an example, which installs /lib/udev/pcscd.sh and runs the following:
You might want to check what |
I have already added the Lines 118 to 119 in 507cf94
For a service marked with the |
507cf94
to
19a2970
Compare
This commit adds a usbmuxd service script for the OpenRC init system. It intends to conform more closely to the way services are started by udev. Previously, on non-systemd systems, udev would start the `usbmuxd` binary directly. This commits makes udev start `usbmuxd` in a much cleaner way, by using the OpenRC service manager. This adds two new `configure` flags: * `--with-openrc`: toggles on or off (default - off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly: `--with-openrc --without-systemd` * `--with-rcservicedir=DIR`: specifies directory where to install service file. Defaults to `$sysconfdir/init.d` (which is `/etc/init.d`) Issue: libimobiledevice#210 Signed-off-by: BalkanMadman <[email protected]>
19a2970
to
093a91e
Compare
I have slightly reworded the commit message to better reflect what the change actually does. |
This is still a draft.
This PR adds two flags to
configure
script:--with-openrc
: toggles on or off (default — off) OpenRC service installation and udev activation via that. Conflicts with systemd, so the latter must be disabled explicitly —--with-openrc --without-systemd
--with-rcservicedir
: specifies directory where to install service file. Defaults to$sysconfdir/init.d
(which is/etc/init.d
)I need the most feedback on which options should be used with
usbmuxd
. The only one used here is--user usbmux
. Maybe--udev
should be added? I don't know usbmuxd architecture that well, so a few advises on this matter won't hurt much :)