Commit Graph

18 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Michael Heimpold 2249780fb7 procd: start additional consoles during hotplugging
Now that 'start-console' procd command has reached the main repo,
we can add a rule to start consoles on serial devices which are
created when USB gadget driver reports creation with hotplugging.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
5 years ago
Michael Heimpold 6e060bd62c base-files/hotplug: fix dedicated group for tty devices
Commit 124ab1dc0a and 5523ee3459 introduced the assignment of the
group "tty" to /dev/tty* devices in order to support unprivileged
user access to serial devices.

However, due to an improperly rebased commit this feature broke.

This patch restores the lost hunk in hotplug.json file to
re-introduce this feature and also renames the existing "tty" group
to "dialout" as this is the more typical name for such a group
on desktop systems.

Fixes: 5209cfa534 ("procd: fix hotplug.json syntax")
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Florian Eckert 5209cfa534 procd: fix hotplug.json syntax
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
7 years ago
Jo-Philipp Wich 124ab1dc0a procd: assign /dev/tty* nodes to "tty" group
Adjust default permissions and ownership of /dev/tty* nodes from
0600/root:root to 0660/root:tty in order to support granting
unprivileged user access when needed.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
neheb 8a83ffbefd procd: Set /dev/kmsg to 600
Small cleanup. I initially though /dev/kmsg was used for dmsg(and journald
on desktops) but this seems not to be the case. dmsg is still accessible
as non-root(gives output) which begs the question what does this do? Some
googling reveals that permissions are set to 600 for some embedded systems
while 644 for others. I can't find any justification for the latter. Might
as well err on the side of caution.

Signed-off by: Rosen Penev <rosenp@gmail.com>
8 years ago
John Crispin 9597675d8e procd: change /dev/{gpio,hvc*} perms to 0600
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
neheb c6cef6dde7 procd: adjust /dev entries to desktop distro defaults
This changes the default permissions for /dev entries to be more similar to
a desktop distro. Taken from the defaults of Arch Linux and Ubuntu. Also
changed some that were nonsensical. For example, all 660 permissions on
desktop distros were of the form root:x where x is something other than
root. As such, 660 is useless for LEDE where the specific group is missing.
audio seems to be the only group that isn't.

Signed-off by: Rosen Penev <rosenp@gmail.com>
8 years ago
John Crispin 163cc22643 procd: properly set /dev/snd permission and group
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 7cc4fa1ae1 procd: fix file permissions of /dev/tty* nodes
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 4f3c1e7793 procd: hotplug.json: allow passing hotplug events from all subsystems
There are time that programs need to be notified of events from
subsystems that are not enumerated in the .json definition, e.g. QEMU
guest agent by default requires /dev/virtio-ports/org.qemu.guest_agent.0
which is a symlink to /dev/vportMpN from virtio-ports subsystem.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

SVN-Revision: 48799
8 years ago
John Crispin ff7f5eb13d procd: emit events for sound subsystem
Useful e.g. for plugable USB-soundcards.
With this change an event/hotplug-call looks like:

ACTION: add DEVNAME: snd/timer DEVPATH: /devices/virtual/sound/timer SUBSYSTEM: sound
ACTION: add DEVNAME:  DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0 SUBSYSTEM: sound
ACTION: add DEVNAME: snd/controlC0 DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/controlC0 SUBSYSTEM: sound
ACTION: add DEVNAME: snd/pcmC0D0p DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/pcmC0D0p SUBSYSTEM: sound
ACTION: add DEVNAME: snd/pcmC0D0c DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/pcmC0D0c SUBSYSTEM: sound
ACTION: add DEVNAME: dsp DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/dsp SUBSYSTEM: sound
ACTION: add DEVNAME: audio DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/audio SUBSYSTEM: sound
ACTION: add DEVNAME: mixer DEVPATH: /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/sound/card0/mixer SUBSYSTEM: sound

This fixes #21466.

Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com>

SVN-Revision: 48366
8 years ago
Rafał Miłecki 26845a4715 procd: switch buttons to the new "button" hotplug handler
This allows requesting "timeout" ACTION in script by returning a
positive value.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46580
9 years ago
John Crispin e28c5f86f3 procd: handle hotplug events for the usbmisc subsystem
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42831
10 years ago
Felix Fietkau 71cda6a1e0 procd: Fix USB cellular modems hotplug events
Without this patch, /etc/hotplug.d/tty/30-3g won't be called when you insert or remove a USB-serial cellular modem.

(see Ticket #14117)

Signed-off-by: Matthew Reeve <mreeve@tenxnetworks.com>

SVN-Revision: 41039
10 years ago
Felix Fietkau c84a43cf40 procd: emit tty events for ttyUSB* even when they come from the usb-serial subsystem
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38862
11 years ago
Felix Fietkau f099defc00 procd: reduce the number of unnecessary calls to /sbin/hotplug-call for tty devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 38705
11 years ago
John Crispin ae7a156434 procd: make old button hotplug rules work until all packages are migrated
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37336
11 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago