sysconfig

Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 02 April 2009
Index Return to Main Contents

 

NAME

sysconfig - configure a Unix/Linux system

 

SYNOPSIS

edrc/bin/sysconfig [ -h ]

sysconfig -s src_dir [ -r root_dir ] [ -b backup_dir ] [ -o OSID ] [ -f ]

sysconfig -p [ -r root_dir ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

With sysconfig you can configure a UNIX or Linux system with a single command using a set of prepared configuration files.

In addition to the prepared files, pre- and post exec scripts enable to run commands prior and after the application of the configuration files. Therefore the operating system configuration can be automated completely.

sysconfig should be used to configure the vanilla operating system as delivered by the vendor instead of including the configuration to the image as installed by Sun JumpStart, Hewlett-Packard Ignite, RedHat Kickstart, SuSE AutoYast etc. .

This has the advantage that the set of changed configurations is well known and it is more efficient to configure a future operating system version with the equal quality. Looking at the configuration repository it is easy to evaluate which files were adjusted to configure the operating system, without relying on configuration documentation. When including the configuration in the related image as mentioned above it is harder to see which files were changed and the possibility of not documenting the configuration changes is high. Furthermore it is more efficient to change the configuration in the sysconfig repository due to the fact that the repository has the same structure for all operating systems (HP-UX, Solaris, Linux, ...) and the user does not need to know the different image formats / install methods provided by the operating system vendor.

 

FEATURES

-
Currently supported operating systems: Solaris, HP-UX, Linux
-
Pre- and post exec support
-
Backup of all removed/changed files
-
Protection of files that change after initial system configuration
-
Simple repository structure, identical to the target operating system directory structure
-
Repository structure is identical for all supported operating systems
-
Possibility of applying multiple configurations to a system
-
Tools to maintain the configuration repository: sysvi(1), syscp(1), sysdiff(1)
-
Tools to use in pre- and post exec scripts: apply2file(1), is_config_byhand(3)

 

CONFIGURATION STEPS

The following steps are performed during a system configuration. Some of them are optional.

1)
execute the check script if it exists. This script is used to ensure that a certain configuration is only applied to a system if the criteria implemented in the check script are met. If this script returns 0 or if this script does not exist it is allowed to configure the system and the following steps are executed.

2)
write all settings to the sysconfig-settings file. This file will later be read if you invoke sysconfig -p and svi and is therefore used to identify which configuration(s) has been applied to a system.

3)
execute the pre_exec script if it exists.

4)
backup files listed in the backup file.

5)
remove files:

a)
collect information about files protected by config_byhand settings applied to the system.

b)
backup files listed in the remove file and not listed in any applied config_byhand file.

c)
remove files listed in the remove file and not listed in any applied config_byhand file.

6)
install files from the source root dir:

a)
check which files has to be installed (only files which differ from the system or have different permissions or ownership and are not listed in any applied config_byhand file will be installed)

b)
backup files which will be overwritten in the install process in step 6c).

c)
install files evaluated in step 6a).

7)
execute the post_exec script if it exists.

8)
write config_byhand to <root_dir>/.EDRC.config_byhand<.name> if it exists and it is not protected by an already applied config_byhand file.
If the CONFIG_BYHAND setting in the sysconfig.cfg file is set to MERGE the new entries and the already existing entries in the applied config_byhand file are merged and written to the <root_dir>/.EDRC.config_byhand<.name> file, else the applied settings are replaced with the new entries.

9)
compress .cpio file that contains the backuped files to a .cpio.gz file.

 

OPTIONS

-h
usage message.

-s source_directory
path to the directory which contains the filestructure used by sysconfig to configure the system.

-p
print the current active configuration(s) of a system. It is possible that a system has multiple configurations active for certain directories. This is especially the case if you use named configurations or if you configure diskless clients on a server.

-r root_dir
root directory where you apply or query the configuration. You can apply all configurations to any target root directory only if you write proper pre_exec and post_exec scripts and if you list only relative path names within the backup and remove files explained in section SYSCONFIG-DATASTRUCTURE. The default for root_dir is /.

-b backup_dir
directory where to save files backed up from the system ahead of overwriting. The default can be changed in sysconfig.cfg, see sysconfig.cfg(4) for more information.

-f
force configuration. If you specify this option all config_byhand settings are ignored.

