Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-06 Thread Enda O'Connor ( Sun Micro Systems Ireland)
Ihsan Zaghmouth wrote:
 Hi Jeff,
 
 Here is my 2 cents, after assuming that pkginfo should hold such an 
 information post installation.
 The */var/sadm/pkg/pkgname/pkginfo* file lists among other info the 
 *SUNW_PKG_ALLZONES*=true | false for the installed package.
 pkginfo should have an option to display that, I tried them all ... in 
 vain !
 
 if you write a small script, you can display the 
 /var/sadm/pkg/pkgname/pkginfo, you should be able to distinguish:
 :
 cat /var/sadm/pkg/pkgname/pkginfo* | *grep SUNW_PKG_ALLZONES, and if:
 
1. SUNW_PKG_ALLZONES=true  ... Then installed on all Zones
2. SUNW_PKG_ALLZONES=false ... *Only Global -G*
 
 Ihsan
 
Hi
ALLZONES is not the same as -G
-G is identical in behaviour to SUNW_PKG_THISZONE=true

So if a package does not define any of the zones variables including
SUNW_PKG_THISZONE
Adding said package with pkgadd -G will lead to identical behaviour as 
though the package had
SUNW_PKG_THISZONE=true defined, but it does not cause this variable to 
get defined in the pkginfo, rather a file
/var/sadm/install/gz-only-packages gets populated with this package

Now remember that one could have
SUNWfoo and SUNWfoor, so a simple grep fro SUNWfoo in said file is not 
sufficent, it might match SUNWfoor which is not what is wanted.

Also
pkgparam is what is used to display pkginfo variables

# pkgparam SUNWcsu SUNW_PKG_ALLZONES
true
#

Enda
 Jeff Victor wrote:
 How can someone learn whether a package was installed in the global zone 
 *with* -G - or without it?

 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
   
 
 -- 
 
 
 
 
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-06 Thread Enda O'Connor ( Sun Micro Systems Ireland)
Enda O'Connor ( Sun Micro Systems Ireland) wrote:
 Ihsan Zaghmouth wrote:
 Hi Jeff,

 Here is my 2 cents, after assuming that pkginfo should hold such an 
 information post installation.
 The */var/sadm/pkg/pkgname/pkginfo* file lists among other info the 
 *SUNW_PKG_ALLZONES*=true | false for the installed package.
 pkginfo should have an option to display that, I tried them all ... in 
 vain !

 if you write a small script, you can display the 
 /var/sadm/pkg/pkgname/pkginfo, you should be able to distinguish:
 :
 cat /var/sadm/pkg/pkgname/pkginfo* | *grep SUNW_PKG_ALLZONES, and if:

1. SUNW_PKG_ALLZONES=true  ... Then installed on all Zones
2. SUNW_PKG_ALLZONES=false ... *Only Global -G*
just to be clear so there's no confusion:

If a package has
SUNW_PKG_ALLZONES=false
basically it means that the package does not have to be identical 
across all the zones, but the default behaviour of pkgadd is to add the 
package  to all available zones ( both global and local ) unless -G was 
specified or SUNW_PKG_THISZONE is true in installing pkginfo, even with 
ALLZONES=false.

So  packages with SUNW_PKG_ALLZONES=false, will actually get installed 
in all the zones by default by calling pkgadd.

The variable that corresponds to -G is SUNW_PKG_THISZONE
see man -s4 pkginfo for a description of the 3 pkginfo variables that 
affect zones

cheers
Enda

 Ihsan

 Hi
 ALLZONES is not the same as -G
 -G is identical in behaviour to SUNW_PKG_THISZONE=true
 
 So if a package does not define any of the zones variables including
 SUNW_PKG_THISZONE
 Adding said package with pkgadd -G will lead to identical behaviour as 
 though the package had
 SUNW_PKG_THISZONE=true defined, but it does not cause this variable to 
 get defined in the pkginfo, rather a file
 /var/sadm/install/gz-only-packages gets populated with this package
 
 Now remember that one could have
 SUNWfoo and SUNWfoor, so a simple grep fro SUNWfoo in said file is not 
 sufficent, it might match SUNWfoor which is not what is wanted.
 
 Also
 pkgparam is what is used to display pkginfo variables
 
 # pkgparam SUNWcsu SUNW_PKG_ALLZONES
 true
 #
 
 Enda
 Jeff Victor wrote:
 How can someone learn whether a package was installed in the global zone 
 *with* -G - or without it?

 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
   
 -- 


 

 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
 
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-05 Thread Ihsan Zaghmouth




