576fa64abf
Update the systemd serial port element implementation so that it uses udev rules. Much nicer than hard coding ttyS0 and ttyS1. The udev rule only adds real serial device types (i.e. == 4). See: define TTY_DRIVER_TYPE_SERIAL 0x0003 from include/linux/tty_driver.h. Change-Id: I5d7de4815fd09c01693b7da4b8949f22fee20745
10 lines
377 B
Bash
Executable file
10 lines
377 B
Bash
Executable file
#!/bin/bash
|
|
set -uex
|
|
SCRIPTDIR=$(dirname $0)
|
|
|
|
DIB_INIT_SYSTEM=$(dib-init-system)
|
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
|
install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf
|
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/serial-console-udev.rules /etc/udev/rules.d/99-serial-console.rules
|
|
fi
|