5
# Required-Start: $remote_fs $syslog
6
# Required-Stop: $remote_fs $syslog
7
# Should-Start: $local_fs
8
# Should-Stop: $local_fs
9
# Default-Start: 2 3 4 5
11
# Short-Description: Start the remote-tty serial console manager
12
# Description: This starts remote-tty listening and logging
13
# on all of its configured serial ports.
18
test -x /usr/sbin/ttysrv || exit 0
22
echo "Starting remote-tty console manager:"
23
mkdir -p /var/run/remote-tty/sock
24
mkdir -p /var/run/remote-tty/pid
25
chmod -R 775 /var/run/remote-tty
26
chown -R rttymgr:rttymgr /var/run/remote-tty >/dev/null 2>&1 || true
28
cd /etc/remote-tty/dev
29
if [ ! "x`ls`" = x ]; then
30
su rttymgr -c "/usr/sbin/startsrv *"
32
echo " no consoles configured"
36
echo -n "Stopping remote-tty console manager:"
37
cd /var/run/remote-tty/pid
41
if start-stop-daemon --stop --quiet --oknodo \
42
--pidfile /var/run/remote-tty/pid/$i;
45
rm -f /var/run/remote-tty/sock/$i
48
echo -n " nothing running"
59
echo "Usage: /etc/init.d/$(basename $0) {start|stop}"