x11-autologin: factor out x11-autostart
It has value of its own and can be used standalone; autologin does require autostart though. Adjust x11 feature targets accordingly.
This commit is contained in:
parent
b683d5d751
commit
0d8e44d8fd
@ -1,3 +1,3 @@
|
||||
use/x11-autologin:
|
||||
use/x11-autologin: use/x11-autostart
|
||||
@$(call add_feature)
|
||||
@$(call add,THE_PACKAGES,shadow-groups) # gpasswd
|
||||
|
@ -39,13 +39,6 @@ restore_later() {
|
||||
chmod +x "$hook"
|
||||
}
|
||||
|
||||
## setup runlevel
|
||||
INITTAB=/etc/inittab
|
||||
if [ -f "$INITTAB" ]; then
|
||||
[ -z "$runlevel" ] && runlevel=5
|
||||
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
|
||||
fi
|
||||
|
||||
## autologin^2
|
||||
AUTOLOGIN_CFG=/etc/sysconfig/autologin
|
||||
if [ -x /usr/sbin/autologin ]; then
|
||||
|
5
features.in/x11-autostart/README
Normal file
5
features.in/x11-autostart/README
Normal file
@ -0,0 +1,5 @@
|
||||
Эта фича добавляет в формируемый пользовательский корень
|
||||
(как правило, live) функцию автоматического запуска
|
||||
графической сессии; обратите внимание, что автоматическим
|
||||
входом после запуска графики занимается соседняя фича
|
||||
x11-autologin.
|
3
features.in/x11-autostart/config.mk
Normal file
3
features.in/x11-autostart/config.mk
Normal file
@ -0,0 +1,3 @@
|
||||
use/x11-autostart: use/x11
|
||||
@$(call add_feature)
|
||||
@$(call add,BASE_PACKAGES,installer-feature-runlevel5-stage3) ###
|
18
features.in/x11-autostart/rootfs/image-scripts.d/40-x11-autostart
Executable file
18
features.in/x11-autostart/rootfs/image-scripts.d/40-x11-autostart
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -x /usr/bin/X ]; then
|
||||
echo "SKIP autostart: X not installed" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## setup automated graphical session startup
|
||||
INITTAB=/etc/inittab
|
||||
if [ -f "$INITTAB" ]; then
|
||||
[ -z "$runlevel" ] && runlevel=5
|
||||
sed -i "s,^\(id:\)\(.*\)\(:initdefault.*\),\\1$runlevel\\3," "$INITTAB"
|
||||
fi
|
||||
|
||||
## ...and systemd, if any
|
||||
rm -f /etc/systemd/system/default.target
|
||||
|
||||
:
|
@ -44,26 +44,22 @@ use/x11/fglrx: use/x11
|
||||
use/x11/wacom: use/x11
|
||||
@$(call add,THE_PACKAGES,xorg-drv-wacom xorg-drv-wizardpen)
|
||||
|
||||
### strictly speaking, runlevel5 should require a *dm, not vice versa
|
||||
use/x11/runlevel5: use/x11/xorg
|
||||
@$(call add,THE_PACKAGES,installer-feature-runlevel5-stage3)
|
||||
|
||||
### xdm: see also #23108
|
||||
use/x11/xdm: use/x11/runlevel5
|
||||
use/x11/xdm: use/x11-autostart
|
||||
@$(call add,THE_PACKAGES,xdm installer-feature-no-xconsole-stage3)
|
||||
|
||||
### : some set()-like thing might be better?
|
||||
use/x11/lightdm/gtk use/x11/lightdm/qt use/x11/lightdm/razorqt \
|
||||
use/x11/lightdm/kde: use/x11/lightdm/%: use/x11/runlevel5
|
||||
use/x11/lightdm/kde: use/x11/lightdm/%: use/x11-autostart
|
||||
@$(call add,THE_PACKAGES,lightdm-$*-greeter)
|
||||
|
||||
use/x11/kdm: use/x11/runlevel5
|
||||
use/x11/kdm: use/x11-autostart
|
||||
@$(call add,THE_PACKAGES,kdebase-kdm<4)
|
||||
|
||||
use/x11/kdm4: use/x11/runlevel5
|
||||
use/x11/kdm4: use/x11-autostart
|
||||
@$(call add,THE_PACKAGES,kde4base-workspace-kdm)
|
||||
|
||||
use/x11/gdm2.20: use/x11/runlevel5
|
||||
use/x11/gdm2.20: use/x11-autostart
|
||||
@$(call add,THE_PACKAGES,gdm2.20)
|
||||
|
||||
use/x11/icewm: use/x11
|
||||
|
Loading…
Reference in New Issue
Block a user