Configuration of profile-manager |
modules/ProfileManager.ycp |
Data for configuration of profile-manager, input and output funcs. | |
|
|
This module has an unstable interface. |
Is SCPM enabled?
Is SCPM re-initialization needed? (possibly after update)
Is SCPM recovery? (after something failed)
Was enabled/disabled status changed?
if resource groups were modified
if SCPM DB needs to be saved (-> SCPM object desctructor)
if SCPM configuration (stored in scpm_conf map) was modified
if list of users was modified
Is SCPM initialized? This is set to true after first enabling.
When scpm action fails, the error message is stored here by SetError()
this map holds the contents of scpm.conf configuration file
all resource groups available; filled by ReadResourceGroups()
list of resource groups marked for deletion
Map of users with permissions to run SCPM
If users are available to switch profiles
List of user names, read from system via Users module
path to scpm qt front-end
path to config file with users
The name of the file, where the progress state is beeing written. (The same name must use the scpm agent!)
how many lines of progress has been pruducted
how many times was progress bar used
Was anything modified?
This function is called when some scpm command failed. The error message is read and shown in Popup::Error.
This function is called when some scpm command failed. The error message is read and stored in global variable scpm_error.
Writes modified resource group.
- Parameters:
-
groupname resource group name resources list of resources belonging to this group descr group description
- Return value:
-
success
Gets resources of resource group.
- Parameters:
-
groupname resource group name
- Return value:
-
of resources
Reads all available resource groups.
- Return value:
-
true on success
get the map of default resource groups
Resets RG's to default values
- Return value:
-
success
Resets one resource group to default values
- Parameters:
-
groupname
- Return value:
-
success
Returns all available resource groups.
- Return value:
-
of groups
Read the set of users allowed to run SCPM
Write new set of users allowed to run scpm
Return the map of users able to run scpm
Check if users are able to switch profiles
- Return value:
-
the result
Write the new status if the users are allowed to run SCPM or not
- Return value:
-
success of the action
Upodate the global map of users
- Parameters:
-
current_users
Return list of user names available in system First time, read it using yast2-users, use cache for later calls.
- Return value:
-
of user names (for local users)
Store error messages generated by multiple commands to one string
- Parameters:
-
error
Save the resource groups edited in YaST UI
- Return value:
-
success
reads a contents of scpm config file (/etc/scpm.conf)
- Return value:
-
false when file doesn't exist
writes configuration data to scpm config file (/etc/scpm.conf)
- Return value:
-
true
Initialize the SCPM agent.
- Return value:
-
true on success
Checks if SCPM is enabled/disabled/initialized.
- Return value:
-
true on success
Calls SCPM::Recover (false) function, which replays journal after the crash (started in separate agen'ts thread, return value must be checked with Wait)
Calls SCPM::Recover (true)
Ask user which action should be taken when scom recovery is necessary
- Return value:
-
: `cancel, `recover, `rollback
Checks the return value of agent's thread
- Return value:
-
true if thread finished succesfully
Gets the hash marks (to show in ProgressPopup) from the hashfile
- Return value:
-
number of characters in hashfile
Reads the file with the progress informations.
- Parameters:
-
everything if set to true, returns the entire rest of file
- Return value:
-
the text to show in ProgressPopup (one line in normal case)
Popup for showing progress informations
- Parameters:
-
position of this progress: (if "first", popup is not closed, for "last" popup is not created) start start of progress (mainly 0) end end of progress (mainly 100)
- Return value:
-
true
Read all profile-manager settings
- Return value:
-
true on success
Enables or disables SCPM (depends on value of enabled variable).
- Return value:
-
true on success
Enables SCPM for the first time
general function for writing status (enable/disable)
Rebuilds SCPM database after changing resources.
- Return value:
-
true on success
function for writing modifications in resource groups
Write all profile-manager settings
- Return value:
-
true on success
Checks if the name of the new profile consists of valid characters: [a-zA-Z0-9_-.]
- Parameters:
-
name Name of the new profile.
- Return value:
-
true if valid