improvment of conf files, and changes of one [[
This commit is contained in:
parent
a9acae3ca3
commit
9b4cdbc40c
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ INIT() {
|
|||
read -p "How much memory will you need ? " -r MEMORY
|
||||
read -p "Do you want to forward ssh port (y/n) " -r entry
|
||||
|
||||
if [[ "$entry" =~ ^[yY]$ ]]
|
||||
if echo "$entry" | grep -q "^[yY]$"
|
||||
then
|
||||
FORWARD=",hostfwd=tcp::10022-:22" # forward VM 22 port to Host 10022
|
||||
fi
|
||||
|
@ -68,12 +68,12 @@ INIT() {
|
|||
mkdir -p conf
|
||||
cat << EOF > "conf/$NAME-vm_var.sh"
|
||||
NAME="$NAME"
|
||||
VMHOSTNAME="\$NAME-vm"
|
||||
VMHOSTNAME="\${NAME}-vm"
|
||||
VMDRIVE="\${VMHOSTNAME}.cow"
|
||||
NPROC="$NPROC"
|
||||
MEMORY="$MEMORY"
|
||||
FORWARD="$FORWARD"
|
||||
LOCATION="\$NAME-sandbox"
|
||||
LOCATION="\${NAME}-sandbox"
|
||||
EOF
|
||||
chmod +x "conf/$NAME-vm_var.sh"
|
||||
|
||||
|
|
Loading…
Reference in a new issue