Commit cd998fef authored by Michael Shigorin's avatar Michael Shigorin

initial live autologin

use/live/autologin target tries hard to configure any available autologin means, including a dedicated package and a few DMs. Thanks gns@ as liveflash.eeepc got robbed somewhat.
parent 3d982dab
......@@ -4,8 +4,13 @@ use/live: use/stage2 sub/stage2/live
use/live/base: use/live use/syslinux/ui-menu
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
use/live/icewm: use/live/base
@$(call add,LIVE_LISTS,\
# NB: there's an unconditional live/image-scripts.d/40-autologin script
# *but* it only configures some of the *existing* means; let's add one
use/live/autologin: use/live/base
@$(call add,LIVE_PACKAGES,autologin xinit)
use/live/icewm: use/live/autologin
@$(call add,LIVE_LISTS, \
$(call tags,(base || desktop) && (live || network || icewm)))
# this is a manual installation script (text-based)
......
#!/bin/sh -ef
USER=altlinux
# setup runlevel
INITTAB=/etc/inittab
if [ -f "$INITTAB" ]; then
[ -z "$runlevel" ] && runlevel=5
subst "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
fi
# autologin^2
if [ -x /usr/sbin/autologin ]; then
cat << E_O_F >> /etc/sysconfig/autologin
USER=$USER
AUTOLOGIN=yes
E_O_F
fi
# gdm2 autologin
GDM_CONF=/etc/X11/gdm/custom.conf
if [ -f "$GDM_CONF" ]; then
sed -i -e '/\[daemon\]/aAutomaticLoginEnable=true\nAutomaticLogin='$USER \
"$GDM_CONF"
fi
# kdm3 autologin
# TODO: iterate over kdm{,4} if feasible
KDMRC=/etc/X11/kdm/kdmrc
if [ -f "$KDMRC" ]; then
sed -i \
-e '/AutoLoginEnable/ s,^.*$,AutoLoginEnable=true,' \
-e '/AutoLoginUser/ s,^.*$,AutoLoginUser='$USER',' \
"$KDMRC"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment