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

virtme-ng: Set a default for --name #34

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions virtme/guest/virtme-init
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ fi
touch /tmp/fstab
mount --bind /tmp/fstab /etc/fstab

if [[ -n "$virtme_hostname" ]]; then
cp /etc/hosts /tmp/hosts
printf '\n127.0.0.1 %s\n::1 %s\n' "$virtme_hostname" "$virtme_hostname" >> /tmp/hosts
mount --bind /tmp/hosts /etc/hosts
fi

# Fix dpkg if we are on a Debian-based distro
if [ -d /var/lib/dpkg ]; then
lock_files=(/var/lib/dpkg/lock /var/lib/dpkg/lock-frontend /var/lib/dpkg/triggers/Lock)
Expand Down
5 changes: 4 additions & 1 deletion virtme_ng/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ def make_parser():
parser.add_argument("--qemu", action="store", help="Use the specified QEMU binary")

parser.add_argument(
"--name", action="store", help="Set guest hostname and qemu -name flag"
"--name",
action="store",
default="virtme-ng",
help="Set guest hostname and qemu -name flag"
)

parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion virtme_ng_init
Submodule virtme_ng_init updated 3 files
+191 −235 src/main.rs
+10 −0 src/test.rs
+50 −38 src/utils.rs