about summary refs log tree commit diff
path: root/services/sulogin/run
diff options
context:
space:
mode:
authorzqqw <electroweld@yandex.com>2016-06-17 02:32:28 +0100
committerGitHub <noreply@github.com>2016-06-17 02:32:28 +0100
commitcd72b526fdf0cea3ff69630f4dcb4fd8e22fdf40 (patch)
tree0613c8005730987ced66f2a8863232de9b8c39c6 /services/sulogin/run
parentf38648a7ed5b6a5244d2c7e9d002ce7802060474 (diff)
downloadrunit-void-cd72b526fdf0cea3ff69630f4dcb4fd8e22fdf40.tar.gz
runit-void-cd72b526fdf0cea3ff69630f4dcb4fd8e22fdf40.tar.xz
runit-void-cd72b526fdf0cea3ff69630f4dcb4fd8e22fdf40.zip
sulogin OPTS
https://forum.voidlinux.eu/t/rescue-mode-sulogin/561/12

Allows rescue mode to be configured to work with a locked root account and sudo.
Thanks to Duncaen.
Diffstat (limited to 'services/sulogin/run')
-rwxr-xr-xservices/sulogin/run3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/sulogin/run b/services/sulogin/run
index b83dda2..eee14c7 100755
--- a/services/sulogin/run
+++ b/services/sulogin/run
@@ -1,4 +1,5 @@
 #!/bin/sh
+[ -r conf ] && . ./conf
 read -r tty < /sys/class/tty/console/active
 tty=/dev/${tty##* }
-exec setsid sulogin -p < $tty >$tty 2>&1
+exec setsid sulogin ${OPTS:=-p} < $tty >$tty 2>&1