repair |
OSRCommon.ycp |
Common functions and variables, used by other OSR modules | |
This module has an unstable interface. |
Variables and functions in these module were moved from other OSR* modules to break their cyclic dependencies.
Functions that could be used as a default in lookups for functin pointers
- Return value:
-
false
- Return value:
-
`error
- Return value:
-
""
- Return value:
-
$[]
- Return value:
-
[]
The name of the current direct repair method.
The name of the repair and rescue tool.
The name of the current module during detection. e.g.: osr_module_partition
["init", "mbr_check", "swap_check", "fs_check", "fstab_check"]
The current detection map during detection.
$[ "fs_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check filesystem" ], "fstab_check" : $[ "help" : "Mounting a filesystem is not possible", "text" : "Check fstab entries" ], "init" : $[ "help" : "", "mode" : "forall", "text" : "Init repair system" ], "mbr_check" : $[ "help" : "If you have installed a other os after inst. Linux", "text" : "Check master boot record" ], ........ ]
The global_provides map contains entries created during the system scan. The different detection methods access to the global_provides map to get informations from former detection methods. $["fs_module_loaded":true, "has_floppy":true, "just_mounted":[$["mountpoint":"/mnt", "partition":"/dev/hda3"]], "linux_partition_list":["/dev/hda1", "/dev/hda3", "/dev/hda6"], "mount_possible_list":["/dev/hda1", "/dev/hda3", "/dev/hda6"], "mounted_partitions":[$["file":"/mnt", "freq":0, "mntops":"rw", "passno":0, "spec":"/dev/hda3", "vfstype":"reiserfs"],..,], "repair_target":"", "root_mounted":true, "root_mountpoint":"/mnt", "root_partition":"/dev/hda3", "root_partition_type":"reiserfs", "swap_partition_list":["/dev/hda2", "/dev/hda5"], "swapable_partitions":["/dev/hda2", "/dev/hda5"], "valid_fstab":true, "valid_root_partitions":["/dev/hda3"], "valid_swap_partitions":["/dev/hda2", "/dev/hda5"], "valid_target":true, "valid_target_list":["/dev/hda"]]
Stores the given list with the specified name into the global_provides map in the osr_map.
API function,
- Parameters:
-
name value
- Return value:
-
True.
Stores the given map with the specified name into the global_provides map in the osr_map.
API function,
- Parameters:
-
name value
- Return value:
-
True.
Stores the given string with the specified name into the global_provides map in the osr_map.
API function,
- Parameters:
-
name value
- Return value:
-
True.
Stores the given path with the specified name into the global_provides map in the osr_map.
API function,
- Parameters:
-
name value
- Return value:
-
True.
Stores the given boolean value with the specified name into the global_provides map in the osr_map.
API function,
- Parameters:
-
name value
- Return value:
-
True.
Returns the required string from the global_provides map in the osr_map.
API function,
- Parameters:
-
name
- Return value:
-
value The required string, "" as default.
Returns the required list from the global_provides map in the osr_map.
API function,
- Parameters:
-
name
- Return value:
-
The required list, [] as default.
Returns the required map from the global_provides map in the osr_map.
API function,
- Parameters:
-
name
- Return value:
-
The required map, $[] as default.
Returns the required path from the global_provides map in the osr_map.
API function,
- Parameters:
-
name
- Return value:
-
value The required path, . as default.
Returns the required boolean value from the global_provides map in the osr_map.
API function,
- Parameters:
-
name
- Return value:
-
value The required boolean value, false as default.
Reset variables moved from OSR.ycp
Set the new value of global_provides map
- Parameters:
-
new
Set the new value of global_provides map
Get group data.
- Parameters:
-
key
Checks if the first specified list (of strings) is a subset of the second one. The sequence of entries in the lists is nonrelevant.
For internal use only. See the testsuite.
- Parameters:
-
l1 l2
- Return value:
-
True if all elements of l1 are contained in l2 or if l1 is empty.
- Example
-
OSRIsSubSet([], ["a", "b"]) -> true; OSRIsSubSet(["a"], ["a", "b"]) -> true; OSRIsSubSet(["c"], ["a", "b"]) -> false; OSRIsSubSet(["a", "b", "c"], ["a", "b"]) -> false;