#! /bin/sh #---------------------------------------------------------------------------- # /var/install/bin/system-filesystems-ext2-to-ext3 - mark filesystems for # ext3 conversion # # Copyright (c) 2004 Frank Meyer # # Creation: 24.07.2004 fm # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- gotoyx () { echo -e "\033[$1;$2H\c"; } kernel_good=false status=`/var/install/bin/check-version eiskernel 1.0.9` if [ "$status" = "installed" -o "$status" = "old" ] then kernel_good=true fi if [ $kernel_good = false ] then colecho "You need eiskernel version 1.0.9 (or higher) to convert" br b br colecho "filesystems to ext3. " br b br colecho "Please install a newer version of eiskernel " br b br exit 1 fi do_exit=false while [ 1 ] do marked=false title_printed=false clrhome colecho "Convert ext2-filesystems to ext3" gn echo echo echo i=1 while read line do set -- $line fs_spec=$1 fs_file=$2 fs_vfstype=$3 fs_mntopts=$4 fs_freq=$5 fs_passno=$6 if [ "$fs_vfstype" = "ext2" ] then if [ "$title_printed" = false ] then echo " ext2 filesystems found:" echo title_printed=true fi if grep "^$fs_spec\$" /tmp/convert-ext2-to-ext3.list >/dev/null 2>&1 then marked=true eval fs_vfstype_$i=ext3 echo " $i: $fs_spec $fs_file (marked for ext3-conversion)" else eval fs_vfstype_$i=ext2 echo " $i: $fs_spec $fs_file" fi eval fs_spec_$i=$fs_spec i=`expr $i + 1` fi done >/tmp/convert-ext2-to-ext3.list else grep -v "^$fs_spec\$" /tmp/convert-ext2-to-ext3.list >/tmp/convert-ext2-to-ext3.list.$$ mv /tmp/convert-ext2-to-ext3.list.$$ /tmp/convert-ext2-to-ext3.list fi fi fi done if [ $i -ne 0 -a $marked = false ] then rm -f /tmp/convert-ext2-to-ext3.list fi echo if [ -f /tmp/convert-ext2-to-ext3.list ] then mkdir -p /var/boot-ext echo "/bin/sh /var/install/bin/convert-ext2-to-ext3" >/var/boot-ext/convert-ext2-to-ext3 colecho "INFO: ext3-filesystem conversion will be started on next reboot" gn else rm -f /var/install/boot-ext/convert-ext2-to-ext3 colecho "INFO: nothing marked for ext3 filesystem conversion" gn fi if [ $do_exit = true ] then exit 127 fi /var/install/bin/anykey