check for boot media

This commit is contained in:
Ilfat G 2022-11-20 19:17:46 +03:00
parent c2cc2f4ac1
commit 99fab71e3d
No known key found for this signature in database
GPG key ID: D5E884CA11E29755
2 changed files with 6 additions and 1 deletions

5
qemoo
View file

@ -52,6 +52,11 @@ do
shift
done
if ! [ -e "$IMG" ]; then
echo "No media to boot"
exit 1
fi
if ! [ -w "$IMG" ]; then
if [ $UID -ne 0 ] && [ "$0" == "/usr/bin/qemoo" ]; then
# TODO use `pkexec --keep-cwd` since polkit version 121 to keep initial working directory

View file

@ -1,7 +1,7 @@
Summary: Wrapper for qemu to easy run guest machines
Name: qemoo
Version: 0.6
Release: 1
Release: 2
License: GPLv2+
Group: System/Base
Url: https://abf.io/import/qemoo