162 |
|
|
163 |
set_system_autologon() |
set_system_autologon() |
164 |
{ |
{ |
165 |
local action |
local action="$1" |
166 |
[[ -z ${action} ]] && help_system_autologon && return 1 |
[[ -z ${action} ]] && help_system_autologon && return 1 |
167 |
|
|
168 |
## splash X11 tty too? |
## splash X11 tty too? |
169 |
|
|
170 |
case "${action}" in |
case "${action}" in |
171 |
enable) |
enable) |
172 |
sed 's:^auto_login.*:\1\tyes' /etc/slim.conf |
sed -i 's:^\(auto_login\).*:\1\tyes:' /etc/slim.conf |
173 |
mecho "autologon enabled" |
mecho "autologon enabled" |
174 |
;; |
;; |
175 |
disable) |
disable) |
176 |
sed 's:^auto_login.*:\1\tno' /etc/slim.conf |
sed -i 's:^\(auto_login\).*:\1\tno:' /etc/slim.conf |
177 |
mecho "autologon disabled" |
mecho "autologon disabled" |
178 |
;; |
;; |
179 |
*) help_system_autologon && return 1 ;; |
*) help_system_autologon && return 1 ;; |