Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rear/rear
Browse files Browse the repository at this point in the history
  • Loading branch information
gdha committed Jul 30, 2014
2 parents 5b45e30 + 94dcb18 commit be46c06
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions usr/share/rear/layout/prepare/default/40_autoresize_disks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ while read type device size junk ; do
resizeable_space=0
available_space="$newsize"
while read type part size start name flags name junk; do
case "$flags" in
(*boot*|*bios_grub*)
if [ -n "$(grep "^fs $name /boot\|^swap $name " "$LAYOUT_FILE")" ]; then
available_space=$(( available_space - ${size%B} ))
Log "Will not resize partition $name."
;;
(*)
else
partitions=( "${partitions[@]}" "$name|${size%B}" )
resizeable_space=$(( resizeable_space + ${size%B} ))
Log "Will resize partition $name."
;;
esac
done < <(grep "^part $device" "$LAYOUT_FILE" | grep -v $(grep "^swap $device" "$LAYOUT_FILE" | cut -d' ' -f 2) )
fi
done < <(grep "^part $device" "$LAYOUT_FILE" )

if (( ${#partitions[@]} == 0 )) ; then
Log "No resizeable partitions found."
Expand Down

0 comments on commit be46c06

Please sign in to comment.