From 97c530fc709270aa6408da78bd603ff98139ab76 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 19 Oct 2020 18:25:36 +0200 Subject: [PATCH] Try to guess the VG name --- debian/chroot.mount | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/chroot.mount b/debian/chroot.mount index 96cf48a..25fdd17 100755 --- a/debian/chroot.mount +++ b/debian/chroot.mount @@ -11,8 +11,8 @@ fi ## If empty, the script will try to get one with nslookup new_hostname="" -## Volume Group name to use for LVM -vgname="${new_hostname}vg" +## Try to guess the VG name by using the last VG detected +vgname=$(vgdisplay --short | tail -n 1 | sed 's/.*"\(.*\)" .*/\1/') ## If the script should create extra volume (eg. backup, virt, Proxmox,…) manage_extra_lv=0 ## Colors definition {{{