Merge lp:~ivoks/casper/casper-virtio into lp:casper

Proposed by Ante Karamatić
Status: Superseded
Proposed branch: lp:~ivoks/casper/casper-virtio
Merge into: lp:casper
Diff against target: 4049 lines (+2343/-759) (has conflicts)
52 files modified
.bzr-builddeb/default.conf (+2/-0)
bin/casper-a11y-enable (+668/-0)
bin/casper-preseed (+13/-6)
bin/casper-set-selections (+92/-0)
bin/casper-snapshot (+1/-1)
bin/casper-update-initramfs (+25/-0)
casper-md5check/Makefile (+2/-1)
casper-md5check/casper-md5check.c (+115/-97)
conf.d/compcache (+1/-1)
debian/casper.init (+17/-11)
debian/casper.install (+3/-0)
debian/casper.postinst (+10/-0)
debian/changelog (+769/-1)
debian/control (+6/-6)
debian/copyright (+11/-1)
debian/manpage/casper.7 (+12/-0)
debian/source/format (+1/-0)
hooks/casper (+5/-1)
scripts/casper (+107/-26)
scripts/casper-bottom/05mountpoints (+4/-0)
scripts/casper-bottom/07remove_oem_config (+32/-0)
scripts/casper-bottom/10adduser (+16/-26)
scripts/casper-bottom/15autologin (+53/-9)
scripts/casper-bottom/19keyboard (+39/-11)
scripts/casper-bottom/22gnome_panel_data (+0/-6)
scripts/casper-bottom/22screensaver (+1/-3)
scripts/casper-bottom/22sslcert (+1/-0)
scripts/casper-bottom/23networking (+20/-15)
scripts/casper-bottom/24preseed (+40/-15)
scripts/casper-bottom/25configure_init (+2/-2)
scripts/casper-bottom/26disable_user_menu (+28/-0)
scripts/casper-bottom/30accessibility (+31/-151)
scripts/casper-bottom/31disable_update_notifier (+8/-0)
scripts/casper-bottom/32disable_hibernation (+6/-10)
scripts/casper-bottom/34disable_kde_services.OTHER (+36/-0)
scripts/casper-bottom/37kubuntu_netbook_installer_link (+0/-28)
scripts/casper-bottom/40install_driver_updates (+7/-1)
scripts/casper-bottom/41apt_cdrom (+9/-1)
scripts/casper-bottom/42disable_apparmor (+0/-26)
scripts/casper-bottom/43disable_updateinitramfs (+2/-7)
scripts/casper-bottom/44pk_allow_ubuntu (+2/-23)
scripts/casper-bottom/45disable_guest_account (+0/-25)
scripts/casper-bottom/47unr_ubiquity (+0/-39)
scripts/casper-bottom/48enable_kubuntu_netbook (+0/-27)
scripts/casper-bottom/48kubuntu_disable_restart_notifications (+5/-0)
scripts/casper-bottom/49kubuntu_mobile_session (+5/-0)
scripts/casper-functions (+15/-1)
scripts/casper-helpers (+34/-10)
scripts/casper-premount/10driver_updates (+1/-1)
ubiquity-hooks/30accessibility (+75/-162)
ubiquity-hooks/48enable_kubuntu_netbook (+0/-8)
ubiquity-hooks/49kubuntu_gnome_icon_cache (+11/-0)
Contents conflict in scripts/casper-bottom/34disable_kde_services
To merge this branch: bzr merge lp:~ivoks/casper/casper-virtio
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+78378@code.launchpad.net

This proposal has been superseded by a proposal from 2011-10-06.

Description of the change

At the moment, casper doesn't work with live system located on virtio device. This simple change makes that possible.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Could you please re-propose this for merging into lp:ubuntu/casper
rather than lp:casper, so that we get a useful merge diff? Thanks.

Revision history for this message
Ante Karamatić (ivoks) wrote :

Ups. Sorry about that.

Unmerged revisions

961. By Ante Karamatić

* scripts/casper:
  - enable use of virtio devices in is_nice_device()

960. By Luke Yelavich

releasing version 1.284

959. By Luke Yelavich

Make sure profile settings are not set up twice

958. By Luke Yelavich

* Fix typo
* Write session data if a starttup script is created

957. By Luke Yelavich

* ubiquity-hooks/30accessibility:
  - Make sure that accessibility profile settings are properly applied at
    install time, even if the user decided to try Ubuntu first, and then
    run the install from the desktop
  - Copy any existing orca configuration to the target system

956. By Luke Yelavich

Reformat the changelog to be easier to comprehend

955. By Luke Yelavich

* Set correct permissions for the orca config directory once the config files
  have been created
* Make sure the startup script checks take into account the ability to be run
  from the initramfs

954. By Luke Yelavich

* Make sure that accessibility profile settings are properly applied at
  install time, even if the user decided to try Ubuntu first, and then
  run the install from the desktop
* Add some other needed settings for various profiles for use in the login
  manager

953. By Luke Yelavich

* bin/casper-a11y-enable: Set the session by calling AccountService via dbus
  instead of using lightdm commands, as we cannot run lightdm-set-defaults
  as a user
* Add some extra spaces to make sure the startup scripts used to set a11y
  settings are syntactically correct

952. By Martin Pitt

