From bfc0e8a1e39a230ec0204e1d19c04a31657a6488 Mon Sep 17 00:00:00 2001 From: Andrey Miroshnikov Date: Thu, 7 Oct 2021 13:37:20 +0100 Subject: [PATCH] coriolis2-chroot: Added optional argument for specifying chroot name --- coriolis2-chroot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coriolis2-chroot b/coriolis2-chroot index af658d4..1ba4e35 100755 --- a/coriolis2-chroot +++ b/coriolis2-chroot @@ -10,6 +10,14 @@ NC='\033[0m' # Default name for the new chroot chroot_name="coriolis" +# Check if default chroot name should be used or not +if [ -z $1 ]; then + echo "Not provided a chroot name, using default chroot \"$chroot_name\"" +else + chroot_name="$1" + echo "Using specified chroot name \"$chroot_name\"" +fi + if [ -e /opt/chroot/$chroot_name ]; then echo -e " ${RED}Chroot \"$chroot_name\" exists! Delete with \"rm-deb-chroot\" or -- 2.30.2