commit 88e60b7ea5b15ba1d760f49e2c2c724bfe70ad10 parent c8ac3c1e7bf3398c650871253230ba2adbd6e7ce Author: Paco Esteban <paco@e1e0.net> Date: Thu, 26 Aug 2021 12:52:40 +0200 add hotplugd scripts for laptop Diffstat:
A | laptop/hotplugd/attach | | | 21 | +++++++++++++++++++++ |
1 file changed, 21 insertions(+), 0 deletions(-)
diff --git a/laptop/hotplugd/attach b/laptop/hotplugd/attach @@ -0,0 +1,21 @@ +#!/bin/sh + +DEVCLASS=$1 +DEVNAME=$2 + +case $DEVCLASS in + 0 ) + # restart sndiod when the audio interface get's connected + if [ "$DEVNAME" = "audio2" ]; then + rcctl restart sndiod + fi + ;; + 3 ) + # configure network devices; requires hostname.$DEVNAME + sh /etc/netstart $DEVNAME + ;; + * ) + # not sure, so we log for now. + echo "Class: $DEVCLASS / Name: $DEVNAME" >> /tmp/hotplugd.txt + ;; +esac