~ubuntu-branches/ubuntu/trusty/debian-cd/trusty-proposed

« back to all changes in this revision

Viewing changes to tools/boot/lenny/x86-desktop.sh

  • Committer: Package Import Robot
  • Author(s): Steve McIntyre, Steve McIntyre, Joey Hess, Ian Campbell, Raphaël Hertzog, Philipp Kern, Robert Millan
  • Date: 2012-05-04 16:13:42 UTC
  • Revision ID: package-import@ubuntu.com-20120504161342-xye3fqy6e51cbgq3
Tags: 3.1.8
[ Steve McIntyre ]
* Switch i386 kernel flavours again on advice from Ben:
  + Removed all mention of 686-bigmem as it's now gone
  + Added 686-pae onto CD#1 in place of 686
  + Leave the 486 kernel on CD#1 still, for people who can't use 686-pae
  + Add zfsutils into the generate_d-i+k_list for kfreebsd users.
* Add support for translated package description files. Closes: #495102
  + Add needed dependency on bzip2
  + Other minor cleanups in tools/make_disc_trees.pl
* Fix "expert" mode in yaboot for powerpc. Closes: #636265. Thanks to
  Milan Kupcevic for the patch.
* Update list of Linux kernel packages. Closes: #648690. Thanks to Ben
  Hutchings for the patch.
* Remove lots of old stuff neither needed nor supported any more:
  + removed architectures: alpha arm hppa
  + removed releases: etch lenny
  + removed unversioned data/sparc and data/yaboot, versioned
    equivalents are in place already.
* tools/generate_firmware_task: Add LOCALDEBS support
* Add more armel kernel flavours
* Add armhf as a known architecture, merging common armel/armhf boot
  setup scripts.
* Remove hppa boot script, unsupported now.
* Tweak command line options for creating source images: add -joliet-long

[ Joey Hess ]
* Read tasksel's debian-tasks.desc from its new location.

[ Ian Campbell ]
* Rename "xm-debian.cfg" to just "debian.cfg" for Xen config.

[ Raphaël Hertzog ]
* Changes triggered by various lintian warnings:
  + Switch to “3.0 (native)” source format to get rid of .svn
    directories in the source package (when built from the svn checkout
    directly)
  + Support build-arch/build-indep targets in debian/rules.
  + Drop executable rights from tools/boot/wheezy/boot-hurd
    (and fix debian/rules to not re-add it).
  + Bump Standards-Version to 3.9.2 (no change required).

[ Philipp Kern ]
* Add an extra tweaked version of d390.ins for s390 booting. The
  Hardware Management Console needs the file to be in the root
  directory.

[ Robert Millan ]
* Add kfreebsd 9. Closes: #650926
* Add graphical installer image for kfreebsd-amd64. Closes: #651530
* generate_d-i+k_list: Add ufutils. Closes: #662234

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Functions to convert isolinux config to allow selection of desktop
2
 
# environment for certain images.
3
 
 
4
 
# All config file names need to be in 8.3 format!
5
 
# For that reason files that get a "desktop"  postfix are renamed as
6
 
# follows: adtxt->at, adgtk->ag.
7
 
# With two characters (dt) for the postfix this will leave as maximum
8
 
# for example: amdtxtdt.cfg or amdatdt.cfg.
9
 
 
10
 
