diff --git a/features.in/x11-autologin/config.mk b/features.in/x11-autologin/config.mk index ea892db2..66676efc 100644 --- a/features.in/x11-autologin/config.mk +++ b/features.in/x11-autologin/config.mk @@ -1,3 +1,3 @@ -use/x11-autologin: +use/x11-autologin: use/x11-autostart @$(call add_feature) @$(call add,THE_PACKAGES,shadow-groups) # gpasswd diff --git a/features.in/x11-autologin/rootfs/image-scripts.d/40-x11-autologin b/features.in/x11-autologin/rootfs/image-scripts.d/40-x11-autologin index a1a7c9f3..e30471e2 100755 --- a/features.in/x11-autologin/rootfs/image-scripts.d/40-x11-autologin +++ b/features.in/x11-autologin/rootfs/image-scripts.d/40-x11-autologin @@ -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 diff --git a/features.in/x11-autostart/README b/features.in/x11-autostart/README new file mode 100644 index 00000000..3bb91690 --- /dev/null +++ b/features.in/x11-autostart/README @@ -0,0 +1,5 @@ +Эта фича добавляет в формируемый пользовательский корень +(как правило, live) функцию автоматического запуска +графической сессии; обратите внимание, что автоматическим +входом после запуска графики занимается соседняя фича +x11-autologin. diff --git a/features.in/x11-autostart/config.mk b/features.in/x11-autostart/config.mk new file mode 100644 index 00000000..8a9ddf8d --- /dev/null +++ b/features.in/x11-autostart/config.mk @@ -0,0 +1,3 @@ +use/x11-autostart: use/x11 + @$(call add_feature) + @$(call add,BASE_PACKAGES,installer-feature-runlevel5-stage3) ### diff --git a/features.in/x11-autostart/rootfs/image-scripts.d/40-x11-autostart b/features.in/x11-autostart/rootfs/image-scripts.d/40-x11-autostart new file mode 100755 index 00000000..25c7cd99 --- /dev/null +++ b/features.in/x11-autostart/rootfs/image-scripts.d/40-x11-autostart @@ -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 + +: diff --git a/features.in/x11/config.mk b/features.in/x11/config.mk index e5ac1498..62f9ab39 100644 --- a/features.in/x11/config.mk +++ b/features.in/x11/config.mk @@ -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