-o OSID
in normal cases you don't have to set the operating system id ( OSID ) due to the fact that it will be resolved by sysconfig using the osid command internally. But for testing purposes or if you have to configure diskless clients with different operating system ids than the server, it might be required to set a specific OSID. See osid(3) for more information.

 

SYSCONFIG-DATASTRUCTURE

This directory- and filestructure is needed by sysconfig. Some files are optional.

<source_directory>
this directory contains the configuration directory structure and all definitions needed by sysconfig. This directory has to be specified in the -s src_dir option of sysconfig.

Optional: NO

Example: development.acme.com

Default: -

<source_directory>/<OSID>
operating system ID evaluated by osid or set with the -o option. If you have to configure different operating systems within an environment you have simply to create an additional OSID directory in the same source_directory. See osid(3) for more information.

Optional: NO

Example: HP-11

Default: -

<source_directory>/<OSID>/README
free-text description and notes to the configuration. This file is to document specialties of the configuration and is not computed by sysconfig.

Optional: YES

Example:

        #
        # README - Free text explanations/notes to the configuration
        #
        # [00] 02.05.2008 CWa   Initial Version
        #


Default: -

<source_directory>/<OSID>/check
execute the check script if it exists. This script is used to ensure that a certain configuration is only applied to a system if the criteria implemented in the check script are met. If this script returns 0 it is allowed to configure the system and the following steps are executed. See also the description of the tool directory var/sysconfig/tools/ to see how to save time and effort in writing check scripts.

Optional: YES

Example:

        #!/bin/sh
        #
        # check - check if configuration is allowed 
        #
        # [00] 08.02.2003 CWa   Initial Version
        #
        #
        test "$DEBUG" = True && set -x

        Targethost=acme054

        if [ "`hostname`" = "$Targethost" ]; then
                        exit 0
        else
                        echo "apply this config on $Targethost only!"
                        exit 1
        fi

Default: allow configuration (exitcode=0)

<source_directory>/<OSID>/description
this file contains a single line with a description of the configuration. This description is displayed if you invoke sysconfig -p on a configured system.

Optional: YES

Example: ACME Development Department Configuration

Default: no description defined

<source_directory>/<OSID>/name
name of a configuration. This gives you the possibility to apply multiple configurations to the same root_dir. This is useful if you have to configure cluster packages (e.g. MC/ServiceGuard) which share the root_dir with the operating system configuration. Normally you will not name the operating system configuration, but you will name special configurations (such as cluster packages).

Optional: YES

Example: BO

Default: -

<source_directory>/<OSID>/pre_exec
execute pre configuration tasks which cannot be handled with the other mechanisms. A common task in a pre exec script could be: stopping daemon which should not run during configuration. See also in section ENVIRONMENT for additional important hints for writing post and pre exec scripts. If you modify files on the system you should use is_config_byhand to ensure not to overwrite a protected file. See also the description of the tool directory var/sysconfig/tools/ to see how to save time and effort in writing pre- and post exec scripts.

Optional: YES

Example:

        #!/bin/sh
        #
        # pre_exec - pre exec script 
        #
        # [00] 04.04.2003 CWa   Initial Version
        #
        #

        test "$DEBUG" = True && set -x

        touch $SYSCONFIG_ROOTDIR/exAppl/connect.lck
        /sbin/init.d/nfs.client stop

Default: -

<source_directory>/<OSID>/backup
a list of files to be backuped in step 4). Do not use absolute pathnames, use only relative ones. This ensures that your configuration can be applied to any root_dir which is important if you plan to configure diskless clients on a server or simply for testing your configuration. Lines starting with a # or empty lines are considered as comments.

Optional: YES

Example:

        #
        #  backup - list of files to be backuped
        #
        # [00] 08.02.2003 CWa   Initial Version
        #
        etc/passwd

Default: no extra file backup

<source_directory>/<OSID>/config_byhand
a list of files to be protected from overwriting and removal after the initial run of sysconfig.

Do not use absolute pathnames, use only relative ones. This ensures that your configuration can be applied to any root_dir which is important if you plan to configure diskless clients on a server or simply for testing your configuration. Lines starting with a # or empty lines are considered as comments.

