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.
This commit is contained in:
parent
3d982dabba
commit
cd998fef41
@ -4,8 +4,13 @@ use/live: use/stage2 sub/stage2/live
|
|||||||
use/live/base: use/live use/syslinux/ui-menu
|
use/live/base: use/live use/syslinux/ui-menu
|
||||||
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
@$(call add,LIVE_LISTS,$(call tags,base && (live || network)))
|
||||||
|
|
||||||
use/live/icewm: use/live/base
|
# NB: there's an unconditional live/image-scripts.d/40-autologin script
|
||||||
@$(call add,LIVE_LISTS,\
|
# *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)))
|
$(call tags,(base || desktop) && (live || network || icewm)))
|
||||||
|
|
||||||
# this is a manual installation script (text-based)
|
# this is a manual installation script (text-based)
|
||||||
|
34
features.in/live/live/image-scripts.d/40-autologin
Executable file
34
features.in/live/live/image-scripts.d/40-autologin
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user