Hi Jeff,

Here is my 2 cents, after assuming that pkginfo should hold such an
information post installation.
The /var/sadm/pkg/pkgname/pkginfo file lists among
other info the SUNW_PKG_ALLZONES=true | false for the installed
package.
pkginfo should have an option to display that, I tried them all ... in
vain !

if you write a small script, you can display the
/var/sadm/pkg/pkgname/pkginfo, you should be able to
distinguish:
:
cat /var/sadm/pkg/pkgname/pkginfo | grep
SUNW_PKG_ALLZONES, and if:

  SUNW_PKG_ALLZONES=true ... Then installed on all Zones 
  
  SUNW_PKG_ALLZONES=false ... Only Global -G 

Ihsan

Jeff Victor wrote:

  How can someone learn whether a package was installed in the global zone 
*with* -G - or without it?

___
zones-discuss mailing list
zones-discuss@opensolaris.org
  


-- 



___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-05 Thread Shawn Ferry

Jeff, Ihsan;

You want the command pkgparam, examples below.

Shawn

On Sep 5, 2007, at 2:54 PM, Ihsan Zaghmouth wrote:


Hi Jeff,

Here is my 2 cents, after assuming that pkginfo should hold such an  
information post installation.
The /var/sadm/pkg/pkgname/pkginfo file lists among other info the  
SUNW_PKG_ALLZONES=true | false for the installed package.
pkginfo should have an option to display that, I tried them all ...  
in vain !


pkgparam -v pkgname or pkgparam pkgname param

e.g.
pkgparam SUNWcsr SUNW_PKG_ALLZONES
true


pkgparam -v SUNWcsr
CLASSES='none ttydefs initd renamenew preserve cronroot passwd  
tiservices inetdconf definit etcremote nsswitch netconfig deflogin  
defsu syslogconf ttysrch group inittab etcrpc etcprofile mailxrc  
shadow locallogin localprofile logadmconf logindevperm nscd fstypes  
pamconf services rbac renameold dhcpinittab policyconf pkcs11confbase  
defpasswd vfstab manifest hosts'

BASEDIR='/'
LANG=''
TZ='GMT0'
PATH='/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin'
OAMBASE='/usr/sadm/sysadm'
PKG='SUNWcsr'
NAME='Core Solaris, (Root)'
ARCH='i386'
VERSION='11.11,REV=2007.01.05.02.51'
SUNW_PRODNAME='SunOS'
SUNW_PRODVERS='5.11/snv_55'
SUNW_PKGTYPE='root'
MAXINST='1000'
CATEGORY='system'
DESC='core software for a specific instruction-set architecture'
VENDOR='Sun Microsystems, Inc.'
HOTLINE='Please contact your local service provider'
EMAIL=''
SUNW_PKGVERS='1.0'
SUNW_PKG_ALLZONES='true'
SUNW_PKG_HOLLOW='false'
SUNW_PKG_THISZONE='false'
PSTAMP='elpaso20070105025839'
PKGINST='SUNWcsr'
PKGSAV='/var/sadm/pkg/SUNWcsr/save'
MODIFIED_AFTER_INSTALLED=''
INSTDATE='Mar 23 2007 06:09'




if you write a small script, you can display the /var/sadm/pkg/ 
pkgname/pkginfo, you should be able to distinguish:

:
cat /var/sadm/pkg/pkgname/pkginfo | grep SUNW_PKG_ALLZONES, and if:
SUNW_PKG_ALLZONES=true  ... Then installed on all Zones
SUNW_PKG_ALLZONES=false ... Only Global -G
Ihsan

