29 lines
592 B
Plaintext
Executable File
29 lines
592 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
# Copyright 2020 Oliver Smith
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
supervisor=supervise-daemon
|
|
|
|
name="tinydm"
|
|
description="tinydm"
|
|
|
|
command="/usr/bin/autologin"
|
|
command_args="tinydm-run-session"
|
|
|
|
depend() {
|
|
provide display-manager
|
|
need localmount dbus elogind
|
|
after geminux-hwinit sshd
|
|
}
|
|
|
|
start_pre() {
|
|
[ -z "$AUTOLOGIN_UID" ] && AUTOLOGIN_UID=10000
|
|
|
|
user="$(getent passwd "${AUTOLOGIN_UID}" | cut -d: -f1)"
|
|
if [ -z "$user" ]; then
|
|
eerror "ERROR: unable to find user with uid $AUTOLOGIN_UID"
|
|
return 1
|
|
fi
|
|
|
|
command_args="$user $command_args"
|
|
}
|