summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/chroot_hacks70
-rwxr-xr-xhelpers/chroot_hooks6
2 files changed, 70 insertions, 6 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
diff --git a/helpers/chroot_hooks b/helpers/chroot_hooks
index 986aab5..04fe487 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