diff --git a/installer/installer.kmdr b/installer/installer.kmdr index d735c22..335ac67 100755 --- a/installer/installer.kmdr +++ b/installer/installer.kmdr @@ -251,7 +251,7 @@ - Copyright (c) 2007-2014 by Silvan Calarco + Copyright (c) 2007-2015 by Silvan Calarco Released under the terms of the GNU GPL v3 license @@ -1764,54 +1764,6 @@ dcop @dcopid KommanderIf setText installhint "$insthint" Advanced features - - - clonebox - - - - 10 - 20 - 16 - 16 - - - - - 3 - 0 - 0 - 0 - - - - - - - - - Label22_2 - - - - 30 - 20 - 520 - 16 - - - - - 3 - 5 - 0 - 0 - - - - Preserve changes made to current running system - - stablelabel @@ -1869,249 +1821,52 @@ dcop @dcopid KommanderIf setText installhint "$insthint" false - - - - PartitionBox - - - true - - - - 10 - 70 - 560 - 290 - - - - - 3 - 7 - 0 - 0 - - - - Where do you want to install openmamba? - - - - - - - + - Layout2 - - - - 10 - 220 - 540 - 19 - - - - - unnamed - - - 0 - - - 6 - - - - Label3 - - - - 1 - 5 - 0 - 0 - - - - - 1 - - - - Install system on: - - - AlignVCenter|AlignLeft - - - - - showdevice - - - - 7 - 5 - 0 - 0 - - - - - - - - - - - - - - - - Label24 + clonebox 10 20 - 540 - 60 + 16 + 16 - - - 1 - + + + 3 + 0 + 0 + 0 + - Please, select the disk partition where you want the system to be installed. -<br><b>WARNING: all current data on the selected partition will be lost.</b> - - - RichText - - - WordBreak|AlignTop - - - - - Layout4 - - - - 10 - 250 - 300 - 26 - - - - - unnamed - - - 0 - - - 6 - - - - Label22 - - - - 3 - 5 - 0 - 0 - - - - Filesystem type: - - - - - - ext4 - - - - - ext3 - - - - - reiserfs - - - - - ext2 - - - - fstypebox - - - - 3 - 0 - 0 - 0 - - - - - - - - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 30 - 0 - - - - - - - - devicesbox - - - - 10 - 90 - 540 - 130 - - - - - - - + + + + Label22_2 + + + + 30 + 20 + 520 + 16 + + + + + 3 + 5 + 0 + 0 + + + + Preserve changes made to current running system @@ -2270,6 +2025,282 @@ function get_udisks_key_last() { + + + PartitionBox + + + true + + + + 10 + 70 + 560 + 290 + + + + + 3 + 7 + 0 + 0 + + + + Where do you want to install openmamba? + + + + + + + + + Layout2 + + + + 10 + 220 + 540 + 19 + + + + + unnamed + + + 0 + + + 6 + + + + Label3 + + + + 1 + 5 + 0 + 0 + + + + + 1 + + + + Install system on: + + + AlignVCenter|AlignLeft + + + + + showdevice + + + + 7 + 5 + 0 + 0 + + + + + + + + + + + + + + + + Label24 + + + + 10 + 20 + 540 + 60 + + + + + 1 + + + + Please, select the disk partition where you want the system to be installed. +<br><b>WARNING: all current data on the selected partition will be lost.</b> + + + RichText + + + WordBreak|AlignTop + + + + + devicesbox + + + + 10 + 90 + 540 + 130 + + + + + + + + + + + + + + Layout13 + + + + 10 + 250 + 540 + 26 + + + + + unnamed + + + 0 + + + 6 + + + + Label22 + + + + 1 + 5 + 0 + 0 + + + + Filesystem type: + + + + + + btrfs + + + + + ext2 + + + + + ext3 + + + + + ext4 + + + + + jfs + + + + + nilfs2 + + + + + reiserfs + + + + + xfs + + + + fstypebox + + + + 1 + 0 + 0 + 0 + + + + 3 + + + + + + + + + + fsbadblocks + + + Check for &bad blocks (slow!) + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 16 + 0 + + + + + + @@ -2294,141 +2325,6 @@ function get_udisks_key_last() { image6 - - - formathome_group - - - false - - - - 10 - 340 - 560 - 90 - - - - Which filesystem do you want? - - - - Layout4_2 - - - - 11 - 50 - 300 - 26 - - - - - unnamed - - - 0 - - - 6 - - - - Label22_3 - - - - 3 - 5 - 0 - 0 - - - - Filesystem type: - - - - - - ext4 - - - - - ext3 - - - - - reiserfs - - - - - ext2 - - - - fstypebox_2 - - - - 3 - 0 - 0 - 0 - - - - - - - - - - - Spacer1_2 - - - Horizontal - - - Expanding - - - - 30 - 0 - - - - - - - - Label33_3 - - - - 10 - 20 - 510 - 20 - - - - - 1 - - - - Partition will be formatted with the selected filesystem. - - - Label21_2_4 @@ -2453,118 +2349,6 @@ function get_udisks_key_last() { AlignCenter - - - setlabel_2 - - - - 550 - 50 - 32 - 32 - - - - - - - - @execBegin -@format_home_box.setEnabled(false) -@if (@devicesbox_2.currentItem >= 0) - currdev=@String.section(@devicesbox_2.item(@devicesbox_2.currentItem)," ",0) - if [ "$currdev" != "none" -a "$currdev" != "nessuna" ]; then - dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "@devicesbox_2.item(@devicesbox_2.currentItem)" - dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box true - dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group @format_home_box.checked() - else - dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "" - dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box false - dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group false - fi - @dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true) - @BackBox.setChecked(true) - dcop @dcopid KommanderIf "setCurrentItem(int)" 0 -@endif -@execEnd -@setBootableCheckbox.execute() - - - - - - scanDevices_2 - - - - 550 - 10 - 32 - 32 - - - - - @devicesbox_2.clear -@BackBox.setChecked(true) -@NextBox.setChecked(true) -@execBegin -function get_udisks_key() { - LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|" -} -devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r` -partlabel= -installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0) -dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "@i18n("none (just use a single partition for system and home)")" 0 -for device in $devices; do - [ "${device:5}" = "$installdevice" ] && continue - if [ "${device:5:3}" != "dm-" ]; then - native_path=`get_udisks_key $device native-path` - [ -e $native_path/partition ] || continue - fi - is_system_internal=`get_udisks_key $device "system internal"` - volsize=`get_udisks_key $device size` - volsize=`expr $volsize / 1024 / 1024` - if [ "${device:5:3}" = "dm-" ]; then - volname=`sudo dmsetup info $device | grep "^Name:" | sed "s|.*[[:space:]]||"` - else - volname=`get_udisks_key $device label` - fi - [ $volsize -ge 512 ] || continue - [ "$volname" ] || volname="unnamed" - parttype=`get_udisks_key $device usage` - [ "$parttype" ] || parttype="unknown" - partscheme=`get_udisks_key $device scheme` - [ "$partscheme" ] || partscheme="unknown" - fstype=`get_udisks_key $device type` - [ "$fstype" ] || fstype="unformatted" - add_info="" - [ "$is_system_internal" = "1" ] || { - add_info=",removable" - [ @removablebox.checked == 1 ] || continue - } - if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then - partlabel="$partlabel<br>${device:5} $fstype $volname $volsize MB" - case "$fstype" in - ext2|ext3|ext4|reiserfs|reiser4|unformatted) - dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;; - *) ;; - esac - elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then - case "$fstype" in - swap|iso9660) ;; - ext2|ext3|ext4|reiserfs|reiser4|unformatted) - dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;; - *) ;; - esac - fi -done -@execEnd - - - - PartitionBox_2 @@ -2783,6 +2567,292 @@ done + + + scanDevices_2 + + + + 550 + 10 + 32 + 32 + + + + + @devicesbox_2.clear +@BackBox.setChecked(true) +@NextBox.setChecked(true) +@execBegin +function get_udisks_key() { + LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|" +} +devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r` +partlabel= +installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0) +dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "@i18n("none (just use a single partition for system and home)")" 0 +for device in $devices; do + [ "${device:5}" = "$installdevice" ] && continue + if [ "${device:5:3}" != "dm-" ]; then + native_path=`get_udisks_key $device native-path` + [ -e $native_path/partition ] || continue + fi + is_system_internal=`get_udisks_key $device "system internal"` + volsize=`get_udisks_key $device size` + volsize=`expr $volsize / 1024 / 1024` + if [ "${device:5:3}" = "dm-" ]; then + volname=`sudo dmsetup info $device | grep "^Name:" | sed "s|.*[[:space:]]||"` + else + volname=`get_udisks_key $device label` + fi + [ $volsize -ge 512 ] || continue + [ "$volname" ] || volname="unnamed" + parttype=`get_udisks_key $device usage` + [ "$parttype" ] || parttype="unknown" + partscheme=`get_udisks_key $device scheme` + [ "$partscheme" ] || partscheme="unknown" + fstype=`get_udisks_key $device type` + [ "$fstype" ] || fstype="unformatted" + add_info="" + [ "$is_system_internal" = "1" ] || { + add_info=",removable" + [ @removablebox.checked == 1 ] || continue + } + if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then + partlabel="$partlabel<br>${device:5} $fstype $volname $volsize MB" + case "$fstype" in + ext2|ext3|ext4|reiserfs|reiser4|unformatted) + dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;; + *) ;; + esac + elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then + case "$fstype" in + swap|iso9660) ;; + ext2|ext3|ext4|reiserfs|reiser4|unformatted) + dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox_2 "${device:5} ($fstype,$volname,$volsize MB${add_info})" 1 ;; + *) ;; + esac + fi +done +@execEnd + + + + + + + setlabel_2 + + + + 550 + 50 + 32 + 32 + + + + + + + + @execBegin +@format_home_box.setEnabled(false) +@if (@devicesbox_2.currentItem >= 0) + currdev=@String.section(@devicesbox_2.item(@devicesbox_2.currentItem)," ",0) + if [ "$currdev" != "none" -a "$currdev" != "nessuna" ]; then + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "@devicesbox_2.item(@devicesbox_2.currentItem)" + dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box true + dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group @format_home_box.checked() + else + dcop @dcopid KommanderIf "setText(QString,QString)" showdevice_2 "" + dcop @dcopid KommanderIf "setEnabled(QString,bool)" format_home_box false + dcop @dcopid KommanderIf "setEnabled(QString,bool)" formathome_group false + fi + @dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true) + @BackBox.setChecked(true) + dcop @dcopid KommanderIf "setCurrentItem(int)" 0 +@endif +@execEnd +@setBootableCheckbox.execute() + + + + + + formathome_group + + + false + + + + 10 + 340 + 560 + 90 + + + + Which filesystem do you want? + + + + Label33_3 + + + + 10 + 20 + 510 + 20 + + + + + 1 + + + + Partition will be formatted with the selected filesystem. + + + + + Layout12 + + + + 10 + 50 + 530 + 26 + + + + + unnamed + + + 0 + + + 6 + + + + Label22_3 + + + + 1 + 5 + 0 + 0 + + + + Filesystem type: + + + + + + btrfs + + + + + ext2 + + + + + ext3 + + + + + ext4 + + + + + jfs + + + + + nilfs2 + + + + + reiserfs + + + + + xfs + + + + fstypebox_2 + + + + 1 + 0 + 0 + 0 + + + + 3 + + + + + + + + + + CheckBox13 + + + + 3 + 0 + 0 + 0 + + + + Check for &bad blocks (slow!) + + + + + Spacer1_2 + + + Horizontal + + + Expanding + + + + 68 + 0 + + + + + + @@ -3520,6 +3590,7 @@ INSTALL_BOOTLOADER_DEVICE_EFI='$efidevice' INSTALL_BOOTLOADER_DEVICE_SETBOOTABLE=@bootableBox.checked INSTALL_BOOTLOADER_CHAINLOAD=($chainloaddevices) INSTALL_FSTYPE='@fstypebox.item(@fstypebox.currentItem)' +INSTALL_BADBLOCKS=@fsbadblocks.checked INSTALL_CLONE_MODE=@clonebox.checked INSTALL_STABLE_UPDATES=@stablebox.checked _EOF @@ -3529,6 +3600,7 @@ cat >>$conffile << _EOF INSTALL_HOME_DEVICE='/dev/$installhomedevice' INSTALL_HOME_FORMAT=@format_home_box.checked INSTALL_HOME_FSTYPE='@fstypebox_2.item(@fstypebox_2.currentItem)' +INSTALL_HOME_BADBLOCKS=@fsbadblocks_2.checked _EOF fi @@ -3537,6 +3609,7 @@ cat >>$conffile << _EOF INSTALL_BOOT_DEVICE='/dev/$installbootdevice' INSTALL_BOOT_FORMAT='1' INSTALL_BOOT_FSTYPE='@fstypebox.item(@fstypebox.currentItem)' +INSTALL_BOOT_BADBLOCKS=@fsbadblocks.checked _EOF fi @execEnd diff --git a/installer/installer.sh b/installer/installer.sh index cb1a4b6..eb36d40 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -1,5 +1,5 @@ # openmamba installation script -# Copyright (c) 2007-2014 by Silvan Calarco +# Copyright (c) 2007-2015 by Silvan Calarco # # For the devfs2gdev() function: # Copyright (c) 2006 by Davide Madrisan @@ -114,7 +114,7 @@ DCOPID=$2 echo $"\ openmamba installation script - version $VERSION -Copyright (c) 2007-2014 by Silvan Calarco +Copyright (c) 2007-2015 by Silvan Calarco " dcop_write $"Starting installation..." 5 @@ -127,20 +127,27 @@ dcop_write $"Starting installation..." 5 . $INPUT_FILE FORMAT_APPEND= +FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" [ "$INSTALL_HOSTNAME" ] || INSTALL_HOSTNAME="openmamba" case "$INSTALL_FSTYPE" in - ext2|ext3|ext4) FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" + ext2|ext3|ext4|jfs|nilfs2) + [ "$INSTALL_BADBLOCKS" ] && FORMAT_APPEND="-c" [ "$INSTALL_HOSTNAME" ] && \ FORMAT_APPEND="$FORMAT_APPEND -L $INSTALL_HOSTNAME" - ;; - reiserfs|reiser4) FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" - FORMAT_APPEND="$FORMAT_APPEND -ff" - [ "$INSTALL_HOSTNAME" ] && \ - FORMAT_APPEND="$FORMAT_APPEND -l $INSTALL_HOSTNAME" - ;; - *) FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" - [ -e "$FORMAT_CMD" ] || { + ;; + btrfs|xfs|reiser4) + # FIXME: bad blocks check option missing? + [ "$INSTALL_HOSTNAME" ] && \ + FORMAT_APPEND="$FORMAT_APPEND -L $INSTALL_HOSTNAME" + ;; + reiserfs) + # FIXME: bad blocks check option missing? + FORMAT_APPEND="$FORMAT_APPEND -ff" + [ "$INSTALL_HOSTNAME" ] && \ + FORMAT_APPEND="$FORMAT_APPEND -l $INSTALL_HOSTNAME" + ;; + *) [ -e "$FORMAT_CMD" ] || { echo $"Error: $INSTALL_FSTYPE is not a supported filesystem type; aborting." >&2 abort } @@ -151,15 +158,21 @@ case "$INSTALL_FSTYPE" in esac if [ "$INSTALL_HOME_DEVICE" ]; then + FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" case "$INSTALL_HOME_FSTYPE" in - ext2|ext3|ext4) FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" - FORMAT_HOME_APPEND="$FORMAT_APPEND -L home" + ext2|ext3|ext4|jfs|nilfs2) + [ "$INSTALL_HOME_BADBLOCKS" ] && FORMAT_HOME_APPEND="-c" + FORMAT_HOME_APPEND="$FORMAT_HOME_APPEND -L home" ;; - reiserfs|reiser4) FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" - FORMAT_HOME_APPEND="$FORMAT_APPEND -ff -l home" - ;; - *) FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" - [ -e "$FORMAT_HOME_CMD" ] || { + btrfs|xfs|reiser4) + # FIXME: bad blocks check option missing? + FORMAT_HOME_APPEND="$FORMAT_HOME_APPEND -L home" + ;; + reiserfs) + # FIXME: bad blocks check option missing? + FORMAT_HOME_APPEND="$FORMAT_HOME_APPEND -ff -l home" + ;; + *) [ -e "$FORMAT_HOME_CMD" ] || { echo $"Error: $INSTALL_HOME_FSTYPE is not a supported filesystem type; aborting." >&2 abort } @@ -171,13 +184,20 @@ if [ "$INSTALL_HOME_DEVICE" ]; then fi if [ "$INSTALL_BOOT_DEVICE" ]; then + FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" case "$INSTALL_BOOT_FSTYPE" in - ext2|ext3|ext4) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" - FORMAT_BOOT_APPEND="$FORMAT_APPEND -L boot" + ext2|ext3|ext4|jfs|nilfs2) + [ "$INSTALL_BOOT_BADBLOCKS" ] && FORMAT_BOOT_APPEND="-c" + FORMAT_BOOT_APPEND="$FORMAT_BOOT_APPEND -L boot" + ;; + btrfs|xfs|reiser4) + # FIXME: bad blocks check option missing? + FORMAT_BOOT_APPEND="$FORMAT_BOOT_APPEND -L boot" + ;; + reiserfs) + # FIXME: bad blocks check option missing? + FORMAT_BOOT_APPEND="$FORMAT_BOOT_APPEND -ff -l home" ;; - reiserfs|reiser4) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" - FORMAT_BOOT_APPEND="$FORMAT_APPEND -ff -l home" - ;; *) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" [ -e "$FORMAT_BOOT_CMD" ] || { echo $"Error: $INSTALL_BOOT_FSTYPE is not a supported filesystem type; aborting." >&2 diff --git a/installer/po/es.po b/installer/po/es.po index 39d01df..e4d1251 100644 --- a/installer/po/es.po +++ b/installer/po/es.po @@ -50,9 +50,9 @@ msgstr "" #: _from_rc.cc:12 msgid "" -"Copyright (c) 2007-2014 by Silvan Calarco\n" +"Copyright (c) 2007-2015 by Silvan Calarco\n" "Released under the terms of the GNU GPL v3 license" -msgstr "Copyright (c) 2007-2014 by Silvan Calarco\n" +msgstr "Copyright (c) 2007-2015 by Silvan Calarco\n" "Expedido segĂșn los tĂ©rminos de la licencia GNU GPL v3" #: _from_rc.cc:14 diff --git a/installer/po/it.po b/installer/po/it.po index cf569d7..202d4ad 100644 --- a/installer/po/it.po +++ b/installer/po/it.po @@ -49,9 +49,9 @@ msgstr "" #: _from_rc.cc:12 msgid "" -"Copyright (c) 2007-2014 by Silvan Calarco\n" +"Copyright (c) 2007-2015 by Silvan Calarco\n" "Released under the terms of the GNU GPL v3 license" -msgstr "Copyright (c) 2007-2014 by Silvan Calarco\n" +msgstr "Copyright (c) 2007-2015 by Silvan Calarco\n" "Rilasciato secondo i termini della licenza GNU GPL v3" #: _from_rc.cc:14 @@ -590,11 +590,11 @@ msgstr " l'operazione." #: installer.sh:113 msgid "" "openmamba installation script - version $VERSION\n" -"Copyright (c) 2007-2014 by Silvan Calarco \n" +"Copyright (c) 2007-2015 by Silvan Calarco \n" "" msgstr "" "script di installazione di openmamba - versione $VERSION\n" -"Copyright (c) 2007-2014 by Silvan Calarco \n" +"Copyright (c) 2007-2015 by Silvan Calarco \n" "" #: installer.sh:118 msgid "Starting installation..."