Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Agent (For UNIX Systems)


2.2.3 Creating the files to be specified during packaging

Organization of this subsection

(1) Creating the packaging-information file

Before you register resources, you need to create the file that describes the information about the resources to be registered (packaging-information file). This subsection describes how to create the packaging-information file.

(a) Rules for creating the packaging-information file

To create the packaging-information file, use a text editor in the following format:

attribute-nameTabvalueEnter
attribute-name

Specify the item to be specified in the packaging-information file.

value

Specify the value to be set for an item in the packaging-information file.

Create the packaging-information file according to the following rules.

  • You can specify a space character instead of a tab character.

  • To include a space character in a set value, enclose the set value between double quotation marks (").

  • If you specify # in the first column, that line is treated as a comment.

  • The maximum length of a line in the packaging-information file is 256 bytes including the code for the pressed Enter key.

  • If you specify more than one attribute with the same name, the set value that is specified last is validated and the preceding set values are ignored.

(b) Syntax of the package-information file

Format

As shown below, attributes that can be specified in the package-information file differ depending on the package type.

For registering Hitachi program products
Group cabinet-ID
PPName program-product-model
[UserName owner-name]
[HostName host-name-on-higher-system]
[Compress {NO|COMPRESS|PACK}]
[APafterGeneration external-program-processing-after-market-software-installation]
[APWatchTimer monitoring-time-for-external-program-processing-after-
market-software-installation]
[LifeofResource package-storage-period]
[InstallTiming BOOT]
[Recover {YES|NO}]
[BackupDataKeep backup-file-storage-period]
For registering another company's software and OS patches
Group cabinet-ID
[ResourceName package-ID]
[ProgramName program-name]
[Version version]
[Generation generation-number]
[HostName host-name-on-higher-system]
[UserName owner-name]
[Compress {NO|COMPRESS|PACK|COMMON}]
[APbeforeGeneration external-program-processing-before-installation]
[APafterGeneration external-program-processing-after-installation]
[APWatchTimer monitoring-time-for-external-program-processing]
[LifeofResource package-storage-period]
[InstallTiming {BOOT|EXECUTE|SHUTDOWN|UAP}]
[Recover {YES|NO}]
For registering user data and user programs
Group cabinet-ID
ResourceName package-ID
[ProgramName program-name]
[UserName owner-name]
[Version version]
[PrerequisiteVersion prerequisite-version]
[Generation generation-number]
[Comments user-comment]
[HostName host-name-on-higher-system]
[Compress {NO|COMPRESS|PACK|COMMON}]
[Generator {STANDARD|NETM_DM_GF}]
[APbeforeGeneration external-program-processing-before-installation]
[APafterGeneration external-program-processing-after-installation]
[APWatchTimer monitoring-time-for-external-program-processing-for-
installation]
[LifeofResource package-storage-period]
[InstallDirectory installation-target-directory]
[OwnerofInstallDirectory directory-owner]
[GroupofInstallDirectory directory-cabinet]
[ModeofInstallDirectory directory-file-mode]
[InstallTiming {BOOT|EXECUTE|SHUTDOWN|UAP}]
[Recover {YES|NO}]
[BackupDataKeep backup-file-storage-period]
[UAPBackupList backup-list-name]
Explanation
Group cabinet-ID ~ <uppercase alphabetic characters or numerics> ((2 characters))

Specify the ID of the cabinet where resources are to be registered. A cabinet can register up to 256 resources. When you create a new cabinet to register resources, specify the ID of the cabinet here so the cabinet is automatically created and resources can be registered. This item must be specified if you do not specify a cabinet ID in the option of the rdsft or rdscm command.

Specify a different cabinet ID for each managing server that registers resources. If you register resources with the same cabinet ID in different managing servers, the packages might not be distributed even if the package names are different when the cabinet ID is the same.

PPName program-product-model

Specify the model of the program product to be registered. To specify multiple program products, delimit them using space characters and enclose the set values between double quotation marks (").

A description example for specifying multiple program products is as follows:

PPName "P-1642-111 P-1642-421"

By using the regular expression of the UNIX operating system, you can simplify the specification method. A specification example using the regular expression is as follows:

  • PPName *

    Specifies all the program products that are registered in a DAT or CD-ROM.

  • PPName P-1642-*

    Specifies all the program products of which names begin with P-1642-.

  • PPName P-1642-??

    Specifies all the program products of which names begin with P-1642- and end with two numbers.

  • PPName P-1642-[1-5]

    Specifies all the program products of which names begin with P-1642- and end with a number between 1 and 5.

ResourceName package-ID ~ <uppercase alphabetic characters, numerics, hyphens, or underscores> ((1 to 44 characters))

Specify the name of the resource to be registered. Specify a name that is unique in the network system. This item must be specified when you register a Hitachi program product or a user program and user data without specifying the package ID in an option of the rdsft or rdscm command. When you register another company's software or an OS patch, you can omit this item. If you omit this item, the package ID is automatically generated.

ProgramName program-name ~ ((1 to 50 characters))

Specify the general name of the resource to be registered. Specify this name if you want a common name besides the package ID. If you do not specify this value, a space character is assumed. For registration of another company's software, if you omit the package ID and program name, the program name is automatically generated.

UserName owner-name ~ ((1 to 14 characters))

Specify the name of the user who owns the resource to be registered. If you do not specify this value, a space character is assumed.

Version version ~ <uppercase alphabetic characters, numerics, or slants> ((1 to 6 characters))

Specify the version of the resource to be registered. For a program product, the version is automatically set. For other resources, set this item to specify dates and for other purposes. If you do not specify this value, 000000 is assumed. For registration of another company's software, if you omit the package ID and version, the version is automatically generated.

PrerequisiteVersion prerequisite-version ~ <uppercase alphabetic characters, numerics, or slants> ((1 to 6 characters))

Specify the prerequisite version when distributing a resource to be registered.

If you specify 000000 as the prerequisite version, the resource is always distributed regardless of the prerequisite version. If you do not specify PrerequisiteVersion, a space character is assumed and the resource is distributed without checking the prerequisite version.

This specification becomes valid when EXECUTE is specified for InstallTiming.

Generation generation-number ~ <uppercase alphabetic characters or numerics> ((4 digits))

Specify the generation number of the resource to be registered. If you do not specify this value, 0000 is assumed.

Comments user-comment ~ ((1 to 64 characters))

Specify the user comment for the resource to be registered. This specification is valid when NETM_DM_GF is set for Generator. Do not insert a new line within a comment. If you do not specify this value, a space character is assumed.

HostName host-name-on-higher-system ~ <uppercase alphabetic characters, numerics, hyphens, underscores, or periods> ((1 to 20 characters))

Specify the host name on higher system. If you do not specify this value, the resource is registered into the managing server specified in the settings file. To specify a host file name in a client workstation, specify the host name of the relay system.

If you do not specify a host name on higher level in the option of the rdsft or rdscm command, the specification in the packaging-information file is validated. The host name on higher system specified in the rdsft or rdscm command takes precedence over the specification in the packaging-information file.

Compress ~ {NO|COMPRESS|PACK|COMMON}

Specify the type of compression for the resource to be registered.

  • NO

    No compression is performed.

  • COMPRESS

    Use the compress command to compress.

  • PACK

    Use the pack command to compress.

  • COMMON

    Compress a shared package.

If the size of a resource is three blocks or smaller, specifying PACK has no effect. If an error occurs during compression, the resource is registered without compression. If you do not specify this value, the type specified in the settings file is validated.

Generator ~ {STANDARD|NETM_DM_GF} <<STANDARD>>

Specify the type of the generator to be started when a package is installed.

  • STANDARD

    Standard generator provided by JP1/IT Desktop Management 2 - Agent

  • NETM_DM_GF

    Generator provided by the generator tools of JP1/IT Desktop Management 2 - Agent

APbeforeGeneration external-program-processing-before-installation ~ ((1 to 60 characters))

Use the absolute path to specify the external program processing before installation which is started before the standard generator executes installation. If you also specify APafterGeneration (external program processing after installation), the specification value of this item plus the specification value of APafterGeneration must be within 60 characters.

This specification is valid when you specify STANDARD for Generator. When you specify NETM_DM_GF, the external program processing before installation is ignored even if it is specified.

By creating the program of the external program processing before installation under /NETMRDS/usrcom/ (/opt/NETMDMW/usrcom/ for HP-UX), you can use the relative path to specify this item.

Note the following when you specify the external program processing before installation:

  • Up to 18 character strings (arguments) can be specified.

  • Consecutive space characters are treated as a single delimiter.

  • Do not use the characters that have special meaning in shell programs such as >, <, |, &, and $.

  • Single quotation marks (') are not treated as arguments.

  • Double quotation marks (") cannot be specified. However, when you specify a space character in a set value, enclose the entire set value between double quotation marks.

  • Shell variables are invalid since they are treated as character strings.

  • Do not include processing that waits for responses.

APafterGeneration external-program-processing-after-installation or external-program-processing-after-market-software-installation ~ ((1 to 64 characters))

Use the absolute path to specify the external program processing after installation or the external program processing after market software installation which is started after a package is installed.

This specification is valid when distributing to the workstation. The installation is ignored when distributed to a PC. When you specify NETM_DM_GF is specified for Generator, specify in less than or equal to 40 characters.

When STANDARD is specified for Generator, if you create a program that requires external program processing for installation under the /NETMRDS/usrcom/ directory (or the /opt/NETMDMW/usrcom/ directory in the case of HP-UX), you can specify the program using a relative path.

Note the following when you specify the external program processing for installation:

  • Up to 18 character strings (arguments) can be specified.

  • Consecutive space characters are treated as a single delimiter.

  • Do not use the characters that have special meaning in shell programs such as >, <, |, &, and $.

  • Single quotation marks (') are not treated as arguments.

  • Double quotation marks (") cannot be specified. However, when you specify a space character in a set value, enclose the entire set value between double quotation marks.

  • Shell variables are invalid since they are treated as character strings.

  • Do not include processing that waits for responses.

APWatchTimer monitoring-time-for-external-program-processing-for-installation or external-program-processing-after-market-software-installation ~ <unsigned integer> ((1 to 32767)) <<300>> (unit: seconds)

Specify the period of time (in seconds) to monitor the execution of the external program processing for installation or the external program processing after market software installation. If the external program processing for installation or the external program processing after market software installation is still executing after the specified value, the distribution-destination system executes the next processing without waiting for the end of the previous processing. The external program processing for installation or external program processing after market software installation will not be terminated forcibly. In this case, the distribution-destination system reports an installation error to the manager server. This specification is validated at each installation timing.

LifeofResource package-storage-period ~ <numerics> ((8 digits))

Use the YYYYMMDD format to specify the time until which the distributed package is stored in the temporary package storehouse of a relay system.

  • YYYY

    Specify the year (YYYY: current year to 2089).

  • MM

    Specify the month using two digits (MM: 01 to 12).

  • DD

    Specify the day using two digits (DD: 01 to 31).

If you omit this value, the number of days to keep the package, which is specified in the settings file, is validated. An error occurs if you specify a date before the registration date.

InstallDirectory installation-target-directory ~ <alphanumeric characters> ((1 to 64 characters))

Specify the installation target directory of user data or user programs. For a hard disk resource, you can specify this item when you register the resource using the relative path. If the specified directory does not exist in the distribution-destination system, it is created when the package is installed.

If the specified directory is not defined or if you omit this specification, the root directory (/) is assumed.

For Linux, do not specify a symbolic link for the installation target directory. Otherwise, the symbolic link will be released.

OwnerofInstallDirectory directory-owner ~ <unsigned integer> ((5 digits from 0 to 59999))

Specify the owner using the user number if the directory specified in InstallDirectory does not exist in the distribution-destination system. If the specified owner is not defined or if you omit this specification, root (user number 0) is assumed.

GroupofInstallDirectory directory-cabinet ~ <unsigned integer> ((5 digits from 0 to 59999))

Specify the cabinet if the directory specified in InstallDirectory does not exist in the distribution-destination system. When you specify a directory cabinet, OwnerofInstallDirectory must be specified. If the specified cabinet number is not defined or if you omit this specification, sys (cabinet number 3) is assumed.

ModeofInstallDirectory directory-file-mode ~ <octal number> ((3 digits from 700 to 777)) <<755>>

Specify the file mode of the directory if the directory specified in InstallDirectory does not exist in the distribution-destination system. For the file mode, specify only the permission mode bits using absolute values. When you specify the file mode of a directory, the following items must be specified:

  • OwnerofInstallDirectory

  • GroupofInstallDirectory

  • InstallDirectory

InstallTiming ~ {BOOT|EXECUTE|SHUTDOWN|UAP} <<EXECUTE>>

Specify the timing to install software.

  • BOOT

    Install a package when the system is started.

  • EXECUTE

    Install a package when the managing server issues a distribution job.

  • SHUTDOWN

    Install a package when the system is stopped.

  • UAP

    A user application program installs a package. You can specify this value only when the distribution-destination system is Windows.

If the package has a daemon process, install the package when the system is started or stopped. The following packages cannot be installed when the system is started. Install them when the system is stopped.

  • Packages that are started before the user_daemon step in the /etc/rc script

  • Packages with the shared library

  • Packages containing the programs that are registered into /etc/inittab with the respawn specification

Only BOOT can be specified for program products. If anything else is specified, the specification is ignored.

Recover ~ {YES|NO} <<NO>>

Specify whether to use the recovery facility.

  • YES

    Execute recovery if installation fails when the package is distributed.

  • NO

    Do not execute recovery if installation fails when the package is distributed.

Some program products might not be able to use the recovery facility because of the attributes of the programs. Recovery is not executed even if you specify YES for such program products. In addition, if the distribution-destination system does not have the backup directory, recovery is not executed even if YES is specified.

Socket device files are not recovered. When you write a socket device in the backup list or register a file with the name identical to that of the socket device, do not specify YES for Recover. If recovery is specified in the packaging-information file that registers a socket device, backups are not acquired when packages are distributed and the socket device file is not distributed.

For another company's software, the recovery facility is available for only the HP-UX version of the software.

BackupDataKeep backup-file-storage-period ~ <unsigned integer> ((0 to 999)) <<0>> (unit: days)

When you use the recovery facility at the distribution of packages, specify the number of days to keep the backup if recovery fails or is not executed. This specification is valid when you specify YES for Recover. The backup will be deleted after the number of days specified here from the date of package distribution.

Recovery can be retried while backups are saved. If you specify 0, backups are not saved. Specify 0 for the packages you do not need to retry recovery for.

UAPBackupList backup-list-name ~ <alphanumeric characters> ((1 to 128 characters))

To acquire a backup for the recovery facility to be executed at the distribution of the next version after a package is distributed, specify the file name of the backup list containing the file and the directory. For details about the backup list, see 6.2.1 Acquiring backups in PART 2. To specify the file name of the backup list, use the absolute path.

This specification is valid when the package is user data or a user program. This specification is validated when the recovery facility is executed at the distribution of the next version after a package is distributed. This specification is invalid if the recovery facility is executed at the distribution of the current package.

If you do not specify this value, only the file and the directory to be overwritten are backed up when the recovery facility is executed at the distribution of the next version.

(2) Creating the user resource path file

For the user resource path file, specify a directory that is registered from the hard disk. Since you can specify multiple directories or files, you can register the files in different directories as a single resource by creating this user resource path file. Use the absolute path to specify a directory or a file. Do not include .. in a path. A creation example of the user resource path file is as follows:

Example:
/users/home
/etc/hosts
/etc/networks

(3) Setting the special file definition file

To register program products using the special file that is not provided by the system as standard, you need to define such a special file in the special file definition file.

(a) Rules for creating the special file definition file

The special file definition file defines the information of each special file. JP1/IT Desktop Management 2 - Agent references this file for the information corresponding to the specified special file when registering a program product and accesses the provided storage medium.

The special files provided by the system as standard are defined in the special file definition file. The directory name of the special file definition file is as follows.

OS

LANG environmental variables

Directory name

HP-UX

ja_JP.SJIS

/etc/opt/NETMDMW/rdsprm/ja_JP.SJIS/DEVTYPE

ja_JP.eucJP

/etc/opt/NETMDMW/rdsprm/ja_JP.eucJP/DEVTYPE

Other than ja_JP.SJIS, ja_JP.eucJP

/etc/opt/NETMDMW/rdsprm/C/DEVTYPE

Solaris

ja_JP.PCK

/NETMRDS/rdsprm/ja_JP.PCK/DEVTYPE

ja

/NETMRDS/rdsprm/ja/DEVTYPE

Other than ja_JP.PCK, ja

/NETMRDS/rdsprm/POSIX/DEVTYPE

AIX

Ja_JP

/NETMRDS/rdsprm/Ja_JP/DEVTYPE

ja_JP

/NETMRDS/rdsprm/ja_JP/DEVTYPE

Other than Ja_JP, ja_JP

/NETMRDS/rdsprm/En_US/DEVTYPE

Linux

ja_JP.UTF-8

/NETMRDS/rdsprm/ja_JP.UTF-8/DEVTYPE

ja_JP.eucJP

/NETMRDS/rdsprm/ja_JP.eucJP/DEVTYPE

Other than ja_JP.SJIS, ja_JP.eucJP

/NETMRDS/rdsprm/C/DEVTYPE

(b) Syntax of the special file definition file

The following shows the format and contents of the special file definition file.

special-file-nameTabmedium-typeTabcommentTabmedium-typeEnter
special-file-name

Use the absolute path from /dev to specify the special file name that corresponds to the tape device or the disk device where the storage medium containing the program product is to be set.

medium-type

Specify the type of the medium containing the data.

DISC

Floptical disk or MO

TAPE

CMT or DAT

ISO9660

CD-ROM

UNKNOWN

External storage medium other than disks and tapes

ILLEGAL

External storage medium such as tty and the hard disk

comment

Write a comment. If you do not specify a comment, specify "". An error occurs if you specify a space character.

medium-type

Specify the type of storage medium.

DAT

The medium is a DAT.

CD-R

The medium is a CD-ROM.

OTHER

The medium is other than above.

(c) Creation example

The following is an example of registering software using special file/dev/dsk/c0t5d0, when the provided recording medium is a CD-ROM.

/dev/dsk/c0t5d0  ISO9660  NETM/DM/WPP access  CD-R

(d) Notes

  • If the special file accesses a medium which is a type of disk, the special file must be the character type.

  • The special file that accesses a CD-ROM must be the block type.

(4) Creating the UAPs to be started during installation (client services)

When you use the client services to install packages, you can start the following UAPs before and after the installation. The UAP is started by a user with superuser permissions.

External program processing for installation

The external program processing for installation is the processing that is started before or after installation of other software, user programs and user data, or OS patches. The external program processing for installation is divided into the external-program-processing-before-installation and the external-program-processing-after-installation.

External program processing after market software installation

The external program processing after market software installation is the processing that is started after a Hitachi program product is installed.

The following subsections describe how to create and specify UAP during packaging.

(a) Using the external program processing for installation

To use the external program processing for installation:

  1. Create the program of the external program processing for installation.

    Create the external program processing for installation to return the following return codes after the processing:

    Normal end: 0
    Abnormal end: Other than 0

    If the return code indicates an abnormal end, JP1/IT Desktop Management 2 - Agent handles it as an installation error. Note the following when you create the external program processing for installation:

    • Do not include spaces in command path names (except for command arguments).

    • The external program processing for installation is started by a user with superuser permissions.

    • Do not include processing that waits for responses

    • Do not output messages to the standard output and the standard error output.

    • The environment variables are inherited from the ones that are active when JP1/IT Desktop Management 2 - Agent is operating.

    • To implement file operations, such as copying files and logging records to a file, in an external program, make sure that the files are specified with their absolute path names.

  2. In the packaging-information file, set the following attributes:

    Generator            STANDARD
    APbeforeGeneration  path-name-of-external-program-processing-before-
    installation
    APafterGeneration   path-name-of-external-program-processing-after-
    installation

    Use the absolute path name to specify the path name of the external program processing for installation. However, if you create the processing under the /NETMRDS/usrcom/ or /opt/NETMDMW/usrcom/ (for HP-UX) directory, you can use the relative path name.

  3. Check the abnormal-end return codes.

    If a created UAP ends abnormally, you can check the return codes in the message log files of the client service. If an installation error occurs, check the UAP return code.

    If a created UAP ends abnormally, the KDDM2100-E message is output to /NETMRDS/rdsprm/MAIN.LOGF or /var/opt/NETMDMW/rdsprm/MAIN.LOGF (for HP-UX). Among the last 4 numbers output in this message, the second number indicates the UAP return code. The following example indicates an output message:

    09.07.31 12:00:00 0000001234 0000001 KDDM2100-E : An error occurred in the specified generator.
      
                 43 APbeforeGen                1   255     1     2
                                                    ~~~~~

    Note: The underlined part indicates the UAP return code.

The following is an example of creating the external program processing for installation for the following operation:

  • External program processing before installation (/users/bin/install check)

    This processing deletes the work directory before installation and outputs the installation start log.

  • External program processing after installation (/users/bin/prog1 DUMMY01)

    This processing installs the package (DUMMY01) and outputs the date of installation to the file (/tmp/DUMMY01).

Specifying the packaging-information file:

Group              A1
ResourceName       DUMMY01
  :
Generator          STANDARD
APbeforeGeneration "/users/bin/install check"
APafterGeneration  "/users/bin/prog1 DUMMY01"
  :

Contents of the external program processing before installation:

/bin/rm -r /usrdata/WORK
    RTN =$?
    if [ $RTN != 0]
    /bin/echo "Installation preparation failed (deleting work file" >> /haifu/LOG
      exit $RTN
    fi 
    /bin/mkdir /usrdata/WORK
    RTN=$?
    if [ $RTN != 0]
    /bin/echo "Installation preparation failed (creating work directory)" >> /haifu/LOG
      exit $RTN
    fi 
    /bin/echo "Installation preparation completed" >> /haifu/LOG
    exit 0

Contents of the external program processing after installation:

RESOURCE=$1
/bin/echo 'RESOURCE='$RESOURCE 'TIME=' '/bin/date' > /tmp/$RESOURCE
exit 0

(b) Using external program processing after installation of market software

To use the external program processing after market software installation:

  1. Create the program of the external program processing after market software installation and distribute it to the distribution-destination systems.

    Create the external program processing after market software installation to return the following return codes after the processing:

    Normal end: 0
    Abnormal end: Other than 0

    Note the following when you create the external program processing after market software installation:

    • Do not include spaces in command path names (except for command arguments).

    • The external program processing after market software installation is started by a user with superuser permissions.

    • Do not include processing that waits for responses.

    • Do not output messages to the standard output and the standard error output.

    • The environment variables are inherited from the ones that are active when JP1/IT Desktop Management 2 - Agent is operating.

    • To implement file operations, such as copying files and logging records to a file, in an external program that will be executed after software installation, make sure that the files are specified with their absolute path names.

  2. In the packaging-information file, set the following attribute:

    APafterGeneration  path-name-of-external-program-processing-
    after-market-software-installation

    Use the absolute path name to specify the path name of the external program processing after market software installation. However, if you create the processing under the /NETMRDS/usrcom/ or /opt/NETMDMW/usrcom/ (for HP-UX) directory, you can use the relative path name.

Even if the external program processing after market software installation ends abnormally, the setup of the distributed program product is normally ended.