aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro/recipes-core/auto-serial-console/auto-serial-console/auto-serial-console
blob: 12da6fc7518a9ffcdc67816380f4b1a7cdc8814b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/auto-getty
NAME="auto-getty"

case "$1" in
  start)
        echo -n "Starting auto-serial-console: "
        start-stop-daemon -S -b -n $NAME --exec $DAEMON
        echo "done"
        ;;
  stop)
        echo -n "Stopping auto-serial-console: "
        start-stop-daemon -K -n $NAME
        echo "done"
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: auto-serial-console { start | stop | restart }" >&2
        exit 1
        ;;
esac

exit 0