scpm

Langue: en

Version: 51938 (openSuse - 09/10/07)

Section: 8 (Commandes administrateur)

NAME

SCPM - System Configuration Profile Management

SYNOPSIS

scpm [-q] [-v] [-f] [-s] command [command_options] [arguments]

DESCRIPTION

scpm enables your system to hold multiple configurations, e.g. different network settings. This is especially useful for notebook computers which may be periodically connected to different networks. For a more detailed description and a usage howto please have a look at the info documentation.

GLOBAL OPTIONS

-q Quiet mode. Only errors will be printed.

-v Verbose mode. Same as setting VERBOSE to yes in /etc/scpm.conf (which is the default).

-f Force action. Actuall only useful with the switch and enable commands. Prevents SCPM from asking questions, saves all pending changes.

-s Skip mode. Actually only useful with the switch command. Prevents SCPM from asking questions, drops all pending changes.

-d Log debug messages.

-b Boot mode. This modifies the way a profile switch is performed by skipping the start/stop resource actions and switch scripts. This is usually run from /etc/init.d/boot.scpm on system start up.

-w Exit on warning. This lets SCPM terminate on warnings, not only on errors. NOTE: May leed to unwanted results. Use this only if you know what you are doing.

-x Force loading of database even if version numbers do not match. You should not need that.

COMMANDS

active

Prints the active profile to stdout.

add {profile}

Creates a new profile named profile. The actual configuration of your system is taken for the new profile.

copy {source_profile} {destination_profile}

Creates a copy of the profile source_profile with the name destination_profile

delete {profile}

Delete the profile named profile. This is not undoable. You cannot delete the active profile.

disable

Completely disables the SCPM on your system. The existing profiles are not going to be deleted. This basically prevents SCPM from being run accidentally.

enable

In case you are running SCPM for the first time, this will set up SCPM on your system and the default profile will be created. If you have already enabled SCPM on your system, you will get an error message execpt you are using the '-f' option. In that case, the actual database gets dropped, the profile data gets removed, and SCPM will be freshly set up on your system. This command also enables a disabled SCPM system again. In that case the profile that was the active one at time of disabling gets marked as active again. In case you made changes to your system in the meantime this also means that you're in a modified profile.

list

Prints a list of all installed profiles.

modify

Not yet implemented.

reload

This reloads the current profile. Useful if you did local modification you want to drop or apply to the current profile. You can also use the

save

Similar to `reload', but only performs saving of modified resources. Nothing gets restored and no services get started or stopped, switch scripts will not be executed.

rename {profile} {new_profile}

Renames profile to newprofile.

set

The set command lets you add or remove a description to/from the active profile and gives you the possiblity to add scripts to a profile that are executed at certain times while a profile switch is performed. Please have a look at the info page for more details.

get

The get command is the counterpart of the set comand, that means you can query the stuff you have set with it.

switch [-r|-g] {profile}

This performs a switch form the actual profile to profile. If working in default mode, this may ask you if you want to save possible changes. You will get prompted for every modified resource that is under SCPM control. You can use the '-s' and '-f' options to prevent SCPM from asking questions and drop/save all changes. After that the data of the destination profile is restored and services are stopped/started accoring to the new profile's settings. The command options '-r' and '-g' stand for show single resources and show resource groups. Default is '-g' unless no resource groups are being used.

db {command}

With no command given, this enters the interactive database manipulation utility. This utility has an online help, so please have a look at it, at least until the lazy author of SCPM updated the manpage.

rebuild

Performs a database rebuild. It removes resources which are not handled anymore and adds resources that should be managed but not yet in the database. It's more a cleanup than a rebuild.

list_groups [-d|-n] [-a]

Prints installed resource groups. -d means with description (default), -n means without description, and -a means only active ones.

activate_group {group}

Activates the resource group group and adds all resources of this group to the database and all profiles.

deactivate_group {group}

Deactivates the resource group group and removes all resources of this group from the database and all profiles.

remove_group {group}

Removes the resource group group from your system. It has to be a user defined group.

reset_group {group}

Reset the resource group group to the default settings the group came with SCPM.

reset_all

Like reset_group but for all resource groups.

backup [-p profile] [-a] {list|add|remove|restore} [resource_type] [resource_name]

Runs a backup command. list lists all resources with backups, add adds current version of given resource as backup, remove removes the latest backup of given resource, restore restores latest backup of given resource. Those commands get usually done for the active profile, you can use option -p to specify an alternative one. -a means all profiles.

recover [-b]

In the case that scpm operation was aborted during execution, the recover command can be used to finish or roll back the aborted command. The latter one is done when option -b is given.

FILES

/var/lib/scpm/scdb/scdb.db

In this file all data regarding your profiles, resources etc is located. It should not be modified manually!

/var/lib/scpm/profiles

This directory is used to save the resource data for the different profiles.

/etc/scpm.conf

The SCPM configuration file. You can customize SCPM's behaviour here. The file is a standard KEY=VALUE config file, which may contain the following keys:

DBFILE

Specifies where the database should be read from and written to. Defaults to /var/lib/scpm/scdb/scdb.db.

LIBDIR

Specifies where the SCPM subsystem has been installed to. This defaults to /lib/scpm.

LOGFILE

Defines where SCPM should log to. This may be a normal file specification or syslog for logging via syslogd or empty for logging to stderr.

RESOURCE_SET

Using this variable you can define a resource set which SCPM should use. Up to SCPM 0.6 the whole system was searched for resources and from this information the SCDB was generated. A resource set defines what resources 'exist' and so you can reduce the database to that resources you really want to have under profile management. There is a predefined resource set called `typical' which defines only a small set of resources. You can adjust that by copying /lib/scpm/resource_sets/typical to /var/lib/scpm/resource_sets/ and modify that file afterwards. The resource set `typical' is also the default now for new installations. NOTE: resource sets have been superseeded by resource groups. They still work, but default is now resource group mode.

