/usr/share/debian-cd/tools/boot/wheezy/x86-desktop.sh is in debian-cd 3.1.17.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | # Functions to convert isolinux config to allow selection of desktop
# environment for certain images.
di_syslinux_version() {
local version
version=$(sed -nr "s/^# D-I config version ([0-9.])/\1/p" \
boot$N/isolinux/isolinux.cfg)
[ -n "Sversion" ] || return 1
echo "$version"
}
# Workaround for #505243
# Syslinux does not correctly handle a default64 option in combination
# with vesamenu. Instead, add special default label to automatically
# select i386/amd64 if user hits enter from help screens.
multiarch_workaround() {
cp -f $CDDIR/../syslinux/usr/lib/syslinux/ifcpu64.c32 boot$N/isolinux/
sed -i "/^default install/ s/^/#/" \
boot$N/isolinux/txt.cfg || true
sed -i "/^default64 amd64-install/ s/^/#/" \
boot$N/isolinux/amdtxt.cfg || true
sed -i "/^include menu.cfg/ a\include instsel.cfg" \
boot$N/isolinux/prompt.cfg
if [ -e boot$N/isolinux/desktop/prompt.cfg ]; then
sed -i "/^default install/ a\include instsel.cfg" \
boot$N/isolinux/desktop/prompt.cfg
fi
cat >boot$N/isolinux/instsel.cfg <<EOF
default install-select
label install-select
kernel ifcpu64.c32
append amd64-install -- install
EOF
}
create_desktop_dir() {
local desktop=$1 title
case $desktop in
kde) title=KDE ;;
xfce) title=Xfce ;;
lxde) title=LXDE ;;
esac
cp -r boot$N/isolinux/desktop boot$N/isolinux/$desktop
sed -i "s:%desktop%:$desktop:
s:%dt-name%:$title:" boot$N/isolinux/$desktop/*.cfg
}
modify_for_single_desktop() {
# Cleanup
rm -f boot$N/isolinux/dtmenu.cfg
rm -fr boot$N/isolinux/desktop
# Set default desktop, or remove if not applicable
if [ "$DESKTOP" ]; then
sed -i "s:%desktop%:$DESKTOP:g" boot$N/isolinux/*.cfg
else
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
fi
}
modify_for_light_desktop() {
local desktop
for file in boot$N/isolinux/{,amd}{,ad}{txt,gtk}.cfg; do
if [ -e $file ]; then
mv $file boot$N/isolinux/desktop
fi
done
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
for desktop in xfce lxde; do
create_desktop_dir $desktop
done
# Cleanup
rm -r boot$N/isolinux/desktop
rm boot$N/isolinux/prompt.cfg boot$N/isolinux/dtmenu.cfg
# Create new "top level" menu file
cat >boot$N/isolinux/menu.cfg <<EOF
menu hshift 13
menu width 49
include stdmenu.cfg
menu title Desktop environment menu
menu begin lxde-desktop
include stdmenu.cfg
menu label ^LXDE
menu title LXDE desktop boot menu
text help
Select the 'Lightweight X11 Desktop Environment' for the Desktop task
endtext
label mainmenu-lxde
menu label ^Back..
menu exit
include lxde/menu.cfg
menu end
menu begin xfce-desktop
include stdmenu.cfg
menu label ^Xfce
menu title Xfce desktop boot menu
text help
Select the 'Xfce lightweight desktop environment' for the Desktop task
endtext
label mainmenu-xfce
menu label ^Back..
menu exit
include xfce/menu.cfg
menu end
menu begin rescue
include stdmenu.cfg
menu label ^System rescue
menu title System rescue boot menu
label mainmenu-rescue
menu label ^Back..
menu exit
include rqtxt.cfg
include amdrqtxt.cfg
include rqgtk.cfg
include amdrqgtk.cfg
menu end
EOF
}
modify_for_all_desktop() {
local desktop
for file in boot$N/isolinux/{,amd}{,ad}{txt,gtk}.cfg; do
if [ -e $file ]; then
cp $file boot$N/isolinux/desktop
fi
done
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
for desktop in kde xfce lxde; do
create_desktop_dir $desktop
done
# Cleanup
rm -r boot$N/isolinux/desktop
}
|