mirror of
https://github.com/suikan4github/kaiten-yaki.git
synced 2025-12-20 10:31:17 -03:00
Test update.
This commit is contained in:
parent
4699f87cc7
commit
ed48590821
3 changed files with 40 additions and 16 deletions
11
script/test/trial.sh
Executable file
11
script/test/trial.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DISK=/dev/sdb
|
||||||
|
|
||||||
|
DISKSIZE=$(blockdev --report ${DISK} | awk /${DISK}/'{print $6}')
|
||||||
|
VOLSIZE=$(lvdisplay --units B /dev/vg_test/anko | awk '/Size/{print $3}')
|
||||||
|
|
||||||
|
echo $DISKSIZE
|
||||||
|
echo $VOLSIZE
|
||||||
|
|
||||||
|
echo "scale=3; $VOLSIZE/$DISKSIZE" | bc
|
||||||
22
script/test/testutil.sh → script/test/util_cleanup.sh
Normal file → Executable file
22
script/test/testutil.sh → script/test/util_cleanup.sh
Normal file → Executable file
|
|
@ -1,20 +1,8 @@
|
||||||
|
#!/bin/bash -u
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
# *******************************************************************************
|
# Load configuration parameter
|
||||||
# Deactivate all LV in the VG and close LUKS volume
|
source ./config01.sh
|
||||||
# *******************************************************************************
|
|
||||||
|
|
||||||
function util_deactivate_and_close(){
|
|
||||||
echo "...Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
|
||||||
vgchange -a n "${VGNAME}"
|
|
||||||
echo "...Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
|
||||||
cryptsetup close "${CRYPTPARTNAME}"
|
|
||||||
cat <<- HEREDOC
|
|
||||||
|
|
||||||
...Installation process terminated..
|
|
||||||
HEREDOC
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# *******************************************************************************
|
# *******************************************************************************
|
||||||
# Delete the nwe volume if overwrite install, and close all
|
# Delete the nwe volume if overwrite install, and close all
|
||||||
|
|
@ -36,3 +24,5 @@ function util_cleanup(){
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
util_cleanup
|
||||||
23
script/test/util_deactivate_and_close.sh
Executable file
23
script/test/util_deactivate_and_close.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash -u
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
# Load configuration parameter
|
||||||
|
source ./config01.sh
|
||||||
|
|
||||||
|
# *******************************************************************************
|
||||||
|
# Deactivate all LV in the VG and close LUKS volume
|
||||||
|
# *******************************************************************************
|
||||||
|
|
||||||
|
function util_deactivate_and_close(){
|
||||||
|
echo "...Deactivating all logical volumes in volume group \"${VGNAME}\"."
|
||||||
|
vgchange -a n "${VGNAME}"
|
||||||
|
echo "...Closing LUKS volume \"${CRYPTPARTNAME}\"."
|
||||||
|
cryptsetup close "${CRYPTPARTNAME}"
|
||||||
|
cat <<- HEREDOC
|
||||||
|
|
||||||
|
...Installation process terminated..
|
||||||
|
HEREDOC
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
util_deactivate_and_close
|
||||||
Loading…
Add table
Add a link
Reference in a new issue