utils

small programs, scripts and utils
git clone https://git.e1e0.net/utils.git
Log | Files | Refs

attach (475B)


      1 #!/bin/sh
      2 
      3 DEVCLASS=$1
      4 DEVNAME=$2
      5 
      6 case $DEVCLASS in
      7     0 )
      8         # restart sndiod when the audio interface get's connected
      9         if [ "$DEVNAME" = "audio2" ]; then
     10             rcctl restart sndiod
     11         fi
     12         ;;
     13     3 )
     14         # configure network devices; requires hostname.$DEVNAME
     15         sh /etc/netstart $DEVNAME
     16         ;;
     17     * )
     18         # not sure, so we log for now.
     19         echo "Class: $DEVCLASS / Name: $DEVNAME" >> /tmp/hotplugd.txt
     20         ;;
     21 esac