-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide an RC service script to start usbmuxd on OpenRC systems
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: #210 Signed-off-by: BalkanMadman <[email protected]>
- Loading branch information
1 parent
360619c
commit 093a91e
Showing
6 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
if WANT_OPENRC | ||
edit = \ | ||
$(SED) -r \ | ||
-e 's|@sbindir[@]|$(sbindir)|g' \ | ||
< $< > $@ || rm $@ | ||
|
||
rcservice_SCRIPTS = usbmuxd | ||
|
||
usbmuxd: usbmuxd.in | ||
$(edit) | ||
|
||
EXTRA_DIST = \ | ||
usbmuxd.in | ||
|
||
MAINTAINERCLEANFILES = \ | ||
usbmuxd | ||
|
||
CLEANFILES = \ | ||
usbmuxd | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 2023-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 or version 3 | ||
|
||
name="USB multiplexing daemon" | ||
description="Socket daemon for the usbmux protocol used by Apple devices" | ||
command="@sbindir@/usbmuxd" | ||
command_args="--user usbmux" | ||
pidfile="/run/${RC_SVCNAME}.pid" | ||
|
||
depend() { | ||
keyword -stop | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters