#142: Preparación para redimiensionar particiones tipo FAT.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@3284 a21b9725-9963-47de-94b9-378ad31fedc9
remotes/github/debian-pkg
ramon 2012-09-14 12:48:54 +00:00
parent 8e9669e5b1
commit 743257efc7
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,7 @@ install drbl-ntfsprogs
install ntfsprogs install ntfsprogs
install ntfs-3g install ntfs-3g
install dosfstools install dosfstools
install fatresize
install dmraid install dmraid
install dmsetup install dmsetup
install lvm2 install lvm2

View File

@ -138,6 +138,7 @@ case "$TYPE" in
REISERFS) PROG="resize_reiserfs"; PARAMS="-f" ;; REISERFS) PROG="resize_reiserfs"; PARAMS="-f" ;;
BTRFS) PROG="btrfs"; PARAMS="filesystem resize max" ;; BTRFS) PROG="btrfs"; PARAMS="filesystem resize max" ;;
NTFS) PROG="ntfsresize"; PARAMS="<<<\"y\" -f" ;; NTFS) PROG="ntfsresize"; PARAMS="<<<\"y\" -f" ;;
# FAT32|FAT16) # Usar "fatresize"
*) ogRaiseError $OG_ERR_PARTITION "$1 $2 $TYPE" *) ogRaiseError $OG_ERR_PARTITION "$1 $2 $TYPE"
return $? ;; return $? ;;
esac esac
@ -750,9 +751,11 @@ case "$(ogGetFsType $1 $2)" in
# awk -v B=$BLKS '/minimum size/ {print int($7*1.1*B/2048)}') # awk -v B=$BLKS '/minimum size/ {print int($7*1.1*B/2048)}')
#resize2fs -fp $PART "${SIZE}M" &>/dev/null || ogRaiseError $OG_ERR_PARTITION "$1,$2" || return $? #resize2fs -fp $PART "${SIZE}M" &>/dev/null || ogRaiseError $OG_ERR_PARTITION "$1,$2" || return $?
resize2fs -fpM $PART &>/dev/null || ogRaiseError $OG_ERR_PARTITION "$1,$2" || return $? resize2fs -fpM $PART &>/dev/null || ogRaiseError $OG_ERR_PARTITION "$1,$2" || return $?
;; ;;
# BTRFS) # Usar "btrfs"
# ;;
# REISERFS) # Usar "resize_reiserfs" # REISERFS) # Usar "resize_reiserfs"
# ;; # ;;
NTFS) NTFS)
ogDeleteFile $1 $2 pagefile.sys ogDeleteFile $1 $2 pagefile.sys
ogDeleteFile $1 $2 hiberfil.sys ogDeleteFile $1 $2 hiberfil.sys
@ -765,6 +768,8 @@ case "$(ogGetFsType $1 $2)" in
[ "$SIZE" == 0 ] && return 1 [ "$SIZE" == 0 ] && return 1
ntfsresize -fs "${SIZE}M" $PART <<<"y" || ogRaiseError $OG_ERR_PARTITION "error reduciendo $1,$2" || return $? ntfsresize -fs "${SIZE}M" $PART <<<"y" || ogRaiseError $OG_ERR_PARTITION "error reduciendo $1,$2" || return $?
;; ;;
# FAT32|FAT16) # Usar "fatresize"
# ;;
*) ogRaiseError $OG_ERR_PARTITION "$1,$2" *) ogRaiseError $OG_ERR_PARTITION "$1,$2"
return $? ;; return $? ;;
esac esac