installer: support (experimental!) for more filesystems (btrfs,nilfs2,jfs,xfs) and bad blocks check

This commit is contained in:
Silvan Calarco 2015-01-25 17:07:40 +01:00
parent 69ecd6de09
commit f6e48799d4
4 changed files with 649 additions and 556 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# openmamba installation script
# Copyright (c) 2007-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2007-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# For the devfs2gdev() function:
# Copyright (c) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
@ -114,7 +114,7 @@ DCOPID=$2
echo $"\
openmamba installation script - version $VERSION
Copyright (c) 2007-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
Copyright (c) 2007-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>
"
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

View File

@ -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

View File

@ -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 <silvan.calarco@mambasoft.it>\n"
"Copyright (c) 2007-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>\n"
""
msgstr ""
"script di installazione di openmamba - versione $VERSION\n"
"Copyright (c) 2007-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>\n"
"Copyright (c) 2007-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>\n"
""
#: installer.sh:118
msgid "Starting installation..."