def prepare_mount(self): mount_options = self.lvm_conf.get('mount_options') lv_path = self.get_lv_path() if lv_path: for src, target in current_mounts(): if target == self.root_path: if src != os.path.realpath(lv_path): self.force_umount_root() self.mount = mounts.FileSystemMountPoint(self.root_path, self.fs_type, lv_path, options=mount_options) # If there is a bind mount of the root into bootstrap buildroot, # replace it with mount of the actual filesystem. This is necessary to # prevent shared mount propagation from unmounting it later on for i, mount in enumerate(self.buildroot.mounts.managed_mounts): if mount.mountsource == self.root_path: newmount = mounts.FileSystemMountPoint(mount.mountpath, self.fs_type, lv_path, options=mount_options) self.buildroot.mounts.managed_mounts[i] = newmount
def prepare_mount(self): mount_options = self.lvm_conf.get('mount_options') lv_path = self.get_lv_path() if lv_path: for src, target in current_mounts(): if target == self.root_path: if src != os.path.realpath(lv_path): self.force_umount_root() self.mount = mounts.FileSystemMountPoint(self.root_path, self.fs_type, lv_path, options=mount_options)
def prepare_mount(self): mount_options = self.lvm_conf.get('mount_options') lv_path = self.get_lv_path() if lv_path: for src, target in current_mounts(): if target == self.root_path: if src != os.path.realpath(lv_path): self.force_umount_root() if self.buildroot.is_bootstrap: keep_mounted = False else: keep_mounted = not self.lvm_conf.get('umount_root') self.mount = mounts.FileSystemMountPoint(self.root_path, self.fs_type, lv_path, options=mount_options, keep_mounted=keep_mounted)