1751866 Members
5359 Online
108782 Solutions
New Discussion юеВ

Re: swreg

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: swreg

>But then what's the use of swreg?

In your case you don't need it. But you can unregister depots. Or if you used mv, cp, or pax/tar/cpio to copy a depot, you would need to register it. Or if the depot is on NFS, you may register it on other machines.

Or if you fall into the SD trap of having N ways to do things and you use swpackage instead of swcopy, you would need to register it.
himacs
Super Advisor

Re: swreg

Hi,

I was trying to unregister melow patch but ended up with error..plz guide

swreg -u depot /var/patch/PHNE_39872.depot
ERROR: A valid registration level is needed for the successful
execution of "swreg"(). The valid levels are: "depot", "root",
"shroot" or "prroot".
ERROR: Command line parsing failed.


regards
himacs
Sudeesh
Respected Contributor

Re: swreg

Correct syntax for un-register is:
swreg -l depot -u

Now let me help you to register a depot the right way:

Assume you have downloaded the patch to depot_server@/tmp/PHNE_39872.depot and you want it to register at /depot/patch/PHNE_39872.

swcopy -x mount_all_filesystems=false -x enforce_dependencies=FALSE /tmp/PHNE_39872.depot \* @/depot/patch/PHNE_39872

verify if swcopy has automatically registered it:

swlist -l depot

If not register it:

swreg -l depot /depot/patch/PHNE_39872

From remote system:

swlist -l depot -s depot_server

swinstall -s depot_server:/depot/patch/PHNE_39872 \*


Hope this helps


Thanks

Sudeesh




The most predictable thing in life is its unpredictability
himacs
Super Advisor

Re: swreg

Hi sudeesh,

The unregistration successful.

I have run swcopy as suggested by you.But ended up with errors.


* Session started for user "root@noortrg".

* Beginning Selection
* "noortrg:/var/patch/PHNE_39872": This target does not exist
and will be created.
ERROR: There is currently no depot software on host "noortrg" at
location "/var/spool/sw". Make sure that an absolute pathname
is specified for location (beginning with "/").
* Source connection failed for "noortrg:/var/spool/sw".
WARNING: More information may be found in the daemon logfile on this
target (default location is noortrg:/var/adm/sw/swagentd.log).
* Selection had errors.
-----------------------
tail -f /var/adm/sw/swagentd.log
16:20:50 uae
* Agent pid=13007 completed. 09/05/09 16:20:50 uae
* Started copy agent on "/var/patch/PHNE_39872" for
root@noortrg, pid=13050, 09/05/09 16:22:54 uae
NOTE: The target "/var/patch/PHNE_39872" does not exist and will be
created. pid=13050 09/05/09 16:22:54 uae
ERROR: Failed to start source agent on "/var/spool/sw" for
root@noortrg. "/var/spool/sw" is not a valid depot. 09/05/09
16:22:54 uae
* Agent pid=13050 completed. 09/05/09 16:22:54 uae

regards
himacs

Sudeesh
Respected Contributor

Re: swreg

sorry .. i missed something(-s): use below syntax

swcopy -x mount_all_filesystems=false -x enforce_dependencies=FALSE -s /tmp/PHNE_39872.depot \* @/depot/patch/PHNE_39872
The most predictable thing in life is its unpredictability
himacs
Super Advisor

Re: swreg

Hi sudheesh,

swcopy worked fine..

BUt when i tried in server B,getting same error.

Mel,
after doing swcopy , defaults.hosts file got created and by default it has source server name and i added target server name.but after that also source server name not displayed in target.

Tinqli,

/tmp is a OS filesystem,not any link


regards
himacs
Sudeesh
Respected Contributor

Re: swreg

pls gave o/p from depot server: swlist -l depot
The most predictable thing in life is its unpredictability
himacs
Super Advisor

Re: swreg

Hi,

UAEMFQDDCBAPD01:/tmp>swlist -l depot @ noortrg
# Initializing...
# Target "noortrg" has the following depot(s):
/tmp/rsp/depot
/var/patch/rsp/depot
/pcard/os/Noor-Islamic-Bank_Depot_bundle+recommended-patches-12081.depot
/var/patch/PHNE_39872
its showing registered depots in target.

Anything needs to done in target?

regards
himacs

himacs
Super Advisor

Re: swreg

Hi Sudheesh,

noortrg /tmp >swlist -l depot
# Initializing...
# Target "noortrg" has the following depot(s):
/tmp/rsp/depot
/var/patch/rsp/depot
/pcard/os/Noor-Islamic-Bank_Depot_bundle+recommended-patches-12081.depot
/var/patch/IPfilter/depot
/var/patch/PHNE_39872


regards
himacs
Sudeesh
Respected Contributor

Re: swreg

also I need swlist -l depot -s depot_server from client.

The most predictable thing in life is its unpredictability