dracut/vmklive/display-manager-autologin.sh: fix lightdm autologin
config file and directives were wrong
This commit is contained in:
parent
8871805dc5
commit
f80794ace0
|
@ -43,6 +43,8 @@ build_variant() {
|
|||
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf alsa-plugins-pulseaudio"
|
||||
SERVICES="sshd"
|
||||
|
||||
LIGHTDM_SESSION=''
|
||||
|
||||
case $variant in
|
||||
base)
|
||||
SERVICES="$SERVICES dhcpcd wpa_supplicant acpid"
|
||||
|
@ -50,18 +52,22 @@ build_variant() {
|
|||
enlightenment)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter enlightenment terminology udisks2 firefox"
|
||||
SERVICES="$SERVICES acpid dhcpcd wpa_supplicant lightdm dbus polkitd"
|
||||
LIGHTDM_SESSION=enlightenment
|
||||
;;
|
||||
xfce)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus elogind lightdm NetworkManager polkitd"
|
||||
LIGHTDM_SESSION=xfce
|
||||
;;
|
||||
mate)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus elogind lightdm NetworkManager polkitd"
|
||||
LIGHTDM_SESSION=mate
|
||||
;;
|
||||
cinnamon)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus elogind lightdm NetworkManager polkitd"
|
||||
LIGHTDM_SESSION=cinnamon
|
||||
;;
|
||||
gnome)
|
||||
PKGS="$PKGS $XORG_PKGS gnome firefox"
|
||||
|
@ -74,6 +80,7 @@ build_variant() {
|
|||
lxde)
|
||||
PKGS="$PKGS $XORG_PKGS lxde lightdm lightdm-gtk3-greeter gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES acpid dbus dhcpcd wpa_supplicant lightdm polkitd"
|
||||
LIGHTDM_SESSION=LXDE
|
||||
;;
|
||||
lxqt)
|
||||
PKGS="$PKGS $XORG_PKGS lxqt sddm gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
|
@ -85,6 +92,11 @@ build_variant() {
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$LIGHTDM_SESSION" ]; then
|
||||
mkdir -p "$INCLUDEDIR"/etc/lightdm
|
||||
echo "$LIGHTDM_SESSION" > "$INCLUDEDIR"/etc/lightdm/.session
|
||||
fi
|
||||
|
||||
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
|
||||
}
|
||||
|
||||
|
|
|
@ -31,11 +31,13 @@ _EOF
|
|||
fi
|
||||
|
||||
# Configure lightdm autologin.
|
||||
if [ -r ${NEWROOT}/etc/lightdm.conf ]; then
|
||||
sed -i -e "s|^\#\(default-user=\).*|\1$USERNAME|" \
|
||||
${NEWROOT}/etc/lightdm.conf
|
||||
sed -i -e "s|^\#\(default-user-timeout=\).*|\10|" \
|
||||
${NEWROOT}/etc/lightdm.conf
|
||||
if [ -r "${NEWROOT}/etc/lightdm/lightdm.conf" ]; then
|
||||
sed -i -e "s|^\#\(autologin-user=\).*|\1$USERNAME|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
sed -i -e "s|^\#\(autologin-user-timeout=\).*|\10|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
sed -i -e "s|^\#\(autologin-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
fi
|
||||
|
||||
# Configure lxdm autologin.
|
||||
|
|
Loading…
Reference in New Issue