This file is copied to <root_dir>/.EDRC.config_byhand<.name>. If you change a file on the system and you think it might be handled by sysconfig you should add the filename to .EDRC.config_byhand<.name> to protect it from overwriting. This is also true for the .EDRC.config_byhand<.name> itself.

To dynamically merge the settings defined in an applied <root_dir>/.EDRC.config_byhand<.name> file and the settings of a config_byhand file in a sysconfig repository to be applied, set the CONFIG_BYHAND setting in the sysconfig.cfg configuration file to MERGE. In this case it has to be ensured that the .EDRC.config_byhand<.name> is not listed in the .EDRC.config_byhand<.name> or the config_byhand file, because this would protect the file from further change.

post_exec and pre_exec scripts should use is_config_byhand if they modify files to ensure it is not protected by a config_byhand setting.

Optional: YES

Example:

        #
        #  config_byhand - list of config by hand files
        #
        # [00] 26.10.2003 CWa   Initial Version
        #
        etc/passwd
        etc/dfs/dfstab
        var/spool/cron/crontabs/root

Default: no files to be configured by hand

<source_directory>/<OSID>/remove
a list of files to be removed in step 5). Do not use absolute pathnames, use only relative ones. This ensures that your configuration can be applied to any root_dir which is important if you plan to configure diskless clients on a server or simply for testing your configuration. Lines starting with a # or empty lines are considered as comments.

Optional: YES

Example:

        #
        #  remove - list of files to be removed
        #
        # [00] 08.02.2003 CWa   Initial Version
        #
        etc/opt/app/lock.lk

Default: no extra file backup

<source_directory>/<OSID>/root/
in this directory the system configuration files resist. All files in this directory are copied to the system during the configuration if the file differs from the file already present on the target system. Symlinks are copied always.

Optional: NO

<source_directory>/<OSID>/post_exec
execute post configuration tasks which cannot be handled with the other mechanisms. A common task in a post exec script could be: setting of the default router entry or starting daemon which should not run during configuration. See also in section ENVIRONMENT for additional important hints for writing post and pre exec scripts. If you modify files on the system you should use is_config_byhand to ensure not to overwrite a protected file. See also the description of the tool directory var/sysconfig/tools/ to see how to save time and effort in writing post- and pre exec scripts.

Optional: YES

Example:

        #!/bin/sh
        #
        # post_exec - post exec script 
        #
        # [00] 04.04.2003 CWa   Initial Version
        #
        #
        test "$DEBUG" = True && set -x

        rm $SYSCONFIG_ROOTDIR/exAppl/connect.lck
        /sbin/init.d/nfs.client start

Default: -

 

ENVIRONMENT

The following environment variables are exported to the pre_exec and post_exec scripts. It is highly recommended to use those variables. Otherwise you cannot use all features of sysconfig.

$SYSCONFIG_ROOTDIR
this variable equals to the value specified in the -r option. Your pre_exec, post_exec and check scripts will only work for every target directory if you use this variable wherever you access a file on the system.

$SYSCONFIG_FORCE
this variable is set to 'True' if sysconfig is called with the -f option. If you use is_config_byhand it will return 'False' for each file in this case.

 

EXIT STATUS

0
no error.

1
you started edrc using the wrong operating system user.

2
operating system is not supported. See osid(3) if you get this error.

4
usage listed.

6
the configuration file does not exist.

 

FILES

etc/sysconfig.cfg
configuration file of edrc, see sysconfig.cfg(4) for more information.

var/log/sysconfig.log
logfile of sysconfig.

var/sysconfig/tools/<OSID>
additional tools (scripts) that can be called in the check, pre_exec and post_exec scripts. If a configuration supports multiple operating systems, what is normally the case in heterogeneous environments, you can place operating system dependent scripts in the related directory. If you like to set the default router entry on your Linux, HP-UX and Solaris systems (this is very different on those systems) in the post_exec script you can create a script called for instance 'set_default_router' for each operating system and place it into the related directory. This enables you to save effort in writing the post_exec script for all the operating systems you like to configure and simplifies those scripts because you don't have to include the whole code into multiple post exec scripts. If multiple operating systems can be handled identical, a script can be placed into the var/sysconfig/tools/default folder and there is no need to have to place identical copies into more then one <OSID> directory. The search order is to first look for the tool script in the operating system related directory ( <OSID> ) and then in the default directory. You should (of course) synchronize the tool directory contents over all your WA2L/edrc installations to fully benefit from this feature. See filedist(1) for instructions how to distribute files easily.
See also: sysconfig.tools(3).

