summaryrefslogtreecommitdiffstats
path: root/net/modemmanager/files/etc/hotplug.d/tty/25-modemmanager-tty
blob: c713912c480e68490dc618855fd2505fb67647f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Copyright (C) 2016 Velocloud Inc
# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>

# Load hotplug common utilities
. /usr/share/ModemManager/modemmanager.common

# We require a device name
[ -n "$DEVNAME" ] || exit

# Always make sure the rundir exists
mkdir -m 0755 -p "${MODEMMANAGER_RUNDIR}"

# Report TTY
mm_report_event "${ACTION}" "${DEVNAME}" "tty" "/sys${DEVPATH}" || exit
mm_log "info" "${ACTION} serial interface ${DEVNAME}: event processed"