Jeff Victor wrote:
How can someone learn whether a package was installed in the  
global zone

*with* -G - or without it?

___
zones-discuss mailing list
zones-discuss@opensolaris.org



--
C:\Sun\Presentation2.jpg
C:\Sun\Presentation2.jpg
___
zones-discuss mailing list
zones-discuss@opensolaris.org


--
Shawn Ferry  shawn.ferry at sun.com
Senior Primary Systems Engineer
Sun Managed Operations




___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-05 Thread Ihsan Zaghmouth




Much appreciated Shawn.

Shawn Ferry wrote:

  
  Jeff, Ihsan;
  
  
  You want the command pkgparam, examples below.
  
  
  Shawn
  
  
  On Sep 5, 2007, at 2:54 PM, Ihsan Zaghmouth wrote:
  
  
   Hi Jeff,

Here is my 2 cents, after assuming that pkginfo should hold such an
information post installation.
The /var/sadm/pkg/pkgname/pkginfo file lists among
other info the SUNW_PKG_ALLZONES=true | false for the installed
package.
pkginfo should have an option to display that, I tried them all ... in
vain !
  
  
  pkgparam -v pkgname or pkgparam pkgname
param
  
  
  
  e.g.
  
  pkgparam SUNWcsr SUNW_PKG_ALLZONES
  true
  
  
  
  
  
  
  pkgparam -v SUNWcsr   
  CLASSES='none ttydefs initd renamenew preserve cronroot passwd
tiservices inetdconf definit etcremote nsswitch netconfig deflogin
defsu syslogconf ttysrch group inittab etcrpc etcprofile mailxrc shadow
locallogin localprofile logadmconf logindevperm nscd fstypes pamconf
services rbac renameold dhcpinittab policyconf pkcs11confbase defpasswd
vfstab manifest hosts'
  BASEDIR='/'
  LANG=''
  TZ='GMT0'
  PATH='/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin'
  OAMBASE='/usr/sadm/sysadm'
  PKG='SUNWcsr'
  NAME='Core Solaris, (Root)'
  ARCH='i386'
  VERSION='11.11,REV=2007.01.05.02.51'
  SUNW_PRODNAME='SunOS'
  SUNW_PRODVERS='5.11/snv_55'
  SUNW_PKGTYPE='root'
  MAXINST='1000'
  CATEGORY='system'
  DESC='core software for a specific instruction-set architecture'
  VENDOR='Sun Microsystems, Inc.'
  HOTLINE='Please contact your local service provider'
  EMAIL=''
  SUNW_PKGVERS='1.0'
  SUNW_PKG_ALLZONES='true'
  SUNW_PKG_HOLLOW='false'
  SUNW_PKG_THISZONE='false'
  PSTAMP='elpaso20070105025839'
  PKGINST='SUNWcsr'
  PKGSAV='/var/sadm/pkg/SUNWcsr/save'
  MODIFIED_AFTER_INSTALLED=''
  INSTDATE='Mar 23 2007 06:09'
  
  
  
  
  

if you write a small script, you can display the
/var/sadm/pkg/pkgname/pkginfo, you should be able to
distinguish:
:
cat /var/sadm/pkg/pkgname/pkginfo | grep
SUNW_PKG_ALLZONES, and if:

  SUNW_PKG_ALLZONES=true ... Then installed on all Zones 
  
  SUNW_PKG_ALLZONES=false ... Only Global -G 

Ihsan

Jeff Victor wrote:

  How can someone learn whether a package was installed in the global zone 
*with* -G - or without it?

___
zones-discuss mailing list
zones-discuss@opensolaris.org
  


-- 
C:\Sun\Presentation2.jpg
C:\Sun\Presentation2.jpg
___
zones-discuss mailing list
zones-discuss@opensolaris.org
  
  
  
   
  --
  Shawn Ferry shawn.ferry at sun.com
  Senior Primary Systems Engineer
  Sun Managed Operations
  
  
  
  
  
   
  
  
  
  

