scpm(8)

NAME

SCPM - System Configuration Profile Management

SYNOPSIS

scpm  [-q] [-v] [-f] [-s] command [command_options] [argu
ments]

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 documen
tation.

NEW IN THIS RELEASE

SCPM 0.9 is the latest release of SCPM, and so it has some
new features and surely a lot of new bugs. At least the
features are nameable:
new concept: Resoure Groups
Resource Groups are the successors of Resource Sets. The
intention is to logically group resources together so the
user does not have to care about which services need which
configuration files. See info documentation for details.
support for non root users
Normal users can now perform switching. This is especially
useful for users who do not administrate their machines
themselves. See info documentation.
extended switch script support
The prior SCPM version had already support for running
user scripts at certain points of the script process, but
those scripts had no access to SCPM data and no possibil
ity to influence the further switch process. Now there is
a script environment wich provides some data. Please have
a look in the info documentation for further information.
locking
This is something SCPM should have had earlier. Locking
prevents you from running multiple SCPM processes concur
rently. This should help to hold your data consistent. In
fact, the main intention for this is to have a mechanism
to prevent SCPM from corrupt your system in case SCPM
crashed or aborted unexpectetly. In case this happens and
SCPM moans about a lock already exists but no SCPM pro
cesses are running anymore, just remove the lockfile
/var/lib/scpm/#LOCK and run `scpm -s reload' afterwards. Then you should have a sane system again.
update detection
SCPM does now save a system identifier string so it can
detect wether your system installation has changed (eg.
you made an update). In case it detects such a change, it
will refuse to work so it does not corrupt your system.
See also NOTES ON UPDATING for further information.
If you are interested in more detailed summary of changes,
please have a look at /usr/share/doc/pack
ages/scpm/CHANGES.

GLOBAL OPTIONS

-q Quiet mode. Only errors will be printed.

-v Verbose mode. This option does nothing at the moment.

-f Force action. Actually 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 and enable commands. 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.
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.

-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 configu ration 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 and the default profiles.
disable
This completely disables the SCPM on your system. The
existing profiles are not going to be deleted.
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 pro
file. 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.
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.
list_groups [-d|-n] [-a]
Prints installed resource groups. -d means with descrip
tion (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 pro
files.

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 writ
ten 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 manage
ment. 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 after
wards. 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 mes
sages more verbose. This is the same as using the -v com
mand 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 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 pro
file using the current configuration and then restores the
wanted profile. Defaults to force.

NOTES ON UPDATING SCPM

In case you have used older SCPM versions before, you may
want to use your existing profiles without reconfiguring
everything. This makes it neccessary that your database
gets properly updated to the current format and sometimes
it is also needed that flaws in the database and/or the
configuration data storage get fixed. SCPM beginng with
version 0.8 comes with a SuSEconfig script which does this
all for you. In case you have updated SCPM using YaST2
you should have already an up-to-date subsystem. Otherwise
you can do that by calling `SuSEconfig --module scpm'.

For people who want to have more control over what's hap
pening, here comes a description for manually updating:

After updating, the database may be in an old format ver
sion. So first of all call

`scpm db convert'

This will rewrite the database in the new format. Then
call

`scpm db maximize'

This will add some resources which SCPM 0.6 did not found
(mainly files living in /etc/sysconfig). Finally call

`scpm db rebuild_deps'

This re-determines the dependencies for all resources.

In case you have decided to use a resource set (see sec
tion about FILES, subsection /etc/scpm.conf) you surely
want to run `scpm db clean' now. This removes all
`deleted' resources, which includes all resources, which
are not in the resource set.

NOTES ON UPDATING THE OS

In case you did an operation system update, SCPM will
detect this (at least, it should so) and refuse to work.
Background: the configuration data saved in your profiles
are not updated by the system update routines. That means,
switching to the profiles may have unwanted results. Until
now we did not reveal an resonable and generic way to
achive updating of the profile configuration data. So the
safe way is to set up SCPM on your system again, at least
for now.

NOTES

This manpage is far from being complete. For further
information about command options please have a look at
the texinfo documentation.

COPYRIGHT

© 2002,2003 SuSE Linux AG Nuernberg

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>
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout