diff options
-rwxr-xr-x | server/modules/partitioner/opt/openslx/scripts/partitioner | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/server/modules/partitioner/opt/openslx/scripts/partitioner b/server/modules/partitioner/opt/openslx/scripts/partitioner index 03e089c4..0b682dba 100755 --- a/server/modules/partitioner/opt/openslx/scripts/partitioner +++ b/server/modules/partitioner/opt/openslx/scripts/partitioner @@ -12,8 +12,8 @@ BLOCKSIZE=1024 . $CONFIGPATH # testing if the sizes and ID's of the disk is defined in the config file - # picking disk that will be used + DISKS=$(cat $PARTITIONSPATH | tr -s ' ' | cut -d ' ' -f5 | grep -e "[a-z]$") if [ -z "$DISKS" ]; then dialog --msgbox "ERROR: Can't find an hard disk." 10 40 @@ -88,12 +88,17 @@ for PARTITION in $SLX_PARTITION_TABLE; do if [ $COUNTER -eq 4 ]; then COUNTER=$(($COUNTER+1)) fi + echo "id: $1" PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/id"]=$1 - PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/size"]=$(echo $2 | egrep -o "[0-9]*") - if [ -n $3 ]; then - PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/mountpoint"]=$3 + shift + echo "size: $1" + PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/size"]=$(echo $1 | egrep -o "[0-9]*") + shift + if [ -n $1 ]; then + PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/mountpoint"]=$1 fi - if [ "$4" = "bootable" ]; then + shift + if [[ "$*" == *bootable* ]]; then PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/bootable"]=1 else PARTTBL["$SLX_CHOOSEN_DISK$COUNTER/bootable"]=0 |