___
zones-discuss mailing list
zones-discuss@opensolaris.org
  


-- 



___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Detect pkgs installed with -G?

2007-09-05 Thread Ethan Quach
Two ways a pkg can be installed in the global zone only.

a)  SUNW_PKG_ALLZONES=false
SUNW_PKG_THISZONE=true

b)  SUNW_PKG_ALLZONES=false
SUNW_PKG_THISZONE=false
# pkgadd was run with -G


Trolling though the installed pkginfo files will give you (a), but
not (b).  What you're probably looking for is
/var/sadm/install/gz-only-packages.  That's a private interface though.


-ethan


Ihsan Zaghmouth wrote:
 Much appreciated Shawn.
 
 Shawn Ferry wrote:
 Jeff, Ihsan;

 You want the command pkgparam, examples below.

 Shawn

 On Sep 5, 2007, at 2:54 PM, Ihsan Zaghmouth wrote:

 Hi Jeff,

 Here is my 2 cents, after assuming that pkginfo should hold such an 
 information post installation.
 The */var/sadm/pkg/pkgname/pkginfo* file lists among other info the 
 *SUNW_PKG_ALLZONES*=true | false for the installed package.
 pkginfo should have an option to display that, I tried them all ... 
 in vain !

 pkgparam -v pkgname or pkgparam pkgname param

 e.g.
 pkgparam SUNWcsr SUNW_PKG_ALLZONES
 true


 pkgparam -v SUNWcsr   
 CLASSES='none ttydefs initd renamenew preserve cronroot passwd 
 tiservices inetdconf definit etcremote nsswitch netconfig deflogin 
 defsu syslogconf ttysrch group inittab etcrpc etcprofile mailxrc 
 shadow locallogin localprofile logadmconf logindevperm nscd fstypes 
 pamconf services rbac renameold dhcpinittab policyconf pkcs11confbase 
 defpasswd vfstab manifest hosts'
 BASEDIR='/'
 LANG=''
 TZ='GMT0'
 PATH='/sbin:/usr/sbin:/usr/bin:/usr/sadm/install/bin'
 OAMBASE='/usr/sadm/sysadm'
 PKG='SUNWcsr'
 NAME='Core Solaris, (Root)'
 ARCH='i386'
 VERSION='11.11,REV=2007.01.05.02.51'
 SUNW_PRODNAME='SunOS'
 SUNW_PRODVERS='5.11/snv_55'
 SUNW_PKGTYPE='root'
 MAXINST='1000'
 CATEGORY='system'
 DESC='core software for a specific instruction-set architecture'
 VENDOR='Sun Microsystems, Inc.'
 HOTLINE='Please contact your local service provider'
 EMAIL=''
 SUNW_PKGVERS='1.0'
 SUNW_PKG_ALLZONES='true'
 SUNW_PKG_HOLLOW='false'
 SUNW_PKG_THISZONE='false'
 PSTAMP='elpaso20070105025839'
 PKGINST='SUNWcsr'
 PKGSAV='/var/sadm/pkg/SUNWcsr/save'
 MODIFIED_AFTER_INSTALLED=''
 INSTDATE='Mar 23 2007 06:09'



 if you write a small script, you can display the 
 /var/sadm/pkg/pkgname/pkginfo, you should be able to distinguish:
 :
 cat /var/sadm/pkg/pkgname/pkginfo* | *grep SUNW_PKG_ALLZONES, and if:

1. SUNW_PKG_ALLZONES=true  ... Then installed on all Zones
2. SUNW_PKG_ALLZONES=false ... *Only Global -G*

 Ihsan

 Jeff Victor wrote:
 How can someone learn whether a package was installed in the global zone 
 *with* -G - or without it?

 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
   

 -- 
 C:\Sun\Presentation2.jpg
 C:\Sun\Presentation2.jpg
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org mailto:zones-discuss@opensolaris.org

 --
 Shawn Ferry  shawn.ferry at sun.com
 Senior Primary Systems Engineer
 Sun Managed Operations




 

 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
   
 
 -- 
 
 
 
 
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org