File: 04-vm-detection.diff

package info (click to toggle)
needrestart 3.6-4%2Bdeb12u3
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 936 kB
  • sloc: perl: 3,371; sh: 277; makefile: 82
file content (22 lines) | stat: -rw-r--r-- 767 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 27bf4678bb92f68dfadd04ab04e96cba6ea2c376 Mon Sep 17 00:00:00 2001
From: zxyrepf <53189615+zxyrepf@users.noreply.github.com>
Date: Sun, 24 Jul 2022 08:30:19 +0000
Subject: [PATCH] Fix VM detection regression introduced in f54d85c

---
 needrestart | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/needrestart b/needrestart
index 64509ba..bcec62b 100755
--- a/needrestart
+++ b/needrestart
@@ -51,7 +51,7 @@ my $is_tty = (-t *STDERR || -t *STDOUT || -t *STDIN);
 my $is_vm;
 my $is_container;
 
-if($is_systemd && -x q(/usr/bin/systemds-detect-virt)) {
+if($is_systemd && -x q(/usr/bin/systemd-detect-virt)) {
 	# check if we are inside of a vm
 	my $ret = system(qw(/usr/bin/systemd-detect-virt --vm --quiet));
 	unless($? == -1 || $? & 127) {