diff options
author | Jybz <j.biernacki@free.fr> | 2019-11-09 17:38:58 +0000 |
---|---|---|
committer | Jybz <j.biernacki@free.fr> | 2019-11-09 17:38:58 +0000 |
commit | f667080ee4743f0e9004e1d7f02b590b6bdb1cca (patch) | |
tree | 83626fd2737a902660320d99fe2c504220d66904 /tools | |
parent | 431f9c1c0c2b9314108a70d44e2073cceb20f64f (diff) | |
download | mageia4arm-f667080ee4743f0e9004e1d7f02b590b6bdb1cca.tar mageia4arm-f667080ee4743f0e9004e1d7f02b590b6bdb1cca.tar.gz mageia4arm-f667080ee4743f0e9004e1d7f02b590b6bdb1cca.tar.bz2 mageia4arm-f667080ee4743f0e9004e1d7f02b590b6bdb1cca.tar.xz mageia4arm-f667080ee4743f0e9004e1d7f02b590b6bdb1cca.zip |
MAJ
Diffstat (limited to 'tools')
-rw-r--r-- | tools/resize_root.sh | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/tools/resize_root.sh b/tools/resize_root.sh index 3686c1a..99aee12 100644 --- a/tools/resize_root.sh +++ b/tools/resize_root.sh @@ -4,24 +4,29 @@ DEVICE="/dev/mmcblk0" ROOT_PARTITION="${DEVICE}p1" ROOT_PARTITION="1" -#Check dependency -hash growpart -if [ ${?} -ne 0 ]; then - echo "install cloud-utils-growpart first. Hint : urpmi cloud-utils-growpart" - exit 1 -fi +echo "Warning : this an early version to resize the root partition. Check the source code to ensure what you are doing." +if [ ${1} = "force" ]; then + #Check dependency + hash growpart + if [ ${?} -ne 0 ]; then + echo "install cloud-utils-growpart first. Hint : urpmi cloud-utils-growpart" + exit 1 + fi -#Check the partition : -e2fsck -f ${ROOT_PARTITION} + #Check the partition : + e2fsck -f ${ROOT_PARTITION} -#Change the size : BUG: app doesn't support "octet". -LC_ALL=C growpart ${DEVICE} ${ROOT_PARTITION} + #Change the size : BUG: app doesn't support "octet". + LC_ALL=C growpart ${DEVICE} ${ROOT_PARTITION} -#Resize the partition with the new size : -resize2fs ${ROOT_PARTITION} + #Resize the partition with the new size : + resize2fs ${ROOT_PARTITION} -#Sync (just to be sure) -sync + #Sync (just to be sure) + sync +else + echo "If you read the source code, you should not have read that message... Exiting with out touching the partition." +fi #Quit exit 0 |