var/sysconfig/tools/default
see description of directory var/sysconfig/tools/<OSID>.
See also: sysconfig.tools(3).

var/sysconfig/development.acme.com
example and template SYSCONFIG-DATASTRUCTURE tree. This tree can be used as a template and copied to your specific configuration.

<source_directory>
this directory contains the configuration definitions. See section SYSCONFIG-DATASTRUCTURE for an explanation of every file within this directory.

<source_directory>/sysconfig.cfg
configuration file of edrc, see sysconfig.cfg(4) for more information. This file overrides settings made in etc/sysconfig.cfg.

<root_dir>/.EDRC.sysconfig <root_dir>/.EDRC.sysconfig.<name>
settings file which contains information about current active configuration. This file is read by sysconfig -p and svi.

<root_dir>/.EDRC.config_byhand <root_dir>/.EDRC.config_byhand.<name>
a list of files to be protected from overwriting after the initial run of sysconfig.

<root_dir>/.config_byhand
a list of files to be protected from overwriting after the initial run of rmtconfig a system configuration tool provided by the SFI-Director. New entries should not be entered into this file, it is only considered to protect systems configured with rmtconfig from miss-configuration.

 

EXAMPLES

0) naming of the system configuration sources

There is no restriction of the naming of the configuration sources ( CONFIGURATION ).

However, it proofed to make sense to use a naming scheme as known from the Domain Name Service (DNS) due to the fact that it is well known and the hierarchical structure that is expandable and allows to start with a very simple configuration setup and enables to specify also very specialized configurations with clear naming.

Configuration naming convention following the DNS example:
CONFIGURATIONNAMEExplanation

acme.chbaseThe base configuration defines
the system behaviour for the
whole ACME enterprise. This
configuration holds all files
that are common in all Unix
environments in the ACME cor-
poration. All environment de-
pendent configurations are
done applying the related con-
figuration on top of this one.

test.acme.chThis configuration holds only
the files that are special to
the TEST environment.

For a complete system confi-
guration, first the 'acme.ch'
configuration and then the
'test.acme.ch' configuration
has to be applied.

production.acme.chThis configuration holds only
the files that are special to
the PRODUCTION environment.


 preproduction.acme.ch
This configuration holds only
the files that are special to
the PREPRODUCTION environment.

See also the following examples.

1) apply a system configuration to a vanilla system

This is an output example of the use of sysconfig on a vanilla HP-UX (OSID = HP-11) system. This configuration has no pre_exec script, but has a post_exec script. At this stage no config_byhand information is available. See also next example, where the configuration is re-applied.

If the hostname is not set, set it prior to applying the configuration using the hostname(1) command:

[ /root ]
[ root@unknown ][-sh]: hostname acme001

Apply the configuration:

[ /root ]
[ root@acme001 ][-sh]: ~edrc/bin/sysconfig \
    -s /opt/edrc/scripts/ACME-sat/sysconfig/acme.ch

sysconfig - configure a Unix/Linux system, by Chr. Walther

DATE:          Mon Jun  4 16:00:05 METDST 2007 
HOSTNAME:      acme001
CONFIGURATION: acme.ch/HP-11
ROOTDIR:       /
BACKUPFILE:    2007-06-04_16.00.05__sysconfig.cpio.gz 
FORCE:         False

configure system acme001 ...
    execute check script ...
        allow configuration (exitcode=0)
    done.
    write settings ...
        /.EDRC.sysconfig.base written
    done.
    execute pre exec script ...
    done.
    backup files in / ...
        evaluate files to backup ...
            etc/issue
        done.
        backup current files ...
            etc/issue
            1 block
        done.
    done.
    remove files in / ...
        collect config_byhand settings ...
            <no files>
        done.
        evaluate files to remove ...
            <no files>
        done.
        backup current files ...
            <no files to backup>
        done.
        remove files ...
            <no files to remove>
        done.
    done.
    install files and directories in / ...
        collect config_byhand settings ...
            <no files>
        done.
        evaluate files to install ...
            .secure
            .secure/etc
            anw
            apl
            dat
            etc
            etc/auto_apl
            etc/auto_direct
            etc/auto_home
            :
            :
            etc/default
            etc/default/security
            etc/default/tz
            :
            :
            etc/group.description
            etc/hosts
            etc/hosts.equiv
            etc/inetd.conf
            etc/issue
            etc/lvmpvg
            etc/mail
            etc/mail/aliases
            etc/mail/mailcap
            etc/mail/sendmail.cf
            etc/mail/sendmail.cw
            etc/mail/service.switch
            etc/motd
            etc/netgroup
            etc/nsswitch.conf
            etc/ntp.conf
            etc/opt
            :
            :
            etc/rc.config.d
            etc/rc.config.d/auditing
            etc/rc.config.d/cmcluster
            etc/rc.config.d/nddconf
            etc/rc.config.d/netconf
            etc/rc.config.d/netdaemons
            etc/rc.config.d/nfsconf
            etc/rc.config.d/samba
            etc/rc.config.d/xntpd
            etc/resolv.conf
            etc/securetty
            etc/services
            :
            :
            opt/iexpress/sudo
            opt/iexpress/sudo/etc
            opt/iexpress/sudo/etc/sudoers
            opt/iexpress/sudo/etc/sudoers.main
            opt/iexpress/sudo/etc/sudoers.user
            opt/patrol
            opt/ssh
            opt/ssh/etc
            opt/ssh/etc/ssh_config
            opt/ssh/etc/sshd_config
            root
            root/.bashrc
            root/.cshrc
            :
            :
            var/spool
            var/spool/cron
            var/spool/cron/crontabs
            var/spool/cron/crontabs/root
        done.
        backup current files ...
            etc/auto_master
            etc/default/tz
            etc/group
            etc/hosts
            etc/inetd.conf
            etc/issue
            :
            :
            opt/ssh/etc/sshd_config
            var/adm/cron/at.allow
            var/adm/cron/cron.allow
            var/opt/perf/parm
            var/spool/cron/crontabs/root
            373 blocks
        done.
        install new files ...
            /.secure
            /.secure/etc
            /anw
            /apl
            /dat
            /etc
            /etc/auto_apl
            /etc/auto_direct
            :
            :
            /var/opt/perf
            /var/opt/perf/parm
            /var/spool
            /var/spool/cron
            /var/spool/cron/crontabs
            /var/spool/cron/crontabs/root
            8367 blocks
        done.
    done.
    execute post exec script ...
        apply2file - install a data stream as file, by Chr. Walther

        process file '//etc/issue' ...
            data written to file
            permissions of original file preserved
        done.
        post_exec-INFO: remove '//net' directory
        apply2file - install a data stream as file, by Chr. Walther

        process file '//etc/rc.config.d/netconf' ...
            data written to file
            permissions of original file preserved
        done.
        apply2file - install a data stream as file, by Chr. Walther

        process file '//.secure/etc/audnames' ...
            data written to file
            permissions set to (root:sys 600)
        done.
    done.
    write config_byhand ...
        /.EDRC.config_byhand.base written
    done.
done.

2) re-apply a system configuration to a system already configured with sysconfig

This is the re-applying of the same configuration as applied in the example 1) above. See the now expanded list of files protected by config_byhand. In this example all files residing on the system are still identical with the files in the repository, therefore it was not needed to re-apply any file to the system.

[ /root ]
[ root@acme001 ][-sh]: ~edrc/bin/sysconfig \
    -s /opt/edrc/scripts/ACME-sat/sysconfig/acme.ch

sysconfig - configure a Unix/Linux system, by Chr. Walther

DATE:          Mon Jun  4 16:13:27 METDST 2007 
HOSTNAME:      acme001
CONFIGURATION: acme.ch/HP-11
ROOTDIR:       /
BACKUPFILE:    2007-06-04_16.13.27__sysconfig.cpio.gz
FORCE:         False

configure system acme001 ...
    execute check script ...
        allow configuration (exitcode=0)
    done.
    write settings ...
        /.EDRC.sysconfig.base written
    done.
    execute pre exec script ...
    done.
    backup files in / ...
        evaluate files to backup ...
            etc/issue
        done.
        backup current files ...
            etc/issue
            1 block
        done.
    done.
    remove files in / ...
        collect config_byhand settings ...
            .EDRC.config_byhand.base
            .secure/etc/audnames
            etc/auto_dat
            etc/auto_master
            etc/ftpd/ftpusers
            etc/group
            etc/group.description
            :
            :
            etc/passwd.ownermap
            etc/rc.config.d/cmcluster
            etc/rc.config.d/netconf
            etc/su.allow
            opt/ACME/data/input/UsersToCheck
            root/.mycshrc
            root/.mykshrc
            root/.mylogin
            root/.myprofile
            tcb/files/auth/system/default
            var/spool/cron/crontabs/root
        done.
        evaluate files to remove ...
            <no files>
        done.
        backup current files ...
            <no files to backup>
        done.
        remove files ...
            <no files to remove>
        done.
    done.
    install files and directories in / ...
        collect config_byhand settings ...
            .EDRC.config_byhand.base
            .secure/etc/audnames
            etc/auto_dat
            etc/auto_master
            etc/ftpd/ftpusers
            etc/group
            etc/group.description
            :
            :
            etc/passwd.ownermap
            etc/rc.config.d/cmcluster
            etc/rc.config.d/netconf
            etc/su.allow
            opt/ACME/data/input/UsersToCheck
            root/.mycshrc
            root/.mykshrc
            root/.mylogin
            root/.myprofile
            tcb/files/auth/system/default
            var/spool/cron/crontabs/root
        done.
        evaluate files to install ...
            <no files>
        done.
        backup current files ...
            <no files to backup>
        done.
        install new files ...
            0 blocks
        done.
    done.
    execute post exec script ...
        apply2file - install a data stream as file, by Chr. Walther

        process file '//etc/issue' ...
            data is identical with existing file, aborting
        done.
        post_exec-INFO: remove '//net' directory
        apply2file - install a data stream as file, by Chr. Walther

        process file '//etc/rc.config.d/netconf' ...
            data is identical with existing file, aborting
        done.
        apply2file - install a data stream as file, by Chr. Walther

        process file '//.secure/etc/audnames' ...
            data is identical with existing file, aborting
        done.
    done.
    write config_byhand ...
        /.EDRC.config_byhand.base protected, not written
    done.
done.

3) print applied configuration

Print the configuration applied to a system using sysconfig. This system has one configuration applied:

[ / ]
[ root@acme001 ][-sh]: ~edrc/bin/sysconfig -p

sysconfig - configure a Unix/Linux system, by Chr. Walther

/ -

    CONFIG:      acme.ch
    NAME:
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2007-06-04_16.13.27__sysconfig.cpio.gz
    DESCRIPTION: BASE PRODUCTION SERVER CONFIGURATION for Operating System
    EXECUTED:    Mon Jun  4 16:13:27 METDST 2007

4) system having multiple configurations applied

This is an efficient usage of sysconfig using two configurations.

The base configuration (acme.ch) defines the system behaviour for the whole ACME enterprise and the unnamed environment dependent configuration (production.acme.ch) defines the special configuration for the servers in the PRODUCTION environment.

[ /root ]
[ root@acme002 ][-sh]: ~edrc/bin/sysconfig -p

sysconfig - configure a Unix/Linux system, by Chr. Walther

/ -

    CONFIG:      production.acme.ch
    NAME:
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/production.acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2005-07-12_20.09.27__sysconfig.cpio.gz
    DESCRIPTION: PRODUCTION SERVER CONFIGURATION for Operating System
    EXECUTED:    Tue Jul 12 20:09:27 METDST 2005

/ - base

    CONFIG:      acme.ch
    NAME:        base
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2004-11-23_05.28.15__sysconfig.cpio.gz
    DESCRIPTION: BASE SERVER CONFIGURATION for Operating System
    EXECUTED:    Tue Nov 23 05:28:15 EST 2004

5) system having multiple configurations plus cluster support

This is a more advanced usage of sysconfig also including the configuration of cluster packages.

This output is from a system used in normal operations for PREPRODUCTION and in a disaster case as PRODUCTION. The system will be reconfigured (also using sysconfig ) during disaster recovery to give it the PRODUCTION' configuration.

