mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-19 18:11:17 -03:00
Fix the duplicate awk match.
Now, it exits the process when the first pattern is procesed.
This commit is contained in:
parent
d322e8d5c5
commit
425181aff1
1 changed files with 6 additions and 5 deletions
|
|
@ -143,20 +143,21 @@ function confirmation(){
|
|||
|
||||
|
||||
# Add -l or -L parameter to the size. The lvcreate command have two size parameter.
|
||||
# -L ###[M|G|T|m|g|t] : Size by absolute value.
|
||||
# -l ###%[FREE|VG|PVS|ORIGIN] : Size by relative value.
|
||||
# -L ###[M|G|T|m|g|t] : Size by absolute value.
|
||||
# Too preven the duplicated match, awk exists the process after it match the /%/ pattern.
|
||||
# If Unit is not specified, installation will fail.
|
||||
|
||||
LVSWAPSIZE=$(echo "${LVSWAPSIZE}" | awk '/M|G|T|m|g|t/{print "-L", $0} /%/ {print "-l", $0}')
|
||||
LVSWAPSIZE=$(echo "${LVSWAPSIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
||||
export LVSWAPSIZE
|
||||
|
||||
LVROOTSIZE=$(echo "${LVROOTSIZE}" | awk '/M|G|T|m|g|t/{print "-L", $0} /%/ {print "-l", $0}')
|
||||
LVROOTSIZE=$(echo "${LVROOTSIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
||||
export LVROOTSIZE
|
||||
|
||||
LVEXT1SIZE=$(echo "${LVEXT1SIZE}" | awk '/M|G|T|m|g|t/{print "-L", $0} /%/ {print "-l", $0}')
|
||||
LVEXT1SIZE=$(echo "${LVEXT1SIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
||||
export LVEXT1SIZE
|
||||
|
||||
LVEXT2SIZE=$(echo "${LVEXT2SIZE}" | awk '/M|G|T|m|g|t/{print "-L", $0} /%/ {print "-l", $0}')
|
||||
LVEXT2SIZE=$(echo "${LVEXT2SIZE}" | awk '/%/{print "-l", $0; exit} /M|G|T|m|g|t/{print "-L", $0}')
|
||||
export LVEXT2SIZE
|
||||
|
||||
# succesfull return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue