Sun Update Connection - Enterprise 1.0 User's Guide

Managing Local Files

In this section, users with full or admin permissions add, edit, and delete local files.

Local files are scripts, binaries, executables, and files that are private to your enterprise or otherwise unknown to the universal server. The following table explains the categories.

Table 5–2 Local File Categories

Category 

Description 

Use 

Configuration files 

Installs a version of a configuration file 

Install configuration file versions for efficient change management on a customized environment 

Macros 

Outputs a value into a local configuration file 

Install a local configuration file that includes a macro sign and the sign will be replaced with the local value 

Post-action

Performs an action on the host after the job tasks are carried out 

Run action scripts or binaries on hosts to fulfill a post-job requirement 

Pre-action 

Performs an action on the host before the job tasks are carried out 

Run action scripts or binaries on hosts to fulfill a pre-job requirement 

Probe

Runs a test on a host; if returns success, the job tasks are begun 

Run test on hosts to make sure they can do a job before the tasks begin 

Actions

An action is a script, binary, or executable that does something to a host. You categorize your actions as either Pre or Post.

Pre-actions are run before the tasks of a job begins. If a pre-action finishes successfully, it returns a value of zero and the next actions of the job are carried out. If a pre-action returns a non-zero value, the job stops.

Post-actions are run after the other tasks of a job are completed. If a post-action returns a non-zero value, the job ends with a failure status.

For example, you want to install the Apache server. A prerequisite of Apache installation is that /home be unmounted. After it is installed, you want to run other applications that need /home to be mounted.

You create a pre-action unmount_home.sh:

#!/bin/sh -f
# unmount home from remote server
umount server01:/home
            if [ $?==0]; then exit 0; fi

You create a post-action mount_home.sh:

#!/bin/sh -f
# mount home to remote server
mount server01:/home
            if [ $?==0]; then exit 0; fi

You upload these actions. Then you create a profile to install Apache, and add these actions to the job basket. The job does the following:

  1. runs any probes that you put in

  2. unmounts /home

  3. installs Apache

  4. mounts /home

Writing Actions

Make sure the action returns zero (0) on success.

Make the name of the action understandable and descriptive. You can view it in the Jobs panel as a task that either succeeded or failed.

Uploading Actions

In this procedure you upload an existing executable as a Pre-Action or Post-Action to the knowledge base. You can create a category under Pre-Actions or Post-Actions before uploading an action (see Adding Categories).

ProcedureTo Add an Action

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list select Local/Post-Actions | Pre-Actions/[category].

  4. Do one of the following:

    • From the tool bar, click the Add Component button.

    • Right-click the selected category and choose Local -> Add.

    • From the Components menu, choose Local -> Add.

      The Add Post Action or the Add Pre Action window opens.

  5. Type a name for the component that will point to your Post-action or Pre-action. This should not be the complete file name. The name should be a name that is easily understood.

  6. Type a free-text description.

  7. Check each distribution to which this file should be applied.

  8. Select a source machine:

    • If the console has access to the file, select Console.

    • If a remote managed host has access to the file, select Managed Host.


      Note –

      Remote upload is limited to 5 Mbytes. Console upload is unlimited. It is recommended that you upload from the console whenever possible.


ProcedureTo Upload a Post-action or a Pre-action from the Console Machine

If you selected console, follow this procedure. If you selected Managed Host, go to To Upload a Post-action or a Pre-action from a Managed Host.

  1. Click the Select File button of the File Name field. The Choose File window opens.

  2. Browse to and select the relevant file.

  3. Click Open.

    The Choose File window closes, and the path name appears in the File Name field of the Add Pre Action or Add Post Action window.

  4. Click Apply.

    The Status column indicates when the upload is done.

  5. Click Close to close the window, or Reset to add more.

ProcedureTo Upload a Post-action or a Pre-action from a Managed Host

If you selected Managed Host, follow this procedure.

  1. Click the Select Host button of the Host Name field.

    The Host Selection window opens.

  2. Select the managed host that has the file, and click OK.

    The Host Selection window closes. The host name appears in the Host Name field of the Add Pre Action or Add Post Action window.

  3. In the File Name field, type the full path name of the file.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.


Example 5–3 Uploading a Post-action or a Pre-action with the CLI

The Add Target Local command is the same for Pre-actions, Post-actions, Configuration files, Macros, and Probes. The following syntax is for Pre-actions and Post-actions. The -tP parameter is for Pre-actions; -tS is for Post-actions. The example script adds a Post-action.

In the CLI syntax, a category under the default Local categories is mandatory. See the procedure: Example 5–1 on for the Add Local Category CLI command. See Add Target Local (-atl) Command.


#! /bin/bash

function login { 
  echo -n “Type your user name:” 
  read user 
  echo -n “Type your password:” 
  read password 
} 

function distro { 
  echo “Active distributions are:” 
  uce_cli -ld -u “$user” -p “$password” 
  echo -n “To which distro should this script be added?” 
  read distro 
  echo 
} 

function category { 
  echo “Under which category should this Post-action be added?” 
  echo “Valid answers: any subcategory under Post-actions. See list:” 
  uce_cli -fc -T “Post-actions” -sons -D $distro -u “$user” -p “$password” #> tmp.file 
  sed “s/ROOT\/Local\/Post-actions//” tmp.file 
  echo -n “Start your answer with / :” 
  read parent #rm tmp.file 
  echo 
} 

function setup { 
  echo -n “Type the full path name of the file to upload:” 
  read pathname 
  echo -n “Type a display name for the local file:” 
  read displayName 
} 

login 
distro 
category 
setup 
uce_cli -atl -f “$pathname” -pT “Post-actions$parent” -tS “$displayName” -D $distro -u “$user” -p “$password”

Probes

A probe is a script or binary that tests whether a host fulfills prerequisites for successful completion of a job.

If a probe returns zero, the next tasks of the job are carried out. This ensures that only hosts that currently meet your requirements will run jobs.

If a probe returns 1, the job fails on the host. The probe name is displayed in the Status window as the point of failure. Now you can easily troubleshoot the host.


Example 5–4 Creating a Probe

You create a probe that tests disk space. It returns zero if there is more than the minimum defined in the script.


#!/bin/csh -f
set minimum_space=10000000000
set actual_space=\Qdf -k | awk ’{print $4}’ | tail -1\Q
if ( $actual_space > $minimum_space ) then
  echo $actual_space
  exit 0
endif
exit 1

Upload this probe. Create a job that includes the probe. The tasks are carried out if the available space of the host meets your requirements.


Writing Probes

Make sure the action returns zero (0) on success and one (1) on failure.

Make the name of the probe a boolean statement, to make it as clear as possible; users will view it in the Jobs panel as a task that either succeeded or failed.

Sun Update Connection – Enterprise might run a probe many times during a job. To ensure that operations are efficient, make sure that your probes are as short and fast as possible.

Uploading Probes

In this procedure you add probes to the local knowledge base. You can create a category under Probes before uploading a probe (see Adding Categories).

ProcedureTo Add a Probe

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list select Local/Probes/[category].

  4. Do one of the following:

    • From the tool bar, click the Add Component button.

    • Right-click the selected category and choose Local -> Add.

    • From the Components menu, choose Local -> Add.

      The Add Probe window opens.

  5. Type a display name for the component that will point to your probe.

    This should not be the complete file name, but it should be a name that is easily understood.

  6. Type a free-text description.

  7. Check each distribution to which this file should be applied.

  8. Select a source machine:

    • If the console has access to the file, select Console.

    • If a remote managed host has access to the file, select Managed Host.

      Note: remote upload is limited to 5Mb; console upload is unlimited. It is recommended that you upload from the console whenever possible.

ProcedureTo Upload a Probe from the Console Machine

If you selected console, follow this procedure. If you selected Managed Host, go to To Upload a Probe from a Managed Host.

  1. Click the Select File button of the File Name field.

    The Choose File window opens.

  2. Browse to and select the relevant file.

  3. Click Open.

    The Choose File window closes, and the path name appears in the File Name field of the Add Probe window.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.

ProcedureTo Upload a Probe from a Managed Host

If you selected Managed Host, follow this procedure.

  1. Click the Select Host button of the Host Name field.

    The Host Selection window opens.

  2. Select the managed host that has the software, and click OK.

    The Host Selection window closes. The host name appears in the Host Name field of the Add Probe window.

  3. In the File Name field, type the full path name of the file.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.


Example 5–5 Uploading a Probe with the CLI

The Add Target Local command is the same for Pre-actions, Post-actions, Configuration files, Macros, and Probes. The following syntax is for Probes.

In the CLI syntax, a category under the default Local categories is mandatory. See the procedure Example 5–1 for the Add Local Category CLI command. See Add Target Local (-atl) Command.


#! /bin/bash

function login { 
  echo -n “Type your user name:” 
  read user 
  echo -n “Type your password:” 
  read password 
} 

function distro { 
  echo “Active distributions are:” 
  uce_cli -ld -u “$user” -p “$password” 
  echo -n “To which distro should this script be added?” 
  read distro 
  echo 
} 

function category { 
  echo “Under which category should this Probe added?” 
  echo “Valid answers: any subcategory under Probes. See list:” 
  uce_cli -fc -T “Probes” -sons -D $distro -u “$user” -p “$password” > tmp.file 
  sed “s/ROOT\/Local\/Probes//” tmp.file 
  echo -n “Start your answer with / :” 
  read parent 
  rm tmp.file 
  echo 
} 

function setup { 
  echo -n “Type the full path name of the file to upload:” 
  read pathname 
  echo -n “Type a display name for the local file:” 
  read displayName 
} 

login 
distro 
category 
setup 
uce_cli -atl -f “$pathname” -pT “Probes$parent” -tR “$displayName” -D $distro -u “$user” -p “$password”

Configuration Files

The configuration files of a Linux or Solaris machine determine everything about the environment: the kernel version, the bootloader, the file system, the printers, and so on. All of these files are writable, to a system administrator with permissions and knowledge. Change management in a Linux or Solaris environment usually includes managing files as well as applications.

A local configuration file is any file that you want to store on the knowledge base and distribute to multiple hosts for simultaneous and consistent configurations. Macros (see Macros) are used to localize these files for values relevant to each managed host.


Example 5–6 Updating Configuration Files

Your enterprise with 200 Linux servers is reorganizing; personnel are changing offices and floors. Everyone wants their machine to print to the closest printer. Instead of reconfiguring every printcap file for every host (probably more than once, as the printers and the staff are moved around the complex), you make different versions of this file.

You change printcap slightly for each version:

# /etc/printcap
# Version for RH 9 on 12th floor West
lp:\
    :sd=/var/spool/lpd/lp:\
    :mx#0:\
    :sh:\
    :rm=printer12
    :rp=pr1:

A second version:

# /etc/printcap
# Version for RH WS3 on 10th floor Main
lp:\
    :sd=/var/spool/lpd/lp:\
    :mx#0:\
    :sh:\
    :rm=printer10
    :rp=pr1:

And so on. You create a file declaration for /etc/printcap. Then you upload the versions of the file to the file declaration.

Now you can change the printer configuration of any host within seconds, by selecting the appropriate version and sending it to the hosts that need it. The contents of their old printcap is overwritten with the contents of the version that you selected.


Creating File Declarations

A file declaration holds a path name for installation on remote hosts. When you select a local Configuration File to install on remote hosts, the file is installed in the path and under the name that is determined by the file declaration. Thus, a file declaration can hold multiple versions of the same file; or different files that you want to be installed in the same path name on different hosts. This allows you to simultaneously manage configuration files of a heterogenous environment.

You can create a sub-category under Configuration Files before uploading a Configuration file (see Adding Categories).

ProcedureTo Add a File Declaration

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list select Local/Configuration Files/[category].

  4. Do one of the following:

    • From the tool bar, click the Add Component button.

    • Right-click the selected category and choose Local -> Add.

    • From the Components menu, choose Local -> Add.

      The Add Target File Declaration window opens.

  5. In the Target File path name text-field, type the path name where you want the files that will be held under this declaration to be installed on the target hosts. Do not delete the starting back-slash.

  6. Type a free-text description.

  7. Check each distribution to which this file should be applied.

  8. Click Apply.

    The status column indicates when the file declaration is uploaded to the knowledge base.

  9. Click Close.

    The Add Target File Declaration window closes.

    The file declaration is created. A file with a suffix of -Unknown is also created. This is a placeholder and prevents accidental overwrites.


Example 5–7 Adding a File Declaration with the CLI

You may add a file declaration to all distributions (default; do not use the -D parameter) or to a single distribution. If you choose to add a file declaration to a single specified distribution, you can add the Configuration files only to that distribution. Remember that a file declaration, declares the target path name for installation; it does not upload the file itself.

In the CLI syntax, a category under the default Local categories is mandatory. See the procedure: Example 5–1 on for the Add Local Category CLI command. See Add File Declaration (-afd) Command.


#! /bin/bash 

function login { 
  echo -n “Type your user name:” 
  read user 
  echo -n “Type your password:” 
  read password 
} 
function distro { 
  echo “Active distributions are:” 
  uce_cli -ld -u “$user” -p “$password” 
  echo -n “To which distro should this be added?” 
  read distro echo 
} 
function category { 
  echo “Under which category should this File Declaration be added?” 
  echo “Valid answers: any subcategory under Configuration files. See list:” 
  uce_cli -fc -T “Configuration files” -sons -D $distro -u “$user” -p “$password” > tmp.file 
  sed “s/ROOT\/Local\/Configuration files//” tmp.file 
  echo -n “Start your answer with / :” 
  read parent 
  rm tmp.file 
  echo 
} 
function setup { 
  echo -n “Type the full path name for target installation:” 
  read path name 
} 
login 
distro 
category 
setup 
uce_cli -afd -tfp “$pathname” -pT “Configuration files$parent” -D $distro -u “$user” -p “$password”

Uploading Local Configuration Files

The File Declaration declares the full target path name for installation of a file on hosts; it is not the file itself. In this procedure you upload your local versions of Configuration files to the local knowledge base.

ProcedureTo Add a Local Configuration File

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, select Local/Configuration Files/category/file declaration.

  4. Do one of the following:

    • From the tool bar, click the Add Component button.

    • Right-click the selected category and choose Local -> Add.

    • From the Components menu, choose Local -> Add.

      The Add Configuration File window opens.

  5. Type a display version-name for the file.

    This text field is called Version (rather than Name), because the files that you add to a specific file declaration should all be different versions of one file. The Version value will be displayed in the Components list as a suffix to the file name.

    When you install this file on a remote host, it is installed under the full path name of the file declaration.

  6. Type a free-text description.

  7. Check each distribution to which this file should be applied. Make sure that the file declaration is on all the selected distributions.

  8. Select a source machine:

    • If the console has access to the file, select Console.

    • If a remote managed host has access to the file, select Managed Host.

      Note: remote upload is limited to 5Mb; console upload is unlimited. It is recommended that you upload from the console whenever possible.

ProcedureTo Upload a Configuration File from the Console Machine

If you selected console, follow this procedure. If you selected Managed Host, go to To Upload a Configuration File from a Managed Host.

  1. Click the Select File button of the File Name field.

    The Choose File window opens.

  2. Browse to and select the relevant file.

  3. Click Open.

    The Choose File window closes, and the path name appears in the File Name field of the Add Configuration File window.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.

ProcedureTo Upload a Configuration File from a Managed Host

If you selected Managed Host, follow this procedure.

  1. Click the Select Host button of the Host Name field.

    The Host Selection window opens.

  2. Select the managed host that has the software, and click OK.

    The Host Selection window closes. The host name appears in the Host Name field of the Add Configuration File window.

  3. In the File Name field, type the full path name of the file.

  4. Click Apply.


Example 5–8 Uploading a Configuration File with the CLI

The Add Target Local command is the same for Pre-actions, Post-actions, Configuration files, Macros, and Probes. The following syntax is for Configuration files. This command creates a file declaration automatically. It cannot be used to add a file to an existing declaration.

In the CLI syntax, a category under the default Local categories is mandatory. See Example 5–1 on for the Add Local Category CLI command. See Add Target Local (-atl) Command.


#! /bin/bash 

function login { 
  echo -n “Type your user name:” 
  read user 
  echo -n “Type your password:” 
  read password 
} 
function distro { 
  echo “Active distributions are:” 
  uce_cli -ld -u “$user” -p “$password” 
  echo -n “To which distro should this file be added?” 
  read distro 
  echo } 
function category { 
  echo “Under which category should this file be added?” 
  echo “A file declaration will be created automatically.” 
  echo “Valid answers: any subcategory under Configuration files. See list:” 
  uce_cli -fc -T “Configuration files” -sons -D $distro -u “$user” -p “$password” > tmp.file 
  sed “s/ROOT\/Local\/Configuration files//” tmp.file 
  echo -n “Start your answer with / :” 
  read parent 
  rm tmp.file 
  echo 
} 
function setup { 
  echo -n “Type the full path name of the file to upload: “ 
  read pathname 
  echo -n “Type a version suffix for this version of the file: “ 
  read version 
  echo -n “Type a display name for the local file: “ 
  read displayName 
} 
login 
distro 
category 
setup 
uce_cli -atl -f “$pathname” -pT “Configuration files$parent” -tF “$displayName” -v “$version” \
-D $distro -u “$user” -p “$password”

Macros

A macro is a short script that outputs a single line. This output replaces a macro sign in a local Configuration file.

The macro value is used to customize a Configuration file for its host machine. You create a job that installs a Configuration file on multiple hosts.

This Configuration file has <^AM^>macro<^AM^> in its content, where macro is the name of the macro in the knowledge base.

Each Agent sees the <^AM^> sign and runs the named macro script. The result of the macro run is a line of local data. The value of the macro is entered in place of the macro sign.


Example 5–9 Using Macros

You are reorganizing your network servers. You will be reconfiguring the /etc/hosts file for multiple hosts, perhaps several times. Instead of changing this file for every host every time, you create versions of this file and upload them as Configuration files. In each version, you replace the specific local host name with: <^AM^>hostname<^AM^>

You create a script named hosname.sh:

#!/bin/sh -f
# find local host name
hostname

You upload hostname.sh as a macro called hostname to the local knowledge base. You send the Configuration file as part of a job. Each agent that receives the file, gets the macro sign, downloads the hostname macro, and executes hostname.sh, which replaces <^AM^>hostname<^AM^> with the real local host name on each host.


Writing Macros

When writing macros:

The value of the macro, that is seen in the Configuration file, is the value that was given when the Configuration file was installed and the agent ran the macro from the knowledge base. If you create a macro that changes its value dynamically (or if you edit the content of the macro file), changes do not apply to the remote host files. If you want to change the content of the Configuration files with a new macro, you will have to upload the macro to the knowledge base and re-install the file on the hosts, letting the agents run the new macro.

Uploading Macros

In this procedure you add macros to the local knowledge base. Use this procedure to store local macro scripts, which will later be automatically downloaded and run on multiple hosts. You can create a category under Macros before uploading a macro (see Adding Categories).

ProcedureTo Add a Macro

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, select Local/Macros/[category].

  4. Do one of the following:

    • From the tool bar, click the Add Component button.

    • Right-click the selected category and choose Local -> Add.

    • From the Components menu, choose Local -> Add.

      The Add Macro window opens.

  5. Type a display name for the component that will point to the macro.

    This should not be the complete file name, but it should be a name that is easily understood.

  6. Type a free-text description.

  7. Check each distribution to which this file should be applied.

  8. Select a source machine:

    • If the console has access to the file, select Console.

    • If a remote managed host has access to the file, select Managed Host.


      Note –

      Remote upload is limited to 5Mb; console upload is unlimited. It is recommended that you upload from the console whenever possible.


ProcedureTo Upload a Macro from the Console Machine

If you selected console, follow this procedure. If you selected Managed Host, go to To Upload a Macro from a Managed Host.

  1. Click the Select File button of the File Name field.

    The Choose File window opens.

  2. Browse to and select the relevant file.

  3. Click Open.

    The Choose File window closes, and the path name appears in the File Name field of the Add Macro window.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.

ProcedureTo Upload a Macro from a Managed Host

If you selected Managed Host, follow this procedure.

  1. Click the Select Host button of the Host Name field.

    The Host Selection window opens.

  2. Select the managed host that has the file, and click OK.

    The Host Selection window closes. The host name appears in the Host Name field.

  3. In the File Name field, type the full path name of the file.

  4. Click Apply.

    The Status column indicates when the upload is done. Click Close to close the window, or Reset to add more.


Example 5–10 Adding a Macro with the CLI

The Add Target Local command is the same for Pre-actions, Post-actions, Configuration files, Macros, and Probes. The following syntax is for Macros.

In the CLI syntax, a category under the default Local categories is mandatory. See Example 5–1 on Example 5–1 for the Add Local Category CLI command. See Add Target Local (-atl) Command.


#! /bin/bash 

function login { 
  echo -n “Type your user name:” 
  read user 
  echo -n “Type your password:” 
  read password 
} 
function distro { 
  echo “Active distributions are:” 
  uce_cli -ld -u “$user” -p “$password” 
  echo -n “To which distro should this script be added?” 
  read distro 
  echo 
} 
function category { 
  echo “Under which category should this Macro be added?” 
  echo “Valid answers: any subcategory under Macros. See list:” 
  uce_cli -fc -T “Macros” -sons -D $distro -u “$user” -p “$password” > tmp.file 
  sed “s/ROOT\/Local\/Macros//” tmp.file 
  echo -n “Start your answer with / :” 
  read parent 
  rm tmp.file 
  echo 
} 
function setup { 
  echo -n “Type the full path name of the file to upload:” 
  read pathname 
  echo -n “Type a display name for the macro:” 
  read displayName 
} 
login 
distro 
category 
setup 
uce_cli -atl -f “$pathname” -pT “Macros$parent” -tM “$displayName” \
-D $distro -u “$user” -p “$password”

Editing Files

After you have added local files to your knowledge base, you may edit them in various ways. You may edit the files on the knowledge base. Any editing you do will affect the file that is stored to the knowledge base, not the original file.

You may edit the files you installed on managed hosts, making the changes directly on the hosts. These files are known as Host files. You may open and save changes to the content of a Host file using Sun Update Connection – Enterprise, but the changes will not be affected in the knowledge base unless you add the file as a knowledge base file.

Editing Local File Properties

In this procedure, you edit the properties of Configuration files, File Declarations, Macros, Post-actions, Pre-actions, and Probes in the knowledge base. If your environment changes, you can use this procedure to change the distributions to which Local Files are applied.

ProcedureTo Edit Local File Properties

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, under Local/default category/[user category>]/, select the relevant Post-action, Pre-action, Probe, Macro, Configuration file, or File Declaration.

  4. Do one of the following:

    • From the tool bar, click the Edit Local Component button.

    • Right-click the selection and choose Local -> Edit.

    • From the Components menu, choose Local -> Edit.

      A Properties window opens.

  5. Change the list of selected active distributions.

  6. Change any of the displayed properties.

  7. Click Apply.

    The changes are uploaded to the knowledge base. If you added more distributions to the selected list, the file itself is uploaded to the knowledge base of the new distributions.

Editing Knowledge Base Files

In this procedure you edit the contents of a Post-action, Pre-action, Probe, Macro, or Configuration file that has already been uploaded to the local knowledge base.

ProcedureTo Edit a Local File

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, under Local/default category/[user category]/, select the relevant Post-action, Pre-action, Probe, Macro, or Configuration file.

  4. Do one of the following:

    • From the tool bar, click the Open knowledge base File button.

    • Right-click the selected component and choose Local -> Open -> Knowledge Base File.

    • From the Components menu, choose Local -> Open -> Knowledge Base File.

      The Knowledge Base File window opens, displaying the contents of the file that is in the knowledge base.

  5. Make any changes to the contents of the knowledge base file.

  6. Check each distribution to which the changes should be applied.

  7. Click Apply.

    The Status column indicates when the upload is done.

  8. Click Close to close the window, or Reset to make more changes.

Replacing Knowledge Base Files

In this procedure, you attach new files to existing listings of Post-actions, Pre-actions, Probes, Macros, and Configuration files. Use this procedure to replace a knowledge base file with a different one from a managed host.

ProcedureTo Replace Knowledge Base Files

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, under Local/default category/[user category]/, select the relevant Post-action, Pre-action, Probe, Macro, or Configuration file.

  4. Do one of the following:

    • From the tool bar, click the Upload KnowledgeBase File button.

    • Right-click the selected file and choose Local -> Upload.

    • From the Components menu, choose Local -> Upload.

      The Attach Target File window opens.

  5. Select a source machine:

    • If the console has access to the file, select Console.

    • If a remote managed host has access to the file, select Managed Host.


      Note –

      Remote upload is limited to 5 Mbytes. Console upload is unlimited. It is recommended that you upload from the console whenever possible.


ProcedureTo Attach a File from the Console Machine

If you selected console, follow this procedure. If you selected Managed Host, go to To Upload a Macro from a Managed Host.

  1. Click the Select File button of the File Name field.

    The Choose File window opens.

  2. Browse to and select the relevant file.

  3. Click Open.

    The Choose File window closes, and the path name appears in the File Name field of the Attach Target File window.

  4. Check the distributions to which you want to apply these changes.

    If you check a distribution that does not have the original file, the attach will fail but no damage will be done.

  5. Click Apply.

    The Status column indicates when the upload is done.

  6. Click Close to close the window.

ProcedureTo Attach a File from a Managed Host

If you selected Managed Host, follow this procedure.

  1. Click the Select Host button of the Host Name field.

    The Host Selection window opens.

  2. Select the managed host that has the file, and click OK.

    The Host Selection window closes. The host name appears in the Host Name field.

  3. In the File Name field, type the full path name of the file.

  4. Check the distributions to which you want to apply these changes.

    If you check a distribution that does not have the original file, the attach will fail but no damage will be done.

  5. Click Apply.

    The Status column indicates when the upload is done.

  6. Click Close to close the window.

Deleting Knowledge Base Files

You can remove anything that you (or another user) added to the Local knowledge base, but before deletion, make sure the component is not already included in a profile or scheduled job. Deleting a local file that will be referenced later will cause the job to fail. In this procedure you delete Post-actions, Pre-actions, Probes, Macros, Configuration files, or File Declarations.

ProcedureTo Delete a Local File

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. From the Components list, select the component you want to delete.

  4. Do one of the following:

    • From the tool bar, click the Delete Local Component button.

    • Right-click the selected component and choose Delete.

    • From the Components menu, choose Delete.

      The Delete Local Component window opens.

  5. Check the distributions from which you want to delete the component.

    You may leave it on the component list of some distributions and delete it from others, or delete it from all.

  6. Click Apply.

    The Status column indicates when the change is done. You might have to wait until the console is updated with the changes; time depends on your local environment configuration.

Opening Host Files

After you have uploaded Local Configuration files to the knowledge base (see Uploading Local Configuration Files), and installed these files on managed hosts (see Distributing Local Files), you can access the files from the hosts. This feature allows you to view, edit, and save-as the content of files on remote hosts, directly on their hosts.

Make sure that:

ProcedureTo Access a File from a Remote Host

  1. Log in with full permissions or as the admin user.

  2. From the drop-down list in the tool bar, select a distribution-architecture.

    The Components list shows Local components applied to the selected distribution.

  3. Select a host. You can view files from only one host at a time.

  4. From the Components list, select Local/Configuration files/[category]/file declaration.

    The Configuration files on the knowledge base are versions for knowledge base organization. Select the File Declaration to point to the installed file on the remote host.

    Local

    -->Configuration Files

    ---->[category]

    ------>File Declaration (path name of file on host)

    -------->File version (on knowledge base)

  5. Do one of the following:

    • From the tool bar, click the Open Host File button.

    • Right-click the File Declaration and choose Local -> Open -> Open Host File.

    • From the Components menu, choose Local -> Open -> Open Host File.

      The Remote File Editor window opens. Wait until the contents of the remote file are uploaded and displayed.

  6. Change the text as needed.

  7. Do one of the following:

    • Click Cancel, to close the file without changing it.

    • Click Save As, to save a copy of the file, with any changes included. The Save As window opens, from where you can determine the path name of the copy.

    • Click Save, to overwrite the file on the selected remote host.

      The File Editor window closes.