diff options
| -rwxr-xr-x | others/vm.sh2 | 5 | ||||
| -rwxr-xr-x | setup.sh | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/others/vm.sh2 b/others/vm.sh2 index a12a922..1f100d8 100755 --- a/others/vm.sh2 +++ b/others/vm.sh2 | |||
| @@ -142,8 +142,9 @@ case "$1" in | |||
| 142 | genisoimage -output "$seed_iso" -volid cidata -joliet -rock user-data meta-data &> /dev/null || { echo "Failed to create seed.iso."; exit 1; } | 142 | genisoimage -output "$seed_iso" -volid cidata -joliet -rock user-data meta-data &> /dev/null || { echo "Failed to create seed.iso."; exit 1; } |
| 143 | 143 | ||
| 144 | sudo cp $src_file $NEW_IMG_PATH &> /dev/null || { echo "Failed to create a new image."; exit 1; } | 144 | sudo cp $src_file $NEW_IMG_PATH &> /dev/null || { echo "Failed to create a new image."; exit 1; } |
| 145 | 145 | ||
| 146 | if sudo virsh list --all | grep -q "$VM_NAME"; then | 146 | if sudo virsh list --all | awk "\$2==\"$VM_NAME\"" | grep -q .; then |
| 147 | # if sudo virsh list --all | grep -q "$VM_NAME"; then | ||
| 147 | echo -e "\n$VM_NAME already exist. Delete it using \n$0 manage -erase $VM_NAME\nExiting..." | 148 | echo -e "\n$VM_NAME already exist. Delete it using \n$0 manage -erase $VM_NAME\nExiting..." |
| 148 | exit 1 | 149 | exit 1 |
| 149 | fi | 150 | fi |
| @@ -54,10 +54,10 @@ set statusline=%F " shows full file path | |||
| 54 | 54 | ||
| 55 | EOF | 55 | EOF |
| 56 | 56 | ||
| 57 | tee -a ~/.bashrc > /dev/null << 'EOF' | 57 | tee -a ~/.bashrc > /dev/null << 'EOF2' |
| 58 | LS_COLORS=$LS_COLORS:'di=38;5;135:' ; export LS_COLORS | 58 | LS_COLORS=$LS_COLORS:'di=38;5;135:' ; export LS_COLORS |
| 59 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' | 59 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' |
| 60 | EOF | 60 | EOF2 |
| 61 | source ~/.bashrc | 61 | source ~/.bashrc |
| 62 | 62 | ||
| 63 | sudo timedatectl set-timezone Asia/Singapore | 63 | sudo timedatectl set-timezone Asia/Singapore |
