mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 10:31: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.
|
# 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 ###%[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.
|
# 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
|
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
|
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
|
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
|
export LVEXT2SIZE
|
||||||
|
|
||||||
# succesfull return
|
# succesfull return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue