summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Affonso Xavier de Morais2014-08-29 14:46:07 +0200
committerMichael Pereira Neves2014-10-28 14:14:50 +0100
commit11b8aae7d80d58f86b8c55b9c20fc06288004c3c (patch)
tree7bc0a620346f27004ca93d9d92ff665a141d4e9e
parent[partitioner] progress bar added on creation of new partitions. (diff)
downloadtm-scripts-11b8aae7d80d58f86b8c55b9c20fc06288004c3c.tar.gz
tm-scripts-11b8aae7d80d58f86b8c55b9c20fc06288004c3c.tar.xz
tm-scripts-11b8aae7d80d58f86b8c55b9c20fc06288004c3c.zip
[partitioner] minor fixes
-rwxr-xr-xserver/modules/partitioner/opt/openslx/scripts/partitioner5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/modules/partitioner/opt/openslx/scripts/partitioner b/server/modules/partitioner/opt/openslx/scripts/partitioner
index 14f47389..75ac7105 100755
--- a/server/modules/partitioner/opt/openslx/scripts/partitioner
+++ b/server/modules/partitioner/opt/openslx/scripts/partitioner
@@ -120,7 +120,7 @@ if [ $DISKSIZE -lt $NEEDED_SPACE ]; then
fi
# choosing the partition type (MSDOS or GPT) if it wasn't set in config file
-if [ -z "$SLX_PARTITION_TYPE" ]; then
+if [ -z "$SLX_PARTITION_TYPE" ] && [ $SLX_DELETE_PARTITION_TABLE = "yes" ]; then
if [ $SLX_AUTOMATIC_PARTITIONING = "yes" ]; then
SLX_PARTITION_TYPE=msdos
else
@@ -228,6 +228,7 @@ if [ $SLX_DELETE_PARTITION_TABLE = "yes" ]; then
fi
done
else
+ DIALOGSTR="Creating Partitions...\n\n"
for (( i = 1; i < $COUNTER; i++ )); do
if [ $i -lt 4 ]; then
SIZE=$((${PARTTBL["$SLX_CHOOSEN_DISK$i/size"]}*1024*1024*1024))
@@ -317,7 +318,7 @@ elif [ $(sfdisk -d /dev/$SLX_CHOOSEN_DISK 2> /dev/null | grep $SLX_CHOOSEN_DISK'
echo $(( $CREATED*100/($NONEXISTENT_PARTITIONS) )) | dialog --gauge "$DIALOGSTR" 0 0 0
fi
if [ ${PARTTBL["$SLX_CHOOSEN_DISK$i/bootable"]} -eq 1 ]; then
- sgdisk /dev/$SLX_CHOOSEN_DISK -A $j:set:2 >/dev/null 2>/deb/null
+ sgdisk /dev/$SLX_CHOOSEN_DISK -A $j:set:2 >/dev/null 2>/dev/null
fi
fi
done