make_desktop_template() {
11
 
        # Split rescue labels out of advanced options files
12
 
        for file in boot$N/isolinux/*ad*.cfg; do
13
 
                rq_file="$(echo "$file" | sed -r "s:/(amd)?ad:/\1rq:")"
14
 
                sed -rn "s:desktop=[^ ]*::
15
 
                         /^label (amd64-)?rescue/,+3 p" $file >$rq_file
16
 
                sed -ri "/^label (amd64-)?rescue/ i\include $(basename $rq_file)
17
 
                         /^label (amd64-)?rescue/,+3 d" $file
18
 
        done
19
 
 
20
 
        mkdir -p boot$N/isolinux/desktop
21
 
 
22
 
        cp boot$N/isolinux/menu.cfg boot$N/isolinux/desktop/menu.cfg
23
 
        sed -i "/^menu hshift/,/^include stdmenu/ d
24
 
                s:include :include %desktop%/:
25
 
                /include .*stdmenu/ s:%desktop%/::
26
 
                s:config :config %desktop%/:" \
27
 
                boot$N/isolinux/desktop/menu.cfg
28
 
        cp boot$N/isolinux/desktop/menu.cfg boot$N/isolinux/desktop/prmenu.cfg
29
 
        sed -ri "s:(include.*(txt|gtk))(\.cfg):\1dt\3:
30
 
                 /include.*(txt|gtk)/ {s:adtxt:at:; s:adgtk:ag:}" \
31
 
                boot$N/isolinux/desktop/menu.cfg
32
 
        sed -i "/menu begin advanced/ s:ced:ced-%desktop%:
33
 
                /Advanced options/ i\    menu label Advanced options
34
 
                /label mainmenu/ s:mainmenu:dtmenu-%desktop%:
35
 
                /label help/ s:help:help-%desktop%:" \
36
 
                boot$N/isolinux/desktop/menu.cfg
37
 
        sed -i "/^[[:space:]]*menu/ d
38
 
                /label mainmenu/ d
39
 
                /include stdmenu/ d
40
 
                s:^[[:space:]]*::
41
 
                /label help/,+5 d" \
42
 
                boot$N/isolinux/desktop/prmenu.cfg
43
 
 
44
 
        cp boot$N/isolinux/prompt.cfg boot$N/isolinux/desktop/prompt.cfg
45
 
        sed -i "/include menu/ a\default install
46
 
                s:include menu:include %desktop%/prmenu:" \
47
 
                boot$N/isolinux/desktop/prompt.cfg
48
 
 
49
 
        for file in boot$N/isolinux/*txt.cfg boot$N/isolinux/*gtk.cfg; do
50
 
                [ -e "$file" ] || continue
51
 
                # Skip rescue include files
52
 
                if $(echo $file | grep -Eq "/(amd)?rq"); then
53
 
                        continue
54
 
                fi
55
 
 
56
 
                # Create two types of desktop include files: for vesa menu and
57
 
                # for prompt; the latter keep the original name, the former
58
 
                # get a 'dt' postfix and the name is shortened if needed
59
 
                dt_prfile="$(dirname "$file")/desktop/$(basename "$file")"
60
 
                dt_file="${dt_prfile%.cfg}dt.cfg"
61
 
                dt_file="$(echo "$dt_file" | \
62
 
                        sed -r "s:adtxt:at:
63
 
                                s:adgtk:ag:")"
64
 
                cp $file $dt_file
65
 
                sed -ri "/^default/ s:^:#:
66
 
                         /include (amd)?rq/ d
67
 
                         s:desktop=[^ ]*:desktop=%desktop%:" \
68
 
                        $dt_file
69
 
                cp $dt_file $dt_prfile
70
 
                sed -i "/^label/ s:[[:space:]]*$:-%desktop%:" \
71
 
                        $dt_file
72
 
        done
73
 
}
74
 
 
75
 
modify_for_light_desktop() {
76
 
        make_desktop_template
77
 
 
78
 
        cp -r boot$N/isolinux/desktop boot$N/isolinux/xfce
79
 
        sed -i "s:%desktop%:xfce:g" boot$N/isolinux/xfce/*.cfg
80
 
        sed -i "/Advanced options/ s:title:title Xfce:" \
81
 
                boot$N/isolinux/xfce/menu.cfg
82
 
 
83
 
        cp -r boot$N/isolinux/desktop boot$N/isolinux/lxde
84
 
        sed -i "s:%desktop%:lxde:g" boot$N/isolinux/lxde/*.cfg
85
 
        sed -i "/Advanced options/ s:title:title LXDE:" \
86
 
                boot$N/isolinux/lxde/menu.cfg
87
 
 
88
 
        # Cleanup
89
 
        rm -r boot$N/isolinux/desktop
90
 
        for file in boot$N/isolinux/*txt.cfg boot$N/isolinux/*gtk.cfg \
91
 
                    boot$N/isolinux/prompt.cfg; do
92
 
                [ -e "$file" ] || continue
93
 
                # Skip rescue include files
94
 
                if $(echo $file | grep -q "/rq"); then
95
 
                        continue
96
 
                fi
97
 
 
98
 
                rm $file
99
 
        done
100
 
 
101
 
        # Create new "top level" menu file
102
 
        cat >boot$N/isolinux/menu.cfg <<EOF
103
 
menu hshift 13
104
 
menu width 49
105
 
 
106
 
include stdmenu.cfg
107
 
menu title Desktop environment menu
108
 
menu begin lxde-desktop
109
 
    include stdmenu.cfg
110
 
    menu label ^LXDE
111
 
    menu title LXDE desktop boot menu
112
 
    text help
113
 
   Select the 'Lightweight X11 Desktop Environment' for the Desktop task
114
 
    endtext
115
 
    label mainmenu-lxde
116
 
        menu label ^Back..
117
 
        menu exit
118
 
    include lxde/menu.cfg
119
 
menu end
120
 
menu begin xfce-desktop
121
 
    include stdmenu.cfg
122
 
    menu label ^Xfce
123
 
    menu title Xfce desktop boot menu
124
 
    text help
125
 
   Select the 'Xfce lightweight desktop environment' for the Desktop task
126
 
    endtext
127
 
    label mainmenu-xfce
128
 
        menu label ^Back..
129
 
        menu exit
130
 
    include xfce/menu.cfg
131
 
menu end
132
 
menu begin rescue
133
 
    include stdmenu.cfg
134
 
    menu label ^System rescue
135
 
    menu title System rescue boot menu
136
 
    label mainmenu-rescue
137
 
        menu label ^Back..
138
 
        menu exit
139
 
    include rqtxt.cfg
140
 
    include amdrqtxt.cfg
141
 
    include rqgtk.cfg
142
 
    include amdrqgtk.cfg
143
 
menu end
144
 
EOF
145
 
}
146
 
 
147
 
modify_for_all_desktop() {
148
 
        make_desktop_template
149
 
 
150
 
        # Remove desktop option in root config files (for GNOME)
151
 
        sed -i "s:desktop=[^ ]*::" boot$N/isolinux/*.cfg
152
 
 
153
 
        cp -r boot$N/isolinux/desktop boot$N/isolinux/kde
154
 
        sed -i "s:%desktop%:kde:g" boot$N/isolinux/kde/*.cfg
155
 
        sed -i "/Advanced options/ s:title:title KDE:" \
156
 
                boot$N/isolinux/kde/menu.cfg
157
 
 
158
 
        cp -r boot$N/isolinux/desktop boot$N/isolinux/xfce
159
 
        sed -i "s:%desktop%:xfce:g" boot$N/isolinux/xfce/*.cfg
160
 
        sed -i "/Advanced options/ s:title:title Xfce:" \
161
 
                boot$N/isolinux/xfce/menu.cfg
162
 
 
163
 
        cp -r boot$N/isolinux/desktop boot$N/isolinux/lxde
164
 
        sed -i "s:%desktop%:lxde:g" boot$N/isolinux/lxde/*.cfg
165
 
        sed -i "/Advanced options/ s:title:title LXDE:" \
166
 
                boot$N/isolinux/lxde/menu.cfg
167
 
 
168
 
        # Cleanup
169
 
        rm -r boot$N/isolinux/desktop
170
 
 
171
 
        # Create desktop menu file
172
 
        cat >boot$N/isolinux/dtmenu.cfg <<EOF
173
 
menu begin desktop
174
 
    include stdmenu.cfg
175
 
    menu hshift 13
176
 
    menu width 49
177
 
    menu label Alternative desktop environments
178
 
    menu title Desktop environment menu
179
 
    label mainmenu-kde
180
 
        menu label ^Back..
181
 
        text help
182
 
        Higher level options install the GNOME desktop environment
183
 
        endtext
184
 
        menu exit
185
 
    menu begin kde-desktop
186
 
        include stdmenu.cfg
187
 
        menu label ^KDE
188
 
        menu title KDE desktop boot menu
189
 
        text help
190
 
   Select the 'K Desktop Environment' for the Desktop task
191
 
        endtext
192
 
        label mainmenu-kde
193
 
            menu label ^Back..
194
 
            menu exit
195
 
        include kde/menu.cfg
196
 
    menu end
197
 
    menu begin lxde-desktop
198
 
        include stdmenu.cfg
199
 
        menu label ^LXDE
200
 
        menu title LXDE desktop boot menu
201
 
        text help
202
 
       Select the 'Lightweight X11 Desktop Environment' for the Desktop task
203
 
        endtext
204
 
        label mainmenu-lxde
205
 
            menu label ^Back..
206
 
            menu exit
207
 
        include lxde/menu.cfg
208
 
    menu end
209
 
    menu begin xfce-desktop
210
 
        include stdmenu.cfg
211
 
        menu label ^Xfce
212
 
        menu title Xfce desktop boot menu
213
 
        text help
214
 
   Select the 'Xfce lightweight desktop environment' for the Desktop task
215
 
        endtext
216
 
        label mainmenu-xfce
217
 
            menu label ^Back..
218
 
            menu exit
219
 
        include xfce/menu.cfg
220
 
    menu end
221
 
menu end
222
 
EOF
223
 
 
224
 
        # Include desktop submenu in Advanced options submenu
225
 
        sed -i "/menu end/ i\\\tinclude dtmenu.cfg" \
226
 
                boot$N/isolinux/menu.cfg
227
 
}