mambo/core.py
def configure_image(self, disk_img, lock, mount_point):
        '''configure the image, copying the configurerepos.sh into it.'''
        try:
            # create mount point
            self.execute_cmd('sudo mkdir ' + mount_point)
            # mount images
            self.execute_cmd('sudo mount -o loop ' + disk_img + ' ' + mount_point)
            # copy file inside the images
            mtp = mount_point + "/home"
            cmd = var.DOWNLOAD_DIR + 'configurerepos.sh' + ' ' + mtp
            self.execute_cmd('sudo cp -rp ' + cmd)
            # umount
            self.execute_cmd('sudo umount ' + mount_point)
            # remove mount point
            self.execute_cmd('sudo rm -rf ' + mount_point)
            # create lock file that block continuing customization
            self.execute_cmd('touch ' + lock)
            print "done"
        except (KeyboardInterrupt, SystemExit, RuntimeError, OSError, IOError):
            print "\n   ERROR: could not configure the " + disk_img
            print "   exiting now!"
            sys.exit(1)
configure the image, copying the configurerepos.sh into it.
configure the image, copying the configurerepos.sh into it.
configure the image copying the configurerepos . sh into it .
def configure_image(self, disk_img, lock, mount_point):
        try:
            self.execute_cmd('sudo mkdir ' + mount_point)
            self.execute_cmd('sudo mount -o loop ' + disk_img + ' ' + mount_point)
            mtp = mount_point + "/home"
            cmd = var.DOWNLOAD_DIR + 'configurerepos.sh' + ' ' + mtp
            self.execute_cmd('sudo cp -rp ' + cmd)
            self.execute_cmd('sudo umount ' + mount_point)
            self.execute_cmd('sudo rm -rf ' + mount_point)
            self.execute_cmd('touch ' + lock)
            print "done"
        except (KeyboardInterrupt, SystemExit, RuntimeError, OSError, IOError):
            print "\n   ERROR: could not configure the " + disk_img
            print "   exiting now!"
            sys.exit(1)
def configure_image ( self , disk_img , lock , mount_point ) : try : self . execute_cmd ( 'sudo mkdir ' + mount_point ) self . execute_cmd ( 'sudo mount -o loop ' + disk_img + ' ' + mount_point ) mtp = mount_point + "/home" cmd = var . DOWNLOAD_DIR + 'configurerepos.sh' + ' ' + mtp self . execute_cmd ( 'sudo cp -rp ' + cmd ) self . execute_cmd ( 'sudo umount ' + mount_point ) self . execute_cmd ( 'sudo rm -rf ' + mount_point ) self . execute_cmd ( 'touch ' + lock ) print "done" except ( KeyboardInterrupt , SystemExit , RuntimeError , OSError , IOError ) : print "\n   ERROR: could not configure the " + disk_img print "   exiting now!" sys . exit ( 1 )
configure the image, copying the configurerepos.sh into it.
configure the image copying the configurerepos . sh into it .
'''configure the image, copying the configurerepos.sh into it.''' # create mount point # mount images # copy file inside the images # umount # remove mount point # create lock file that block continuing customization
self
disk_img
lock
mount_point