2017-03-10 02:53:02 +05:30
|
|
|
#!@SBINDIR@/openrc-run
|
|
|
|
# Copyright (c) 2017 The OpenRC Authors.
|
|
|
|
# See the Authors file at the top-level directory of this distribution and
|
|
|
|
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
|
|
|
|
#
|
|
|
|
# This file is part of OpenRC. It is subject to the license terms in
|
|
|
|
# the LICENSE file found in the top-level directory of this
|
|
|
|
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
|
|
|
|
# This file may not be copied, modified, propagated, or distributed
|
|
|
|
# except according to the terms contained in the LICENSE file.
|
|
|
|
|
|
|
|
description="start agetty on a terminal line"
|
|
|
|
supervisor=supervise-daemon
|
|
|
|
port="${RC_SVCNAME#*.}"
|
2018-12-07 04:07:40 +05:30
|
|
|
respawn_period="${respawn_period:-60}"
|
2017-03-10 02:53:02 +05:30
|
|
|
term_type="${term_type:-linux}"
|
|
|
|
command=/sbin/agetty
|
2017-05-22 23:16:55 +05:30
|
|
|
command_args_foreground="${agetty_options} ${port} ${baud} ${term_type}"
|
2017-03-10 02:53:02 +05:30
|
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
after local
|
2017-04-01 02:51:28 +05:30
|
|
|
keyword -prefix
|
2017-03-10 02:53:02 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
if [ -z "$port" ]; then
|
|
|
|
eerror "${RC_SVCNAME} cannot be started directly. You must create"
|
|
|
|
eerror "symbolic links to it for the ports you want to start"
|
|
|
|
eerror "agetty on and add those to the appropriate runlevels."
|
|
|
|
return 1
|
2018-03-15 07:07:02 +05:30
|
|
|
else
|
|
|
|
export EINFO_QUIET="${quiet:-yes}"
|
2017-03-10 02:53:02 +05:30
|
|
|
fi
|
|
|
|
}
|
2018-03-15 07:07:02 +05:30
|
|
|
|
|
|
|
stop_pre()
|
|
|
|
{
|
|
|
|
export EINFO_QUIET="${quiet:-yes}"
|
|
|
|
}
|