diff options
Diffstat (limited to 'scripts/casper-bottom')
-rwxr-xr-x | scripts/casper-bottom/01integrity_check | 2 | ||||
-rwxr-xr-x | scripts/casper-bottom/02_timezone | 21 | ||||
-rw-r--r-- | scripts/casper-bottom/02etc_casper_conf | 40 | ||||
-rwxr-xr-x | scripts/casper-bottom/05mountpoints | 6 | ||||
-rwxr-xr-x | scripts/casper-bottom/10adduser | 42 | ||||
-rwxr-xr-x | scripts/casper-bottom/12fstab | 2 | ||||
-rwxr-xr-x | scripts/casper-bottom/13swap | 2 | ||||
-rwxr-xr-x | scripts/casper-bottom/14locales | 47 | ||||
-rwxr-xr-x | scripts/casper-bottom/15autologin | 5 | ||||
-rwxr-xr-x | scripts/casper-bottom/18hostname | 4 | ||||
-rwxr-xr-x | scripts/casper-bottom/19keyboard | 37 | ||||
-rwxr-xr-x | scripts/casper-bottom/20xconfig | 40 | ||||
-rwxr-xr-x | scripts/casper-bottom/23networking | 12 | ||||
-rwxr-xr-x | scripts/casper-bottom/24preseed | 33 | ||||
-rwxr-xr-x | scripts/casper-bottom/25configure_init | 42 | ||||
-rwxr-xr-x | scripts/casper-bottom/30accessibility | 136 | ||||
-rwxr-xr-x | scripts/casper-bottom/33disable_binary_drivers | 27 | ||||
-rwxr-xr-x | scripts/casper-bottom/33enable_apport_crashes | 28 | ||||
-rwxr-xr-x | scripts/casper-bottom/40install_driver_updates | 40 | ||||
-rwxr-xr-x | scripts/casper-bottom/41apt_cdrom | 24 |
20 files changed, 291 insertions, 299 deletions
diff --git a/scripts/casper-bottom/01integrity_check b/scripts/casper-bottom/01integrity_check index 8c8e153..637a1ff 100755 --- a/scripts/casper-bottom/01integrity_check +++ b/scripts/casper-bottom/01integrity_check @@ -15,4 +15,4 @@ prereqs) ;; esac -grep integrity-check /proc/cmdline && casper-md5check /live_media /live_media/md5sum.txt < /dev/tty8 +grep integrity-check /proc/cmdline && casper-md5check /cdrom /cdrom/md5sum.txt < /dev/tty8 diff --git a/scripts/casper-bottom/02_timezone b/scripts/casper-bottom/02_timezone new file mode 100755 index 0000000..1cb6402 --- /dev/null +++ b/scripts/casper-bottom/02_timezone @@ -0,0 +1,21 @@ +#! /bin/sh + +PREREQ="" +DESCRIPTION="Adding APT-CDROM source..." + +. /scripts/casper-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime diff --git a/scripts/casper-bottom/02etc_casper_conf b/scripts/casper-bottom/02etc_casper_conf deleted file mode 100644 index 9e6deff..0000000 --- a/scripts/casper-bottom/02etc_casper_conf +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -PREREQ="" -DESCRIPTION="Copying config on real root fs..." - -. /scripts/casper-functions - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -log_begin_msg "$DESCRIPTION" - -if [ -f /etc/casper.conf ] ; then - if [ ! -z "${CASPERCONF}" ]; then - # Updating casper.conf - sed -i -e 's/\(USERNAME="\).*"/\1'"${USERNAME}"'"/g' \ - -e 's/\(USERFULLNAME="\).*"/\1'"${USERFULLNAME}"'"/g' \ - -e 's/\(HOSTNAME="\).*"/\1'"${HOSTNAME}"'"/g' /etc/casper.conf - fi - cp -p /etc/casper.conf /root/etc/casper.conf - -else - cat <<EOF >/root/etc/casper.conf -export USERNAME="$USERNAME" -export USERFULLNAME="$USERFULLNAME" -export HOSTNAME="$HOSTNAME" -EOF - -fi - diff --git a/scripts/casper-bottom/05mountpoints b/scripts/casper-bottom/05mountpoints index be76755..7c61de3 100755 --- a/scripts/casper-bottom/05mountpoints +++ b/scripts/casper-bottom/05mountpoints @@ -21,9 +21,7 @@ esac log_begin_msg "$DESCRIPTION" # Move to the new root filesystem so that programs there can get at it. -if [ ! -d /root/live_media ]; then - mkdir -p /root/live_media - mount -n -o move /live_media /root/live_media -fi +mkdir -p /root/cdrom +mount -n -o move /cdrom /root/cdrom log_end_msg diff --git a/scripts/casper-bottom/10adduser b/scripts/casper-bottom/10adduser index af7754b..4fe9378 100755 --- a/scripts/casper-bottom/10adduser +++ b/scripts/casper-bottom/10adduser @@ -20,28 +20,16 @@ esac log_begin_msg "$DESCRIPTION" -if [ "${BUILD_SYSTEM}" == "Debian" ]; then - user_crypted="8Ab05sVQ4LLps" # as in `echo "live" | mkpasswd -s` -else - user_crypted="U6aMy0wojraho" # "ubuntu" -fi - # U6aMy0wojraho is just a blank password chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF set passwd/root-password-crypted * -set passwd/user-password-crypted ${user_crypted} -set passwd/user-fullname $USERFULLNAME +set passwd/user-password-crypted U6aMy0wojraho +set passwd/user-fullname $USERFULLNAME set passwd/username $USERNAME set passwd/user-uid 999 EOF -if [ "${BUILD_SYSTEM}" == "Debian" ]; then - chroot /root /usr/bin/env -i HOME="/root" \ - TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \ - /usr/lib/user-setup/user-setup-apply > /dev/null -else - chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null -fi +chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null # Clear out debconf database again to avoid confusing ubiquity later. chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF @@ -53,21 +41,23 @@ set passwd/user-uid EOF if [ -f /root/etc/sudoers ]; then - if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then - # XXX - awful hack to stop xscreensaver locking the screen (#7150) - echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment + if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers - for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do - if [ -f "/root/$file" ]; then - chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") - break - fi - done - else # We are in debian :-) - echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers + elif [ "${BUILD_SYSTEM}" = "Debian" ]; then + echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers fi fi +# XXX - awful hack to stop xscreensaver locking the screen (#7150) +echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment + +for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do + if [ -f "/root/$file" ]; then + chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") + break + fi +done + if [ -L /root/home/$USERNAME/Examples ]; then chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/ diff --git a/scripts/casper-bottom/12fstab b/scripts/casper-bottom/12fstab index ac39396..616216a 100755 --- a/scripts/casper-bottom/12fstab +++ b/scripts/casper-bottom/12fstab @@ -26,6 +26,6 @@ unionfs / unionfs rw 0 0 tmpfs /tmp tmpfs nosuid,nodev 0 0 EOF -rm -f /root/etc/rcS.d/S10checkroot.sh +rm -f /root/etc/rcS.d/S*checkroot.sh log_end_msg diff --git a/scripts/casper-bottom/13swap b/scripts/casper-bottom/13swap index 986b079..9c5d0c9 100755 --- a/scripts/casper-bottom/13swap +++ b/scripts/casper-bottom/13swap @@ -27,7 +27,7 @@ for device in /dev/[hs]d[a-z][0-9]*; do continue fi - magic=$(dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | dd bs=10 count=1 2>/dev/null) || continue + magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then # log "Found $device" diff --git a/scripts/casper-bottom/14locales b/scripts/casper-bottom/14locales index 18ed15e..3ee3ef0 100755 --- a/scripts/casper-bottom/14locales +++ b/scripts/casper-bottom/14locales @@ -34,10 +34,18 @@ else fi # commandline -if [ ! -z "${LOCALE}" ]; then - locale="${LOCALE}" - set_locale="true" -fi +for x in $(cat /proc/cmdline); do + case $x in + debian-installer/locale=*) + locale=${x#debian-installer/locale=} + set_locale="true" + ;; + locale=*) + locale=${x#locale=} + set_locale="true" + ;; + esac +done if [ -z "${locale}" ]; then # Set a default one @@ -46,35 +54,10 @@ if [ -z "${locale}" ]; then fi if [ "${set_locale}" ]; then - if echo "${locale}" | grep -sqE '^[[:lower:]]{2}$' ; then - # input is like "locale=it", so we will convert and setup also the keyboard if not already set - if [ -z "${KBD}" ]; then - # FIXME: look if this keyb is supported - KBD="${locale}" - really_export KBD - fi - uploc=$(echo "${locale}" | tr '[a-z]' '[A-Z]') - locale="${locale}_${uploc}.UTF-8" - fi - LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 |sed -e 's, .*,,' -e q) - if [ -z "${LANG}" ]; then - log_warning_message "Locale ${locale} is unsupported." - locale="en_US.UTF-8" - LANG="${locale}" - fi - - really_export LANG - - if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then - printf 'LANG="%s"\n' "${LANG}" > "${grep_file}" - chroot /root /usr/sbin/locale-gen "${LANG}" - casper-preseed /root debian-installer/locale "${locale}" - else - printf 'LANG=%s\n' "${LANG}" > "${grep_file}" - printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen - chroot /root /usr/sbin/locale-gen - fi + printf 'LANG="%s"\n' "${LANG}" >> "${grep_file}" + printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen + chroot /root /usr/sbin/locale-gen "${LANG}" fi log_end_msg diff --git a/scripts/casper-bottom/15autologin b/scripts/casper-bottom/15autologin index cdaa038..81bd3a4 100755 --- a/scripts/casper-bottom/15autologin +++ b/scripts/casper-bottom/15autologin @@ -27,11 +27,6 @@ else fi if chroot /root [ -f ${GDMCONF} ]; then - if [ "${BUILD_SYSTEM}" == "Debian" ]; then - # true hack ! -- nohar - chroot /root cp /usr/share/gdm/defaults.conf /etc/gdm/gdm.conf - fi - # Configure GDM autologin chroot /root sed -i \ -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \ diff --git a/scripts/casper-bottom/18hostname b/scripts/casper-bottom/18hostname index a616488..19ac61f 100755 --- a/scripts/casper-bottom/18hostname +++ b/scripts/casper-bottom/18hostname @@ -20,10 +20,10 @@ esac log_begin_msg "$DESCRIPTION" -echo "$HOSTNAME" > /root/etc/hostname +echo "$HOST" > /root/etc/hostname cat > /root/etc/hosts <<EOF 127.0.0.1 localhost -127.0.1.1 $HOSTNAME +127.0.1.1 $HOST # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback diff --git a/scripts/casper-bottom/19keyboard b/scripts/casper-bottom/19keyboard index 40834d8..ef90115 100755 --- a/scripts/casper-bottom/19keyboard +++ b/scripts/casper-bottom/19keyboard @@ -20,29 +20,27 @@ esac log_begin_msg "$DESCRIPTION" -kbd= +kbd=us cslayout= csvariant= csmodel= -# commandline -if [ -n "${KBD}" ]; then - kbd="${KBD}" -else - kbd=us -fi - -really_export kbd - -if [ -n "${KLAYOUT}" ]; then - cslayout="${KLAYOUT}" -fi -if [ -n "${KVARIANT}" ]; then - csvariant="${KVARIANT}" -fi -if [ -n "${KMODEL}" ]; then - csmodel="${KMODEL}" -fi +for x in $(cat /proc/cmdline); do + case $x in + kbd-chooser/method=*) + kbd=${x#kbd-chooser/method=} + ;; + console-setup/layoutcode=*) + cslayout=${x#console-setup/layoutcode=} + ;; + console-setup/variantcode=*) + csvariant=${x#console-setup/variantcode=} + ;; + console-setup/modelcode=*) + csmodel=${x#console-setup/modelcode=} + ;; + esac +done if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then if [ "$cslayout" ]; then @@ -68,6 +66,5 @@ if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then else chroot /root /usr/sbin/install-keymap $kbd casper-preseed /root debian-installer/keymap "$kbd" - casper-preseed /root kbd-chooser/method "$kbd" fi log_end_msg diff --git a/scripts/casper-bottom/20xconfig b/scripts/casper-bottom/20xconfig index 470f54c..c5563ed 100755 --- a/scripts/casper-bottom/20xconfig +++ b/scripts/casper-bottom/20xconfig @@ -5,7 +5,6 @@ DESCRIPTION="Configuring X..." . /scripts/casper-functions - prereqs() { echo "$PREREQ" @@ -27,41 +26,36 @@ if [ "$TERM_TYPE" = "serial" ]; then exit 0 fi +locale=en_US.UTF-8 + +for x in $(cat /proc/cmdline); do + case $x in + debian-installer/locale=*) + locale=${x#debian-installer/locale=} + ;; + locale=*) + locale=${x#locale=} + ;; + esac +done + mount -n -o bind /sys /root/sys mount -n -o bind /proc /root/proc +mount -n -o bind /dev /root/dev if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]; then # xdebconfigurator chroot /root /usr/sbin/xdebconfigurator fi -if [ "${BUILD_SYSTEM}" == "Ubuntu" ]; then - chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF +chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF set xserver-xorg/autodetect_keyboard true fset xserver-xorg/autodetect_keyboard seen true EOF -else - # d-i code not present, so: - if [ -n "${KOPTIONS}" ]; then - setoptions="set xserver-xorg/config/inputdevice/keyboard/options ${KOPTIONS}" - fi - if [ -n "${KVARIANT}" ]; then - setvariant="set xserver-xorg/config/inputdevice/keyboard/variant ${KVARIANT}" - fi - if [ -n "${KMODEL}" ]; then - setmodel="set xserver-xorg/config/inputdevice/keyboard/model ${KMODEL}" - fi - - chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF -set xserver-xorg/config/inputdevice/keyboard/layout ${kbd} -${setvariant} -${setmodel} -${setoptions} -EOF -fi -DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 casper-reconfigure /root xserver-xorg +DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q) casper-reconfigure /root xserver-xorg umount /root/sys umount /root/proc +umount /root/dev log_end_msg diff --git a/scripts/casper-bottom/23networking b/scripts/casper-bottom/23networking index cfc565d..1b732d3 100755 --- a/scripts/casper-bottom/23networking +++ b/scripts/casper-bottom/23networking @@ -61,14 +61,13 @@ else # on startup by ifup script - otherwise our root fs might be disconnected! method="manual" fi - # iterate the physical interfaces and add them to the interfaces list for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*; do [ -e $interface ] || continue i="$(basename $interface)" cat >> "$IFFILE" <<EOF auto $i -iface $i inet ${method} +iface $i inet $method EOF done @@ -96,4 +95,13 @@ EOF fi fi +for i in eth0 eth1 eth2 ath0 wlan0; do + grep -q "iface $i" $IFFILE && continue + cat >> "$IFFILE" <<EOF +auto $i +iface $i inet dhcp + +EOF +done + log_end_msg diff --git a/scripts/casper-bottom/24preseed b/scripts/casper-bottom/24preseed index b4aac4c..cd52467 100755 --- a/scripts/casper-bottom/24preseed +++ b/scripts/casper-bottom/24preseed @@ -20,16 +20,29 @@ esac log_begin_msg "$DESCRIPTION" -if [ -f "/root/${LOCATION}" ]; then - chroot /root debconf-set-selections < "/root/${LOCATION}" -fi - -if [ -n "${PRESEEDS}" ]; then - for preseed in ${PRESEEDS}; do - question="${preseed%%=*}" - value="${preseed#*=}" - casper-preseed /root "${question}" "${value}" - done +location= +for x in $(cat /proc/cmdline); do + case $x in + preseed/file=*) + location="${x#preseed/file=}" + ;; + file=*) + location="${x#file=}" + ;; + */*=*) + question="${x%%=*}" + value="${x#*=}" + casper-preseed /root "$question" "$value" + ;; + locale=*) + value="${x#*=}" + casper-preseed /root debian-installer/locale "$value" + ;; + esac +done + +if [ "$location" ]; then + chroot /root debconf-set-selections < "/root$location" fi log_end_msg diff --git a/scripts/casper-bottom/25configure_init b/scripts/casper-bottom/25configure_init index 60baa76..f9a8626 100755 --- a/scripts/casper-bottom/25configure_init +++ b/scripts/casper-bottom/25configure_init @@ -23,41 +23,13 @@ log_begin_msg "$DESCRIPTION" # Arrange for shells on virtual consoles, rather than login prompts if [ -n "$USERNAME" ]; then - if [ ! -z "${CASPERGETTY}" ]; then - if echo "${DEFCONSOLE}" | grep -qs ttyS; then - # AUTOMATIC SERIAL CONSOLE # - PORT=$(echo "${DEFCONSOLE}" | \ - sed -e 's%,.*%%') - SPEED=$(echo "${DEFCONSOLE}" | \ - sed -e 's%ttyS[0-9]\+,%%' \ - -e's%\([0-9]\+\).*%\1%') - if ! ( sed -n -e'/^[^#]/p' /root/etc/inittab | grep -qs ":respawn:/sbin/getty.*${PORT}" ) ; then - IDs="A B C D E F G H I J K L M N O P Q R S T Q U V V X Y Z 0 1 2 3 4 5 6 7 8 9" - for ID1 in $IDs; do - for ID2 in $IDs; do - ID="${ID1}${ID2}" - if ! grep "^${ID}:" /etc/inittab ; then - #make sure it is not already in use - break 2 - fi - done - done - echo "${ID}:2345:respawn:/sbin/casper-getty -L ${PORT} ${SPEED} vt100" \ - >>/root/etc/inittab - fi - fi - if [ -f /root/etc/inittab ]; then - sed -i -e'/^[^#]/s%respawn:/sbin/getty%respawn:/sbin/casper-getty%' /root/etc/inittab - fi - else - if [ -f /root/etc/inittab ]; then - sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab - fi - if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]; then - for f in /root/etc/event.d/tty*; do - sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME </dev/$(basename $f) > /dev/$(basename $f) 2>\&1|" $f - done - fi + if [ -f /root/etc/inittab ]; then + sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab + fi + if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]; then + for f in /root/etc/event.d/tty*; do + sed -i -e "s|^exec.*|exec /bin/login -f $USERNAME </dev/$(basename $f) > /dev/$(basename $f) 2>\&1|" $f + done fi fi diff --git a/scripts/casper-bottom/30accessibility b/scripts/casper-bottom/30accessibility index 8b6f875..01c2386 100755 --- a/scripts/casper-bottom/30accessibility +++ b/scripts/casper-bottom/30accessibility @@ -34,77 +34,73 @@ kderc_addtoprefixes() { fi } -case ${ACCESS} in - # Lesser Visual Impairment - v1) - gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint - gct -s -t string /desktop/gnome/interface/icon_theme HighContrast - gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18" - gct -s -t string /desktop/gnome/interface/font_name "sans 18" - gct -s -t string /apps/metacity/general/theme Atlanta - gct -s -t string /desktop/gnome/background/picture_filename "" - gct -s -t string /desktop/gnome/background/picture_options none - gct -s -t string /desktop/gnome/background/primary_color \#666666 - gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F - gct -s -t string /desktop/gnome/background/color_shading_type solid - gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 48 - gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass +for x in $(cat /proc/cmdline); do + case $x in + # Lesser Visual Impairment + access=v1) + gct -s -t string /desktop/gnome/interface/gtk_theme HighContrastLargePrint + gct -s -t string /desktop/gnome/interface/icon_theme HighContrast + gct -s -t string /desktop/gnome/interface/monospace_font_name "monospace 18" + gct -s -t string /desktop/gnome/interface/font_name "sans 18" + gct -s -t string /apps/metacity/general/theme Atlanta + gct -s -t string /desktop/gnome/background/picture_filename "" + gct -s -t string /desktop/gnome/background/picture_options none + gct -s -t string /desktop/gnome/background/primary_color \#666666 + gct -s -t string /desktop/gnome/background/secondary_color \#7F7F7F + gct -s -t string /desktop/gnome/background/color_shading_type solid + gct -s -t int /desktop/gnome/peripherals/mouse/cursor_size 48 + gct -s -t string /desktop/gnome/peripherals/mouse/cursor_theme whiteglass - kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/ - if [ -d /root/usr/share/xubuntu-default-settings/accessibility ]; then - cp -a /root/usr/share/xubuntu-default-settings/accessibility/* /root/etc/xdg/ - fi - ;; - # Moderate Visual Impairment - v2) - gct -s -t bool /desktop/gnome/interface/accessibility true - gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [orca] - #gct -s -t bool /apps/gnopernicus/srcore/mag_active true - #gct -s -t bool /apps/gnopernicus/srcore/sp_active false - if [ -e /root/usr/share/python-support/gnome-orca/orca/settings.py ]; then - sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/python-support/gnome-orca/orca/settings.py - fi - kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/ - ;; - # Blindness - v3) - gct -s -t bool /desktop/gnome/sound/enable_esd false - gct -s -t bool /desktop/gnome/interface/accessibility true - gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [orca] - #gct -s -t bool /apps/gnopernicus/srcore/sp_active true - #gct -s -t bool /apps/gnopernicus/srcore/mag_active false - ;; - # Minor Motor Difficulties - m1) - gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true - gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true - gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true - gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true - gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false - gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true - gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700 - gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10 + kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/ + if [ -d /root/usr/share/xubuntu-default-settings/accessibility ]; then + cp -a /root/usr/share/xubuntu-default-settings/accessibility/* /root/etc/xdg/ + fi + ;; + # Moderate Visual Impairment + access=v2) + gct -s -t bool /desktop/gnome/interface/accessibility true + gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [orca] + if [ -e /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py ]; then + sed -i '/^enableSpeech\W/ s/True/False/;/^enableMagnifier/ s/False/True/' /root/usr/share/pycentral/gnome-orca/site-packages/orca/settings.py + fi + kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/ + ;; + # Blindness + access=v3) + gct -s -t bool /desktop/gnome/sound/enable_esd false + gct -s -t bool /desktop/gnome/interface/accessibility true + gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [orca] + ;; + # Minor Motor Difficulties + access=m1) + gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true + gct -s -t bool /desktop/gnome/accessibility/keyboard/mousekeys_enable true + gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true + gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep true + gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false + gct -s -t bool /desktop/gnome/peripherals/keyboard/repeat true + gct -s -t int /desktop/gnome/peripherals/keyboard/delay 700 + gct -s -t int /desktop/gnome/peripherals/keyboard/rate 10 - kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/ - if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then - sed -i 's/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml - fi - - ;; - # Motor Difficulties - pointing devices - m2) - gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true - gct -s -t bool /desktop/gnome/interface/accessibility true - gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true - gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false - gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false - gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [onboard] - - kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/ - if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then - sed -i '/Sticky/ s/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml - fi - ;; -esac + kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/ + if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then + sed -i 's/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml + fi + ;; + # Motor Difficulties - pointing devices + access=m2) + gct -s -t bool /desktop/gnome/accessibility/keyboard/enable true + gct -s -t bool /desktop/gnome/interface/accessibility true + gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_enable true + gct -s -t bool /desktop/gnome/accessibility/keyboard/stickykeys_modifier_beep false + gct -s -t bool /desktop/accessibility/gnome/keyboard/stickykeys_two_key_off false + gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats [onboard] + kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/minor-motor-difficulties/,/usr/share/kubuntu-default-settings/kde-profile/motor-difficulties-pointing-devices/ + if [ -e /root/etc/xdg/xfce4/mcs_settings/keyboard.xml ]; then + sed -i '/Sticky/ s/0/1/' /root/etc/xdg/xfce4/mcs_settings/keyboard.xml + fi + ;; + esac +done log_end_msg diff --git a/scripts/casper-bottom/33disable_binary_drivers b/scripts/casper-bottom/33disable_binary_drivers deleted file mode 100755 index 971ce8e..0000000 --- a/scripts/casper-bottom/33disable_binary_drivers +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh - -PREREQ="" -DESCRIPTION="Configuring some drivers..." - -. /scripts/casper-functions - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -log_begin_msg "$DESCRIPTION" - -if [ -e /root/etc/default/linux-restricted-modules-common ]; then - echo 'DISABLED_MODULES="fglrx nv"' >> /root/etc/default/linux-restricted-modules-common -fi - -log_end_msg
\ No newline at end of file diff --git a/scripts/casper-bottom/33enable_apport_crashes b/scripts/casper-bottom/33enable_apport_crashes new file mode 100755 index 0000000..d1c8829 --- /dev/null +++ b/scripts/casper-bottom/33enable_apport_crashes @@ -0,0 +1,28 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Enabling notifications about program crashes..." + +. /scripts/casper-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +log_begin_msg "$DESCRIPTION" + +update_notifier_version=$(chroot /root dpkg-query -W --showformat='${Version}' update-notifier 2>/dev/null) || update_notifier_version="" +if [ -n "$update_notifier_version" ]; then + chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true +fi + +log_end_msg diff --git a/scripts/casper-bottom/40install_driver_updates b/scripts/casper-bottom/40install_driver_updates new file mode 100755 index 0000000..272a0ed --- /dev/null +++ b/scripts/casper-bottom/40install_driver_updates @@ -0,0 +1,40 @@ +#! /bin/sh + +PREREQ="" +DESCRIPTION="Installing driver updates..." + +. /scripts/casper-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ ! -d /tmp/driver-updates ]; then + exit 0 +fi + +log_begin_msg "$DESCRIPTION" + +install_dir=/var/cache/driver-updates + +mkdir "/root$install_dir" +cp -a /tmp/driver-updates/*.deb "/root$install_dir/" + +# We cannot leave packages in a bad state. So if the install fails, remove +# it. This will get caught in casper.log. +for deb in "/root$install_dir"/*; do + if ! chroot /root dpkg -i "$install_dir/$deb"; then + chroot /root dpkg -P "${deb%%_*}" + fi +done + +log_end_msg diff --git a/scripts/casper-bottom/41apt_cdrom b/scripts/casper-bottom/41apt_cdrom new file mode 100755 index 0000000..b4ab643 --- /dev/null +++ b/scripts/casper-bottom/41apt_cdrom @@ -0,0 +1,24 @@ +#! /bin/sh + +PREREQ="" +DESCRIPTION="Adding APT-CDROM source..." + +. /scripts/casper-functions + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +mkdir -p /root/cdrom +mount -n -o bind /cdrom /root/cdrom +chroot /root apt-cdrom -m add +umount /root/cdrom |