This system has five configurations applied. In this case the base (acme.ch) configuration contains all basic configuration files of the ACME enterprise. The preproduction (preproduction.acme.ch) configuration is applied on top of the base configuration and contains all basic configuration of the PREPRODUCTION environment that will not be changed during a disaster recovery. The unnamed (normal.preproduction.acme.ch) configuration is applied on top of the preproduction configuration and contains only the files that are needed to configure the system as a PREPRODUCTION system in NORMAL OPERATIONS. This part of the configuration will be replaced with the unnamed (disaster.preproduction.acme.ch) configuration to re-configure the system in case of disaster and give it the PRODUCTION' identity.

The configurations dwh_db1 and dwh_db2 are the configurations of cluster packages, that are reconfiguired during disaster recovery, too.

To ensure that the cluster package configuration is only displayed on the node where the cluster package is running, prior to the execution of sysconfig a symbolic link to the settings file has to be created. This will place the settings file to a moving file system:

[ / ]
[ root@acme003 ][-sh]: ln -s /data_dwh1/.EDRC.sysconfig.dwh_db1 \
                              .EDRC.sysconfig.dwh_db1

The symbolic link has to be created on each node where the cluster package is able to start.

In this case the filesystems /data_dwh1/, /ora0[1-3]_dwh1/ are moved with the cluster package, that's also the reason why the configurations of the cluster packages are needed to be applied to the root directory ( / ).

[ /root ]
[ root@acme003 ][-sh]: ~edrc/bin/sysconfig -p

sysconfig - configure a Unix/Linux system, by Chr. Walther

/ -

    CONFIG:      normal.preproduction.acme.ch
    NAME:
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/normal.preproduction.acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2005-07-12_20.30.04__sysconfig.cpio.gz
    DESCRIPTION: NORMAL OPERATION PREPRODUCTION SERVER CONFIGURATION for Operating System
    EXECUTED:    Tue Jul 12 20:30:04 METDST 2005

/ - preproduction

    CONFIG:      preproduction.acme.ch
    NAME:        preproduction
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/preproduction.acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2004-11-25_14.54.06__sysconfig.cpio.gz
    DESCRIPTION: BASE PREPRODUCTION SERVER CONFIGURATION for Operating System
    EXECUTED:    Thu Nov 25 14:54:06 MET 2004

/ - base

    CONFIG:      acme.ch
    NAME:        base
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2004-11-24_15.00.01__sysconfig.cpio.gz
    DESCRIPTION: BASE SERVER CONFIGURATION for Operating System
    EXECUTED:    Wed Nov 24 15:00:01 MET 2004

/ - dwh_db1

    CONFIG:      dwh_db1.normal.preproduction.acme.ch
    NAME:        dwh_db1
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/dwh_db1.normal.preproduction.acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2007-08-20_12.38.37__sysconfig.cpio.gz
    DESCRIPTION: NORMAL OPERATION PREPRODUCTION CONFIGURATION for Cluster Package dwh_db1_pre
    EXECUTED:    Mon Aug 20 12:38:38 METDST 2007

/ - dwh_db2

    CONFIG:      dwh_db2.normal.preproduction.acme.ch
    NAME:        dwh_db2
    OSID:        HP-11
    SOURCE:      /opt/edrc/scripts/ACME-sat/sysconfig/dwh_db2.normal.preproduction.acme.ch
    ROOTDIR:     /
    BACKUPDIR:   /opt/edrc/var/backup
    BACKUPFILE:  2007-08-20_12.38.42__sysconfig.cpio.gz
    DESCRIPTION: NORMAL OPERATION PREPRODUCTION CONFIGURATION for Cluster Package dwh_db2_pre
    EXECUTED:    Mon Aug 20 12:38:43 METDST 2007

 

SEE ALSO

edrcintro(1), apply2file(1), filedist(1), filelink(1), is_config_byhand(3), ksh(1), lscomp(1), llcomp(1), osid(3), sh(1), svi(1), sysconfig.cfg(4), sysconfig.tools(3), syscp(1), sysdiff(1), sysvi(1)

 

NOTES

The implementation of the config_byhand feature as known from the SFI-Director rmtconfig command.

 

BUGS

-

 

AUTHOR

sysconfig was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2014 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
FEATURES
CONFIGURATION STEPS
OPTIONS
SYSCONFIG-DATASTRUCTURE
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 20:08:04 GMT, May 11, 2025