-
Notifications
You must be signed in to change notification settings - Fork 78
Description
heres a very cheap attempt at getting some
extra info from virtme-ng-init when it is run
like a regular program.
kernel-info isnt very useful, but I saw it and used it.
version or build-info would be more useful, last time I groped the internet for it I got a bunch of non-working suggestions.
'''
[jimc@gandalf virtme-ng]$ ./virtme/guest/bin/virtme-ng-init
virtme-ng-init: must be run as PID 1
virtme-ng-init: kernel version: 6.13.6-200.fc41.x86_64 x86_64
[jimc@gandalf virtme-ng]$ git diff
diff --git a/virtme_ng_init/src/main.rs b/virtme_ng_init/src/main.rs
index 1ffdf62..947624f 100644
--- a/virtme_ng_init/src/main.rs
+++ b/virtme_ng_init/src/main.rs
@@ -195,6 +195,7 @@ const USER_SCRIPT: &str = "/run/tmp/.virtme-script";
fn check_init_pid() {
if id() != 1 {
log!("must be run as PID 1");
-
}
log!(" kernel version: {}", get_kernel_version(true)); exit(1);
}
[jimc@gandalf virtme-ng]$
'''