-
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 service script for an OpenRC init system. It intends to conform more closely to the way services are started by udev. usbmuxd detaches and daemonises itself correctly, yet the fact that its execution skips an init system results in a rather low level of integration with the running system. 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 19a2970
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