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 # 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: # For the devfs2gdev() function:
# Copyright (c) 2006 by Davide Madrisan <davide.madrisan@gmail.com> # Copyright (c) 2006 by Davide Madrisan <davide.madrisan@gmail.com>
@ -114,7 +114,7 @@ DCOPID=$2
echo $"\ echo $"\
openmamba installation script - version $VERSION 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 dcop_write $"Starting installation..." 5
@ -127,20 +127,27 @@ dcop_write $"Starting installation..." 5
. $INPUT_FILE . $INPUT_FILE
FORMAT_APPEND= FORMAT_APPEND=
FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE"
[ "$INSTALL_HOSTNAME" ] || INSTALL_HOSTNAME="openmamba" [ "$INSTALL_HOSTNAME" ] || INSTALL_HOSTNAME="openmamba"
case "$INSTALL_FSTYPE" in 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" ] && \ [ "$INSTALL_HOSTNAME" ] && \
FORMAT_APPEND="$FORMAT_APPEND -L $INSTALL_HOSTNAME" FORMAT_APPEND="$FORMAT_APPEND -L $INSTALL_HOSTNAME"
;; ;;
reiserfs|reiser4) FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" 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" FORMAT_APPEND="$FORMAT_APPEND -ff"
[ "$INSTALL_HOSTNAME" ] && \ [ "$INSTALL_HOSTNAME" ] && \
FORMAT_APPEND="$FORMAT_APPEND -l $INSTALL_HOSTNAME" FORMAT_APPEND="$FORMAT_APPEND -l $INSTALL_HOSTNAME"
;; ;;
*) FORMAT_CMD="/sbin/mkfs.$INSTALL_FSTYPE" *) [ -e "$FORMAT_CMD" ] || {
[ -e "$FORMAT_CMD" ] || {
echo $"Error: $INSTALL_FSTYPE is not a supported filesystem type; aborting." >&2 echo $"Error: $INSTALL_FSTYPE is not a supported filesystem type; aborting." >&2
abort abort
} }
@ -151,15 +158,21 @@ case "$INSTALL_FSTYPE" in
esac esac
if [ "$INSTALL_HOME_DEVICE" ]; then if [ "$INSTALL_HOME_DEVICE" ]; then
FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE"
case "$INSTALL_HOME_FSTYPE" in case "$INSTALL_HOME_FSTYPE" in
ext2|ext3|ext4) FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" ext2|ext3|ext4|jfs|nilfs2)
FORMAT_HOME_APPEND="$FORMAT_APPEND -L home" [ "$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" btrfs|xfs|reiser4)
FORMAT_HOME_APPEND="$FORMAT_APPEND -ff -l home" # FIXME: bad blocks check option missing?
FORMAT_HOME_APPEND="$FORMAT_HOME_APPEND -L home"
;; ;;
*) FORMAT_HOME_CMD="/sbin/mkfs.$INSTALL_HOME_FSTYPE" reiserfs)
[ -e "$FORMAT_HOME_CMD" ] || { # 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 echo $"Error: $INSTALL_HOME_FSTYPE is not a supported filesystem type; aborting." >&2
abort abort
} }
@ -171,12 +184,19 @@ if [ "$INSTALL_HOME_DEVICE" ]; then
fi fi
if [ "$INSTALL_BOOT_DEVICE" ]; then if [ "$INSTALL_BOOT_DEVICE" ]; then
FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE"
case "$INSTALL_BOOT_FSTYPE" in case "$INSTALL_BOOT_FSTYPE" in
ext2|ext3|ext4) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" ext2|ext3|ext4|jfs|nilfs2)
FORMAT_BOOT_APPEND="$FORMAT_APPEND -L boot" [ "$INSTALL_BOOT_BADBLOCKS" ] && FORMAT_BOOT_APPEND="-c"
FORMAT_BOOT_APPEND="$FORMAT_BOOT_APPEND -L boot"
;; ;;
reiserfs|reiser4) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" btrfs|xfs|reiser4)
FORMAT_BOOT_APPEND="$FORMAT_APPEND -ff -l home" # 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"
;; ;;
*) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE" *) FORMAT_BOOT_CMD="/sbin/mkfs.$INSTALL_BOOT_FSTYPE"
[ -e "$FORMAT_BOOT_CMD" ] || { [ -e "$FORMAT_BOOT_CMD" ] || {

View File

@ -50,9 +50,9 @@ msgstr ""
#: _from_rc.cc:12 #: _from_rc.cc:12
msgid "" 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" "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" "Expedido según los términos de la licencia GNU GPL v3"
#: _from_rc.cc:14 #: _from_rc.cc:14

View File

@ -49,9 +49,9 @@ msgstr ""
#: _from_rc.cc:12 #: _from_rc.cc:12
msgid "" 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" "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" "Rilasciato secondo i termini della licenza GNU GPL v3"
#: _from_rc.cc:14 #: _from_rc.cc:14
@ -590,11 +590,11 @@ msgstr " l'operazione."
#: installer.sh:113 #: installer.sh:113
msgid "" msgid ""
"openmamba installation script - version $VERSION\n" "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 "" msgstr ""
"script di installazione di openmamba - versione $VERSION\n" "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 #: installer.sh:118
msgid "Starting installation..." msgid "Starting installation..."