init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
# PROVIDE: console_login
|
||||
# REQUIRE: LOGIN
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=console_login
|
||||
start_precmd=console_login_prestart
|
||||
start_cmd=console_login_start
|
||||
stop_cmd=:
|
||||
|
||||
autologin=
|
||||
if grep -qw mouse.autologin=1 /proc/cmdline; then
|
||||
autologin="--autologin root"
|
||||
fi
|
||||
|
||||
console_login_prestart()
|
||||
{
|
||||
[ -e /run/utmp ] || : > /run/utmp
|
||||
[ -e /var/log/wtmp ] || : > /var/log/wtmp
|
||||
chmod 0664 /run/utmp /var/log/wtmp
|
||||
}
|
||||
|
||||
console_login_start()
|
||||
{
|
||||
/usr/bin/setsid -f /sbin/agetty $autologin \
|
||||
--login-program /bin/login --noclear --keep-baud \
|
||||
115200,38400,9600 ttyS0 vt100 &
|
||||
/usr/bin/setsid -f /sbin/agetty $autologin \
|
||||
--login-program /bin/login --noclear tty1 linux &
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
Reference in New Issue
Block a user