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 /helpers/chroot_hacks | |
parent | afa0ce7b8405da9dd4c77744c96e97dc65e9650d (diff) | |
download | live-build-dd2fa705308e32a3aa237f5f402e01e5894e2891.zip live-build-dd2fa705308e32a3aa237f5f402e01e5894e2891.tar.gz |
Updating default desktop configuration quirks.
Diffstat (limited to 'helpers/chroot_hacks')
-rwxr-xr-x | helpers/chroot_hacks | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/helpers/chroot_hacks b/helpers/chroot_hacks index 66fb365..98e6b5b 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 |