diff options
author | Daniel Baumann <daniel@debian.org> | 2010-02-21 10:36:00 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:04 +0100 |
commit | dd2fa705308e32a3aa237f5f402e01e5894e2891 (patch) | |
tree | 8d0378220df3bb3242a46121d05b0ae34354942e | |
parent | afa0ce7b8405da9dd4c77744c96e97dc65e9650d (diff) | |
download | vyos-live-build-dd2fa705308e32a3aa237f5f402e01e5894e2891.tar.gz vyos-live-build-dd2fa705308e32a3aa237f5f402e01e5894e2891.zip |
Updating default desktop configuration quirks.
-rwxr-xr-x | helpers/chroot_hacks | 70 | ||||
-rwxr-xr-x | helpers/chroot_hooks | 6 | ||||
-rwxr-xr-x | hooks/kde-desktop | 14 |
3 files changed, 70 insertions, 20 deletions
diff --git a/helpers/chroot_hacks b/helpers/chroot_hacks index 66fb36506..98e6b5b42 100755 --- a/helpers/chroot_hacks +++ b/helpers/chroot_hacks @@ -37,6 +37,76 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock +# Handling default desktop configuration +for TASK in ${LH_TASKS} +do + case "${TASKS}" in + gnome-desktop) + # gnome is the only desktop environment in this image + if [ -z "$(echo ${LH_TASKS} | sed -e 's|gnome-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/gnome-session" + fi + ;; + + kde-desktop) + # kde is the only desktop-environment in this image + if [ -z "$(echo ${LH_TASKS} | sed -e 's|kde-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "kdm shared/default-x-display-manager select kdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure kdm" + echo "/usr/bin/kdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/startkde" + fi + ;; + + lxde-desktop) + # lxde is the only desktop environment in this image + if [ -z "$(echo ${LH_TASKS} | sed -e 's|lxde-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/startlxde" + fi + ;; + + xfce-desktop) + # xfce is the only desktop environment in this image + if [ -z "$(echo ${LH_TASKS} | sed -e 's|xfce-desktop||' -e 's| desktop ||' | grep desktop)" ] + then + # set display manager + echo "gdm shared/default-x-display-manager select gdm" > chroot/root/preseed + Chroot chroot "debconf-set-selections /root/preseed" + rm -f chroot/root/preseed + Chroot chroot "dpkg-reconfigure gdm" + echo "/usr/bin/gdm" > chroot/etc/X11/default-display-manager + + # set session manager + Chroot chroot "update-alternatives --set x-session-manager /usr/bin/xfce4-session" + fi + ;; + esac +done + # Removing udev mac caching rule rm -f chroot/etc/udev/rules.d/*persistent-net.rules diff --git a/helpers/chroot_hooks b/helpers/chroot_hooks index 986aab593..04fe4876a 100755 --- a/helpers/chroot_hooks +++ b/helpers/chroot_hooks @@ -42,12 +42,6 @@ HOOKS="$(echo ${LH_HOOKS} ${LH_PACKAGES_LISTS} ${LH_TASKS} | sed -e 's| |\n|g' | for HOOK in ${HOOKS} do - # Special handling for kde - if [ "${HOOK}" = "kde-desktop" ] && [ -n "$(echo ${HOOKS} | grep gnome-desktop)" ] - then - continue - fi - if [ -f ${LH_BASE:-/usr/share/live-helper}/hooks/"${HOOK}" ] then # Copying hook diff --git a/hooks/kde-desktop b/hooks/kde-desktop deleted file mode 100755 index 3dc4d242c..000000000 --- a/hooks/kde-desktop +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# /usr/share/live-helper/hooks/kde-desktop - hook list for live-helper(7) -# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org> -# -# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -# This is free software, and you are welcome to redistribute it -# under certain conditions; see COPYING for details. - -set -e - -apt-get remove --purge --yes gdm -update-alternatives --set x-session-manager /usr/bin/startkde -dpkg-reconfigure kdm |