From 8d69288129b4b05a25716d13a711404fdba88397 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 22 Jun 2012 22:56:39 +0200 Subject: [PATCH] grml-reboot: use virt-what instead of imvirt for detection of VMs As noted in the bugreport imvirt doesn't detect Virtualbox reliable enough, virt-what seems to work more reliable (and faster too) so let's give it a shot. Adjusted the dependency accordingly. Closes: issue1184 Thanks: Ulrich Dangel for bugreport and suggestion --- debian/control | 2 +- etc/init.d/grml-reboot | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index d39b19c..b77b7d0 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Architecture: all Replaces: automount-knoppix Suggests: grml-desktop, grml-docs, grml-x, policyrcd-script-zg2 Recommends: eterm, python, vim (>= 7.0) -Depends: ${misc:Depends}, grml-scripts (>= 0.9), grml-etc-core (>= 0.3), imvirt +Depends: ${misc:Depends}, grml-scripts (>= 0.9), grml-etc-core (>= 0.3), virt-what Description: ecetera files for the grml system This package includes /etc files for the Grml system. Whereas the grml-etc-core package is limited to some diff --git a/etc/init.d/grml-reboot b/etc/init.d/grml-reboot index c90fa8c..c88f71f 100755 --- a/etc/init.d/grml-reboot +++ b/etc/init.d/grml-reboot @@ -149,7 +149,8 @@ esac [ -r /etc/noprompt ] && NOPROMPT=true [ -r /etc/noeject ] && NOPROMPT=true && NOEJECT=true -if [ "$(/usr/bin/imvirt 2>/dev/null)" != "Physical" ] ; then +VIRT_WHAT=$(/usr/sbin/virt-what 2>/dev/null) +if [ -n "$VIRT_WHAT" ] ; then log_begin_msg "System seems to be a virtual machine, assuming noprompt as default." NOPROMPT=true log_end_msg 0 -- 2.1.4