DEBUG

Settings this variable to yes enables debug log messages. This is the same as using the -d command line option.

VERBOSE

Settings this variable to yes makes SCPM's progress messages more verbose. This is the same as using the -v command line option.

FILE_EXCLUDE_PATTERN

When determining the resource list for the resource type file, files that match one of the pattern specified here will be excluded from the list. Defaults to /lib/scpm/resource_types/file/exclude. The patterns are normal shell patterns.

FILE_EXTRA_PATTERN

When determining the resource list for the resource type file, files that match one of the pattern specified here will be added to the list. Defaults to /lib/scpm/resource_types/file/extra. The patterns are normal shell patterns. The extra patterns are processed after the exclude patterns, so you can add files here, which are normally excluded by the built in list.

SERVICE_EXCLUDE_PATTERN

The same as FILE_EXCLUDE_PATTERN but for the service resource type.

SERVICE_EXTRA_PATTERN

The same as FILE_EXTRA_PATTERN but for the service resource type.

SWITCH_MODE

With this variable you can set the default behaviour for the switch command. Normally, SCPM asks you whether you want to save or drop modified resources. Using the -f and -s (force an skip) switches, you can prevent SCPM from asking questions. Setting the SWITCH_MODE variable to force and skip does basically the same (you can override with the command line options, of course). Leaving the variable empty or setting it to normal lets SCPM operate as usual.

BOOT_MODE

Specified the SCPM behaviour on boot time. In case you gave a parameter PROFILE=profile_to_boot_into on the LILO/Grub command line, SCPM will restore the profile data of the given profile before the services are started. If you set BOOT_MODE to force your actual configuration (that means, the configuration before you rebooted/shut down your machine) will get saved before the wanted profile gets restored. If you set it to skip changes get dropped. You can also set it to backup which will create a backup profile using the current configuration and then restores the wanted profile. Defaults to force.

NOTES ON UPDATING

Older SCPM releases did refuse to work after a system update. The idea behind this behaviour was that configuration data saved in your profiles did not get updated by the system update routines. This could have some unwanted effects. Beginning with SuSE Linux 9.2 system update with SCPM is supported now. On updating SCPM will add changes the system update did to your configuration files to all profiles. For all resources which are touched backups will be created, so if you find broken configuration files in some profiles, you may want to have a look at your backup. For more information about updating and the backup system see info pages.

NOTES

This manpage is far from being complete. For further information about command options please have a look at the texinfo documentation. © 2002-2004 SuSE Linux AG Nuernberga

SCPM is released under the terms of the GNU General Public License. That means you are allowed to modify and/or redistribute it under certain conditions. Refer to your most favourite copy of the GPL on your system.

AUTHOR

Joachim Gleißner <jg@suse.de>