From: Michael Prokop Date: Fri, 22 Jun 2012 20:56:39 +0000 (+0200) Subject: grml-reboot: use virt-what instead of imvirt for detection of VMs X-Git-Tag: v1.4.0~3 X-Git-Url: http://git.grml.org/?p=grml-etc.git;a=commitdiff_plain;h=8d69288129b4b05a25716d13a711404fdba88397 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 --- 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