[PATCH] more robust virtualbox hook
Hi
I had to change my package list for a short test but kept all my hooks
and includes in place. Building failed because the virtualbox hook
stumbled over the missing defaults file. The attached patch makes the
virtualbox hook more stable and prevents this kind of problem.
Regards
Ronny Standtke
--
Ronny Standtke Fachhochschule Nordwestschweiz
Dozent Medienpädagogik / ICT Pädagogische Hochschule
Telefon: +41 32 627 92 47 Obere Sternengasse 7
Mobil : +41 79 786 81 82 4502 Solothurn
diff --git a/examples/hooks/virtualbox-ose.sh b/examples/hooks/virtualbox-ose.sh
index bcf7289..4f25cef 100755
--- a/examples/hooks/virtualbox-ose.sh
+++ b/examples/hooks/virtualbox-ose.sh
@@ -5,4 +5,8 @@
# directory.
# Enabling loading of vboxdrv
-sed -i -e 's|^LOAD_VBOXDRV_MODULE=.*$|LOAD_VBOXDRV_MODULE=1|' /etc/default/virtualbox-ose
+VBOX_DEFAULTS=/etc/default/virtualbox-ose
+if [ -e ${VBOX_DEFAULTS} ]
+then
+ sed -i -e 's|^LOAD_VBOXDRV_MODULE=.*$|LOAD_VBOXDRV_MODULE=1|' ${VBOX_DEFAULTS}
+fi
Reply to: