• Keine Ergebnisse gefunden

Copying or Moving an Authorized Area

Im Dokument Software Installing Domain (Seite 178-183)

This section describes how to copy or move an Authorized Area from one location (directory) to another, using standard UNIX and Aegis commands.

You can copy or move the Authorized Area to a directory on the same disk or another node's disk. The destination directory can be another existing Autho-rized Area or a directory that is not an AuthoAutho-rized Area. If the destination is another Authorized Area, the contents of the two Authorized Areas are com-bined.

The only complicating factor is if you copy or move an Authorized Area that is at a node entry directory (//node_name/install/ ... ), since every node has a (//node_name/install) directory that contains non-Authorized Area objects.

Accordingly, we provide three procedures:

• Copying an Authorized Area that is not at a node entry directory to a di-rectory that also is not a node entry didi-rectory (the simplest case).

• Copying an Authorized Area from one node entry directory to another.

• Copying an Authorized Area from a node entry directory to a directory that is not a node entry directory.

You can easily adapt these procedures to copy or move subdirectories of an Authorized Area, such as the install/tools directory.

When you copy an Authorized Area, be sure to preserve the Access Control Lists (ACLs) of the Authorized Area objects. (The command lines in this sec-tion provide the appropriate opsec-tions for doing this.) The ACLs of the installation tools specify the owner as root and turn the setuid bit on, which causes the effective user ID of the processes to be root. If you don't preserve these ACls, the copied tools may not have sufficient access privileges to per-form some tasks.

If you use these procedures to set up a new Authorized Area, we recommend that you do not locate the new Authorized Area at a node entry directory and that you create a new directory to be used exclusively for the Authorized Area (//node_name/aa_m68k, for example).

These procedures describe how to copy an Authorized Area. To move an Au-thorized Area, use the appropriate copy procedure in this section. Then remove the source Authorized Area, using the "Removing an Authorized Area" procedure later in this chapter.

.. To copy an Authorized Area that is not at a node entry directory to another directory or Authorized Area that is not a node entry directory (for example, from Iinode_l/aa to Ilnode_2/another_aa), execute the following command:

UNIX environment:

cp -rpsoP source _ AAlinstaU target _ AA Aegis environment:

cpt -pdt -sad -md source AAlinstaU target _ AAlinstaU where

source_AA is the pathname of the Authorized Area you want to copy.

targeC AA is the pathname of the directory you want to copy the Authorized Area to. This can be the pathname of an existing Authorized Area or a direc-tory that is not an Authorized Area. If target_AA is an Authorized Area, the contents of the two Authorized Areas are combined. If target_AA is not an Authorized Area, target_AA must already exist, but the install subdirectory doesn't have to. (If targeC AA doesn't exist, the UNIX cp command creates the directory and copies objects without error, but does not create the instaU subdirectory. The Aegis cpt command returns an error.)

• To copy an Authorized Area at a node entry directory (Jlnode_name) to another node entry directory (whether or not an Authorized Area already exists there), execute the following commands:

UNIX environment:

mv Iitargetlinstall/baseline Iitargetlinstall/baseline.tmp

mv Iitargetiinstall/not_installed IltargetlinstaU/not_instaUed.tmp mv IltargetlinstallJpreserve.list IltargetlinstaU/preserve.list.tmp cp -rpsoP Iisourcelinstall Iitarget

rm -rf I Itarget linstall/baseline

mv I Itarget linstaU/baseline.tmp I Itarget linstall/baseline

mv IltargetlinstaU/not_instaUed.tmp IltargetlinstaU/not_installed mv IltargetlinstaU/preserve.list.tmp IltargetlinstaU/preserve.list

Manipulating Authorized Areas

Aegis environment:

ebn / /target/install/baseline baseline.tmp

cpt -pdt -sad -md / /source/install / /target/install dlt -f / /target /install/baseline

ebn Iltargetlinstall/baseline.tmp baseline where

target is the name of the node you are copying the Authorized Area to.

source is the name of the node you are copying the Authorized Area from.

These commands preserve the following non-Authorized Area objects in the target node's /install directory: the baseline files (in the /install/baseline di-rectory), the preserve.list file, and the not_installed file. (For more information about these objects, see "install," Chapter 10.) To preserve the objects, the commands rename the objects before the Authorized Area is co-pied and then restore the objects' original names after the copy.

The UNIX commands we provide assume the preserve.list file (optionally created by the user) and the not_installed file (created by the install tool only when it fails to install objects on the node) exist on both the source and the target. If one of these files exists only on the target, or exists on neither the source or the target, you don't have to execute the move (mv) commands for the file, but doing so does no harm. If, however, one of the files exists on the source but not the target, you should remove (rm) the file from the target's /install directory after you copy the Authorized Area.

The Aegis commands work fine whether or not the preserve.list and not_in-stalled files exist, with one exception. If one of the files exists on the source but not on the target, you should delete the file (using dlf) from the target's /install directory after you copy the Authorized Area .

.. To copy an Authorized Area at a node entry directory (/Inode_name) to a directory or Authorized Area that is not a node entry directory (for example, from Ilnode_l to /lnode_2/aa), execute the following commands:

UNIX environment:

ep -rpsoP / /source/install target_AA rm -rf target _ AAlinstall/baseline rm target_AA/install/not_installed

rID target _ AA/install/preserve.list

Examples

Aegis environment:

cpt -pdt -sad -md Iisourcelinstall target_AAlinstall dIt -f targee AAlinstall/baseline

dlf targee AAlinstaU/not_instaUed dlf target _ AAlinstall/preserve.list where

source is the name of the node you are copying the Authorized Area from.

tar gee AA is the pathname of the directory you want to copy the Authorized Area to. This can be the pathname of an existing Authorized Area or a direc-tory that is not an Authorized Area. If target_AA is an Authorized Area, the contents of the two Authorized Areas are combined. If target_AA is not an Authorized Area, target_AA must already exist, but the install subdirectory doesn't have to. (If target_AA doesn't exist, the UNIX cp command creates the directory and copies objects without error, but does not create the install subdirectory. The Aegis cpt command returns an error.)

When you copy the Authorized Area, nonAuthorized Area components -the linstall/baseline directory, -the linstall/preserve.list file, and -the linstaUI not_installed file are copied along with it. (For more information about these objects, see "install," Chapter 10.) The commands we provide remove these objects from the target Authorized Area, since the objects are super-fluous there.

The preserve.list file (optionally created by the user) and the not_installed file (created by the install tool only when it fails to install objects on the node) do not necessarily exist in the source node's linstaH directory. But ex-ecuting the remove commands if they don't does no harm.

To copy an Authorized Area at Ilnode_lIaa to Ilnode_2/aa, assuming the aa directory on Ilnode.-2 does not exist initially,

Using UNIX,

% cd I Inode_2

% mkdir aa

% cp -rpsoP Ilnodellaa/instaU Ilnode_2/aa

U sing Aegis,

$ wd Ilnode_2

$ crd aa

Manipulating Authorized Areas

$ cpt -pdt -sad -md IInode_1Iaa/instaU IInode_2/aa/instaU

To copy an Authorized Area at the node entry directory of Ilnode_l to the node entry directory of Ilnode_2, assuming the files Ilnode_2/install/pres-erve.list and Ilnode_2/install/not_installed exist,

Using UNIX,

% mv Ilnode_2/install/baseline Ilnode_2/install/baseline.tmp

% mv I Inode _ 2/install/not _installed I Inode _2/install/not _ installed.tmp

% mv I Inode _ 2/install/preserveJist Ilnode _ 2/instaU/preserve.list.tmp

% cp -rpsoP Ilnode_1Iinstall Ilnode_2

% rm -rf Ilnode_2/install/baseline

% mv Ilnode_2/install/baseline.tmp Ilnode_2/install/baseline

% mv I In ode _ 2/install/not _ installed.tmp I In ode _2/install/not _installed

% mv I Inode _ 2/install/preserveJist.tmp I Inode .J,/install/preserve.list U sing Aegis,

$ chn Ilnode_2/instali/baseline baseline.tmp

$ cpt -pdt -sad -md Ilnode_1Iinstall Ilnode_2/install

$ dlt -f Ilnode _ 2/install/baseline

$ chn Ilnode_2/install/baseline.tmp baseline

To copy an Authorized Area at the node entry directory of Ilnode_l to the directory Ilnode_2/aa, assuming the directory aa already exists,

Using UNIX,

% cp -rpsoP Ilnode_1Iinstall Ilnode._2/aa

% rm -rf Ilnode_2/aa/instali/baseline

% rm Ilnode_2/aa/install/not_installed

% rm Ilnode_2/aa/instaU/preserveJist Using Aegis,

$ cpt -pdt -sad -md Ilnode_1IinstaU Ilnode_2/aa/instaU

$ dU -f Ilnode_2/aa/install/baseHne

$ dlf Ilnode_2/aa/instaU/not_installed

$ dlf Ilnode.J,/aa/install/preserveJist

Im Dokument Software Installing Domain (Seite 178-183)