diff options
Diffstat (limited to 'scripts/casper-bottom')
| -rwxr-xr-x | scripts/casper-bottom/14locales | 47 | ||||
| -rwxr-xr-x | scripts/casper-bottom/19keyboard | 54 | ||||
| -rwxr-xr-x | scripts/casper-bottom/25configure_init | 18 | ||||
| -rwxr-xr-x | scripts/casper-bottom/30accessibility | 22 | ||||
| -rwxr-xr-x | scripts/casper-bottom/32disable_hibernation | 3 | ||||
| -rwxr-xr-x | scripts/casper-bottom/35fix_language_selector | 4 |
6 files changed, 81 insertions, 67 deletions
diff --git a/scripts/casper-bottom/14locales b/scripts/casper-bottom/14locales index 4297a58..5080df6 100755 --- a/scripts/casper-bottom/14locales +++ b/scripts/casper-bottom/14locales @@ -21,44 +21,37 @@ esac log_begin_msg "$DESCRIPTION" if [ -e /root/etc/default/locale ]; then - grep_file=/root/etc/default/locale - locale=$(grep 'LANG=' ${grep_file} | sed s/'LANG='// | tr -d '"' ) + grep_file=/root/etc/default/locale elif [ -e /root/etc/environment ]; then # Old locales policy - grep_file=/root/etc/environment + grep_file=/root/etc/environment fi -if [ -z "${grep_file}" ]; then - grep_file=/root/etc/default/locale +if [ ! -z "${grep_file}" ]; then + locale=$(grep -s 'LANG=' ${grep_file} | sed s/'LANG='// | tr -d '"' ) +else + grep_file=/root/etc/default/locale fi # commandline -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 + locale="${LOCALE}" + set_locale="true" +fi if [ -z "${locale}" ]; then - # Set a default one - locale=en_US.UTF-8 - set_locale="true" + # Set a default one + locale=en_US.UTF-8 + set_locale="true" fi if [ "${set_locale}" ]; then - LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 |sed -e 's, .*,,' -e q) - printf 'LANG="%s"\n' "${LANG}" >> "${grep_file}" - if [ "${BUILD_SYSTEM}" == "Debian" ]; then - chroot /root /usr/sbin/locale-gen - else - chroot /root /usr/sbin/locale-gen "${LANG}" - fi + LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 |sed -e 's, .*,,' -e q) + printf 'LANG="%s"\n' "${LANG}" >> "${grep_file}" + if [ "${BUILD_SYSTEM}" == "Debian" ]; then + chroot /root /usr/sbin/locale-gen + else + chroot /root /usr/sbin/locale-gen "${LANG}" + fi fi log_end_msg diff --git a/scripts/casper-bottom/19keyboard b/scripts/casper-bottom/19keyboard index 1d833ad..7acc4e4 100755 --- a/scripts/casper-bottom/19keyboard +++ b/scripts/casper-bottom/19keyboard @@ -23,28 +23,42 @@ log_begin_msg "$DESCRIPTION" kbd=us cslayout= csvariant= +csmodel= -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=} - ;; - esac -done - -if [ "$cslayout" ] && [ -x /root/bin/setupcon ] && \ - [ -f /root/etc/default/console-setup ]; then - chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \ - /etc/default/console-setup - if [ "$csvariant" ]; then - chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \ +# commandline +if [ ! -z "${KBD}" ]; then + kbd="${KBD}" +fi +if [ ! -z "${CSLAYOUT}" ]; then + cslayout="${CSLAYOUT}" +fi +if [ ! -z "${CSVARIANT}" ]; then + csvariant="${CSVARIANT}" +fi +if [ ! -z "${CSMODEL}" ]; then + csmodel="${CSMODEL}" +fi + +if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then + if [ "$cslayout" ]; then + chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \ /etc/default/console-setup + if [ "$csvariant" ]; then + chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \ + /etc/default/console-setup + else + casper-preseed /root console-setup/variantcode '' false + fi + if [ "$csmodel" ]; then + chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \ + /etc/default/console-setup + else + casper-preseed /root console-setup/modelcode '' false + fi + else + casper-preseed /root console-setup/layoutcode '' false + casper-preseed /root console-setup/variantcode '' false + casper-preseed /root console-setup/modelcode '' false fi else chroot /root /usr/sbin/install-keymap $kbd diff --git a/scripts/casper-bottom/25configure_init b/scripts/casper-bottom/25configure_init index 573b2a6..60baa76 100755 --- a/scripts/casper-bottom/25configure_init +++ b/scripts/casper-bottom/25configure_init @@ -24,20 +24,19 @@ log_begin_msg "$DESCRIPTION" if [ -n "$USERNAME" ]; then if [ ! -z "${CASPERGETTY}" ]; then - # AUTOMATIC SERIAL CONSOLE # - defconsole=$(sed -e 's%.*console=%console=%' /proc/cmdline) - if echo "${defconsole}" | grep -qs console=ttyS; then - PORT=$(echo "${defconsole}" | \ - sed -e's%^console=%%' -e's%,.*%%') - SPEED=$(echo "${defconsole}" | \ - sed -e 's%^console=ttyS[0-9]\+,%%' \ + 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 + if ! grep "^${ID}:" /etc/inittab ; then #make sure it is not already in use break 2 fi @@ -47,6 +46,9 @@ if [ -n "$USERNAME" ]; then >>/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 diff --git a/scripts/casper-bottom/30accessibility b/scripts/casper-bottom/30accessibility index cc64832..8cd633b 100755 --- a/scripts/casper-bottom/30accessibility +++ b/scripts/casper-bottom/30accessibility @@ -20,7 +20,7 @@ esac log_begin_msg "$DESCRIPTION" -gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf-2 2>/dev/null) || gconf_version="" +gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gconf2 2>/dev/null) || gconf_version="" gct() { if [ "$gconf_version" ]; then @@ -45,8 +45,8 @@ for x in $(cat /proc/cmdline); do 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/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 @@ -56,9 +56,9 @@ for x in $(cat /proc/cmdline); do # 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 [gnopernicus] - gct -s -t bool /apps/gnopernicus/srcore/mag_active true - gct -s -t bool /apps/gnopernicus/srcore/sp_active false + 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 kderc_addtoprefixes /usr/share/kubuntu-default-settings/kde-profile/lesser-visual-impairment/,/usr/share/kubuntu-default-settings/kde-profile/moderate-visual-impairment/ ;; @@ -66,9 +66,9 @@ for x in $(cat /proc/cmdline); do 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 [gnopernicus] - gct -s -t bool /apps/gnopernicus/srcore/sp_active true - gct -s -t bool /apps/gnopernicus/srcore/mag_active false + 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 access=m1) @@ -86,11 +86,11 @@ for x in $(cat /proc/cmdline); do # 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 bool /desktop/gnome/interface/accessibility true - gct -s -t list --list-type=string /desktop/gnome/accessibility/startup/exec_ats gok + 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/ ;; diff --git a/scripts/casper-bottom/32disable_hibernation b/scripts/casper-bottom/32disable_hibernation index 47344fa..e27e2c4 100755 --- a/scripts/casper-bottom/32disable_hibernation +++ b/scripts/casper-bottom/32disable_hibernation @@ -23,8 +23,9 @@ log_begin_msg "$DESCRIPTION" gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version="" if [ -n "$gpm_version" ]; then - casper-reconfigure /root gnome-power-manager +# casper-reconfigure /root gnome-power-manager chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false + chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false fi if [ -f /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kcmlaptoprc ]; then diff --git a/scripts/casper-bottom/35fix_language_selector b/scripts/casper-bottom/35fix_language_selector index 96a1d6c..3a22602 100755 --- a/scripts/casper-bottom/35fix_language_selector +++ b/scripts/casper-bottom/35fix_language_selector @@ -25,4 +25,8 @@ if [ -e /root/usr/share/applications/language-selector.desktop ]; then fi +if [ -x /root/usr/bin/fontconfig-voodoo ]; then + chroot /root fontconfig-voodoo --auto --quiet || true +fi + log_end_msg |
