From 4374bb03bd47b69fa470cfe8d065349f20d16cc2 Mon Sep 17 00:00:00 2001 From: 53845714nF Date: Thu, 25 Jul 2024 23:41:12 +0200 Subject: [PATCH] add a bridge variable --- .pre-commit-config.yaml | 7 ++----- vuln2pve | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b179a4a..8cc6ef2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,10 @@ +--- repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v1.2.3 - hooks: - - id: trailing-whitespace - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.39.0 hooks: - id: markdownlint - - repo: https://github.com/shellcheck-py/shellcheck-py + - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.9.0.6 hooks: - id: shellcheck \ No newline at end of file diff --git a/vuln2pve b/vuln2pve index ba69713..31c045b 100644 --- a/vuln2pve +++ b/vuln2pve @@ -4,6 +4,7 @@ dns=local # like fritz.box storage=vm_pool # default is local-lvm images_dir=/var/lib/vz/images # default pve dir +bridge=vmbr0 # set your bridge default is vmbr0 # Color Codes NORMAL="\e[39m" @@ -106,7 +107,7 @@ echo -e "$GREEN Removing done! $NORMAL\n" echo -e "$BLUE Create VM. $NORMAL\n" name=$(find "$images_dir"/"$vm_id"/ -name '*.qcow2' | head -n 1 | rev | cut -d "/" -f 1 | rev | cut -d "." -f 1 | cut -d "-" -f 1 | tr '[:upper:]' '[:lower:]'| tr -d '_') qm create "$vm_id" \ ---net0 e1000,bridge=vmbr0 \ +--net0 e1000,bridge="$bridge" \ --acpi yes \ --cores 2 \ --keyboard de \