X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Finitscripts%2Finit.d%2Fpartresize;h=474b79f4dd23ac254b8697d4dd6ca4fce0660cc3;hp=33b56266a403289b181ed8ede518a5c372c94afb;hb=b8101c50ea58cc6a6bc76fe472826af7b7f33271;hpb=5114bcb3cdee18bdb30b71e9e0df2b559b561273 diff --git a/src/initscripts/init.d/partresize b/src/initscripts/init.d/partresize index 33b56266a..474b79f4d 100644 --- a/src/initscripts/init.d/partresize +++ b/src/initscripts/init.d/partresize @@ -6,7 +6,7 @@ # # Authors : Arne Fitzenreiter - arne_f@ipfire.org # -# Version : 1.01 +# Version : 1.04 # # Notes : # @@ -22,6 +22,12 @@ case "${1}" in mount -o remount,rw / > /dev/null evaluate_retval + boot_mesg "Create /etc/mtab..." + > /etc/mtab + mount -f / || failed=1 + (exit ${failed}) + evaluate_retval + # Detect device ROOT=`mount | grep -m1 " / " | cut -d" " -f1`; if [ "${ROOT:`expr length $ROOT`-2:1}" == "p" ]; then @@ -30,15 +36,20 @@ case "${1}" in DRV=${ROOT::`expr length $ROOT`-1} fi + boot_mesg "Update c,h,s values of ${DRV} ..." + echo -e ',' | sfdisk --no-reread -f -N1 ${DRV} 2>&1 > /dev/null + echo -e ',' | sfdisk --no-reread -f -N3 ${DRV} 2>&1 > /dev/null + boot_mesg "Change Partition ${DRV}3 to all free space ..." - echo -e 'd\n3\nn\np\n3\n\n\nw\nq\n' | fdisk ${DRV} + echo -e ',+' | sfdisk --no-reread -N3 ${DRV} 2>/dev/null # Erase symlink, it should run only once rm -f /etc/rc.d/rcsysinit.d/S25partresize boot_mesg "Rebooting ..." sync - mount -o remount,ro / > /dev/null + mount -o remount,ro / 2>&1 > /dev/null + sleep 15 reboot -f ;; @@ -49,4 +60,3 @@ case "${1}" in esac # End $rc_base/init.d/partresize -