diff --git a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create b/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create index 633fe78..000de7e 100755 --- a/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create +++ b/branches/ucs-3.0/ucs/base/univention-updater/python/univention-repository-create @@ -164,7 +164,10 @@ def mount( options ): if options.mount: print "Mounting %s ..." % options.mount_point, devnull = open( os.path.devnull, 'w' ) - ret = subprocess.call( [ 'mount', options.mount_point ], stdout = devnull, stderr = subprocess.STDOUT ) + if options.iso: + ret = subprocess.call(['mount', '-o', 'loop,ro', options.iso, options.mount_point], stdout=devnull, stderr=subprocess.STDOUT) + else: + ret = subprocess.call(['mount', '-o', 'ro', options.mount_point], stdout=devnull, stderr=subprocess.STDOUT) # if exit code is 0 or 32 (already mounted) devnull.close() if not ret or ret == 32: @@ -220,11 +223,13 @@ if __name__ == '__main__': parser.add_option( '-m', '--mount-point', action = 'store', dest = 'mount_point', default = '/cdrom', help = 'devices mount point for CD-ROM drive' ) + parser.add_option('-i', '--iso', action='store', dest='iso', + default=None, help='define filename of an ISO image') ( options, arguments ) = parser.parse_args() if options.silent: - sys.stdout = open( '/dev/null', 'w' ) + sys.stdout = open(os.path.devnull, 'w') try: lock = univention.updater.tools.updater_lock_acquire()