From 0324e567ad60d66358075bf866299abeae5241b3 Mon Sep 17 00:00:00 2001
From: Tianon Gravi <admwiggin@gmail.com>
Date: Wed, 23 Oct 2013 15:48:02 -0600
Subject: [PATCH] Fix install.sh with $sh_c to get sudo/su for modprobe

---
 hack/install.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hack/install.sh b/hack/install.sh
index 179a643946..34d5b7fbde 100755
--- a/hack/install.sh
+++ b/hack/install.sh
@@ -84,13 +84,13 @@ case "$lsb_dist" in
 		}
 		
 		# TODO remove this section once device-mapper lands
-		if ! grep -q aufs /proc/filesystems && ! modprobe aufs; then
+		if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then
 			kern_extras="linux-image-extra-$(uname -r)"
 			
 			apt_get_update
 			( set -x; $sh_c 'sleep 3; apt-get install -y -q '"$kern_extras" ) || true
 			
-			if ! grep -q aufs /proc/filesystems && ! modprobe aufs; then
+			if ! grep -q aufs /proc/filesystems && ! $sh_c 'modprobe aufs'; then
 				echo >&2 'Warning: tried to install '"$kern_extras"' (for AUFS)'
 				echo >&2 ' but we still have no AUFS.  Docker may not work. Proceeding anyways!'
 				( set -x; sleep 10 )