mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-29 03:02:04 +03:00
jenkins init fixes
This commit is contained in:
@@ -5,6 +5,16 @@ vgchange -ay
|
||||
|
||||
DEVICE_FS=`blkid -o value -s TYPE ${DEVICE}`
|
||||
if [ "`echo -n $DEVICE_FS`" == "" ] ; then
|
||||
# wait for the device to be attached
|
||||
DEVICENAME=`echo "${DEVICE}" | awk -F '/' '{print $3}'`
|
||||
DEVICEEXISTS=''
|
||||
while [[ -z $DEVICEEXISTS ]]; do
|
||||
echo "checking $DEVICENAME"
|
||||
DEVICEEXISTS=`lsblk |grep "$DEVICENAME" |wc -l`
|
||||
if [[ $DEVICEEXISTS != "1" ]]; then
|
||||
sleep 15
|
||||
fi
|
||||
done
|
||||
pvcreate ${DEVICE}
|
||||
vgcreate data ${DEVICE}
|
||||
lvcreate --name volume1 -l 100%FREE data
|
||||
|
||||
Reference in New Issue
Block a user