#!/bin/sh script=/etc/init.d/vboxguest-service device=/dev/vboxguest if [ ! -c $device ]; then if $script --quiet status; then IN_HOTPLUG=1 $script --quiet stop fi else if ! $script --quiet status; then IN_HOTPLUG=1 $script --quiet start fi fi