releasing version 1.283

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory '.bzr-builddeb'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf 2011-10-06 10:04:28 +0000
@@ -0,0 +1,2 @@
1[BUILDDEB]
2native = True
03
=== added file 'bin/casper-a11y-enable'
--- bin/casper-a11y-enable 1970-01-01 00:00:00 +0000
+++ bin/casper-a11y-enable 2011-10-06 10:04:28 +0000
@@ -0,0 +1,668 @@
1#!/bin/sh
2#
3# casper-a11y-enable - Sets accessibility profile settings for the live session
4# or installed system.
5#
6# This script is called by several other scripts, as well as ubiquity itself to
7# set up accessibility profile settings for use in the live environment and on
8# an installed system.
9#
10# Copyright (C) 2011, Canonical Ltd.
11#
12# Author:
13# - Luke Yelavich <luke.yelavich@canonical.com>
14#
15# This script is free software; you can redistribute it and/or modify it under
16# the terms of the GNU General Public License as published by the Free
17# Software Foundation; either version 2 of the License, or at your option)
18# any later version.
19#
20# This program is distributed in the hope that it will be useful,
21# but WITHOUT ANY WARRANTY; without even the implied warranty of
22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23# GNU General Public License for more details.
24#
25# You should have received a copy of the GNU General Public License along
26# with this application; if not, write to the Free Software Foundation, Inc., 51
27# Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28##################################################################################
29
30set -e
31
32### PROFILE SETTINGS METHODS BEGIN HERE ###
33# The methods that are used to set profile data have been placed as close to the
34# top of this file as possible, so they are easy to locate, and will hopefully
35# save time when making smaller changes.
36
37# Common settings for low vision profiles. Any change you make here will affect
38# all low vision profiles, for both the user session and login manager.
39set_common_lowvis()
40{
41 gset set org.gnome.desktop.interface toolkit-accessibility true
42 gct -s -t bool /desktop/gnome/interface/accessibility true
43 gct -s -t bool /apps/gksu/disable-grab true
44 gset set org.gnome.yelp show-cursor true
45 add_sudoers_file
46}
47
48# Common settings for motor profiles. Any change you make here will affect
49# all motor profiles, for both the user session and login manager.
50set_common_motor()
51{
52 gset set org.gnome.desktop.a11y.keyboard enable true
53 gct -s -t bool /apps/gksu/disable-grab true
54 gset set org.gnome.desktop.a11y.keyboard stickykeys-enable true
55 gset set org.gnome.desktop.a11y.keyboard stickykeys-two-key-off false
56}
57
58# Settings for the high-contrast profile.
59set_high_contrast()
60{
61 gset set org.gnome.desktop.interface icon-theme HighContrast
62 gset set org.gnome.desktop.interface monospace-font-name "monospace 18"
63 gset set org.gnome.desktop.interface font-name "sans 18"
64 gset set org.gnome.desktop.background picture-uri ""
65 gset set org.gnome.desktop.background picture-options none
66 gset set org.gnome.desktop.background primary-color \#666666
67 gset set org.gnome.desktop.background secondary-color \#7F7F7F
68 gset set org.gnome.desktop.background color-shading-type solid
69 gset set org.gnome.desktop.interface cursor-size 48
70 gset set org.gnome.desktop.interface cursor-theme whiteglass
71 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/
72 if [ -d $CHROOT_DIR/usr/share/xubuntu-default-settings/accessibility ]; then
73 cp -a $CHROOT_DIR/usr/share/xubuntu-default-settings/accessibility/* $CHROOT_DIR/etc/xdg/
74 fi
75}
76
77set_magnifier()
78{
79 # Ubuntu
80 gset set org.gnome.desktop.a11y.applications screen-magnifier-enabled true
81 set_orca_config magnifier
82
83 # Kubuntu
84 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/
85}
86
87set_blindness()
88{
89 gset set org.gnome.desktop.a11y.applications screen-reader-enabled true
90 gset set org.gnome.Empathy.conversation theme classic
91 set_orca_config speech
92 set_session ubuntu-2d
93
94 if [ -n "$SET_LOGIN" ]; then
95 gset_lightdm set org.gnome.desktop.interface toolkit-accessibility true
96 gset_lightdm set org.gnome.desktop.a11y.applications screen-reader-enabled true
97 fi
98}
99
100set_braille()
101{
102 gset set org.gnome.desktop.a11y.applications screen-reader-enabled true
103 gset set org.gnome.Empathy.conversation theme classic
104 set_orca_config braille
105 set_session ubuntu-2d
106
107 if [ -n "$SET_LOGIN" ]; then
108 gset_lightdm set org.gnome.desktop.interface toolkit-accessibility true
109 gset_lightdm set org.gnome.desktop.a11y.applications screen-reader-enabled true
110 fi
111}
112
113set_keyboard_modifiers()
114{
115 gset set org.gnome.desktop.a11y.keyboard mousekeys-enable true
116 gset set org.gnome.desktop.a11y.keyboard stickykeys-modifier-beep true
117 gset set org.gnome.settings-daemon.peripherals.keyboard repeat true
118 gset set org.gnome.settings-daemon.peripherals.keyboard delay 700
119 gset set org.gnome.settings-daemon.peripherals.keyboard repeat-interval 10
120 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/
121 if [ -e $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
122 sed -i 's/0/1/' $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml
123 fi
124}
125
126set_onscreen_keyboard()
127{
128 gset set org.gnome.desktop.interface toolkit-accessibility true
129 gset set org.gnome.desktop.a11y.keyboard stickykeys-modifier-beep false
130 gset set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
131
132 if [ -n "$SET_LOGIN" ]; then
133 gset_lightdm set org.gnome.desktop.interface toolkit-accessibility true
134 gset_lightdm set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
135 fi
136
137 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/
138 if [ -e $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
139 sed -i '/Sticky/ s/0/1/' $CHROOT_DIR/etc/xdg/xfce4/mcs_settings/keyboard.xml
140 fi
141}
142### PROFILE SETTINGS METHODS END HERE ###
143
144help()
145{
146 cat <<EOF
147Usage: $0 [-chroot=<root>] [-user=<username>] [-l|-login]
148 [-i|-initramfs] [-d|-debug] <profilename>
149
150-h, -help Display this help.
151-chroot=<root> Chroot into <root> to apply profile settings, requires a
152 username to be specified, see below.
153-user=<username> The user where a profile is to be applied, requires the
154 script to be run as root. If no username is given, it
155 is assumed that you wish to apply profile settings for
156 the current user.
157-l, -login Apply some of the selected profile settings to the
158 login manager. Currently this is hard-coded to lightdm.
159 This requires root privileges.
160-i, -initramfs Indicate that the script is being called from the
161 initramfs. Allows the script to assume some values
162 that can not otherwise be easily determined in an
163 initramfs environment. Requires that a chroot dir and
164 user name are specified. See above.
165-script Create a script to be run at system boot that will
166 apply all settings for the specified user and for
167 login. This script will then remove itself. This is
168 needed to work around gsettings not working in a chroot
169 environment with no dconf service running.
170-d|-debug Enable debugging output.
171<profilename> The name of the profile you wish to apply, see below.
172
173The profiles currently available are as follows:
174high-contrast For users with lesser visual impairments who only need a high
175 contrast theme, mouse cursor and icons.
176magnifier For users with moderate visual impairments who require a screen
177 magnifier.
178blindness Users who are partially or completely blind who require a screen
179 reader.
180braille Users who are partially or completely blind who require a screen
181 reader and wish to use a Braille display.
182keyboard-modifiers
183 Users who have minor motor impairments who require slight
184 changes to the way their keyboard behaves.
185onscreen-keyboard
186 Users with motor impairments who require the use of an
187 on-screen keyboard.
188EOF
189}
190
191gset()
192{
193 if [ -n "$GLIBBIN_VERSION" ]; then
194 if [ -n "$STARTUP_SCRIPT" ]; then
195 echo "gsettings " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings
196 else
197 $DO_CHROOT $DO_SUDO gsettings "$@"
198 fi
199 fi
200}
201
202gset_lightdm()
203{
204 if [ -n "$GLIBBIN_VERSION" ]; then
205 if [ -n "$STARTUP_SCRIPT" ]; then
206 echo "gsettings " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings-lightdm
207 else
208 $DO_CHROOT sudo -u lightdm gsettings "$@"
209 fi
210 fi
211}
212
213# Soon to be deprecated
214gct()
215{
216 if [ -n "$GCONF_VERSION" ]; then
217 if [ -n "$STARTUP_SCRIPT" ]; then
218 echo "gconftool-2 " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings
219 else
220 $DO_CHROOT $DO_SUDO gconftool-2 "$@"
221 fi
222 fi
223}
224
225gct_lightdm()
226{
227 if [ -n "$GCONF_VERSION" ]; then
228 if [ -n "$STARTUP_SCRIPT" ]; then
229 echo "gconftool-2 " "$@" >> $CHROOT_DIR/usr/bin/a11y-profile-settings-lightdm
230 else
231 $DO_CHROOT sudo -u lightdm gconftool-2 "$@"
232 fi
233 fi
234}
235
236kderc_addtoprefixes()
237{
238 if [ -e $CHROOT_DIR/etc/kde4rc ]; then
239 sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" $CHROOT_DIR/etc/kde4rc
240 fi
241}
242
243add_sudoers_file()
244{
245 if [ "$HOME" = "/root" ] || [ -n "$IN_INITRAMFS" ]; then
246 cat <<EOF > $CHROOT_DIR/etc/sudoers.d/a11y-sudo
247# To allow accessibility in GTK to work with sudo.
248Defaults env_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"
249EOF
250 chmod 0440 $CHROOT_DIR/etc/sudoers.d/a11y-sudo
251 else
252 echo "Warning: Could not create sudoers file due to no root privileges."
253 fi
254}
255
256# Unfortunately this bloats this script somewhat, but orca doesn't seem to want
257# to deal with individual settings/a small config fragment.
258# Arguments: $1 = speech/magnifier/braille (which
259# accessibility feature to turn on)
260set_orca_config()
261{
262 # Yes, we could use $HOME, but enquiring about $HOME is not easy when
263 # Outside the target environment, particularly when running from the
264 # initramfs, and this script is not everything for everybody anyway.
265 if [ -n "$ORCA_VERSION" ] && ! [ -f "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf" ]; then
266 mkdir -p "$CHROOT_DIR/home/$USER_NAME/.local/share/orca"
267
268 cat <<EOF > "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf"
269{
270 "pronunciations": {},
271 "keybindings": {},
272 "profiles": {
273 "default": {
274 "profile": [
275 "Default",
276 "default"
277 ],
278 "pronunciations": {},
279 "keybindings": {}
280 }
281 },
282 "general": {
283 "speakCellHeaders": true,
284 "magEdgeMargin": 0,
285 "brailleContractionTable": "",
286 "magPointerFollowsFocus": false,
287 "magTextTrackingMode": 2,
288 "magZoomerBorderSize": 1,
289 "brailleAlignmentStyle": 0,
290 "enableEchoByWord": false,
291 "enableMagZoomerColorInversion": false,
292 "magCursorSize": 32,
293 "magSmoothingMode": 0,
294 "magZoomerLeft": 840,
295 "showMainWindow": true,
296 "sayAllStyle": 1,
297 "brailleSelectorIndicator": 192,
298 "presentDateFormat": "%x",
299 "magContrastLevel": 0,
300 "magMouseTrackingMode": 0,
301 "speakCellSpan": true,
302 "progressBarUpdateInterval": 10,
303 "speakCellCoordinates": true,
304 "enablePauseBreaks": true,
305 "brailleEOLIndicator": " $l",
306 "verbalizePunctuationStyle": 1,
307 "progressBarVerbosity": 1,
308 "enableSpeech": false,
309 "enableBraille": false,
310 "chatAnnounceBuddyTyping": false,
311 "speakMultiCaseStringsAsWords": false,
312 "enableBrailleGrouping": false,
313 "readTableCellRow": true,
314 "speechServerFactory": "speechdispatcherfactory",
315 "textAttributesBrailleIndicator": 0,
316 "enableMagCursorExplicitSize": false,
317 "messageVerbosityLevel": 1,
318 "enableMagLiveUpdating": true,
319 "enableSpeechIndentation": false,
320 "enableKeyEcho": true,
321 "magHideCursor": false,
322 "magZoomerBorderColor": "#000000",
323 "magPointerFollowsZoomer": true,
324 "mouseDwellDelay": 0,
325 "magBrightnessLevelRed": 0,
326 "enableMagnifier": false,
327 "magZoomFactor": 4.0,
328 "activeProfile": [
329 "Default",
330 "default"
331 ],
332 "enableMagZoomerBorder": false,
333 "flashVerbosityLevel": 1,
334 "enableFlashMessages": true,
335 "speechServerInfo": null,
336 "presentToolTips": false,
337 "flashIsPersistent": false,
338 "skipBlankCells": false,
339 "firstStart": false,
340 "largeObjectTextLength": 75,
341 "enableEchoBySentence": false,
342 "magContrastLevelBlue": 0,
343 "magContrastLevelRed": 0,
344 "enableContractedBraille": false,
345 "orcaModifierKeys": [
346 "Insert",
347 "KP_Insert"
348 ],
349 "enableMagCursor": true,
350 "speechRequiredStateString": "required",
351 "quitOrcaNoConfirmation": false,
352 "brailleRequiredStateString": "required",
353 "magCursorColor": "#000000",
354 "enablePositionSpeaking": false,
355 "magZoomerType": 0,
356 "onlySpeakDisplayedText": false,
357 "enableProgressBarUpdates": true,
358 "wrappedStructuralNavigation": true,
359 "chatRoomHistories": false,
360 "brailleVerbosityLevel": 1,
361 "enableFunctionKeys": true,
362 "enableModifierKeys": true,
363 "magCrossHairColor": "#000000",
364 "enableTutorialMessages": false,
365 "enableActionKeys": true,
366 "speakBlankLines": true,
367 "magColorFilteringMode": 0,
368 "magZoomerRight": 1680,
369 "keyboardLayout": 1,
370 "magTargetDisplay": "",
371 "disableBrailleEOL": false,
372 "magZoomerTop": 0,
373 "magSourceDisplay": "",
374 "enableDiacriticalKeys": false,
375 "enableMnemonicSpeaking": false,
376 "enabledBrailledTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; text-spelling:none;",
377 "speechVerbosityLevel": 1,
378 "enableMagCrossHair": true,
379 "enableBrailleMonitor": false,
380 "voices": {
381 "default": {
382 "established": false
383 },
384 "uppercase": {
385 "average-pitch": 5.6
386 },
387 "system": {
388 "established": false
389 },
390 "hyperlink": {
391 "established": false
392 }
393 },
394 "magContrastLevelGreen": 0,
395 "brailleFlashTime": 5000,
396 "magCrossHairSize": 16,
397 "enableMouseReview": false,
398 "enableNavigationKeys": false,
399 "magBrightnessLevelGreen": 0,
400 "chatSpeakRoomName": false,
401 "startingProfile": [
402 "Default",
403 "default"
404 ],
405 "enableLockingKeys": true,
406 "profile": [
407 "Default",
408 "default"
409 ],
410 "brailleRolenameStyle": 1,
411 "brailleLinkIndicator": 192,
412 "enableEchoByCharacter": false,
413 "magBrightnessLevelBlue": 0,
414 "enableBrailleContext": true,
415 "magControlTrackingMode": 2,
416 "magZoomerBottom": 1050,
417 "enablePrintableKeys": true,
418 "enabledSpokenTextAttributes": "size:; family-name:; weight:400; indent:0; underline:none; strikethrough:false; justification:left; style:normal; paragraph-style:; text-spelling:none;",
419 "chatMessageVerbosity": 0,
420 "presentTimeFormat": "%X",
421 "magBrightnessLevel": 0,
422 "presentRequiredState": false,
423 "enableMagCrossHairClip": false
424 }
425}
426EOF
427
428 case "$1" in
429 magnifier)
430 sed -i -e 's/\"enableMagnifier\": false/\"enableMagnifier\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf"
431 ;;
432 speech)
433 sed -i -e 's/\"enableSpeech\": false/\"enableSpeech\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf"
434 ;;
435 braille)
436 sed -i -e 's/\"enableBraille\": false/\"enableBraille\": true/' "$CHROOT_DIR/home/$USER_NAME/.local/share/orca/user-settings.conf"
437 ;;
438 *)
439 ;;
440 esac
441
442 if [ "$HOME" = "/root" ] || [ -n "$IN_INITRAMFS" ]; then
443 chmod 755 "$CHROOT_DIR/home/$USER_NAME/.local/share/orca"
444 $DO_CHROOT chown $USER_NAME.$USER_NAME -R "/home/$USER_NAME/.local"
445 fi
446 fi
447}
448
449set_session()
450{
451 local uid=$($DO_CHROOT getent passwd $USER_NAME | awk -F: '{print $3}')
452
453 # We need to start the accounts daemon somehow and wait for a half second
454 # for it to get ready. Calling on AccountsService to set the X session with
455 # only one call seems to error out, so querying the user by name seems to get
456 # the daemon going.
457 if [ -n "$STARTUP_SCRIPT" ]; then
458 # I don't like having to write the file manually, but during testing I was
459 # unable to get calls via dbus-send to work.
460 cat <<EOF > $CHROOT_DIR/var/lib/AccountsService/users/$USER_NAME
461
462[User]
463XSession=ubuntu-2d
464EOF
465 else
466 dbus-send --type=method_call --system --dest=org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.FindUserByName string:$USER_NAME
467 sleep 1
468 dbus-send --type=method_call --system --reply-timeout=1000 --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User$uid org.freedesktop.Accounts.User.SetXSession string:$1
469 fi
470}
471
472create_conf()
473{
474 cat <<EOF > /tmp/casper-a11y.conf
475UBIQUITY_A11Y_PROFILE=$1
476EOF
477}
478
479if [ "$#" = "0" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
480 help
481 exit 1
482fi
483
484while [ "$#" -gt 0 ];
485do
486 case "$1" in
487 -chroot=*)
488 CHROOT_DIR="${1#-chroot=}"
489 DO_CHROOT="chroot $CHROOT_DIR"
490 shift
491 continue
492 ;;
493 -user=*)
494 USER_NAME="${1#-user=}"
495 DO_SUDO="sudo -u $USER_NAME"
496 shift
497 continue
498 ;;
499 -l|-login)
500 SET_LOGIN=1
501 shift
502 continue
503 ;;
504 -i|-initramfs)
505 IN_INITRAMFS=1
506 shift
507 continue
508 ;;
509 -d|-debug)
510 set -x
511 shift
512 continue
513 ;;
514 -script)
515 STARTUP_SCRIPT=1
516 shift
517 continue
518 ;;
519 *)
520 PROFILE_NAME="$1"
521 shift
522 continue
523 ;;
524 esac
525done
526
527if [ -n "$IN_INITRAMFS" ] && [ -z "$CHROOT_DIR" ]; then
528 echo "Error: In initramfs, but no chroot directory specified."
529 help
530 exit 1
531elif [ -n "$IN_INITRAMFS" ] && [ -z "$USER_NAME" ]; then
532 echo "Error: In initramfs, but no username specified."
533 help
534 exit 1
535fi
536
537if [ -n "$SET_LOGIN" ] && [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then
538 echo "Error: Setting up accessibility for login requires root privileges."
539 help
540 exit 1
541fi
542
543
544if [ -n "$CHROOT_DIR" ] || [ -n "$USER_NAME" ]; then
545 if [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then
546 echo "Error: You are not running as root."
547 help
548 exit 1
549 fi
550fi
551
552if [ -n "$CHROOT_DIR" ]; then
553 if [ ! -d "$CHROOT_DIR" ]; then
554 echo "Error: Target chroot directory does not exist, or you do not have permission to access it."
555 exit 1
556 fi
557 if [ -z "$IN_INITRAMFS" ] && ! type chroot >/dev/null 2>&1 ; then
558 echo "Error: Chroot command not available in running environment."
559 exit 1
560 fi
561fi
562
563if [ -n "$STARTUP_SCRIPT" ]; then
564 if [ -z "$USER_NAME" ]; then
565 echo "Error: You have requested to create a startup script, but no user was specified."
566 exit 1
567 fi
568 if [ "$HOME" != "/root" ] && [ -z "$IN_INITRAMFS" ]; then
569 echo "Error: You have requested to create a startup script, but you do not have root"
570 echo "privileges."
571 exit 1
572 fi
573 if [ -z "$CHROOT_DIR" ]; then
574 echo "Error: You have requested to create a startup script, but you did not specify"
575 echo "a target directory to chroot to."
576 exit 1
577 fi
578fi
579
580# If no username was entered on the command line, grab the name of the current
581# user, so we can write files to their home directory.
582if [ -z "$USER_NAME" ]; then
583 if [ -z "$USER" ]; then
584 USER_NAME="${HOME#/home/}"
585 else
586 USER_NAME="$USER"
587 fi
588fi
589
590# Check to see if a few necessary packages are present in the target
591# environment.
592GCONF_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || GCONF_VERSION=""
593GLIBBIN_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' libglib2.0-bin 2>/dev/null) || GLIBBIN_VERSION=""
594ORCA_VERSION=$($DO_CHROOT /usr/bin/dpkg-query -W --showformat='${Version}' gnome-orca 2>/dev/null) || ORCA_VERSION=""
595
596if [ -n "$STARTUP_SCRIPT" ]; then
597 cat <<EOF > $CHROOT_DIR/etc/init/a11y-profile-settings.conf
598# a11y-profile-settings - A job to set up accessibility settings
599
600description "Accessib ility profile settings"
601
602start on runlevel [2345]
603
604umask 022
605
606script
607 sudo -u $USER_NAME /usr/bin/dbus-launch --exit-with-session /usr/bin/a11y-profile-settings
608 sudo -u lightdm /usr/bin/dbus-launch --exit-with-session /usr/bin/a11y-profile-settings-lightdm
609 rm /usr/bin/a11y-profile-settings /usr/bin/a11y-profile-settings-lightdm
610 rm /etc/init/a11y-profile-settings.conf
611end script
612EOF
613 cat <<EOF > $CHROOT_DIR/usr/bin/a11y-profile-settings
614#!/bin/sh
615
616# Created by the casper accessibility profile settings script on
617# $(date).
618
619# This script deletes itself once run.
620
621EOF
622 cat <<EOF > $CHROOT_DIR/usr/bin/a11y-profile-settings-lightdm
623#!/bin/sh
624
625# Created by the casper accessibility profile settings script on
626# $(date).
627
628# This script deletes itself once run.
629
630EOF
631fi
632
633case $PROFILE_NAME in
634 high-contrast)
635 set_common_lowvis
636 set_high_contrast
637 create_conf $PROFILE_NAME
638 ;;
639 magnifier)
640 set_common_lowvis
641 set_magnifier
642 create_conf $PROFILE_NAME
643 ;;
644 blindness)
645 set_common_lowvis
646 set_blindness
647 create_conf screen-reader
648 ;;
649 braille)
650 set_common_lowvis
651 set_braille
652 create_conf $PROFILE_NAME
653 ;;
654 keyboard-modifiers)
655 set_common_motor
656 set_keyboard_modifiers
657 create_conf $PROFILE_NAME
658 ;;
659 onscreen-keyboard)
660 set_common_motor
661 set_onscreen_keyboard
662 create_conf $PROFILE_NAME
663 ;;
664esac
665
666if [ -n "$STARTUP_SCRIPT" ]; then
667 chmod 755 $CHROOT_DIR/usr/bin/a11y-profile-settings*
668fi
0669
=== modified file 'bin/casper-preseed'
--- bin/casper-preseed 2006-10-16 15:05:58 +0000
+++ bin/casper-preseed 2011-10-06 10:04:28 +0000
@@ -2,18 +2,25 @@
2set -e2set -e
3PATH=/usr/sbin:/usr/bin:/sbin:/bin3PATH=/usr/sbin:/usr/bin:/sbin:/bin
44
5# Only do this once.
6if [ -z "$DEBCONF_REDIR" ]; then
7 exec <&4
8 export DEBIAN_HAS_FRONTEND=1
9 export DEBCONF_REDIR=1
10fi
11
5root="$1"12root="$1"
13. "$root/usr/share/debconf/confmodule"
14
6question="$2"15question="$2"
7value="$3"16value="$3"
8seen="$4"17seen="$4"
9[ "$seen" ] || seen=true18[ "$seen" ] || seen=true
1019
11if ! (echo "SET $question $value"; echo "FSET $question seen $seen") | chroot "$1" debconf-communicate -fnoninteractive casper >/dev/null; then20if ! db_set "$question" "$value"; then
12 chroot "$1" debconf-communicate -fnoninteractive casper >/dev/null <<EOF21 db_register debian-installer/dummy "$question"
13REGISTER debian-installer/dummy $question22 db_set "$question" "$value"
14SET $question $value
15FSET $question seen $seen
16EOF
17fi23fi
24db_fset "$question" seen "$seen"
1825
19exit 026exit 0
2027
=== added file 'bin/casper-set-selections'
--- bin/casper-set-selections 1970-01-01 00:00:00 +0000
+++ bin/casper-set-selections 2011-10-06 10:04:28 +0000
@@ -0,0 +1,92 @@
1#!/bin/sh
2# Cloned-and-hacked from preseed/debconf-set-selections for casper.
3set -e
4
5OLDIFS="$IFS"
6CR=$(echo -en "\r")
7NL="
8"
9
10. /scripts/casper-functions
11load_confmodule
12
13# Returns the first field in the current line
14first_field() {
15 echo "$line" | grep -q "[[:space:]]" || return 1
16 echo "$line" | sed -r 's/^([^[:space:]]*).*/\1/'
17}
18
19# Returns any fields after the first field in the current line
20rest_line() {
21 if echo "$line" | grep -q "[[:space:]]"; then
22 echo "$line" | sed 's/^[^[:space:]]*[[:space:]]*//'
23 fi
24}
25
26SEEN=1
27if [ "$1" = --unseen ]; then
28 SEEN=
29 shift
30fi
31
32file="$1"
33
34parse_error() {
35 echo "Error parsing preconfiguration file: $*" >&2
36 exit 1
37}
38
39IFS="$NL"
40multiline=""
41# TODO: this squashes \r elsewhere in the line too
42for line in $(grep -v '^#\|^[[:space:]]*$' "$file" | sed "s/$CR//g"); do
43 IFS="$OLDIFS"
44
45 line="$(echo "$line" | sed 's/^[[:space:]]*//')"
46 if echo "$line" | grep -q '\\$'; then
47 multiline="${multiline:+$multiline }$(echo "$line" | \
48 sed 's/[[:space:]]*\\$//')"
49 continue
50 elif [ -n "$multiline" ]; then
51 line="$multiline $line"
52 multiline=""
53 fi
54
55 package=""
56 var=""
57 type=""
58 val=""
59 if ! package="$(first_field)"; then
60 parse_error "Syntax error: unable to determine template owner"
61 fi
62 line="$(rest_line)"
63 if ! var="$(first_field)"; then
64 parse_error "Syntax error: unable to determine template name"
65 fi
66 line="$(rest_line)"
67 if ! type="$(first_field)"; then
68 # Allow for lines without separator before an empty value
69 if [ "$line" ]; then
70 type="$line"
71 else
72 parse_error "Syntax error: unable to determine template type"
73 fi
74 fi
75 line="$(rest_line)"
76 val="$line"
77
78 if [ "$type" = seen ]; then
79 # Set seen flag.
80 db_fset "$var" "$type" "$val" || true # how to handle this error?
81 else
82 if ! db_set "$var" "$val"; then
83 # Question does not exist yet.
84 db_register debian-installer/dummy "$var"
85 db_set "$var" "$val"
86 db_subst "$var" ID "$var"
87 fi
88 if [ "$SEEN" ]; then
89 db_fset "$var" seen true
90 fi
91 fi
92done
093
=== modified file 'bin/casper-snapshot'
--- bin/casper-snapshot 2009-06-12 11:46:49 +0000
+++ bin/casper-snapshot 2011-10-06 10:04:28 +0000
@@ -215,7 +215,7 @@
215 fi215 fi
216 else216 else
217 if [ -b "${dev}" ] ; then217 if [ -b "${dev}" ] ; then
218 try_mount "${dev}" "${MOUNTP}" rw218 try_mount "${dev}" "${MOUNTP}" rw || panic "failed to mount ${dev}"
219 fi219 fi
220 fi220 fi
221}221}
222222
=== added file 'bin/casper-update-initramfs'
--- bin/casper-update-initramfs 1970-01-01 00:00:00 +0000
+++ bin/casper-update-initramfs 2011-10-06 10:04:28 +0000
@@ -0,0 +1,25 @@
1#! /bin/sh
2set -e
3update-initramfs.distrib "$@"
4if [ -e /initrd.img ]; then
5 bootdir=
6else
7 bootdir=/boot
8fi
9# initrd.img may exist when vmlinuz doesn't; for example, if
10# update-initramfs is run on a fresh live USB stick without upgrading the
11# kernel.
12if [ -e "$bootdir/initrd.img" ]; then
13 if [ -e /cdrom/casper/initrd.lz ]; then
14 zcat "$bootdir/initrd.img" | lzma -9c >/cdrom/casper/initrd.lz.new
15 mv /cdrom/casper/initrd.lz.new /cdrom/casper/initrd.lz
16 else
17 cp "$bootdir/initrd.img" /cdrom/casper/initrd.gz.new
18 mv /cdrom/casper/initrd.gz.new /cdrom/casper/initrd.gz
19 fi
20fi
21if [ -e "$bootdir/vmlinuz" ]; then
22 cp "$bootdir/vmlinuz" /cdrom/casper/vmlinuz.new
23 mv /cdrom/casper/vmlinuz.new /cdrom/casper/vmlinuz
24fi
25exit 0
026
=== modified file 'casper-md5check/Makefile'
--- casper-md5check/Makefile 2009-01-30 11:27:37 +0000
+++ casper-md5check/Makefile 2011-10-06 10:04:28 +0000
@@ -1,6 +1,7 @@
11
2CC=gcc2CC=gcc
3CFLAGS=$(getconf LFS_CFLAGS) -Wall -O23CFLAGS := $(shell getconf LFS_CFLAGS) -Wall -O2 -g $(shell pkg-config --cflags ply-boot-client)
4LDLIBS=$(shell pkg-config --libs ply-boot-client)
45
5casper-md5check: casper-md5check.c md5.c6casper-md5check: casper-md5check.c md5.c
67
78
=== modified file 'casper-md5check/casper-md5check.c'
--- casper-md5check/casper-md5check.c 2009-01-30 11:27:37 +0000
+++ casper-md5check/casper-md5check.c 2011-10-06 10:04:28 +0000
@@ -1,6 +1,7 @@
1/* casper-md5check - a tool to check md5sums and talk to usplash1/* casper-md5check - a tool to check md5sums and talk to plymouth
2 (C) Canonical Ltd 20062 (C) Canonical Ltd 2006, 2010
3 Written by Tollef Fog Heen <tfheen@ubuntu.com>3 Written by Tollef Fog Heen <tfheen@ubuntu.com>
4 Ported to plymouth by Steve Langasek <steve.langasek@ubuntu.com>
45
5 This program is free software; you can redistribute it and/or6 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as7 modify it under the terms of the GNU General Public License as
@@ -32,13 +33,17 @@
32#include <math.h>33#include <math.h>
33#include <termios.h>34#include <termios.h>
3435
35#define USPLASH_FIFO "/dev/.initramfs/usplash_fifo"36#include <ply-boot-client.h>
36#define MAXTRIES 537#include <ply-event-loop.h>
38
37#include "md5.h"39#include "md5.h"
38#define DEBUG40#define DEBUG
3941
40static int verbose = 1;42static int verbose = 1;
41static int got_usplash = 0;43static int got_plymouth = 0;
44static ply_event_loop_t *ply_event_loop = NULL;
45
46int set_nocanonical_tty(int fd);
4247
43void parse_cmdline(void) {48void parse_cmdline(void) {
44 FILE *cmdline = fopen("/proc/cmdline", "r");49 FILE *cmdline = fopen("/proc/cmdline", "r");
@@ -60,73 +65,54 @@
60 fclose(cmdline);65 fclose(cmdline);
61}66}
6267
63int write_and_retry(int fd, char *s) {68void plymouth_disconnected(void *user_data, ply_boot_client_t *client) {
64 int try = 0, ret = 0;69 printf("Disconnected from Plymouth\n");
65 char *end;70 got_plymouth = 0;
6671 ply_event_loop_exit(ply_event_loop, 0);
67#ifdef DEBUG72}
68 fprintf(stderr, "-> %s\n", s);73
69#endif74void plymouth_answer(void *user_data, const char *keys,
7075 ply_boot_client_t *client)
71 end = s + strlen(s)+1;76{
7277 ply_event_loop_exit(ply_event_loop, 0);
73 ret = write(fd, s, end - s);78}
74 while (s + ret < end && try < MAXTRIES) {79
75 sleep(1);80void plymouth_response(void *user_data, ply_boot_client_t *client) {
76 s += ret;81 /* No response */
77 ret = write(fd, s, strlen(s)+1);82}
78 try++;83
79 }84void plymouth_failure(ply_boot_client_t *client, char *format, ...) {
80 return (s+ret == end ? 0 : 1);
81}
82
83void usplash_timeout(int fd, int timeout) {
84 char *s;85 char *s;
85
86 if (!got_usplash)
87 return;
88
89 asprintf(&s, "TIMEOUT %d", timeout);
90
91 write_and_retry(fd, s);
92
93 free(s);
94}
95
96void usplash_failure(int fd, char *format, ...) {
97 char *s, *s1;
98 va_list argp;86 va_list argp;
9987
100 va_start(argp, format);88 va_start(argp, format);
101 vasprintf(&s, format, argp);89 vasprintf(&s, format, argp);
102 va_end(argp);90 va_end(argp);
10391
104 if (got_usplash) {92 if (got_plymouth) {
105 asprintf(&s1, "FAILURE %s", s);93 ply_boot_client_tell_daemon_to_display_message(client, s,
10694 plymouth_response,
107 write_and_retry(fd, s1);95 plymouth_response, NULL);
10896 ply_event_loop_process_pending_events(ply_event_loop);
109 free(s1);
110 } else if (verbose)97 } else if (verbose)
111 printf("%s\n", s);98 printf("%s\n", s);
11299
113 free(s);100 free(s);
114}101}
115102
116void usplash_text(int fd, char *format, ...) {103void plymouth_text(ply_boot_client_t *client, char *format, ...) {
117 char *s, *s1;104 char *s;
118 va_list argp;105 va_list argp;
119106
120 va_start(argp, format);107 va_start(argp, format);
121 vasprintf(&s, format, argp);108 vasprintf(&s, format, argp);
122 va_end(argp);109 va_end(argp);
123110
124 if (got_usplash) {111 if (got_plymouth) {
125 asprintf(&s1, "TEXT %s", s);112 ply_boot_client_tell_daemon_to_display_message(client, s,
126113 plymouth_response,
127 write_and_retry(fd, s1);114 plymouth_response, NULL);
128115 ply_event_loop_process_pending_events(ply_event_loop);
129 free(s1);
130 } else if (verbose) {116 } else if (verbose) {
131 printf("%s...", s);117 printf("%s...", s);
132 fflush(stdout);118 fflush(stdout);
@@ -135,7 +121,7 @@
135 free(s);121 free(s);
136}122}
137123
138void usplash_urgent(int fd, char *format, ...) {124void plymouth_prompt(ply_boot_client_t *client, char *format, ...) {
139 char *s, *s1;125 char *s, *s1;
140 va_list argp;126 va_list argp;
141127
@@ -143,12 +129,41 @@
143 vasprintf(&s, format, argp);129 vasprintf(&s, format, argp);
144 va_end(argp);130 va_end(argp);
145131
146 if (got_usplash) {132 if (got_plymouth) {
147 asprintf(&s1, "TEXT-URGENT %s", s);133 asprintf(&s1, "keys:%s", s);
148134 ply_boot_client_tell_daemon_to_display_message(client, s1,
149 write_and_retry(fd, s1);135 plymouth_response,
150136 plymouth_response, NULL);
151 free(s1);137
138 ply_boot_client_ask_daemon_to_watch_for_keystroke(client, NULL,
139 plymouth_answer,
140 (ply_boot_client_response_handler_t)plymouth_answer, NULL);
141 ply_event_loop_run(ply_event_loop);
142 ply_boot_client_attach_to_event_loop(client, ply_event_loop);
143 ply_boot_client_tell_daemon_to_quit(client, 1, plymouth_response,
144 plymouth_response, NULL);
145 ply_event_loop_run(ply_event_loop);
146 } else {
147 printf("%s\n", s);
148 set_nocanonical_tty(0);
149 getchar();
150 }
151 free(s);
152}
153
154void plymouth_urgent(ply_boot_client_t *client, char *format, ...) {
155 char *s;
156 va_list argp;
157
158 va_start(argp, format);
159 vasprintf(&s, format, argp);
160 va_end(argp);
161
162 if (got_plymouth) {
163 ply_boot_client_tell_daemon_to_display_message(client, s,
164 plymouth_response,
165 plymouth_response, NULL);
166 ply_event_loop_process_pending_events(ply_event_loop);
152 } else167 } else
153 printf("%s\n", s);168 printf("%s\n", s);
154169
@@ -156,27 +171,26 @@
156}171}
157172
158173
159void usplash_success(int fd, char *format, ...) {174void plymouth_success(ply_boot_client_t *client, char *format, ...) {
160 char *s, *s1;175 char *s;
161 va_list argp;176 va_list argp;
162177
163 va_start(argp, format);178 va_start(argp, format);
164 vasprintf(&s, format, argp);179 vasprintf(&s, format, argp);
165 va_end(argp);180 va_end(argp);
166181
167 if (got_usplash) {182 if (got_plymouth) {
168 asprintf(&s1, "SUCCESS %s", s);183 ply_boot_client_tell_daemon_to_display_message(client, s,
169184 plymouth_response,
170 write_and_retry(fd, s1);185 plymouth_response, NULL);
171 186 ply_event_loop_process_pending_events(ply_event_loop);
172 free(s1);
173 } else if (verbose)187 } else if (verbose)
174 printf("%s\n", s);188 printf("%s\n", s);
175189
176 free(s);190 free(s);
177}191}
178192
179void usplash_progress(int fd, int progress) {193void plymouth_progress(ply_boot_client_t *client, int progress) {
180 static int prevprogress = -1;194 static int prevprogress = -1;
181 char *s;195 char *s;
182196
@@ -184,11 +198,11 @@
184 return;198 return;
185 prevprogress = progress;199 prevprogress = progress;
186200
187 if (got_usplash) {201 if (got_plymouth) {
188 asprintf(&s, "PROGRESS %d", progress);202 asprintf(&s, "md5check:verifying:%d", progress);
189203 ply_boot_client_update_daemon(client, s, plymouth_response,
190 write_and_retry(fd, s);204 plymouth_response, NULL);
191205 ply_event_loop_process_pending_events(ply_event_loop);
192 free(s);206 free(s);
193 } else {207 } else {
194 printf("%d%%...", progress);208 printf("%d%%...", progress);
@@ -210,7 +224,7 @@
210224
211int main(int argc, char **argv) {225int main(int argc, char **argv) {
212 226
213 int pipe_fd, check_fd;227 int check_fd;
214 int failed = 0;228 int failed = 0;
215 229
216 FILE *md5_file;230 FILE *md5_file;
@@ -219,6 +233,7 @@
219 char hex_output[16*2 + 1];233 char hex_output[16*2 + 1];
220 char *checksum, *checkfile;234 char *checksum, *checkfile;
221 ssize_t tsize, csize;235 ssize_t tsize, csize;
236 ply_boot_client_t *client = NULL;
222237
223 tsize = 0;238 tsize = 0;
224 csize = 0;239 csize = 0;
@@ -236,18 +251,23 @@
236 251
237 parse_cmdline();252 parse_cmdline();
238253
239 pipe_fd = open(USPLASH_FIFO, O_WRONLY|O_NONBLOCK);254 client = ply_boot_client_new();
240 255 if (client)
241 if (pipe_fd == -1) {256 ply_event_loop = ply_event_loop_new();
257 if (ply_event_loop)
258 ply_boot_client_attach_to_event_loop(client, ply_event_loop);
259
260 if (!client || !ply_event_loop || !ply_boot_client_connect(client, plymouth_disconnected, NULL))
261 {
242 /* Fall back to text output */262 /* Fall back to text output */
243 perror("Opening pipe");263 perror("Connecting to plymouth");
244 got_usplash = 0;264 got_plymouth = 0;
245 } else265 } else
246 got_usplash = 1;266 got_plymouth = 1;
247 267
248268
249 usplash_progress(pipe_fd, 0);269 plymouth_progress(client, 0);
250 usplash_urgent(pipe_fd, "Checking integrity, this may take some time");270 plymouth_urgent(client, "Checking integrity, this may take some time");
251 md5_file = fopen(argv[2], "r");271 md5_file = fopen(argv[2], "r");
252 if (!md5_file) {272 if (!md5_file) {
253 perror("fopen md5_file");273 perror("fopen md5_file");
@@ -272,12 +292,11 @@
272 292
273 md5_init(&state);293 md5_init(&state);
274 294
275 usplash_text(pipe_fd, "Checking %s", checkfile);295 plymouth_text(client, "Checking %s", checkfile);
276 296
277 check_fd = open(checkfile, O_RDONLY);297 check_fd = open(checkfile, O_RDONLY);
278 if (check_fd < 0) {298 if (check_fd < 0) {
279 usplash_timeout(pipe_fd, 300);299 plymouth_failure(client, "%s: %s", checkfile, strerror(errno));
280 usplash_failure(pipe_fd, "%s", strerror(errno));
281 sleep(10);300 sleep(10);
282 }301 }
283 302
@@ -285,7 +304,7 @@
285304
286 while (rsize > 0) {305 while (rsize > 0) {
287 csize += rsize;306 csize += rsize;
288 usplash_progress(pipe_fd, 100*((long double)csize)/tsize);307 plymouth_progress(client, 100*((long double)csize)/tsize);
289308
290 md5_append(&state, (const md5_byte_t *)buf, rsize);309 md5_append(&state, (const md5_byte_t *)buf, rsize);
291 rsize = read(check_fd, buf, sizeof(buf));310 rsize = read(check_fd, buf, sizeof(buf));
@@ -298,9 +317,9 @@
298 sprintf(hex_output + i * 2, "%02x", digest[i]);317 sprintf(hex_output + i * 2, "%02x", digest[i]);
299 318
300 if (strncmp(hex_output, checksum, strlen(hex_output)) == 0) {319 if (strncmp(hex_output, checksum, strlen(hex_output)) == 0) {
301 usplash_success(pipe_fd, "OK");320 plymouth_success(client, "%s: OK", checkfile);
302 } else {321 } else {
303 usplash_failure(pipe_fd, "mismatch");322 plymouth_failure(client, "%s: mismatch", checkfile);
304 failed++;323 failed++;
305 }324 }
306 free(checksum);325 free(checksum);
@@ -308,14 +327,13 @@
308 }327 }
309 fclose(md5_file);328 fclose(md5_file);
310 if (failed) {329 if (failed) {
311 usplash_urgent(pipe_fd, "Check finished: errors found in %d files!", failed);330 plymouth_urgent(client, "Check finished: errors found in %d files!", failed);
312 } else {331 } else {
313 usplash_urgent(pipe_fd, "Check finished: no errors found");332 plymouth_urgent(client, "Check finished: no errors found");
314 }333 }
315 usplash_urgent(pipe_fd, "Press any key to reboot your system");334
316 usplash_timeout(pipe_fd, 86400);335 plymouth_prompt(client, "Press any key to reboot your system");
317 set_nocanonical_tty(0);336
318 getchar();
319 reboot(LINUX_REBOOT_CMD_RESTART);337 reboot(LINUX_REBOOT_CMD_RESTART);
320 return 0;338 return 0;
321 339
322340
=== modified file 'conf.d/compcache'
--- conf.d/compcache 2008-09-12 08:13:38 +0000
+++ conf.d/compcache 2011-10-06 10:04:28 +0000
@@ -1,1 +1,1 @@
1COMPCACHE_SIZE="25%"1COMPCACHE_SIZE="50%"
22
=== modified file 'debian/casper.init'
--- debian/casper.init 2009-10-09 14:59:34 +0000
+++ debian/casper.init 2011-10-06 10:04:28 +0000
@@ -46,7 +46,7 @@
46 find "$path" -type f | xargs cat > /dev/null 2>&146 find "$path" -type f | xargs cat > /dev/null 2>&1
47 elif [ -f "$path" ]; then47 elif [ -f "$path" ]; then
48 if [ -x "$path" ]; then48 if [ -x "$path" ]; then
49 if file "$path" | grep -q 'dynamically linked'; then49 if file -L "$path" | grep -q 'dynamically linked'; then
50 for lib in $(ldd "$path" | awk '{ print $3 }'); do50 for lib in $(ldd "$path" | awk '{ print $3 }'); do
51 cache_path "$lib"51 cache_path "$lib"
52 done52 done
@@ -89,7 +89,7 @@
89 prompt=89 prompt=
90 fi90 fi
9191
92 for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do92 for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty) /bin/plymouth /sbin/usplash_write; do
93 cache_path "$path"93 cache_path "$path"
94 done94 done
9595
@@ -97,17 +97,23 @@
9797
98 [ "$prompt" ] || return 098 [ "$prompt" ] || return 0
9999
100 stty sane < /dev/console
101
102 # XXX - i18n100 # XXX - i18n
103 echo "Please remove the disc and close the tray (if any) then press ENTER: " > /dev/console101 MSG="Please remove installation media and close the tray (if any) then press ENTER: "
104 if [ -x /sbin/usplash_write ]; then102
105 /sbin/usplash_write "TIMEOUT 86400"103 if [ -x /bin/plymouth ] && plymouth --ping; then
106 /sbin/usplash_write "TEXT-URGENT Please remove the disc, close the tray (if any)"104 plymouth message --text="$MSG"
107 /sbin/usplash_write "TEXT-URGENT and press ENTER to continue"105 plymouth watch-keystroke > /dev/null
106 else
107 stty sane < /dev/console
108
109 echo $MSG > /dev/console
110 if [ -x /sbin/usplash_write ]; then
111 /sbin/usplash_write "TIMEOUT 86400"
112 /sbin/usplash_write "TEXT-URGENT Please remove installation media, close the tray"
113 /sbin/usplash_write "TEXT-URGENT (if any) and press ENTER to continue"
114 fi
115 read x < /dev/console
108 fi116 fi
109
110 read x < /dev/console
111}117}
112118
113case "$1" in119case "$1" in
114120
=== modified file 'debian/casper.install'
--- debian/casper.install 2009-09-23 14:21:43 +0000
+++ debian/casper.install 2011-10-06 10:04:28 +0000
@@ -1,9 +1,12 @@
1bin/casper-a11y-enable usr/bin
1bin/casper-getty sbin2bin/casper-getty sbin
2bin/casper-login sbin3bin/casper-login sbin
3bin/casper-new-uuid sbin4bin/casper-new-uuid sbin
4bin/casper-preseed usr/share/casper5bin/casper-preseed usr/share/casper
5bin/casper-reconfigure usr/share/casper6bin/casper-reconfigure usr/share/casper
7bin/casper-set-selections usr/share/casper
6bin/casper-snapshot sbin8bin/casper-snapshot sbin
9bin/casper-update-initramfs usr/share/casper
7hooks usr/share/initramfs-tools10hooks usr/share/initramfs-tools
8scripts usr/share/initramfs-tools11scripts usr/share/initramfs-tools
9conf.d usr/share/initramfs-tools12conf.d usr/share/initramfs-tools
1013
=== modified file 'debian/casper.postinst'
--- debian/casper.postinst 2006-07-21 11:19:15 +0000
+++ debian/casper.postinst 2011-10-06 10:04:28 +0000
@@ -1,5 +1,15 @@
1#! /bin/sh1#! /bin/sh
22
3# If running from writable media, make sure that update-initramfs is
4# properly a symlink.
5if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.253 && \
6 [ -w /cdrom ] && [ -e /usr/sbin/update-initramfs.distrib ] && \
7 [ ! -L /usr/sbin/update-initramfs ] && \
8 fgrep -qs update-initramfs.distrib /usr/sbin/update-initramfs; then
9 ln -nsf /usr/share/casper/casper-update-initramfs \
10 /usr/sbin/update-initramfs
11fi
12
3update-initramfs -u13update-initramfs -u
414
5#DEBHELPER#15#DEBHELPER#
616
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-28 23:07:27 +0000
+++ debian/changelog 2011-10-06 10:04:28 +0000
@@ -1,4 +1,732 @@
1casper (1.211) UNRELEASED; urgency=low1casper (1.285) UNRELEASED; urgency=low
2
3 * scripts/casper:
4 - enable use of virtio devices in is_nice_device()
5
6 -- Ante Karamatic <ivoks@ubuntu.com> Thu, 06 Oct 2011 05:29:13 -0400
7
8casper (1.284) oneiric; urgency=low
9
10 * bin/casper-a11y-enable:
11 - Set the session by calling AccountService via dbus instead of using
12 lightdm commands, as we cannot run lightdm-set-defaults as a user
13 - Add some extra spaces to make sure the startup scripts used to set a11y
14 settings are syntactically correct
15 - Add some other needed settings for various profiles for use in the login
16 manager
17 - Set correct permissions for the orca config directory once the config
18 files have been created
19 - Make sure the startup script checks take into account the ability to be
20 run from the initramfs
21 * ubiquity-hooks/30accessibility:
22 - Make sure that accessibility profile settings are properly applied at
23 install time, even if the user decided to try Ubuntu first, and then
24 run the install from the desktop
25 - Copy any existing orca configuration to the target system
26 - Make sure profile settings are not set up twice
27
28 -- Luke Yelavich <themuso@ubuntu.com> Wed, 14 Sep 2011 16:19:59 +1000
29
30casper (1.283) oneiric; urgency=low
31
32 * scripts/casper-bottom/22screensaver: Set gsettings key instead of gconf.
33 * scripts/casper-bottom/44pk_allow_ubuntu: Drop old PolicyKit stuff, it's
34 gone for a long time.
35 * Drop scripts/casper-bottom/45disable_guest_account: We are not using gdm
36 any more, and lightdm implements that differently.
37 * Drop scripts/casper-bottom/47une_ubiquity, UNE/netbook-launcher are
38 history.
39 * Add scripts/casper-bottom/26disable_user_menu: Disable the user indicator
40 menu. (LP: #834137)
41
42 -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 07 Sep 2011 12:33:57 +0200
43
44casper (1.282) oneiric; urgency=low
45
46 * bin/casper-a11y-enable: Fix typo/syntax error in the set_session function
47
48 -- Luke Yelavich <themuso@ubuntu.com> Wed, 07 Sep 2011 15:20:05 +1000
49
50casper (1.281) oneiric; urgency=low
51
52 * bin/casper-a11y-enable:
53 - Change all remaining references of gdm to lightdm, particularly in the
54 usage help text, and the username of the login manager
55 - Set the default login session to ubuntu-2d for screen reader and braille
56 profiles
57
58 -- Luke Yelavich <themuso@ubuntu.com> Mon, 05 Sep 2011 15:02:31 +1000
59
60casper (1.280) oneiric; urgency=low
61
62 * Don't fail to set up autologin on a commented out autologin-user line
63 in lightdm custom conf. (LP: #836727)
64
65 -- Mario Limonciello <Mario_Limonciello@Dell.com> Mon, 29 Aug 2011 09:16:00 -0500
66
67casper (1.279) oneiric; urgency=low
68
69 * hooks/casper: pull in overlayfs kernel module to allow use of overlayfs
70 as the union mount during install.
71
72 -- Andy Whitcroft <apw@canonical.com> Fri, 19 Aug 2011 13:03:27 +0100
73
74casper (1.278) oneiric; urgency=low
75
76 * scripts/casper-bottom/15autologin:
77 - handling lightdm.conf in the case we already have a configuration file (to
78 avoid overwriting it on the cd if we don't have the default gtk greeter
79 installed if greeter not specified). Flavors should now use
80 set-lightdm-defaults to set the default session and greeter, even if
81 this still works with current alternatives method.
82
83 -- Didier Roche <didrocks@ubuntu.com> Thu, 11 Aug 2011 09:05:43 +0200
84
85casper (1.277) oneiric; urgency=low
86
87 * Add an extra command-line argument to casper-a11y-helper which will
88 create a startup script that will be executed either on first boot after
89 install, or once we switch out of the initramfs to boot the live
90 session. This is needed to work around gsettings not working when
91 chrooting to the target environment with no dbus running.
92 * Add extra checks to the ubiquity accessibility target-config hook to
93 determine whether accessibility was enabled during the running of
94 ubiquity, and act accordingly.
95 * Call the casper a11y helper script with the newly added -script argument
96 as per above.
97 * Determine whether we are root by checking the $HOME variable.
98 * Do not call the a11y profile script in debug mode
99
100 -- Luke Yelavich <themuso@ubuntu.com> Fri, 05 Aug 2011 15:22:27 +1000
101
102casper (1.276) oneiric; urgency=low
103
104 * If lightdm.conf exists, remove it first to avoid issues with symlinks.
105
106 -- Stéphane Graber <stgraber@ubuntu.com> Thu, 04 Aug 2011 12:26:08 -0400
107
108casper (1.275) oneiric; urgency=low
109
110 * Update 15autologin to overwrite any existing lightdm configuration.
111 This should fix lightdm autologin for everyone.
112 Any custom lightdm configuration won't apply to the live environment.
113
114 -- Stéphane Graber <stgraber@ubuntu.com> Wed, 03 Aug 2011 10:10:48 -0400
115
116casper (1.274) oneiric; urgency=low
117
118 * Remove log_end_message call (LP: #820284).
119
120 -- Evan Dandrea <ev@ubuntu.com> Wed, 03 Aug 2011 12:01:57 +0100
121
122casper (1.273) oneiric; urgency=low
123
124 [ Mario Limonciello ]
125 * scripts/casper: Add support for SAS controllers now that 575297 is fixed.
126 (LP: #819564)
127
128 [ Stéphane Graber ]
129 * lightdm no longer ships with /etc/lightdm/lightdm.conf in its package.
130 Updating 15autologin casper hook to create one when missing. (LP: #819609)
131
132 -- Stéphane Graber <stgraber@ubuntu.com> Tue, 02 Aug 2011 17:47:10 -0400
133
134casper (1.272) oneiric; urgency=low
135
136 [ Andy Whitcroft ]
137 * scripts/casper: add support for overlayfs for union mounts of the liveCD
138
139 [ Luke Yelavich ]
140 * Port the rest of the accessibility profile settings to gsettings, except
141 where gconf settings are required, eg firefox and gksu
142 * bin/casper-a11y-enable: Extract the username from the $HOME environment
143 variable, as $USER is not set when ubiquity calls the script, even with
144 all privileges dropped
145
146 -- Luke Yelavich <themuso@ubuntu.com> Wed, 27 Jul 2011 15:20:11 +1000
147
148casper (1.271) oneiric; urgency=low
149
150 * bin/casper-a11y-enable:
151 - Use -x when enabling debug mode
152 - Adjust some variable quoting when checking for package versions
153 - Do not break out of the command-line checking loop at all, let it run its
154 course until there are no command-line values left to parse
155
156 -- Luke Yelavich <themuso@ubuntu.com> Fri, 01 Jul 2011 11:47:31 +0100
157
158casper (1.270) oneiric; urgency=low
159
160 * Depend on lzma for our diverted update-initramfs (LP: #790794).
161
162 -- Colin Watson <cjwatson@ubuntu.com> Thu, 30 Jun 2011 10:30:49 +0100
163
164casper (1.269) oneiric; urgency=low
165
166 [ Luke Yelavich ]
167 * bin/casper-a11y-helper:
168 - Migrate blindness and braille accessibility profiles to gsettings for
169 all except gksu, which still uses gconf to store settings.
170
171 [ Colin Watson ]
172 * Add LightDM autologin support (LP: #797669).
173
174 -- Colin Watson <cjwatson@ubuntu.com> Fri, 17 Jun 2011 12:52:44 +0100
175
176casper (1.268) oneiric; urgency=low
177
178 The big accessibility profile code refactor:
179 * debian/copyright: Update Canonical copyright years to include 2011
180 * bin/casper-a11y-helper: Create a new script that will be callable from
181 casper/the initramfs, ubiquity at the maybe-ubiquity screen, and ubiquity
182 when running through ubiquity-hooks during the installation process.
183 - Copy accessibility profile settings from both
184 scripts/casper-bottom/30accessibility and ubiquity-hooks/30accessibility
185 - Refactor profile settings into groups of common settings for low vision
186 and motor profiles, with the rest of the settings broken up into
187 individual methods for each profile
188 - Add options to allow for calling the script from within the initramfs
189 - Do a few more package checks to make sure the target environment has the
190 commands we need to set things up
191 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
192 - Remove old profile settings and support code, and make use of the new
193 a11y helper script
194 - Call the helper with debugging enabled for now, to help with testing
195 to make sure the new helper is executing properly
196 * debian/casper.install: Add casper-a11y-helper
197
198 -- Luke Yelavich <themuso@ubuntu.com> Wed, 08 Jun 2011 15:35:39 +1000
199
200casper (1.267) oneiric; urgency=low
201
202 * scripts/casper-bottom/32disable_hibernation: Drop obsolete
203 gnome-power-manager and kde-profile configuration, and just globally
204 disable hibernation via policykit. (LP: #610351)
205
206 -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 08 Jun 2011 07:25:43 +0200
207
208casper (1.266) oneiric; urgency=low
209
210 * Disable release-upgrade prompts in the live session (LP: #777759).
211
212 -- Colin Watson <cjwatson@ubuntu.com> Thu, 05 May 2011 12:28:33 +0100
213
214casper (1.265) natty; urgency=low
215
216 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
217 - Use gsettings to adjust yelp caret navigation, as properly fixed in
218 yelp 3.0.1
219 * ubiquity-hooks/30accessibility: Fix the gset function to set settings for
220 the target username, and not the username of the live user
221
222 -- Luke Yelavich <themuso@ubuntu.com> Mon, 11 Apr 2011 16:47:46 +1000
223
224casper (1.264) natty; urgency=low
225
226 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
227 - Enable yelp carrot navigation by default in the moderate visual
228 impairment, blindness, and Braille profiles, thanks to Attila Hammer
229 for the patch (LP: #752503)
230
231 -- Luke Yelavich <themuso@ubuntu.com> Thu, 07 Apr 2011 10:17:52 +1000
232
233casper (1.263) natty; urgency=low
234
235 [ Evan Dandrea ]
236 * Suppress Log Out item in the live session (LP: #750140).
237
238 [ Martin Pitt ]
239 * scripts/casper-helpers, find_cow_device(): Do not ever probe floppy
240 devices. There are lots of computers which still have a floppy controller
241 (and thus a /dev/fd0), but no actual floppy. Trying to send anything to
242 /dev/fd0 will result in very long timeouts. Here this causes booting the
243 live CD to take more than 30 minutes. (See also LP #539515 for the
244 corresponding bug in udev/udisks). (LP: #739774)
245
246 -- Martin Pitt <martin.pitt@ubuntu.com> Mon, 04 Apr 2011 16:12:34 +0200
247
248casper (1.262) natty; urgency=low
249
250 * scripts/casper-bottom/30accessibility:
251 - Don't blindly assume that there are no orca config files/directories in
252 the created user's home directory. A derivative may have placed something
253 in /etc/skel as part of the live filesystem, and we shouldn't be
254 clobbering it, thanks to Attila Hammer for the pointer (LP: #744227)
255
256 -- Luke Yelavich <themuso@ubuntu.com> Mon, 04 Apr 2011 17:32:40 +1000
257
258casper (1.261) natty; urgency=low
259
260 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
261 - Also use classic GNOME for the "motor difficulties, pointing devices"
262 profile, due to issues with on-screen keyboards and unity search
263
264 -- Luke Yelavich <themuso@ubuntu.com> Mon, 04 Apr 2011 16:15:59 +1000
265
266casper (1.260) natty; urgency=low
267
268 [ Colin Watson ]
269 * Force apt-cdrom's mount point to /cdrom (LP: #723357). I've left the
270 /media/cdrom symlink introduced in 1.259 in place anyway, as it's
271 harmless on the live CD and may save some effort elsewhere.
272
273 [ Luke Yelavich ]
274 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
275 - Set the default session to classic GNOME for moderate visual
276 impairement, blindness, and braille accessibility profiles (LP: #734659)
277 - Fix a few dangling references to user-settings.py (LP: #744214)
278 - Don't set /desktop/gnome/accessibility/keyboard/enable for vision
279 related profiles (LP: #711131)
280
281 -- Luke Yelavich <themuso@ubuntu.com> Fri, 01 Apr 2011 16:13:07 +1100
282
283casper (1.259) natty; urgency=low
284
285 * scripts/casper-bottom/05mountpoints: Create a /media/cdrom -> /cdrom
286 symlink, to work around apt's changed default mount point for Alpha-3.
287 (LP: #727783)
288
289 -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 03 Mar 2011 11:52:38 +0100
290
291casper (1.258) natty; urgency=low
292
293 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
294 - Remove code that removes applets from the panel. Indicators are the
295 way forward, and we have unity, which works differently.
296 - Write orca configuration in json format
297 - Set some settings in gsettings parallel to gconf, next cycle there
298 will be a full migration to gsettings.
299 - Do not change the default window manager setting, this will be done
300 according to what is detected with unity/compiz et al.
301
302 -- Luke Yelavich <themuso@ubuntu.com> Wed, 23 Feb 2011 15:18:23 +1100
303
304casper (1.257) natty; urgency=low
305
306 * Handle $cow_backing already being mounted elsewhere (LP: #683260).
307
308 -- Evan Dandrea <ev@ubuntu.com> Fri, 11 Feb 2011 16:41:11 +0000
309
310casper (1.256) natty; urgency=low
311
312 * Add scripts/casper-bottom/49kubuntu_mobile_session to run Kubuntu
313 mobile session
314
315 -- Jonathan Riddell <jriddell@ubuntu.com> Thu, 10 Feb 2011 17:42:34 +0000
316
317casper (1.255) natty; urgency=low
318
319 [ Evan Dandrea ]
320 * Don't disable the free space notifier if using persistent storage.
321
322 [ Daniel Manrique ]
323 * scripts/casper-bottom/23networking: Strip quotes from DNSDOMAIN as
324 returned by ipconfig, and sanitize the domain entry to ensure the
325 generated /etc/resolv.conf is formatted correctly (LP: #709364).
326
327 -- Colin Watson <cjwatson@ubuntu.com> Tue, 01 Feb 2011 11:05:13 +0000
328
329casper (1.254) natty; urgency=low
330
331 * More fixes to the USB update-initramfs shim (LP: #591207):
332 - Make the shim a proper executable in
333 /usr/share/casper/casper-update-initramfs and symlink to it if
334 necessary at boot time, so that new versions of this shim are
335 automatically installed when casper is upgraded.
336 - $bootdir/initrd.img may exist when $bootdir/vmlinuz doesn't; for
337 example, if we're running off a fresh live USB stick and the kernel
338 hasn't yet been upgraded.
339
340 -- Colin Watson <cjwatson@ubuntu.com> Thu, 20 Jan 2011 14:18:59 +0000
341
342casper (1.253) natty; urgency=low
343
344 * Don't try to process the initramfs and kernel if the real update-
345 initramfs hasn't generated anything (LP: #557023).
346
347 -- Evan Dandrea <ev@ubuntu.com> Wed, 05 Jan 2011 12:07:47 +0000
348
349casper (1.252) natty; urgency=low
350
351 * Cope with forthcoming console-setup changes: handle
352 /etc/default/keyboard if present, and in that case preseed
353 keyboard-configuration/* templates.
354
355 -- Colin Watson <cjwatson@ubuntu.com> Tue, 21 Dec 2010 16:44:54 +0000
356
357casper (1.251) natty; urgency=low
358
359 * scripts/casper-bottom/44pk_allow_ubuntu: Tweak the default PolicyKit
360 policy to avoid dropping wireless connections when a user switches to
361 another VT (LP: #656757)
362
363 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Sat, 04 Dec 2010 13:11:23 +0000
364
365casper (1.250) natty; urgency=low
366
367 * Use LDLIBS rather than LDFLAGS for 'pkg-config --libs ply-boot-client',
368 fixing link line ordering.
369
370 -- Colin Watson <cjwatson@ubuntu.com> Mon, 29 Nov 2010 13:28:17 +0000
371
372casper (1.249) natty; urgency=low
373
374 [ arky ]
375 * Add universal access preferences taskbar icon in all accessibility
376 profiles (LP: #621561).
377
378 [ Serge Hallyn ]
379 * change scripts/casper-helpers:try_mount() to not panic when regular
380 mounts fail. Instead, return an error code so the caller can decide.
381 (LP: #624632)
382
383 [ Evan Broder ]
384 * scripts/casper: Check for uuid= command line parameter in addition to
385 /conf/uuid.conf file in initrd. (LP: #671786)
386
387 [ Colin Watson ]
388 * Document new uuid= option in casper(7).
389
390 -- Colin Watson <cjwatson@ubuntu.com> Mon, 29 Nov 2010 12:49:36 +0000
391
392casper (1.248) maverick; urgency=low
393
394 * ubiquity-hooks/30accessibility: Create .local/share subdirectory structure
395 before copying files. Also copy orca files to ~/.local/share, instead
396 ~/. Thanks to Attila Hammer for the patch. (LP: #650846)
397
398 -- Luke Yelavich <themuso@ubuntu.com> Tue, 05 Oct 2010 15:35:35 +1100
399
400casper (1.247) maverick; urgency=low
401
402 * Check for the existance of a kubuntu-default-settings directory before
403 running scripts/casper-bottom/48kubuntu_disable_restart_notifications
404
405 -- Jonathan Thomas <echidnaman@kubuntu.org> Mon, 04 Oct 2010 17:43:21 -0400
406
407casper (1.246) maverick; urgency=low
408
409 * Added scripts/casper-bottom/07remove_oem_config
410 - Added new script to remove oem-config if installed on the image on ARM,
411 as it should never be installed on a non-preinstalled image. This is
412 necessary because we can't exclude oem-config on the seed on a
413 per-subarchitecture basis
414 * scripts/casper/47une_ubiquity
415 - Cause gconf changes to be made to both the 2D & 3D UNE launchers so
416 ubiquity properly shows up in favorites regardless of which launcher is
417 used (LP: #643791)
418
419 -- Michael Casadevall <mcasadevall@ubuntu.com> Mon, 27 Sep 2010 17:52:50 -0400
420
421casper (1.245) maverick; urgency=low
422
423 * Add scripts/casper-bottom/49disable_kubuntu_restart_notify for a more
424 surgical solution at disabling restart notifications on the Live CD
425 * Don't remove the notificationhelper.desktop file in 34disable_kde_services
426
427 -- Jonathan Thomas <echidnaman@kubuntu.org> Tue, 28 Sep 2010 19:20:26 -0400
428
429casper (1.244) maverick; urgency=low
430
431 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
432 - Use orca's new settings location in ~/.local/share, as orca is now
433 more XDG compliant
434
435 -- Luke Yelavich <themuso@ubuntu.com> Thu, 16 Sep 2010 09:38:21 +1000
436
437casper (1.243) maverick; urgency=low
438
439 * Backport from live-initramfs 1.154.6-1:
440 - Adding patch from Thierry Walrant <debian.tgc@walrant.net> to allow
441 setting a path for the persistence files through persistent-path boot
442 parameter (Closes: #512661).
443 * Follow symlinks when checking for dynamically linked files at reboot.
444
445 -- Colin Watson <cjwatson@ubuntu.com> Tue, 07 Sep 2010 10:53:32 +0100
446
447casper (1.242) maverick; urgency=low
448
449 * Update scripts/casper-bottom/34disable_kde_services to stop some new
450 akonadi services
451
452 -- Jonathan Riddell <jriddell@ubuntu.com> Mon, 06 Sep 2010 14:20:54 +0100
453
454casper (1.241) maverick; urgency=low
455
456 [ Mathieu Trudel-Lapierre ]
457 * Use configure_networking at do_netmount; it's at least more resilient
458 than a simple ipconfig call since it retries, and it properly parses
459 BOOTIF to know which devices to configure. (LP: #602273)
460
461 [ Colin Watson ]
462 * Parse the machine-readable file written out by ipconfig rather than
463 trying to parse its human-readable output.
464
465 -- Colin Watson <cjwatson@ubuntu.com> Fri, 20 Aug 2010 13:37:56 +0100
466
467casper (1.240) maverick; urgency=high
468
469 * scripts/casper
470 - Added platform-sata_mv to is_nice_device() to allow Marvell
471 Dove A0 and AVD1 to properly boot live media (LP: #618489)
472
473 -- Michael Casadevall <mcasadevall@ubuntu.com> Mon, 16 Aug 2010 19:36:56 +0800
474
475casper (1.239) maverick; urgency=low
476
477 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
478 - Instead of mangling the main sudoers file, create a new file in
479 /etc/sudoers.d and set permissions appropriately
480
481 -- Luke Yelavich <themuso@ubuntu.com> Wed, 11 Aug 2010 13:46:03 +1000
482
483casper (1.238) maverick; urgency=low
484
485 [ Alex Chiang ]
486 * Disable ureadahead-other job as well as ureadahead (LP: #605695).
487
488 -- Colin Watson <cjwatson@ubuntu.com> Thu, 15 Jul 2010 11:49:36 +0100
489
490casper (1.237) maverick; urgency=low
491
492 [ Colin Watson ]
493 * Add btrfs support.
494 * Make ip=* command-line parsing more precise (thanks, Bill Nickless;
495 LP: #586553).
496 * Make the USB update-initramfs shim cope with vmlinuz and initrd.img
497 being in /boot rather than / (LP: #591207).
498 * Depend on file for /etc/init.d/casper (thanks, Alon Swartz;
499 LP: #591213).
500 * Conflict with live-initramfs, as they overlap and people can pick one or
501 the other (LP: #453476).
502
503 [ Martin Pitt ]
504 * debian/casper.init: Change shutdown splash message to refer to
505 "installation media" instead of "disc"; a lot of installs happen
506 from USB sticks these days. Thanks to Debbie Beliveau for the idea.
507
508 -- Colin Watson <cjwatson@ubuntu.com> Mon, 28 Jun 2010 16:53:17 +0100
509
510casper (1.236) lucid; urgency=low
511
512 * Check for LTS in the release name (LP: #558488).
513
514 -- Evan Dandrea <evand@ubuntu.com> Wed, 21 Apr 2010 11:12:32 +0100
515
516casper (1.235) lucid; urgency=low
517
518 * Unbreak early command from previous commit.
519
520 -- Mario Limonciello <Mario_Limonciello@Dell.com> Thu, 15 Apr 2010 02:54:15 -0500
521
522casper (1.234) lucid; urgency=low
523
524 * Only bring the network up while running preseed/early_command if
525 preseed/allow-network=true.
526
527 -- Colin Watson <cjwatson@ubuntu.com> Wed, 14 Apr 2010 15:56:40 +0100
528
529casper (1.233) lucid; urgency=low
530
531 * Bring the network up while running preseed/early_command.
532 * Fix use of debconf passthrough frontend; DEBCONF_READFD and
533 DEBCONF_WRITEFD were backwards, and DEBIAN_HAS_FRONTEND and
534 DEBCONF_REDIR needed to be unset or else confmodule scripts would end up
535 trying to talk to closed file descriptors.
536 * Run debconf-communicate with a read-only template database and separate
537 config databases, and copy any changed values back to the master
538 databases at the end. This allows us to use the noninteractive frontend
539 rather than passthrough when running apt-get in preseed/early_command or
540 dpkg to install driver updates, thereby ensuring that the template
541 database is properly initialised (LP: #557011).
542
543 -- Colin Watson <cjwatson@ubuntu.com> Mon, 12 Apr 2010 23:41:09 +0100
544
545casper (1.232) lucid; urgency=low
546
547 * bump compcache size to 50% on live images for machines with less than
548 512MiB. This makes sure we don't hit OOM errors on systems with only
549 256MiB of RAM.
550
551 -- Oliver Grawert <ogra@ubuntu.com> Mon, 12 Apr 2010 08:10:06 +0200
552
553casper (1.231) lucid; urgency=low
554
555 [ Jonathan Riddell ]
556 * Remove 37kubuntu_netbook_installer_link, now done with a patch in
557 kdebase-workspace
558
559 [ Colin Watson ]
560 * If copying live media to RAM or disk, explicitly copy .disk, since *
561 won't expand to include it (LP: #526305).
562 * Cache /bin/plymouth and /sbin/usplash_write before ejecting the CD, in
563 the hope that that helps with I/O errors on reboot (see LP #539027).
564
565 [ Luke Yelavich ]
566 * ubiquity-hooks/30accessibility: Copy the orca settings directory to the
567 gdm home directory, to allow for preferred orca settings to be used in
568 gdm (LP: #551515).
569
570 -- Luke Yelavich <themuso@ubuntu.com> Fri, 09 Apr 2010 14:00:51 +1000
571
572casper (1.230) lucid; urgency=low
573
574 * Don't save the hardware clock on live CD reboot; we used to do this in
575 the sysvinit world, but it regressed when we switched to Upstart
576 (thanks, Norm Pierce; LP: #436535).
577 * When running update-initramfs on writable media, update initrd.lz rather
578 than initrd.gz if it's present, and make the update process a bit safer
579 while we're there (LP: #489736).
580 * Handle toram and todisk=DEVICE options on command line (LP: #526305).
581 * Policy version 3.8.4: no changes required.
582 * Convert to source format 3.0 (native).
583
584 -- Colin Watson <cjwatson@ubuntu.com> Tue, 30 Mar 2010 11:41:24 +0100
585
586casper (1.229) lucid; urgency=low
587
588 [ Jonathan Riddell ]
589 * Update scripts/casper-bottom/34disable_kde_services for lucid
590
591 [ Evan Dandrea ]
592 * Don't let apt try to auto-detect the CD-ROM device using udev. We
593 already know what it is, and using udev to find it again wont work
594 for USB disks.
595
596 -- Evan Dandrea <evand@ubuntu.com> Tue, 23 Mar 2010 11:42:00 +0000
597
598casper (1.228) lucid; urgency=low
599
600 * Update for the new libplymouth2.
601
602 -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 12 Mar 2010 18:37:02 -0800
603
604casper (1.227) lucid; urgency=low
605
606 * casper-md5check: port from usplash to plymouth. LP: #500198
607 * fix up our reliance on usplash, /dev/console elsewhere. LP: #506418.
608
609 -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 12 Mar 2010 01:12:28 -0800
610
611casper (1.226) lucid; urgency=low
612
613 [ Colin Watson ]
614 * Stop using removed nfsro option for NFS/unionfs (thanks, Bernhard
615 Seibold; LP: #460781).
616
617 [ Jonathan Riddell ]
618 * Remove scripts/casper-bottom/48enable_kubuntu_netbook and ubiquity-
619 hooks/48enable_kubuntu_netbook now enabled in kubuntu-netbook-
620 default-settings
621
622 -- Jonathan Riddell <jriddell@ubuntu.com> Wed, 10 Mar 2010 22:23:04 +0000
623
624casper (1.225) lucid; urgency=low
625
626 * Add ubiquity-hooks/49kubuntu_gnome_icon_cache to recreate the Gnome
627 icon cache on Kubuntu CDs, removed by livecd-rootfs
628
629 -- Jonathan Riddell <jriddell@ubuntu.com> Mon, 08 Mar 2010 11:47:01 +0000
630
631casper (1.224) lucid; urgency=low
632
633 * Remove ubiquity-hooks/35copy_wallpaper_cache as now implement it in
634 ubiquity itself (LP: #530024)
635
636 -- Didier Roche <didrocks@ubuntu.com> Mon, 01 Mar 2010 19:41:45 +0100
637
638casper (1.223) lucid; urgency=low
639
640 * Bind-mount /dev, /proc, and /sys into /root while running apt-cdrom.
641 * Copy /lib/udev/rules.d/60-cdrom_id.rules into the initramfs to go with
642 /lib/udev/cdrom_id, so that apt-cdrom will be able to find ID_CDROM=1
643 entries when we run it. This should stop update-notifier from
644 repeatedly popping up during the live session.
645
646 -- Colin Watson <cjwatson@ubuntu.com> Tue, 23 Feb 2010 01:35:30 +0000
647
648casper (1.222) lucid; urgency=low
649
650 * scripts/casper-bottom/47une_ubiquity:
651 - get back ubiquity favorite icon in UNE live (LP: #524381)
652 - rename the script from 47unr_ubiquity to 47une_ubiquity as well
653 as "UNR" mention
654
655 -- Didier Roche <didrocks@ubuntu.com> Mon, 22 Feb 2010 14:01:25 +0100
656
657casper (1.221) lucid; urgency=low
658
659 * Remove the rest of the mythbuntu delta from 10adduser. It will be
660 maintained in the mythbuntu-live-autostart package instead so that
661 users from ~mythbuntu-dev can administer it.
662
663 -- Mario Limonciello <superm1@ubuntu.com> Sun, 21 Feb 2010 20:22:00 -0600
664
665casper (1.220) lucid; urgency=low
666
667 * scripts/casper: calculate memory without "head" utility, thanks to
668 Petar Bogdanovic (LP: #25496).
669
670 -- Kees Cook <kees@ubuntu.com> Fri, 19 Feb 2010 14:04:18 -0800
671
672casper (1.219) lucid; urgency=low
673
674 [ Mario Limonciello ]
675 * Disable casper-reconfigure from 22gnome_panel_data. It doesn't (appear) to
676 serve a functional purpose as the postinst does nothing different for laptops.
677
678 [ Didier Roche ]
679 * add 35copy_wallpaper_cache to copy the wallpaper cache created at boot time
680 to the main user's directory. First boot will take it into account in
681 ureadahead profiling
682
683 -- Didier Roche <didrocks@ubuntu.com> Wed, 17 Feb 2010 19:14:53 +0100
684
685casper (1.218) lucid; urgency=low
686
687 * Allow dpkg and apt-get to be installed from within commands that operate
688 in the chroot via early_command or driver updates. (LP: #521218)
689
690 -- Mario Limonciello <Mario_Limonciello@Dell.com> Tue, 16 Feb 2010 13:38:48 -0600
691
692casper (1.217) lucid; urgency=low
693
694 [ Luke Yelavich ]
695 * ubiquity-hooks/30accessibility: Enable accessible login for the blindness
696 and braile accessibility profiles.
697
698 [ Colin Watson ]
699 * Use egrep rather than 'grep -E' (LP: #512386).
700
701 [ Julien Lavergne ]
702 * 15autologin: Add support for LXDM autologin (LP: #511976).
703
704 [ Evan Dandrea ]
705 * Properly shut down debconf-communicate so that its database gets
706 written (LP: #518272).
707
708 -- Evan Dandrea <evand@ubuntu.com> Thu, 11 Feb 2010 08:25:53 +0000
709
710casper (1.216) lucid; urgency=low
711
712 [ Luke Yelavich ]
713 * scripts/casper-bottom/30accessibility && ubiquity-hooks/30accessibility:
714 - Remove code to disable pulseaudio, as it is no longer needed, and
715 the supporting code in the pulseaudio package was removed a long time
716 ago.
717 - Set the default empathy theme to classic for blindness and braille
718 accessibility profiles.
719
720 [ Jamie Bennett ]
721 * Speed up work around debconf-communicate. Replace several calls to
722 debconf-communicate with one persistent invocation followed by
723 confmodule calls.
724 * Disable guest account by rm'ing rather than waiting for dpkg to
725 remove it.
726
727 -- Colin Watson <cjwatson@ubuntu.com> Wed, 03 Feb 2010 16:41:57 -0800
728
729casper (1.215) lucid; urgency=low
2730
3 [ Mario Limonciello ]731 [ Mario Limonciello ]
4 * Support multiple preseed file/urlarguments on the kernel commandline732 * Support multiple preseed file/urlarguments on the kernel commandline
@@ -18,6 +746,46 @@
18746
19 -- Jonathan Riddell <jriddell@ubuntu.com> Wed, 27 Jan 2010 13:55:42 +0000747 -- Jonathan Riddell <jriddell@ubuntu.com> Wed, 27 Jan 2010 13:55:42 +0000
20748
749casper (1.214) lucid; urgency=low
750
751 * 15autologin: simplify the code with escape character evaluation
752 (LP: #505140)
753
754 -- Didier Roche <didrocks@ubuntu.com> Tue, 12 Jan 2010 08:57:05 +0100
755
756casper (1.213) lucid; urgency=low
757
758 * printf does not evaluate escape characters in the argument string.
759
760 -- Evan Dandrea <evand@ubuntu.com> Mon, 11 Jan 2010 11:02:12 +0000
761
762casper (1.212) lucid; urgency=low
763
764 [ Martin Pitt ]
765 * debian/control: Add ${misc:Depends}.
766 * debian/control: Bump Standards-Version to 3.8.3 (no changes necessary).
767
768 [ Colin Watson ]
769 * 15autologin: Use printf rather than echo -e, since its behaviour is
770 portable across shells.
771
772 [ Evan Dandrea ]
773 * Remove scripts/casper-bottom/42disable_apparmor. Apparmor
774 2.3.1+bzr1312-0ubuntu3 and ifupdown 0.6.8ubuntu26 now no-op when
775 they detect the live CD environment.
776
777 -- Evan Dandrea <evand@ubuntu.com> Fri, 08 Jan 2010 20:31:26 +0000
778
779casper (1.211) lucid; urgency=low
780
781 * Readd scripts/casper-bottom/15autologin changes: derivatives have
782 now a custom.conf file and still need autologin in live version.
783 Merge with my previous fix proposed for sponsoring one week ago:
784 use echo -e to enable \n interpretation (/bin/sh is busybox ash
785 which behavior differs from vanilla ash interpretor) (LP: #500786)
786
787 -- Didier Roche <didrocks@ubuntu.com> Tue, 05 Jan 2010 20:05:26 +0100
788
21casper (1.210) lucid; urgency=low789casper (1.210) lucid; urgency=low
22790
23 [ Scott James Remnant ]791 [ Scott James Remnant ]
24792
=== modified file 'debian/control'
--- debian/control 2010-01-20 23:35:11 +0000
+++ debian/control 2011-10-06 10:04:28 +0000
@@ -2,23 +2,23 @@
2Section: misc2Section: misc
3Priority: optional3Priority: optional
4Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: debhelper (>= 7.0.50~), lsb-release5Build-Depends: debhelper (>= 7.0.50~), lsb-release, libplymouth-dev (>= 0.8.0~-13), pkg-config
6Standards-Version: 3.6.16Standards-Version: 3.8.4
7Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-core-dev/casper/trunk/7Vcs-Bzr: lp:ubuntu/casper
88
9Package: casper9Package: casper
10Architecture: any10Architecture: any
11Section: misc11Section: misc
12Priority: extra12Priority: extra
13Depends: ${shlibs:Depends}, initramfs-tools (>= 0.92bubuntu55), busybox-initramfs (>= 1:1.1.3-4ubuntu3), dmsetup, user-setup, sudo, eject, uuid-runtime, localechooser-data (>= 2.03ubuntu1), util-linux (>= 2.15-1)13Depends: ${shlibs:Depends}, ${misc:Depends}, initramfs-tools (>= 0.92bubuntu55), busybox-initramfs (>= 1:1.1.3-4ubuntu3), dmsetup, user-setup, sudo, eject, uuid-runtime, localechooser-data (>= 2.03ubuntu1), util-linux (>= 2.15-1), file, lzma
14Conflicts: usplash (<< 0.4-43)14Conflicts: usplash (<< 0.4-43), live-initramfs
15Breaks: genext2fs (<< 1.4.1)15Breaks: genext2fs (<< 1.4.1)
16Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso966016Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with-format::iso9660
17Description: Run a "live" preinstalled system from read-only media17Description: Run a "live" preinstalled system from read-only media
1818
19Package: ubiquity-casper19Package: ubiquity-casper
20Architecture: all20Architecture: all
21Depends: laptop-detect, sudo21Depends: laptop-detect, sudo, ${misc:Depends}
22Conflicts: espresso-casper22Conflicts: espresso-casper
23Replaces: espresso-casper23Replaces: espresso-casper
24Enhances: ubiquity24Enhances: ubiquity
2525
=== modified file 'debian/copyright'
--- debian/copyright 2009-01-13 18:56:31 +0000
+++ debian/copyright 2011-10-06 10:04:28 +0000
@@ -28,10 +28,20 @@
28 3. This notice may not be removed or altered from any source28 3. This notice may not be removed or altered from any source
29 distribution.29 distribution.
3030
31License (bin/casper-set-selections):
32
33 The Debian installer preseeder is copyright 2004 by Joey Hess
34 <joeyh@debian.org> and others.
35
36 This program is free software; you can redistribute it and/or modify
37 it under the terms of the GNU General Public License as published by
38 the Free Software Foundation; either version 2 of the License, or
39 (at your option) any later version.
40
31License (everything else):41License (everything else):
3242
33 Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>43 Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
34 Copyright (C) 2005-2008 Canonical Ltd. <http://www.canonical.com/>44 Copyright (C) 2005-2011 Canonical Ltd. <http://www.canonical.com/>
35 Copyright (C) 2008 Dell Inc.45 Copyright (C) 2008 Dell Inc.
3646
37 This program is free software; you can redistribute it and/or modify47 This program is free software; you can redistribute it and/or modify
3848
=== modified file 'debian/manpage/casper.7'
--- debian/manpage/casper.7 2009-06-02 13:57:02 +0000
+++ debian/manpage/casper.7 2011-10-06 10:04:28 +0000
@@ -51,6 +51,9 @@
51.B nopersistent51.B nopersistent
52disables the above mentioned "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled.52disables the above mentioned "persistent" feature, useful if the bootloader (like syslinux) has been installed with persistent enabled.
53.TP53.TP
54.BI "persistent-path=" PATH
55Casper will look for persistency files in the root directory of a partition. With this parameter, the path can be configured so that you can have multiple directories on the same partition to store persistency files.
56.TP
54.B "showmounts"57.B "showmounts"
55This parameter will make casper to show on "/" the ro filesystems (mostly compressed) on /casper. This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation.58This parameter will make casper to show on "/" the ro filesystems (mostly compressed) on /casper. This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation.
56.TP59.TP
@@ -66,9 +69,18 @@
66.BI "{preseed/file|file}=" FILE69.BI "{preseed/file|file}=" FILE
67A path to a file present on the rootfs could be used to preseed debconf database.70A path to a file present on the rootfs could be used to preseed debconf database.
68.TP71.TP
72.B preseed/allow-network=true
73Bring up the network while running
74.BR preseed/early_command .
75.TP
69.BI "package/question=" VALUE76.BI "package/question=" VALUE
70All debian installed packages could be preseeded from command-line that way, beware of blanks spaces, they will interfere with parsing, use a preseed file in this case.77All debian installed packages could be preseeded from command-line that way, beware of blanks spaces, they will interfere with parsing, use a preseed file in this case.
71.TP78.TP
79.BI "uuid=" UUID
80Check that the discovered medium matches
81.I UUID
82rather than the default UUID embedded in the initramfs.
83.TP
72.BI ignore_uuid84.BI ignore_uuid
73Do not check that any UUID embedded in the initramfs matches the discovered medium.85Do not check that any UUID embedded in the initramfs matches the discovered medium.
74.B casper86.B casper
7587
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2011-10-06 10:04:28 +0000
@@ -0,0 +1,1 @@
13.0 (native)
02
=== modified file 'hooks/casper'
--- hooks/casper 2009-05-23 22:30:56 +0000
+++ hooks/casper 2011-10-06 10:04:28 +0000
@@ -20,6 +20,7 @@
2020
21manual_add_modules unionfs21manual_add_modules unionfs
22manual_add_modules aufs22manual_add_modules aufs
23manual_add_modules overlayfs
2324
24# unionfs-fuse, if available25# unionfs-fuse, if available
25if [ -x /usr/bin/unionfs-fuse ]; then26if [ -x /usr/bin/unionfs-fuse ]; then
@@ -33,8 +34,10 @@
33mkdir -p ${DESTDIR}/lib/casper34mkdir -p ${DESTDIR}/lib/casper
34copy_exec /usr/share/casper/casper-reconfigure /bin35copy_exec /usr/share/casper/casper-reconfigure /bin
35copy_exec /usr/share/casper/casper-preseed /bin36copy_exec /usr/share/casper/casper-preseed /bin
37copy_exec /usr/share/casper/casper-set-selections /bin
3638
37mkdir -p ${DESTDIR}/lib/udev39mkdir -p ${DESTDIR}/lib/udev/rules.d
40cp -p /lib/udev/rules.d/60-cdrom_id.rules ${DESTDIR}/lib/udev/rules.d/
38copy_exec /lib/udev/cdrom_id /lib/udev41copy_exec /lib/udev/cdrom_id /lib/udev
39copy_exec /lib/udev/path_id /lib/udev42copy_exec /lib/udev/path_id /lib/udev
40copy_exec /usr/bin/eject /bin43copy_exec /usr/bin/eject /bin
@@ -55,6 +58,7 @@
55manual_add_modules vfat58manual_add_modules vfat
56manual_add_modules ext359manual_add_modules ext3
57manual_add_modules ext460manual_add_modules ext4
61manual_add_modules btrfs
58# needed for vfat. :-/62# needed for vfat. :-/
59manual_add_modules nls_cp43763manual_add_modules nls_cp437
60manual_add_modules nls_utf864manual_add_modules nls_utf8
6165
=== modified file 'scripts/casper'
--- scripts/casper 2009-10-06 12:07:52 +0000
+++ scripts/casper 2011-10-06 10:04:28 +0000
@@ -6,6 +6,7 @@
66
7mountpoint=/cdrom7mountpoint=/cdrom
8LIVE_MEDIA_PATH=casper8LIVE_MEDIA_PATH=casper
9[ -f /conf/uuid.conf ] && UUID="$(cat /conf/uuid.conf)"
910
10root_persistence="casper-rw"11root_persistence="casper-rw"
11home_persistence="home-rw"12home_persistence="home-rw"
@@ -38,24 +39,32 @@
38 export PERSISTENT="Yes" ;;39 export PERSISTENT="Yes" ;;
39 nopersistent)40 nopersistent)
40 export PERSISTENT="" ;;41 export PERSISTENT="" ;;
42 persistent-path=*)
43 export PERSISTENT_PATH="${x#persistent-path=}" ;;
41 union=*)44 union=*)
42 export UNIONFS="${x#union=}";;45 export UNIONFS="${x#union=}";;
43 ip*)46 ip=*)
44 STATICIP=${x#ip=}47 STATICIP=${x#ip=}
45 if [ "${STATICIP}" = "" ]; then48 if [ "${STATICIP}" = "" ]; then
46 STATICIP="frommedia"49 STATICIP="frommedia"
47 fi50 fi
48 export STATICIP ;;51 export STATICIP ;;
52 uuid=*)
53 UUID=${x#uuid=} ;;
49 ignore_uuid)54 ignore_uuid)
50 IGNORE_UUID="Yes" ;;55 UUID="" ;;
51 live-media-path=*)56 live-media-path=*)
52 LIVE_MEDIA_PATH="${x#live-media-path=}"57 LIVE_MEDIA_PATH="${x#live-media-path=}"
53 export LIVE_MEDIA_PATH58 export LIVE_MEDIA_PATH
54 echo "export LIVE_MEDIA_PATH=\"$LIVE_MEDIA_PATH\"" >> /etc/casper.conf ;;59 echo "export LIVE_MEDIA_PATH=\"$LIVE_MEDIA_PATH\"" >> /etc/casper.conf ;;
60 toram)
61 export TORAM="Yes" ;;
62 todisk=*)
63 export TODISK="${x#todisk=}" ;;
55 esac64 esac
56 done65 done
57 if [ "${UNIONFS}" = "" ]; then66 if [ "${UNIONFS}" = "" ]; then
58 export UNIONFS="aufs"67 export UNIONFS="DEFAULT"
59 fi68 fi
60}69}
6170
@@ -72,15 +81,14 @@
72}81}
7382
74matches_uuid() {83matches_uuid() {
75 if [ "$IGNORE_UUID" ] || [ ! -e /conf/uuid.conf ]; then84 if [ -z "$UUID" ]; then
76 return 085 return 0
77 fi86 fi
78 path="$1"87 path="$1"
79 uuid="$(cat /conf/uuid.conf)"
80 for try_uuid_file in "$path/.disk/casper-uuid"*; do88 for try_uuid_file in "$path/.disk/casper-uuid"*; do
81 [ -e "$try_uuid_file" ] || continue89 [ -e "$try_uuid_file" ] || continue
82 try_uuid="$(cat "$try_uuid_file")"90 try_uuid="$(cat "$try_uuid_file")"
83 if [ "$uuid" = "$try_uuid" ]; then91 if [ "$UUID" = "$try_uuid" ]; then
84 return 092 return 0
85 fi93 fi
86 done94 done
@@ -125,7 +133,7 @@
125133
126is_nice_device() {134is_nice_device() {
127 sysfs_path="${1#/sys}"135 sysfs_path="${1#/sys}"
128 if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb)|platform-orion-ehci|platform-mmc|platform-mxsdhci)"; then136 if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci)"; then
129 return 0137 return 0
130 fi138 fi
131 if echo ${sysfs_path} | grep -q "^/block/dm-"; then139 if echo ${sysfs_path} | grep -q "^/block/dm-"; then
@@ -143,7 +151,7 @@
143151
144 if [ "${copytodev}" = "ram" ]; then152 if [ "${copytodev}" = "ram" ]; then
145 # copying to ram:153 # copying to ram:
146 freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ) )154 freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo)
147 mount_options="-o size=${size}k"155 mount_options="-o size=${size}k"
148 free_string="memory"156 free_string="memory"
149 fstype="tmpfs"157 fstype="tmpfs"
@@ -169,7 +177,10 @@
169 mkdir "${copyto}"177 mkdir "${copyto}"
170 echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"178 echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
171 mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"179 mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
172 cp -a ${copyfrom}/* ${copyto} # "cp -a" from busybox also copies hidden files180 cp -a ${copyfrom}/* ${copyto}
181 if [ -e ${copyfrom}/.disk ]; then
182 cp -a ${copyfrom}/.disk ${copyto}
183 fi
173 umount ${copyfrom}184 umount ${copyfrom}
174 mount -r -o move ${copyto} ${copyfrom}185 mount -r -o move ${copyto} ${copyfrom}
175 rmdir ${copyto}186 rmdir ${copyto}
@@ -184,7 +195,8 @@
184 /sbin/udevadm trigger195 /sbin/udevadm trigger
185 /sbin/udevadm settle196 /sbin/udevadm settle
186197
187 ipconfig ${DEVICE} /tmp/net-${DEVICE}.conf | tee /netboot.config198 configure_networking
199 export DEVICE
188200
189 if [ "${NFSROOT}" = "auto" ]; then201 if [ "${NFSROOT}" = "auto" ]; then
190 NFSROOT=${ROOTSERVER}:${ROOTPATH}202 NFSROOT=${ROOTSERVER}:${ROOTPATH}
@@ -255,7 +267,7 @@
255 todev=$(cat /proc/mounts | grep -s " $(base_path ${todir}) " | awk '{print $1}' )267 todev=$(cat /proc/mounts | grep -s " $(base_path ${todir}) " | awk '{print $1}' )
256 freespace=$(df -k | grep -s ${todev} | awk '{print $4}')268 freespace=$(df -k | grep -s ${todev} | awk '{print $4}')
257 else269 else
258 freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ))270 freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo)
259 fi271 fi
260272
261 tomount="/mnt/tmpsnap"273 tomount="/mnt/tmpsnap"
@@ -355,15 +367,23 @@
355 image_directory="$1"367 image_directory="$1"
356 rootmnt="$2"368 rootmnt="$2"
357369
358 case ${UNIONFS} in370 if [ "${UNIONFS}" = 'DEFAULT' ]; then
359 aufs|unionfs)371 for union in 'overlayfs' 'aufs' 'unionfs'
360 modprobe "${MP_QUIET}" -b ${UNIONFS} || true372 do
361 if ! cut -f2 /proc/filesystems | grep -q "^${UNIONFS}\$" && \373 modprobe "${MP_QUIET}" -b ${union} || true
362 [ -x /bin/unionfs-fuse ]; then374 if cut -f2 /proc/filesystems | grep -q "^${union}\$"; then
363 UNIONFS="unionfs-fuse"375 UNIONFS="${union}"
364 fi376 break
365 ;;377 fi
366 esac378 done
379 fi
380 if [ "${UNIONFS}" = 'DEFAULT' -a -x /bin/unionfs-fuse ]; then
381 UNIONFS="unionfs-fuse"
382 fi
383 # If all else fails fall back to aufs.
384 if [ "${UNIONFS}" = 'DEFAULT' ]; then
385 UNIONFS='aufs'
386 fi
367387
368 # run-init can't deal with images in a subdir, but we're going to388 # run-init can't deal with images in a subdir, but we're going to
369 # move all of these away before it runs anyway. No, we're not,389 # move all of these away before it runs anyway. No, we're not,
@@ -375,9 +395,7 @@
375 # Let's just mount the read-only file systems first395 # Let's just mount the read-only file systems first
376 rofsstring=""396 rofsstring=""
377 rofslist=""397 rofslist=""
378 if [ "${NETBOOT}" = "nfs" ] ; then398 if [ "${UNIONFS}" = "aufs" ]; then
379 roopt="nfsro" # work around a bug in nfs-unionfs locking
380 elif [ "${UNIONFS}" = "aufs" ]; then
381 roopt="rr"399 roopt="rr"
382 elif [ "${UNIONFS}" = "unionfs-fuse" ]; then400 elif [ "${UNIONFS}" = "unionfs-fuse" ]; then
383 roopt="RO"401 roopt="RO"
@@ -431,9 +449,29 @@
431 mkdir -p /dev/.initramfs/varrun449 mkdir -p /dev/.initramfs/varrun
432 pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true450 pidof unionfs-fuse >> /dev/.initramfs/varrun/sendsigs.omit || true
433 ;;451 ;;
434 *)452 aufs|unionfs)
435 mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed"453 mount -t ${UNIONFS} -o noatime,dirs=/cow=rw:$rofsstring ${UNIONFS} "$rootmnt" || panic "${UNIONFS} mount failed"
436 ;;454 ;;
455 overlayfs)
456 # Mount the layers pairwise from the bottom onto rootmnt,
457 # for the second and later layers rootmnt forms the lower layer.
458 mounts=""
459 for mount in /cow $rofslist
460 do
461 mounts="$mount $mounts"
462 done
463 lower=""
464 for mount in $mounts
465 do
466 if [ "$lower" = "" ]; then
467 lower="$mount"
468 continue
469 fi
470 mount -t overlayfs -o "upperdir=$mount,lowerdir=$lower" \
471 "$mount" "$rootmnt"
472 lower="$rootmnt"
473 done
474 ;;
437 esac475 esac
438476
439 # Adding other custom mounts477 # Adding other custom mounts
@@ -545,7 +583,7 @@
545 fi583 fi
546 fi584 fi
547 # or do the scan of block devices585 # or do the scan of block devices
548 for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|fd)"); do586 for sysblock in $(echo /sys/block/* | tr ' ' '\n' | egrep -v "/(loop|ram|fd)"); do
549 devname=$(sys2dev "${sysblock}")587 devname=$(sys2dev "${sysblock}")
550 [ -e "$devname" ] || continue588 [ -e "$devname" ] || continue
551 fstype=$(get_fstype "${devname}")589 fstype=$(get_fstype "${devname}")
@@ -562,7 +600,8 @@
562 elif [ "${fstype}" = "squashfs" -o \600 elif [ "${fstype}" = "squashfs" -o \
563 "${fstype}" = "ext4" -o \601 "${fstype}" = "ext4" -o \
564 "${fstype}" = "ext3" -o \602 "${fstype}" = "ext3" -o \
565 "${fstype}" = "ext2" ]; then603 "${fstype}" = "ext2" -o \
604 "${fstype}" = "btrfs" ]; then
566 # This is an ugly hack situation, the block device has605 # This is an ugly hack situation, the block device has
567 # an image directly on it. It's hopefully606 # an image directly on it. It's hopefully
568 # casper, so take it and run with it.607 # casper, so take it and run with it.
@@ -651,6 +690,34 @@
651 mount -n -o bind /dev "${rootmnt}/dev"690 mount -n -o bind /dev "${rootmnt}/dev"
652 fi691 fi
653692
693 # Open up two fifo's fd's for debconf-communicate to use. Speeds up
694 # the Casper process considerably.
695 log_begin_msg "Creating debconf-communicate fifo mechanism"
696 mkfifo /tmp/debconf-in.fifo
697 mkfifo /tmp/debconf-out.fifo
698
699 # Make the template database read-only, so that passthrough debconf
700 # instances can write to it directly; otherwise templates are only
701 # passed through when necessary. Use temporary config databases as
702 # well; we'll copy their contents back at the end.
703 DEBCONF_TMPDIR="$(chroot /root mktemp -dt debconf.XXXXXX)"
704 cp -a /root/var/cache/debconf/config.dat "/root$DEBCONF_TMPDIR/"
705 cp -a /root/var/cache/debconf/passwords.dat "/root$DEBCONF_TMPDIR/"
706 sed "s,^Filename: /var/cache/debconf/\(config\|passwords\).dat$,Filename: $DEBCONF_TMPDIR/\1.dat,; /^Name: templatedb/a\
707Readonly: true" /root/etc/debconf.conf >"/root$DEBCONF_TMPDIR/debconf.conf"
708
709 DEBCONF_SYSTEMRC="$DEBCONF_TMPDIR/debconf.conf" chroot /root debconf-communicate -fnoninteractive casper > /tmp/debconf-out.fifo < /tmp/debconf-in.fifo &
710
711 if [ ! -p /tmp/debconf-in.fifo ] || [ ! -p /tmp/debconf-out.fifo ]; then
712 log_warning_msg "failed to setup debconf-communicate channel"
713 fi
714 log_end_msg
715
716 # Order matters!
717 # These file descriptors must stay open until we're finished with
718 # debconf-communicate.
719 exec 4</tmp/debconf-out.fifo 3>/tmp/debconf-in.fifo
720
654 maybe_break casper-bottom721 maybe_break casper-bottom
655 [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"722 [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/casper-bottom"
656723
@@ -661,6 +728,20 @@
661 umount "${rootmnt}/dev"728 umount "${rootmnt}/dev"
662 fi729 fi
663730
731 # Close the fd's associated with debconf-communicate.
732 exec 3>&- 4<&-
733 rm -f /tmp/debconf-in.fifo
734 rm -f /tmp/debconf-out.fifo
735
736 # Copy config database changes back to the master files.
737 chroot /root debconf-copydb tmpdb config \
738 --config=Name:tmpdb --config=Driver:File \
739 --config="Filename:$DEBCONF_TMPDIR/config.dat"
740 chroot /root debconf-copydb tmpdb passwords \
741 --config=Name:tmpdb --config=Driver:File \
742 --config="Filename:$DEBCONF_TMPDIR/passwords.dat"
743 rm -rf "$DEBCONF_TMPDIR"
744
664 exec 1>&6 6>&-745 exec 1>&6 6>&-
665 exec 2>&7 7>&-746 exec 2>&7 7>&-
666 kill "$tailpid"747 kill "$tailpid"
667748
=== modified file 'scripts/casper-bottom/05mountpoints'
--- scripts/casper-bottom/05mountpoints 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/05mountpoints 2011-10-06 10:04:28 +0000
@@ -24,4 +24,8 @@
24mkdir -p /root/cdrom24mkdir -p /root/cdrom
25mount -n -o move /cdrom /root/cdrom25mount -n -o move /cdrom /root/cdrom
2626
27# temporary hack for LP#727783
28mkdir -p /root/media
29ln -s /cdrom /root/media/cdrom
30
27log_end_msg31log_end_msg
2832
=== added file 'scripts/casper-bottom/07remove_oem_config'
--- scripts/casper-bottom/07remove_oem_config 1970-01-01 00:00:00 +0000
+++ scripts/casper-bottom/07remove_oem_config 2011-10-06 10:04:28 +0000
@@ -0,0 +1,32 @@
1#!/bin/sh
2
3PREREQ=""
4DESCRIPTION="Removing oem-config if installed..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21# Only do this on ARM
22if ! uname -m | grep -q arm; then exit 0; fi
23
24log_begin_msg "$DESCRIPTION"
25
26# if oem-config is installed, we need to remove it to remove the desktop
27# file diversion, and to remove the OEM icons from showing up before we
28# install the image.
29
30chroot /root apt-get -y --purge remove oem-config </dev/null || true
31
32log_end_msg
033
=== modified file 'scripts/casper-bottom/10adduser'
--- scripts/casper-bottom/10adduser 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/10adduser 2011-10-06 10:04:28 +0000
@@ -17,28 +17,25 @@
17esac17esac
1818
19. /scripts/casper-functions19. /scripts/casper-functions
20load_confmodule
2021
21log_begin_msg "$DESCRIPTION"22log_begin_msg "$DESCRIPTION"
2223
23# U6aMy0wojraho is just a blank password24# U6aMy0wojraho is just a blank password
24chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF25db_set passwd/root-password-crypted '*'
25set passwd/root-password-crypted *26db_set passwd/user-password-crypted U6aMy0wojraho
26set passwd/user-password-crypted U6aMy0wojraho27db_set passwd/user-fullname "$USERFULLNAME"
27set passwd/user-fullname $USERFULLNAME 28db_set passwd/username "$USERNAME"
28set passwd/username $USERNAME29db_set passwd/user-uid 999
29set passwd/user-uid 999
30EOF
3130
32chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null31chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
3332
34# Clear out debconf database again to avoid confusing ubiquity later.33# Clear out debconf database again to avoid confusing ubiquity later.
35chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF34db_set passwd/root-password-crypted
36set passwd/root-password-crypted35db_set passwd/user-password-crypted
37set passwd/user-password-crypted36db_set passwd/user-fullname
38set passwd/user-fullname37db_set passwd/username
39set passwd/username38db_set passwd/user-uid
40set passwd/user-uid
41EOF
4239
43if [ -f /root/etc/sudoers ]; then40if [ -f /root/etc/sudoers ]; then
44 if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then41 if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
@@ -55,7 +52,11 @@
55# XXX - awful hack to stop xscreensaver locking the screen (#7150)52# XXX - awful hack to stop xscreensaver locking the screen (#7150)
56echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment53echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
5754
58RELEASE="$(cut -d' ' -f1-2 /root/cdrom/.disk/info 2>/dev/null)" || RELEASE=""55LTS="$(cut -d' ' -f3 /root/cdrom/.disk/info 2>/dev/null)" || LTS=
56RELEASE="$(cut -d' ' -f1-2 /root/cdrom/.disk/info 2>/dev/null)" || RELEASE=
57if [ "$LTS" = "LTS" ] && [ -n "$RELEASE" ]; then
58 RELEASE="$RELEASE LTS"
59fi
59for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop; do60for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop; do
60 if [ -f "/root/$file" ]; then61 if [ -f "/root/$file" ]; then
61 sed -i "s/RELEASE/$RELEASE/" "/root$file"62 sed -i "s/RELEASE/$RELEASE/" "/root$file"
@@ -97,15 +98,4 @@
97 fi98 fi
98fi99fi
99100
100#Mythbuntu
101if [ -d "/root/usr/share/mythbuntu" ]; then
102 if [ -f "/root/usr/share/applications/mythbuntu-live-frontend.desktop" ]; then
103 chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
104 chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/applications/mythbuntu-live-frontend.desktop /home/$USERNAME/Desktop/mythbuntu-live-frontend.desktop
105 fi
106 if [ -f "/root/etc/xdg/mythbuntu/xfce4/mcs_settings/desktop.xml" ]; then
107 sed -i "s/<\/mcs/\t<option\ name=\"showremovable\"\ type=\"int\"\ value=\"0\"\/>\n<\/mcs/" /root/etc/xdg/mythbuntu/xfce4/mcs_settings/desktop.xml
108 fi
109fi
110
111log_end_msg101log_end_msg
112102
=== modified file 'scripts/casper-bottom/15autologin'
--- scripts/casper-bottom/15autologin 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/15autologin 2011-10-06 10:04:28 +0000
@@ -20,16 +20,24 @@
2020
21log_begin_msg "$DESCRIPTION"21log_begin_msg "$DESCRIPTION"
2222
23if [ -d /root/etc/gdm ] && [ ! -e /root/etc/gdm/custom.conf ]; then23if [ -d /root/etc/gdm ]; then
24 # Configure GDM autologin24 # Configure GDM autologin
25 cat > /root/etc/gdm/custom.conf <<EOF25 GDMCustomFile=/root/etc/gdm/custom.conf
26[daemon]26 AutologinParameters="AutomaticLoginEnable=true\n\
27AutomaticLoginEnable=true27AutomaticLogin=$USERNAME\n\
28AutomaticLogin=$USERNAME28TimedLoginEnable=true\n\
29TimedLoginEnable=true29TimedLogin=$USERNAME\n\
30TimedLogin=$USERNAME30TimedLoginDelay=10"
31TimedLoginDelay=1031
32EOF32 # Prevent from updating if parameters already present (persistent usb key)
33 if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then
34 if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then
35 echo '[daemon]' >> $GDMCustomFile
36 fi
37 sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
38 chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool \
39 /apps/indicator-session/suppress_logout_menuitem true
40 fi
33fi41fi
3442
35if [ -f /root/etc/kde4/kdm/kdmrc ]; then43if [ -f /root/etc/kde4/kdm/kdmrc ]; then
@@ -41,4 +49,40 @@
41 /root/etc/kde4/kdm/kdmrc49 /root/etc/kde4/kdm/kdmrc
42fi50fi
4351
52if [ -f /root/etc/lxdm/lxdm.conf ]; then
53 # Configure LXDM autologin with LXDE session
54 sed -i -r \
55 -e "s/^# autologin=dgod/autologin=$USERNAME/" \
56 -e "s/^# session/session/" \
57 -e "s/startlxde/startlubuntu/" \
58 /root/etc/lxdm/lxdm.conf
59fi
60
61if [ -f /root/etc/xdg/lubuntu/lxdm/lxdm.conf ]; then
62 # Configure LXDM autologin with Lubuntu session
63 sed -i -r \
64 -e "s/^# autologin=dgod/autologin=$USERNAME/" \
65 -e "s/^# session/session/" \
66 -e "s/startlxde/startlubuntu/" \
67 /root/etc/xdg/lubuntu/lxdm/lxdm.conf
68fi
69
70if [ -d /root/etc/lightdm ]; then
71 # Configure LightDM autologin
72 LightDMCustomFile=/root/etc/lightdm/lightdm.conf
73 AutologinParameters="allow-guest=false\n\
74autologin-guest=false\n\
75autologin-user=$USERNAME\n\
76autologin-user-timeout=0\n\
77autologin-session=lightdm-autologin"
78
79 # Prevent from updating if parameters already present (persistent usb key)
80 if ! `grep -qs '^autologin-user' $LightDMCustomFile` ; then
81 if ! `grep -qs '\[SeatDefaults\]' $LightDMCustomFile` ; then
82 echo '[SeatDefaults]' >> $LightDMCustomFile
83 fi
84 sed -i "s/\[SeatDefaults\]/\[SeatDefaults\]\n$AutologinParameters/" $LightDMCustomFile
85 fi
86fi
87
44log_end_msg88log_end_msg
4589
=== modified file 'scripts/casper-bottom/19keyboard'
--- scripts/casper-bottom/19keyboard 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/19keyboard 2011-10-06 10:04:28 +0000
@@ -48,6 +48,24 @@
48 console-setup/modelcode\?=*)48 console-setup/modelcode\?=*)
49 csmodel=${x#console-setup/modelcode\?=}49 csmodel=${x#console-setup/modelcode\?=}
50 ;;50 ;;
51 keyboard-configuration/layoutcode=*)
52 cslayout=${x#keyboard-configuration/layoutcode=}
53 ;;
54 keyboard-configuration/layoutcode\?=*)
55 cslayout=${x#keyboard-configuration/layoutcode\?=}
56 ;;
57 keyboard-configuration/variantcode=*)
58 csvariant=${x#keyboard-configuration/variantcode=}
59 ;;
60 keyboard-configuration/variantcode\?=*)
61 csvariant=${x#keyboard-configuration/variantcode\?=}
62 ;;
63 keyboard-configuration/modelcode=*)
64 csmodel=${x#keyboard-configuration/modelcode=}
65 ;;
66 keyboard-configuration/modelcode\?=*)
67 csmodel=${x#keyboard-configuration/modelcode\?=}
68 ;;
51 esac69 esac
52done70done
5371
@@ -151,35 +169,45 @@
151 fi169 fi
152}170}
153171
154if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then172PREFIX=
173CONFIGFILE=
174if [ -f /root/etc/default/keyboard ]; then
175 PREFIX=keyboard-configuration
176 CONFIGFILE=/etc/default/keyboard
177elif [ -f /root/etc/default/console-setup ]; then
178 PREFIX=console-setup
179 CONFIGFILE=/etc/default/console-setup
180fi
181if [ -x /root/bin/setupcon ] && [ "$PREFIX" ] && [ "$CONFIGFILE" ]; then
155 if [ "$cslayout" ]; then182 if [ "$cslayout" ]; then
156 csoptions=183 csoptions=
157 adjust_console_setup184 adjust_console_setup
158185
159 chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \186 chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
160 /etc/default/console-setup187 "$CONFIGFILE"
161 if [ "$csvariant" ]; then188 if [ "$csvariant" ]; then
162 chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \189 chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
163 /etc/default/console-setup190 "$CONFIGFILE"
164 else191 else
165 casper-preseed /root console-setup/variantcode '' false192 casper-preseed /root "$PREFIX/variantcode" '' false
166 fi193 fi
167 if [ "$csmodel" ]; then194 if [ "$csmodel" ]; then
168 chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \195 chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
169 /etc/default/console-setup196 "$CONFIGFILE"
170 else197 else
171 casper-preseed /root console-setup/modelcode '' false198 casper-preseed /root "$PREFIX/modelcode" '' false
172 fi199 fi
173 if [ "$csoptions" ]; then200 if [ "$csoptions" ]; then
174 chroot /root sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"$csoptions\"/" \201 chroot /root sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"$csoptions\"/" \
175 /etc/default/console-setup202 "$CONFIGFILE"
176 fi203 fi
177 else204 else
178 casper-preseed /root console-setup/layoutcode '' false205 casper-preseed /root "$PREFIX/layoutcode" '' false
179 casper-preseed /root console-setup/variantcode '' false206 casper-preseed /root "$PREFIX/variantcode" '' false
180 casper-preseed /root console-setup/modelcode '' false207 casper-preseed /root "$PREFIX/modelcode" '' false
181 fi208 fi
182 casper-preseed /root console-setup/optionscode '' false209 casper-preseed /root "$PREFIX/optionscode" '' false
210 # prefix remains console-setup even with keyboard-configuration
183 casper-preseed /root console-setup/codesetcode '' false211 casper-preseed /root console-setup/codesetcode '' false
184212
185 if [ -f /root/etc/init.d/usplash ]; then213 if [ -f /root/etc/init.d/usplash ]; then
186214
=== modified file 'scripts/casper-bottom/22gnome_panel_data'
--- scripts/casper-bottom/22gnome_panel_data 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/22gnome_panel_data 2011-10-06 10:04:28 +0000
@@ -20,12 +20,6 @@
2020
21log_begin_msg "$DESCRIPTION"21log_begin_msg "$DESCRIPTION"
2222
23if [ -x /root/usr/sbin/laptop-detect ]; then
24 if chroot /root laptop-detect; then
25 casper-reconfigure /root gnome-panel-data
26 fi
27fi
28
29panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""23panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
30if [ -n "$panel_version" ]; then24if [ -n "$panel_version" ]; then
31 chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true25 chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
3226
=== modified file 'scripts/casper-bottom/22screensaver'
--- scripts/casper-bottom/22screensaver 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/22screensaver 2011-10-06 10:04:28 +0000
@@ -22,9 +22,7 @@
2222
23gnome_screensaver_version=$(chroot /root dpkg-query -W --showformat='${Version}' gnome-screensaver 2>/dev/null) || gnome_screensaver_version=""23gnome_screensaver_version=$(chroot /root dpkg-query -W --showformat='${Version}' gnome-screensaver 2>/dev/null) || gnome_screensaver_version=""
24if [ -n "$gnome_screensaver_version" ]; then24if [ -n "$gnome_screensaver_version" ]; then
25 # Support legacy gconf value25 chroot /root sudo -u "$USERNAME" gsettings set org.gnome.desktop.screensaver lock-enabled false
26 chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false
27 chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
28fi26fi
2927
30if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then28if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then
3129
=== modified file 'scripts/casper-bottom/22sslcert'
--- scripts/casper-bottom/22sslcert 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/22sslcert 2011-10-06 10:04:28 +0000
@@ -17,6 +17,7 @@
17esac17esac
1818
19. /scripts/casper-functions19. /scripts/casper-functions
20load_confmodule
2021
21log_begin_msg "$DESCRIPTION"22log_begin_msg "$DESCRIPTION"
2223
2324
=== modified file 'scripts/casper-bottom/23networking'
--- scripts/casper-bottom/23networking 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/23networking 2011-10-06 10:04:28 +0000
@@ -73,27 +73,32 @@
73EOF73EOF
74 done74 done
75 fi75 fi
76 if [ ! -f /root/etc/resolv.conf -a -f /netboot.config ] ; then76 if [ ! -f /root/etc/resolv.conf ] || [ -z "$(cat /root/etc/resolv.conf)" ]; then
77 # create a resolv.conf if it is not present77 if [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ]; then
78 cp /netboot.config /root/var/log/netboot.config78 # create a resolv.conf if it is not present
79 rc_search=$(cat netboot.config | awk '/domain/{print $3}')79 cp /tmp/net-"${DEVICE}".conf /root/var/log/netboot.config
80 rc_server0=$(cat netboot.config | awk '/dns0/{print $5}')80 #ipconfig quotes DNSDOMAIN, quotes need to be removed for a correct resolv.conf
81 rc_server1=$(cat netboot.config | awk '/dns0/{print $8}')81 rc_search="$(sed -n 's/"//g;s/^DNSDOMAIN=//p' /tmp/net-"${DEVICE}".conf)"
82 rc_server0="nameserver ${rc_server0}"82 #search might contain multiple entries but domain should only have one.
83 if [ "${rc_server1}" = "0.0.0.0" ]; then83 rc_domain="$(sed -n -e 's/"//g;s/^DNSDOMAIN=\([^ ]\+\) *.*/\1/p' /tmp/net-"${DEVICE}".conf)"
84 rc_server1=""84 rc_server0="$(sed -n 's/^IPV4DNS0=//p' /tmp/net-"${DEVICE}".conf)"
85 else85 rc_server1="$(sed -n 's/^IPV4DNS1=//p' /tmp/net-"${DEVICE}".conf)"
86 rc_server1="nameserver ${rc_server1}"86 rc_server0="nameserver ${rc_server0}"
87 fi87 if [ "${rc_server1}" = "0.0.0.0" ]; then
88 cat > /root/etc/resolv.conf <<EOF88 rc_server1=""
89 else
90 rc_server1="nameserver ${rc_server1}"
91 fi
92 cat > /root/etc/resolv.conf <<EOF
89# /etc/resolv.conf93# /etc/resolv.conf
90# Autogenerated by casper94# Autogenerated by casper
91search ${rc_search}95search ${rc_search}
92domain ${rc_search}96domain ${rc_domain}
93${rc_server0}97${rc_server0}
94${rc_server1}98${rc_server1}
95EOF99EOF
96 cat /root/etc/resolv.conf >> /root/var/log/netboot.config100 cat /root/etc/resolv.conf >> /root/var/log/netboot.config
101 fi
97 fi102 fi
98fi103fi
99104
100105
=== modified file 'scripts/casper-bottom/24preseed'
--- scripts/casper-bottom/24preseed 2010-01-20 23:33:29 +0000
+++ scripts/casper-bottom/24preseed 2011-10-06 10:04:28 +0000
@@ -17,13 +17,40 @@
17esac17esac
1818
19. /scripts/casper-functions19. /scripts/casper-functions
20load_confmodule
2021
21log_begin_msg "$DESCRIPTION"22log_begin_msg "$DESCRIPTION"
2223
23if [ -e /preseed.cfg ]; then24if [ -e /preseed.cfg ]; then
24 chroot /root debconf-set-selections < /preseed.cfg25 casper-set-selections /preseed.cfg
25fi26fi
2627
28network_started=
29
30start_network () {
31 [ -z "$network_started" ] || return
32 [ -z "$NETBOOT" ] || return
33
34 mount -n -o bind /sys /root/sys
35 mount -n -o bind /proc /root/proc
36 mount -n -o bind /dev /root/dev
37 mkdir -p /root/var/run/network
38 # Close inherited fd's to prevent debconf-communicate from
39 # continuing to run post-casper.
40 chroot /root dhclient eth0 3>&- 4<&-
41
42 network_started=1
43}
44
45stop_network () {
46 [ "$network_started" ] || return
47
48 chroot /root ifconfig eth0 down
49 umount /root/sys
50 umount /root/proc
51 umount /root/dev
52}
53
27locations=54locations=
28for x in $(cat /proc/cmdline); do55for x in $(cat /proc/cmdline); do
29 case $x in56 case $x in
@@ -35,16 +62,8 @@
35 ;;62 ;;
36 url=*)63 url=*)
37 url_location="${x#url=}"64 url_location="${x#url=}"
38 mount -n -o bind /sys /root/sys65 start_network
39 mount -n -o bind /proc /root/proc
40 mount -n -o bind /dev /root/dev
41 mkdir -p /root/var/run/network
42 [ "$NETBOOT" ] || chroot /root dhclient eth0
43 chroot /root wget -P /tmp "$url_location"66 chroot /root wget -P /tmp "$url_location"
44 [ "$NETBOOT" ] || chroot /root ifconfig eth0 down
45 umount /root/sys
46 umount /root/proc
47 umount /root/dev
48 locations="/tmp/$(basename "$url_location") $locations"67 locations="/tmp/$(basename "$url_location") $locations"
49 ;;68 ;;
50 */*\?=*)69 */*\?=*)
@@ -66,16 +85,22 @@
6685
67if [ "$locations" ]; then86if [ "$locations" ]; then
68 for item in $locations; do87 for item in $locations; do
69 chroot /root debconf-set-selections < "/root$item"88 casper-set-selections "/root$item"
70 done89 done
71fi90fi
7291
73reply="$(echo "GET preseed/early_command" | chroot /root debconf-communicate -fnoninteractive casper)"92if db_get preseed/early_command && [ "$RET" ]; then
74if [ "${reply#0 }" != "$reply" ]; then93 EARLY="$RET"
75 reply="${reply#0 }"94 if db_get preseed/allow-network && [ "$RET" = true ]; then
76 sh -c "$reply"95 start_network
96 fi
97 DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \
98 DEBIAN_FRONTEND=noninteractive \
99 sh -c "$EARLY"
77fi100fi
78101
102stop_network
103
79# Clear out debconf database backup files to save memory.104# Clear out debconf database backup files to save memory.
80rm -f /root/var/cache/debconf/*.dat-old105rm -f /root/var/cache/debconf/*.dat-old
81106
82107
=== modified file 'scripts/casper-bottom/25configure_init'
--- scripts/casper-bottom/25configure_init 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/25configure_init 2011-10-06 10:04:28 +0000
@@ -54,7 +54,7 @@
54rm -f /root/etc/rc?.d/[SK]??postfix54rm -f /root/etc/rc?.d/[SK]??postfix
5555
56# Avoid clobbering the user's clock56# Avoid clobbering the user's clock
57rm -f /root/etc/rc?.d/K??hwclock.sh57rm -f /root/etc/rc?.d/K??hwclock.sh /root/etc/init/hwclock-save.conf
5858
59# Disable readahead since it doesn't play well with squashfs + unionfs59# Disable readahead since it doesn't play well with squashfs + unionfs
60# use chmod instead of mv to not trigger unionfs bugs.60# use chmod instead of mv to not trigger unionfs bugs.
@@ -65,7 +65,7 @@
65# Disable ureadahead too since we don't ship a pack file for it anyway, so65# Disable ureadahead too since we don't ship a pack file for it anyway, so
66# all we'll end up doing is profiling the live CD boot. ureadahead also66# all we'll end up doing is profiling the live CD boot. ureadahead also
67# breaks partman occasionally by reading from its synchronisation FIFOs.67# breaks partman occasionally by reading from its synchronisation FIFOs.
68rm -f /root/etc/init/ureadahead.conf68rm -f /root/etc/init/ureadahead*.conf
6969
70log_end_msg70log_end_msg
7171
7272
=== added file 'scripts/casper-bottom/26disable_user_menu'
--- scripts/casper-bottom/26disable_user_menu 1970-01-01 00:00:00 +0000
+++ scripts/casper-bottom/26disable_user_menu 2011-10-06 10:04:28 +0000
@@ -0,0 +1,28 @@
1#!/bin/sh
2
3PREREQ=""
4DESCRIPTION="Disabling user menu..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23indicator_session_version=$(chroot /root dpkg-query -W --showformat='${Version}' indicator-session 2>/dev/null) || indicator_session_version=""
24if [ -n "$indicator_session_version=" ]; then
25 chroot /root sudo -u "$USERNAME" gsettings set com.canonical.indicator.session user-show-menu false
26fi
27
28log_end_msg
029
=== modified file 'scripts/casper-bottom/30accessibility'
--- scripts/casper-bottom/30accessibility 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/30accessibility 2011-10-06 10:04:28 +0000
@@ -1,172 +1,52 @@
1#!/bin/sh1#!/bin/sh
2# If you change this, please also change the copy in ubiquity-hooks/30accessibility.2# If you are looking to change accessibility profile settings, plesae look in
3# bin/casper-a11y-enable.
34
4PREREQ=""5PREREQ=""
5DESCRIPTION="Configuring accessibility options..."6DESCRIPTION="Configuring accessibility options..."
67
7prereqs()8prereqs()
8{9{
9 echo "$PREREQ"10 echo "$PREREQ"
10}11}
1112
12case $1 in13case $1 in
13# get pre-requisites14# get pre-requisites
14prereqs)15 prereqs)
15 prereqs16 prereqs
16 exit 017 exit 0
17 ;;18 ;;
18esac19esac
1920
20. /scripts/casper-functions21. /scripts/casper-functions
2122
22log_begin_msg "$DESCRIPTION"23log_begin_msg "$DESCRIPTION"
2324
24gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
25
26gct() {
27 if [ "$gconf_version" ]; then
28 chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
29 fi
30}
31
32kderc_addtoprefixes() {
33 if [ -e "/root/etc/kde4rc" ]; then
34 sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" /root/etc/kde4rc
35 fi
36}
37
38# Code to remove an applet from the default panel setup
39# This is rather hacky, but I can't think of a one or two line regular
40# expression to do this any more efficiently. Patches welcome.
41# In addition, setting these via gconf also doesn't work for some reason.
42remove_applet()
43{
44 local line_no prior_line next_line
45
46 line_no=$(grep -n "<string>$1</string>" /root/usr/share/gconf/defaults/05_panel-default-setup.entries | cut -f 1 -d :)
47 [ "$line_no" ] || return
48 prior_line=$((line_no-1))
49 next_line=$((line_no+1))
50 sed -i -n "${prior_line},${next_line}!p" /root/usr/share/gconf/defaults/05_panel-default-setup.entries
51 chroot /root update-gconf-defaults
52}
53
54for x in $(cat /proc/cmdline); do25for x in $(cat /proc/cmdline); do
55 case $x in26 case $x in
56 # Lesser Visual Impairment27 # Lesser Visual Impairment
57 access=v1)28 access=v1)
58 gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint29 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script high-contrast
59 gct -s -t string /desktop/gnome/interface/icon_theme HighContrast30 ;;
60 gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18"31 # Moderate Visual Impairment
61 gct -s -t string /desktop/gnome/interface/font_name "sans 18"32 access=v2)
62 gct -s -t string /apps/metacity/general/theme Atlanta33 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script magnifier
63 gct -s -t string /desktop/gnome/background/picture_filename ""34 ;;
64 gct -s -t string /desktop/gnome/background/picture_options none35 # Blindness
65 gct -s -t string /desktop/gnome/background/primary_color \#66666636 access=v3)
66 gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F37 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script blindness
67 gct -s -t string /desktop/gnome/background/color_shading_type solid38 ;;
68 gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 4839 # Braille
69 gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass40 braille=ask)
7041 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script braille
71 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/42 ;;
72 if [ -d /root/usr/share/xubuntu-default-settings/accessibility ]; then43 # Minor Motor Difficulties
73 cp -a /root/usr/share/xubuntu-default-settings/accessibility/* /root/etc/xdg/44 access=m1)
74 fi45 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script keyboard-modifiers
75 ;;46 ;;
76 # Moderate Visual Impairment47 # Motor Difficulties - pointing devices
77 access=v2)48 access=m2)
78 gct -s -t bool /desktop/gnome/interface/accessibility true49 /root/usr/bin/casper-a11y-enable -initramfs -user="$USERNAME" -chroot=/root -script onscreen-keyboard
79 gct -s -t bool /desktop/gnome/applications/at/visual/startup true
80 gct -s -t string /desktop/gnome/applications/at/visual/exec orca
81 if [ -x /root/usr/bin/orca ]; then
82 mkdir -p /root/home/$USERNAME/.orca
83 echo "import orca.settings" >> /root/home/$USERNAME/.orca/user-settings.py
84 echo "orca.settings.enableSpeech = False" >> /root/home/$USERNAME/.orca/user-settings.py
85 echo "orca.settings.enableMagnifier = True" >> /root/home/$USERNAME/.orca/user-settings.py
86 chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.orca
87 fi
88 gct -s -t bool /apps/gksu/disable-grab true
89 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
90 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
91 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/
92 ;;
93 # Blindness
94 access=v3)
95 gct -s -t bool /desktop/gnome/interface/accessibility true
96 gct -s -t bool /apps/gksu/disable-grab true
97 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
98 gct -s -t bool /desktop/gnome/applications/at/visual/startup true
99 gct -s -t string /desktop/gnome/applications/at/visual/exec orca
100 remove_applet fast_user_switch
101 if [ -x /root/usr/bin/pulse-session ]; then
102 mkdir -p /root/var/lib/pulseaudio
103 touch /root/var/lib/pulseaudio/pulse_a11y_nostart
104 chroot /root chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
105 mkdir -p /root/home/$USERNAME/.pulse
106 echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
107 chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
108 fi
109 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
110 if [ -x /root/usr/bin/orca ]; then
111 mkdir -p /root/home/$USERNAME/.orca
112 chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.orca
113 fi
114 ;;
115 # Braille
116 braille=ask)
117 gct -s -t bool /desktop/gnome/interface/accessibility true
118 gct -s -t bool /desktop/gnome/applications/at/visual/startup true
119 gct -s -t string /desktop/gnome/applications/at/visual/exec orca
120 if [ -x /root/usr/bin/orca ]; then
121 mkdir -p /root/home/$USERNAME/.orca
122 echo "import orca.settings" >> /root/home/$USERNAME/.orca/user-settings.py
123 echo "orca.settings.enableSpeech = False" >> /root/home/$USERNAME/.orca/user-settings.py
124 echo "orca.settings.enableBraille = True" >> /root/home/$USERNAME/.orca/user-settings.py
125 chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.orca
126 fi
127 gct -s -t bool /apps/gksu/disable-grab true
128 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
129 remove_applet fast_user_switch
130 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /root/etc/sudoers
131 if [ -x /root/usr/bin/pulse-session ]; then
132 mkdir -p /root/var/lib/pulseaudio
133 touch /root/var/lib/pulseaudio/pulse_a11y_nostart
134 chroot /root chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
135 mkdir -p /root/home/$USERNAME/.pulse
136 echo "autospawn = no" > /root/home/$USERNAME/.pulse/client.conf
137 chroot /root chown -R $USERNAME.$USERNAME /home/$USERNAME/.pulse
138 fi
139 ;;
140 # Minor Motor Difficulties
141 access=m1)
142 gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
143 gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true
144 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
145 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true
146 gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
147 gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true
148 gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700
149 gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10
150 gct -s -t bool /apps/gksu/disable-grab true
151 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/
152 if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
153 sed -i 's/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
154 fi
155 ;;
156 # Motor Difficulties - pointing devices
157 access=m2)
158 gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
159 gct -s -t bool /desktop/gnome/interface/accessibility true
160 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
161 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false
162 gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
163 gct -s -t bool /desktop/gnome/applications/at/mobility/startup true
164 gct -s -t string /desktop/gnome/applications/at/mobility/exec onboard
165
166 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/
167 if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
168 sed -i '/Sticky/ s/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml
169 fi
170 ;;50 ;;
171 esac51 esac
172done52done
17353
=== modified file 'scripts/casper-bottom/31disable_update_notifier'
--- scripts/casper-bottom/31disable_update_notifier 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/31disable_update_notifier 2011-10-06 10:04:28 +0000
@@ -31,4 +31,12 @@
31# 'apt-get update' equivalent, so we disable it entirely.31# 'apt-get update' equivalent, so we disable it entirely.
32rm -f /root/usr/share/autostart/adept_notifier_auto.desktop32rm -f /root/usr/share/autostart/adept_notifier_auto.desktop
3333
34# Upgrading the live CD to new releases is probably not a great plan.
35chroot /root dpkg-divert --add --rename --quiet \
36 /usr/lib/update-manager/check-new-release
37ln -sf /bin/true /root/usr/lib/update-manager/check-new-release
38chroot /root dpkg-divert --add --rename --quiet \
39 /usr/lib/update-manager/check-new-release-gtk
40ln -sf /bin/true /root/usr/lib/update-manager/check-new-release-gtk
41
34log_end_msg42log_end_msg
3543
=== modified file 'scripts/casper-bottom/32disable_hibernation'
--- scripts/casper-bottom/32disable_hibernation 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/32disable_hibernation 2011-10-06 10:04:28 +0000
@@ -20,15 +20,11 @@
2020
21log_begin_msg "$DESCRIPTION"21log_begin_msg "$DESCRIPTION"
2222
2323cat <<EOF > /root/var/lib/polkit-1/localauthority/50-local.d/disable-hibernate.pkla
24gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version=""24[Disable hibernate in live system]
25if [ -n "$gpm_version" ]; then25Identity=unix-user:*
26# casper-reconfigure /root gnome-power-manager26Action=org.freedesktop.upower.hibernate
27 chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/general/can_hibernate false27ResultActive=no
28fi28EOF
29
30if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then
31 echo "disableHibernate=1" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/guidance-power-managerrc
32fi
3329
34log_end_msg30log_end_msg
3531
=== added file 'scripts/casper-bottom/34disable_kde_services.OTHER'
--- scripts/casper-bottom/34disable_kde_services.OTHER 1970-01-01 00:00:00 +0000
+++ scripts/casper-bottom/34disable_kde_services.OTHER 2011-10-06 10:04:28 +0000
@@ -0,0 +1,36 @@
1#! /bin/sh
2
3PREREQ=""
4DESCRIPTION="Disabling unnecessary KDE services..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23rm -f /root/usr/share/autostart/kab2kabc.desktop
24rm -f /root/usr/share/autostart/kaddressbookmigrator.desktop
25rm -f /root/usr/share/autostart/korgac.desktop
26rm -f /root/usr/share/autostart/printer-applet.desktop
27rm -f /root/usr/share/autostart/nepomukserver.desktop
28rm -f /root/usr/share/kde4/services/kwalletd.desktop
29rm -f /root/usr/share/kde4/services/kded/kpackagekitd.desktop
30if [ -z "${PERSISTENT}" ]; then
31 rm -f /root/usr/share/kde4/services/kded/freespacenotifier.desktop
32fi
33rm -f /root/usr/share/kde4/services/plasma-runner-contacts.desktop # starts akonadi
34rm -f /root/usr/share/kde4/services/plasma-dataengine-calendar.desktop # starts akonadi
35
36log_end_msg
037
=== removed file 'scripts/casper-bottom/37kubuntu_netbook_installer_link'
--- scripts/casper-bottom/37kubuntu_netbook_installer_link 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/37kubuntu_netbook_installer_link 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1#! /bin/sh
2
3PREREQ=""
4DESCRIPTION="Adding installer to Kubuntu Netbook favourites..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23if [ -e "/root/usr/share/kubuntu-netbook-default-settings/share/config/moved_plasma-netbook-appletsrc" ]; then
24 mv /root/usr/share/kubuntu-netbook-default-settings/share/config/moved_plasma-netbook-appletsrc \
25 /root/usr/share/kubuntu-netbook-default-settings/share/config/plasma-netbook-appletsrc
26fi
27
28log_end_msg
290
=== modified file 'scripts/casper-bottom/40install_driver_updates'
--- scripts/casper-bottom/40install_driver_updates 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/40install_driver_updates 2011-10-06 10:04:28 +0000
@@ -34,7 +34,13 @@
34for deb in "/root$install_dir"/*; do34for deb in "/root$install_dir"/*; do
35 [ -f "$deb" ] || continue35 [ -f "$deb" ] || continue
36 debbase="${deb##*/}"36 debbase="${deb##*/}"
37 if ! chroot /root dpkg -i "$install_dir/$debbase"; then37 DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \
38 DEBIAN_FRONTEND=noninteractive \
39 chroot /root dpkg -i "$install_dir/$debbase"
40 ret=$?
41 if [ $ret != 0 ]; then
42 DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \
43 DEBIAN_FRONTEND=noninteractive \
38 chroot /root dpkg -P "${debbase%%_*}"44 chroot /root dpkg -P "${debbase%%_*}"
39 fi45 fi
40done46done
4147
=== modified file 'scripts/casper-bottom/41apt_cdrom'
--- scripts/casper-bottom/41apt_cdrom 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/41apt_cdrom 2011-10-06 10:04:28 +0000
@@ -18,4 +18,12 @@
1818
19. /scripts/casper-functions19. /scripts/casper-functions
2020
21chroot /root apt-cdrom -m add21mount -n -o bind /sys /root/sys
22mount -n -o bind /proc /root/proc
23mount -n -o bind /dev /root/dev
24chroot /root apt-cdrom -o Acquire::cdrom::mount=/cdrom \
25 -o Dir::Media::MountPath=/cdrom \
26 -o Acquire::cdrom::AutoDetect=false -m add
27umount /root/dev
28umount /root/proc
29umount /root/sys
2230
=== removed file 'scripts/casper-bottom/42disable_apparmor'
--- scripts/casper-bottom/42disable_apparmor 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/42disable_apparmor 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
1#!/bin/sh
2# workaround for AppArmor bug #131976
3
4PREREQ=""
5DESCRIPTION="Disabling AppArmor (does not work with stacked file systems)..."
6
7prereqs()
8{
9 echo "$PREREQ"
10}
11
12case $1 in
13# get pre-requisites
14prereqs)
15 prereqs
16 exit 0
17 ;;
18esac
19
20. /scripts/casper-functions
21
22log_begin_msg "$DESCRIPTION"
23
24chroot /root update-rc.d -f apparmor remove
25
26log_end_msg
270
=== modified file 'scripts/casper-bottom/43disable_updateinitramfs'
--- scripts/casper-bottom/43disable_updateinitramfs 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/43disable_updateinitramfs 2011-10-06 10:04:28 +0000
@@ -27,13 +27,8 @@
27if [ -w /root/cdrom ] && \27if [ -w /root/cdrom ] && \
28 # rw is guaranteed to be first.28 # rw is guaranteed to be first.
29 grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo; then29 grep -q ' /root/cdrom rw[, ]' /proc/self/mountinfo; then
30 cat > /root/usr/sbin/update-initramfs <<'EOF'30 ln -s /usr/share/casper/casper-update-initramfs \
31#! /bin/sh31 /root/usr/sbin/update-initramfs
32update-initramfs.distrib "$@"
33cp /initrd.img /cdrom/casper/initrd.gz
34cp /vmlinuz /cdrom/casper/vmlinuz
35exit 0
36EOF
37else32else
38 cat > /root/usr/sbin/update-initramfs <<EOF33 cat > /root/usr/sbin/update-initramfs <<EOF
39#! /bin/sh34#! /bin/sh
4035
=== modified file 'scripts/casper-bottom/44pk_allow_ubuntu'
--- scripts/casper-bottom/44pk_allow_ubuntu 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/44pk_allow_ubuntu 2011-10-06 10:04:28 +0000
@@ -1,7 +1,7 @@
1#!/bin/sh1#!/bin/sh
22
3PREREQ=""3PREREQ=""
4DESCRIPTION="Grant administrative PolicyKit pivilieges to default user..."4DESCRIPTION="Grant administrative PolicyKit privileges to default user..."
55
6prereqs()6prereqs()
7{7{
@@ -21,27 +21,6 @@
21log_begin_msg "$DESCRIPTION"21log_begin_msg "$DESCRIPTION"
2222
23# configure PolicyKit in live session23# configure PolicyKit in live session
24mkdir -p /root/etc/PolicyKit
25cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
26<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
27
28<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
29"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
30
31<!-- See the manual page PolicyKit.conf(5) for file format -->
32
33<config version="0.1">
34 <match user="root">
35 <return result="yes"/>
36 </match>
37 <!-- don't ask password for user in live session -->
38 <match user="$USERNAME">
39 <return result="yes"/>
40 </match>
41 <define_admin_auth group="admin"/>
42</config>
43EOF
44
45mkdir -p /root/var/lib/polkit-1/localauthority/10-vendor.d24mkdir -p /root/var/lib/polkit-1/localauthority/10-vendor.d
46cat << EOF > /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla25cat << EOF > /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla
47# Policy to allow the livecd user to bypass policykit26# Policy to allow the livecd user to bypass policykit
@@ -49,7 +28,7 @@
49Identity=unix-user:$USERNAME28Identity=unix-user:$USERNAME
50Action=*29Action=*
51ResultAny=no30ResultAny=no
52ResultInactive=no31ResultInactive=yes
53ResultActive=yes32ResultActive=yes
54EOF33EOF
5534
5635
=== removed file 'scripts/casper-bottom/45disable_guest_account'
--- scripts/casper-bottom/45disable_guest_account 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/45disable_guest_account 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1#!/bin/sh
2
3PREREQ=""
4DESCRIPTION="Disabling gdm guest session functionality..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23chroot /root dpkg -P gdm-guest-session || true
24
25log_end_msg
260
=== removed file 'scripts/casper-bottom/47unr_ubiquity'
--- scripts/casper-bottom/47unr_ubiquity 2010-01-05 16:54:40 +0000
+++ scripts/casper-bottom/47unr_ubiquity 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
1#!/bin/sh
2
3PREREQ=""
4DESCRIPTION="Set ubiquity favourite for UNR..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version=""
24
25gct() {
26 if [ "$gconf_version" ]; then
27 chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
28 fi
29}
30
31if ! gct -g /apps/netbook-launcher/favorites/favorites_list | grep -q ubiquity; then
32 gct -s -t string /apps/netbook-launcher/favorites/ubiquity/type application
33 gct -s -t string /apps/netbook-launcher/favorites/ubiquity/desktop_file /usr/share/applications/ubiquity-gtkui.desktop
34 favs=$(gct -g /apps/netbook-launcher/favorites/favorites_list)
35 gct -s -t list --list-type=string /apps/netbook-launcher/favorites/favorites_list $(echo "$favs" | sed -e 's/]$/,ubiquity]/')
36fi
37
38log_end_msg
39
400
=== removed file 'scripts/casper-bottom/48enable_kubuntu_netbook'
--- scripts/casper-bottom/48enable_kubuntu_netbook 2010-01-27 13:56:03 +0000
+++ scripts/casper-bottom/48enable_kubuntu_netbook 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1#! /bin/sh
2
3PREREQ=""
4DESCRIPTION="Enabling Plasma Netbook workspace if appropriate..."
5
6prereqs()
7{
8 echo "$PREREQ"
9}
10
11case $1 in
12# get pre-requisites
13prereqs)
14 prereqs
15 exit 0
16 ;;
17esac
18
19. /scripts/casper-functions
20
21log_begin_msg "$DESCRIPTION"
22
23if [ -e "/root/usr/share/autostart/plasma-netbook.desktop" ]; then
24 sed -i "s,Hidden=true,," /root/usr/share/autostart/plasma-netbook.desktop
25fi
26
27log_end_msg
280
=== added file 'scripts/casper-bottom/48kubuntu_disable_restart_notifications'
--- scripts/casper-bottom/48kubuntu_disable_restart_notifications 1970-01-01 00:00:00 +0000
+++ scripts/casper-bottom/48kubuntu_disable_restart_notifications 2011-10-06 10:04:28 +0000
@@ -0,0 +1,5 @@
1#! /bin/sh
2
3if [ -d /root/usr/share/kubuntu-default-settings/ ]; then
4 echo "[Event]\nhideRestartNotifier=true" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/notificationhelper
5fi
06
=== added file 'scripts/casper-bottom/49kubuntu_mobile_session'
--- scripts/casper-bottom/49kubuntu_mobile_session 1970-01-01 00:00:00 +0000
+++ scripts/casper-bottom/49kubuntu_mobile_session 2011-10-06 10:04:28 +0000
@@ -0,0 +1,5 @@
1#! /bin/sh
2
3if [ -d /root/usr/share/kubuntu-mobile-default-settings/ ]; then
4 cp /root/usr/share/kubuntu-mobile-default-settings/share/nodm /root/etc/default/nodm
5fi
06
=== modified file 'scripts/casper-functions'
--- scripts/casper-functions 2008-09-18 23:39:20 +0000
+++ scripts/casper-functions 2011-10-06 10:04:28 +0000
@@ -4,7 +4,10 @@
4# Print a message and wait for enter4# Print a message and wait for enter
5log_wait_msg()5log_wait_msg()
6{6{
7 if [ -x /sbin/usplash_write ]; then7 if [ -x /bin/plymouth ] && plymouth --ping; then
8 plymouth message --text="$@"
9 plymouth watch-keystroke | read nunya
10 elif [ -x /sbin/usplash_write ]; then
8 /sbin/usplash_write "INPUTENTER $@"11 /sbin/usplash_write "INPUTENTER $@"
9 read nunya < /dev/.initramfs/usplash_outfifo12 read nunya < /dev/.initramfs/usplash_outfifo
10 fi13 fi
@@ -39,3 +42,14 @@
39 echo "C"42 echo "C"
40 fi43 fi
41}44}
45
46load_confmodule() {
47 # Only do this once.
48 if [ -z "$DEBCONF_REDIR" ]; then
49 exec <&4
50 export DEBIAN_HAS_FRONTEND=1
51 export DEBCONF_REDIR=1
52 fi
53
54 . /root/usr/share/debconf/confmodule
55}
4256
=== modified file 'scripts/casper-helpers'
--- scripts/casper-helpers 2009-05-12 12:30:01 +0000
+++ scripts/casper-helpers 2011-10-06 10:04:28 +0000
@@ -31,7 +31,7 @@
31 # FIXME: do something better like the scan of supported filesystems31 # FIXME: do something better like the scan of supported filesystems
32 fstype="${1}"32 fstype="${1}"
33 case ${fstype} in33 case ${fstype} in
34 vfat|iso9660|udf|ext2|ext3|ext4|ntfs)34 vfat|iso9660|udf|ext2|ext3|ext4|btrfs|ntfs)
35 return 035 return 0
36 ;;36 ;;
37 esac37 esac
@@ -164,6 +164,9 @@
164 fi164 fi
165}165}
166166
167# Returns 0 on success
168# panics if remount- or bind-mount fails
169# returns 1 on failure otherwise
167try_mount ()170try_mount ()
168{171{
169 dev="${1}"172 dev="${1}"
@@ -171,19 +174,39 @@
171 opts="${3}"174 opts="${3}"
172175
173 if where_is_mounted ${dev} > /dev/null; then176 if where_is_mounted ${dev} > /dev/null; then
174 if [ "${opts}" != "ro" ]; then177 if [ "${opts}" != "ro" ]; then
175 mount -o remount,"${opts}" ${dev} $(where_is_mounted ${dev}) || panic "Remounting failed"178 mount -o remount,"${opts}" ${dev} $(where_is_mounted ${dev}) || panic "Remounting failed"
176 fi179 return 0
180 fi
177 mount -o bind $(where_is_mounted ${dev}) ${mountp} || panic "Cannot bind-mount"181 mount -o bind $(where_is_mounted ${dev}) ${mountp} || panic "Cannot bind-mount"
182 return 0
178 else183 else
179 mount -t $(get_fstype "${dev}") -o "${opts}" "${dev}" "${mountp}" || panic "Cannot mount ${dev} on ${mountp}"184 mount -t $(get_fstype "${dev}") -o "${opts}" "${dev}" "${mountp}"
185 ret=$?
186 if [ $ret -ne 0 ]; then
187 log_warning_msg "Cannot mount ${dev} on ${mountp}"
188 return 1
189 fi
190 return 0
180 fi191 fi
181}192}
182193
183find_cow_device() {194find_cow_device() {
184 pers_label="${1}"195 pers_label="${1}"
185 cow_backing="/${pers_label}-backing"196 cow_backing="/${pers_label}-backing"
197
198 if [ -z "${PERSISTENT_PATH}" ]; then
199 pers_fpath=${pers_label}
200 else
201 pers_fpath=${PERSISTENT_PATH}/${pers_label}
202 fi
203
186 for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do204 for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop); do
205 # do not ever probe floppies, probing nonexistant ones delays the boot to half an hour and longer
206 n=${sysblock##*/}
207 if [ "${n#fd}" != "$n" ]; then
208 continue
209 fi
187 for dev in $(subdevices "${sysblock}"); do210 for dev in $(subdevices "${sysblock}"); do
188 devname=$(sys2dev "${dev}")211 devname=$(sys2dev "${dev}")
189 if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]; then212 if [ "$(/sbin/blkid -s LABEL -o value $devname 2>/dev/null)" = "${pers_label}" ]; then
@@ -195,12 +218,13 @@
195 # where filesystems are in use by hibernated operating systems.218 # where filesystems are in use by hibernated operating systems.
196 elif [ "$(get_fstype ${devname})" = "vfat" ]; then219 elif [ "$(get_fstype ${devname})" = "vfat" ]; then
197 mkdir -p "${cow_backing}"220 mkdir -p "${cow_backing}"
198 try_mount "${devname}" "${cow_backing}" "rw"221 try_mount "${devname}" "${cow_backing}" "rw" || continue
199 if [ -e "${cow_backing}/${pers_label}" ]; then222 cow_backing_mp=$(where_is_mounted "${devname}")
200 echo $(setup_loop "${cow_backing}/${pers_label}" "loop" "/sys/block/loop*")223 if [ -e "${cow_backing_mp}/${pers_fpath}" ]; then
224 echo $(setup_loop "${cow_backing_mp}/${pers_fpath}" "loop" "/sys/block/loop*")
201 return 0225 return 0
202 else226 else
203 umount ${cow_backing}227 umount ${cow_backing_mp}
204 fi228 fi
205 fi229 fi
206 done230 done
@@ -219,7 +243,7 @@
219 devfstype="$(get_fstype ${devname})"243 devfstype="$(get_fstype ${devname})"
220 if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] ; then # FIXME: all supported block devices should be scanned244 if [ "${devfstype}" = "vfat" ] || [ "${devfstype}" = "ext2" ] ; then # FIXME: all supported block devices should be scanned
221 mkdir -p "${snap_backing}"245 mkdir -p "${snap_backing}"
222 try_mount "${devname}" "${snap_backing}" "ro"246 try_mount "${devname}" "${snap_backing}" "ro" || continue
223 for filename in ${filenames}; do247 for filename in ${filenames}; do
224 if [ -e "${snap_backing}/${filename}" ]; then248 if [ -e "${snap_backing}/${filename}" ]; then
225 echo "${devname} ${snap_backing} ${filename}"249 echo "${devname} ${snap_backing} ${filename}"
226250
=== modified file 'scripts/casper-premount/10driver_updates'
--- scripts/casper-premount/10driver_updates 2010-01-05 16:54:40 +0000
+++ scripts/casper-premount/10driver_updates 2011-10-06 10:04:28 +0000
@@ -42,7 +42,7 @@
4242
43is_nice_device() {43is_nice_device() {
44 sysfs_path="${1#/sys}"44 sysfs_path="${1#/sys}"
45 if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb))"; then45 if /lib/udev/path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb))"; then
46 return 046 return 0
47 fi47 fi
48 return 148 return 1
4949
=== modified file 'ubiquity-hooks/30accessibility'
--- ubiquity-hooks/30accessibility 2009-10-13 21:25:53 +0000
+++ ubiquity-hooks/30accessibility 2011-10-06 10:04:28 +0000
@@ -1,5 +1,6 @@
1#!/bin/sh1#!/bin/sh
2# If you change this, please also change the copy in scripts/casper-bottom/30accessibility.2# If you are looking to change accessibility profile settings, plesae look in
3# bin/casper-a11y-enable.
34
4. /usr/share/debconf/confmodule5. /usr/share/debconf/confmodule
5. /etc/casper.conf6. /etc/casper.conf
@@ -9,171 +10,83 @@
9db_get passwd/username10db_get passwd/username
10TARGET_USERNAME="$RET"11TARGET_USERNAME="$RET"
1112
12gct() {13copy_orca_config()
13 chroot /target sudo -u "$TARGET_USERNAME" gconftool-2 "$@"
14}
15
16kderc_addtoprefixes() {
17 if [ -e "/target/etc/kde4rc" ]; then
18 sed -i "s|\\(prefixes=/usr/share/kubuntu-default-settings/kde-profile/default/\\)|\\1,$1|" /target/etc/kde4rc
19 fi
20}
21
22# Code to remove an applet from the default panel setup
23# This is rather hacky, but I can't think of a one or two line regular
24# expression to do this any more efficiently. Patches welcome.
25# In addition, setting these via gconf also doesn't work for some reason.
26remove_applet()
27{14{
28 local line_no prior_line next_line15 if [ -f /home/$USERNAME/.local/share/orca/user-settings.conf ]; then
2916 mkdir -p /target/home/$TARGET_USERNAME/.local/share
30 line_no=$(grep -n "<string>$1</string>" /target/usr/share/gconf/defaults/05_panel-default-setup.entries | cut -f 1 -d :)17 cp -r /home/$USERNAME/.local/share/orca /target/home/$TARGET_USERNAME/.local/share
31 [ "$line_no" ] || return18 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.local
32 prior_line=$((line_no-1))19 chmod 755 /target/home/$TARGET_USERNAME/.local/share/orca
33 next_line=$((line_no+1))20 fi
34 sed -i -n "${prior_line},${next_line}!p" /target/usr/share/gconf/defaults/05_panel-default-setup.entries
35 chroot /target update-gconf-defaults
36}21}
3722
38for x in $(cat /proc/cmdline); do23for x in $(cat /proc/cmdline); do
39 case $x in24 case $x in
40 # Lesser Visual Impairment25 # Lesser Visual Impairment
41 access=v1)26 access=v1)
42 gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint27 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script high-contrast
43 gct -s -t string /desktop/gnome/interface/icon_theme HighContrast28 exit
44 gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18"29 ;;
45 gct -s -t string /desktop/gnome/interface/font_name "sans 18"30 # Moderate Visual Impairment
46 gct -s -t string /apps/metacity/general/theme Atlanta31 access=v2)
47 gct -s -t string /desktop/gnome/background/picture_filename ""32 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script magnifier
48 gct -s -t string /desktop/gnome/background/picture_options none33 exit
49 gct -s -t string /desktop/gnome/background/primary_color \#66666634 ;;
50 gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F35 # Blindness
51 gct -s -t string /desktop/gnome/background/color_shading_type solid36 access=v3)
52 gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 4837 copy_orca_config
53 gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass38 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script blindness
54 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/39 exit
55 if [ -d /target/usr/share/xubuntu-default-settings/accessibility ]; then40 ;;
56 cp -a /target/usr/share/xubuntu-default-settings/accessibility/* /target/etc/xdg/41 # Braille
57 fi42 braille=ask)
58 ;;43 copy_orca_config
59 # Moderate Visual Impairment44 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script braille
60 access=v2)45 exit
61 gct -s -t bool /desktop/gnome/interface/accessibility true46 ;;
62 gct -s -t bool /apps/gksu/disable-grab true47 # Minor Motor Difficulties
63 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity48 access=m1)
64 gct -s -t bool /desktop/gnome/applications/at/visual/startup true49 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script keyboard-modifiers
65 gct -s -t string /desktop/gnome/applications/at/visual/exec orca50 exit
6651 ;;
67 if [ -d /usr/share/xubuntu-default-settings ]; then52 # Motor Difficulties - pointing devices
68 apt-install gnome-orca gnome-mag53 access=m2)
69 fi54 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script onscreen-keyboard
7055 exit
71 if [ -x /target/usr/bin/orca ]; then
72 if [ -f /home/$USERNAME/.orca/user-settings.py ]; then
73 cp -r /home/$USERNAME/.orca /target/home/$TARGET_USERNAME/
74 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
75 else
76 mkdir -p /target/home/$TARGET_USERNAME/.orca
77 echo "import orca.settings" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
78 echo "orca.settings.enableSpeech = True" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
79 echo "orca.settings.enableMagnifier = True" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
80 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
81 fi
82 fi
83 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /target/etc/sudoers
84
85 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/
86 ;;
87 # Blindness
88 access=v3)
89 gct -s -t bool /desktop/gnome/interface/accessibility true
90 gct -s -t bool /apps/gksu/disable-grab true
91 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
92 gct -s -t bool /desktop/gnome/applications/at/visual/startup true
93 gct -s -t string /desktop/gnome/applications/at/visual/exec orca
94 remove_applet fast_user_switch
95 if [ -x /target/usr/bin/pulse-session ]; then
96 mkdir -p /target/var/lib/pulseaudio
97 touch /target/var/lib/pulseaudio/pulse_a11y_nostart
98 chroot /target chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
99 mkdir -p /target/home/$TARGET_USERNAME/.pulse
100 echo "autospawn = no" > /target/home/$TARGET_USERNAME/.pulse/client.conf
101 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.pulse
102 fi
103 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /target/etc/sudoers
104 if [ -x /target/usr/bin/orca ]; then
105 if [ -f /home/$USERNAME/.orca/user-settings.py ]; then
106 cp -r /home/$USERNAME/.orca /target/home/$TARGET_USERNAME/
107 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
108 else
109 mkdir -p /target/home/$TARGET_USERNAME/.orca
110 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
111 fi
112 fi
113
114 if [ -d /usr/share/xubuntu-default-settings ]; then
115 apt-install gnome-orca
116 fi
117 ;;
118 # Braille
119 braille=ask)
120 gct -s -t bool /desktop/gnome/interface/accessibility true
121 gct -s -t bool /desktop/gnome/applications/at/visual/startup true
122 gct -s -t string /desktop/gnome/applications/at/visual/exec orca
123 if [ -x /target/usr/bin/orca ]; then
124 if [ -f /home/$USERNAME/.orca/user-settings.py ]; then
125 cp -r /home/$USERNAME/.orca /target/home/$TARGET_USERNAME/
126 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
127 else
128 mkdir -p /target/home/$TARGET_USERNAME/.orca
129 echo "import orca.settings" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
130 echo "orca.settings.enableSpeech = False" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
131 echo "orca.settings.enableBraille = True" >> /target/home/$TARGET_USERNAME/.orca/user-settings.py
132 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.orca
133 fi
134 fi
135 gct -s -t bool /apps/gksu/disable-grab true
136 gct -s -t string /desktop/gnome/applications/window_manager/default /usr/bin/metacity
137 remove_applet fast_user_switch
138 sed -i -e 's/# Host alias specification/Defaults\tenv_keep = "ORBIT_SOCKETDIR XDG_SESSION_COOKIE GTK_MODULES"\n\n# Host alias specification/g' /target/etc/sudoers
139 if [ -x /target/usr/bin/pulse-session ]; then
140 mkdir -p /target/var/lib/pulseaudio
141 touch /target/var/lib/pulseaudio/pulse_a11y_nostart
142 chroot /target chown root.root /var/lib/pulseaudio/pulse_a11y_nostart
143 mkdir -p /target/home/$TARGET_USERNAME/.pulse
144 echo "autospawn = no" > /target/home/$TARGET_USERNAME/.pulse/client.conf
145 chroot /target chown -R $TARGET_USERNAME.$TARGET_USERNAME /home/$TARGET_USERNAME/.pulse
146 fi
147 ;;
148 # Minor Motor Difficulties
149 access=m1)
150 gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
151 gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true
152 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
153 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true
154 gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
155 gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true
156 gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700
157 gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10
158 gct -s -t bool /apps/gksu/disable-grab true
159 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/
160 if [ -e /target/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
161 sed -i 's/0/1/' /target/etc/xdg/xfce4/mcs_settings/keyboard.xml
162 fi
163 ;;
164 # Motor Difficulties - pointing devices
165 access=m2)
166 gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true
167 gct -s -t bool /desktop/gnome/interface/accessibility true
168 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true
169 gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false
170 gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false
171 gct -s -t bool /desktop/gnome/applications/at/mobility/startup true
172 gct -s -t string /desktop/gnome/applications/at/mobility/exec onboard
173 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/
174 if [ -e /target/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then
175 sed -i '/Sticky/ s/0/1/' /target/etc/xdg/xfce4/mcs_settings/keyboard.xml
176 fi
177 ;;56 ;;
178 esac57 esac
179done58done
59
60if [ -z "$UBIQUITY_A11Y_PROFILE" ] && [ -f /tmp/casper-a11y.conf ]; then
61 . /tmp/casper-a11y.conf
62fi
63
64case "$UBIQUITY_A11Y_PROFILE" in
65 # Lesser Visual Impairment
66 high-contrast)
67 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script high-contrast
68 ;;
69 # Moderate Visual Impairment
70 magnifier)
71 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script magnifier
72 ;;
73 # Blindness
74 screen-reader)
75 copy_orca_config
76 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script blindness
77 ;;
78 # Braille
79 braille)
80 copy_orca_config
81 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script braille
82 ;;
83 # Minor Motor Difficulties
84 keyboard-modifiers)
85 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script keyboard-modifiers
86 ;;
87 # Motor Difficulties - pointing devices
88 onscreen-keyboard)
89 /usr/bin/casper-a11y-enable -login -user="$TARGET_USERNAME" -chroot=/target -script onscreen-keyboard
90 ;;
91esac
92
18093
=== removed file 'ubiquity-hooks/48enable_kubuntu_netbook'
--- ubiquity-hooks/48enable_kubuntu_netbook 2010-01-27 14:01:22 +0000
+++ ubiquity-hooks/48enable_kubuntu_netbook 1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
1#! /bin/sh
2set -e
3
4if [ -e "/target/usr/share/autostart/plasma-netbook.desktop" ]; then
5 sed -i "s,Hidden=true,," /target/usr/share/autostart/plasma-netbook.desktop
6fi
7
8exit 0
90
=== added file 'ubiquity-hooks/49kubuntu_gnome_icon_cache'
--- ubiquity-hooks/49kubuntu_gnome_icon_cache 1970-01-01 00:00:00 +0000
+++ ubiquity-hooks/49kubuntu_gnome_icon_cache 2011-10-06 10:04:28 +0000
@@ -0,0 +1,11 @@
1#! /bin/sh
2set -e
3
4# livecd-rootfs deletes the Gnome icon cache for Kubuntu CDs to save space, recreate it here
5
6if [ -e "/target/usr/share/kubuntu-default-settings/" ] && [ -e "/target/usr/bin/gtk-update-icon-cache" ]; then
7 chroot /target gtk-update-icon-cache /usr/share/icons/hicolor
8 chroot /target gtk-update-icon-cache /usr/share/icons/oxygen
9fi
10
11exit 0

Subscribers

People subscribed via source and target branches