Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix grep command for KVM_IMAGE (Bugfix) #1421

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ fi
# Check local availability of KVM image or pull from Internet, which tends to be slow
KVM_Image_Check(){
echoname "KVM Image Check"
if grep "^KVM_IMAGE =" /etc/xdg/$configfile >/dev/null; then
if grep "^KVM_IMAGE =" $configfile >/dev/null; then
kvmurl=$(grep ^KVM_IMAGE $configfile|awk '{print $3}')
if [[ "$kvmurl" =~ .*\.img$ ]] ; then
/usr/bin/qemu-img check $kvmurl >/dev/null 2>&1
Expand All @@ -405,7 +405,7 @@ if grep "^KVM_IMAGE =" /etc/xdg/$configfile >/dev/null; then
if [[ $YN == "Y" ]]; then
read -e -p " Enter the path of your KVM Image: " kvm
sudo sed -i "s,KVM_IMAGE =.*,KVM_IMAGE = $kvm,g" $configfile
kvmurl=$(grep ^KVM_IMAGE $configfilen|awk '{print $3}')
kvmurl=$(grep ^KVM_IMAGE $configfile|awk '{print $3}')
/usr/bin/qemu-img check $kvmurl >/dev/null 2>&1
if [ $? = "0" ]; then
echo -e " $kvmurl is a valid image.\n Continuing to use this image"
Expand Down
Loading