From b3d13b21e1ef6d58a94af9d67cb66a3fde8a3c7d Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Fri, 9 Jan 2009 16:50:21 +0100
Subject: Adding sample hook to add custom /etc/modules entries.

---
 examples/hooks/modules.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100755 examples/hooks/modules.sh

diff --git a/examples/hooks/modules.sh b/examples/hooks/modules.sh
new file mode 100755
index 0000000..159e9bc
--- /dev/null
+++ b/examples/hooks/modules.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# This is a hook for live-helper(7) to add entries to /etc/modules.
+# To enable it, copy or symlink this hook into your config/chroot_local-hooks
+# directory.
+
+MODULES=""
+
+for MODULE in ${MODULES}
+do
+	if ! grep -qs /etc/modules ${MODULE}
+	then
+		echo ${MODULE} >> /etc/modules
+	fi
+done
-- 
cgit v1.0