Load loop kernel module [Closes: issue1097]
authorChristian Hofstaedtler <ch@grml.org>
Thu, 22 Dec 2011 00:41:50 +0000 (01:41 +0100)
committerChristian Hofstaedtler <ch@grml.org>
Thu, 22 Dec 2011 00:41:50 +0000 (01:41 +0100)
grml2usb

index 1f08aea..24207b6 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1624,6 +1624,11 @@ def check_programs():
         logging.critical("Fatal: rsync not available, can not continue - sorry.")
         sys.exit(1)
 
+def load_loop():
+    """Runs modprobe loop and throws away it's output"""
+    proc = subprocess.Popen(["modprobe", "loop"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+    proc.wait()
+
 def main():
     """Main function [make pylint happy :)]"""
 
@@ -1642,6 +1647,8 @@ def main():
 
     check_options(options)
 
+    load_loop()
+
     logging.info("Executing grml2usb version %s", PROG_VERSION)
 
     if options.dryrun: