Tony Nguyen writes:
> Looking for $BASEDIR/etc/svc/repository-boot is reasonable. Does 
> smf_present() or checking for existence of /etc 
> <http://cvs.opensolaris.org/source/s?path=/etc/>/svc 
> <http://cvs.opensolaris.org/source/s?path=/etc/svc/>/volatile 
> <http://cvs.opensolaris.org/source/s?path=/etc/svc/volatile/>/repository_door 
> <http://cvs.opensolaris.org/source/s?path=/etc/svc/volatile/repository_door> 
> in smf_include.sh be sufficient?

That won't work, because /etc/svc/volatile is mounted on swap.  When
I'm looking at an inactive system -- which is _always_ the case during
upgrade, and which is the problem I'm trying to solve -- anything that
might have been created in a tmpfs file system is gone.

For normal upgrade, the root file system is mounted on /a.  For Live
Upgrade, it's some /.alt.* mount point.  Either way, I need something
that's permanently part of the root file system and that tells me
whether SMF has run on that system.  That door won't do it.

I also can't really use smf_include.sh, because the packaging scripts
need to be runnable on pre-S10 releases of Solaris.  That's how Live
Upgrade works: lucreate copies the current root over to a new one with
cpio, and then luupgrade runs pfinstall which then does the necessary
pkgrm and pkgadd invocations with '-R' set to that new root.  The
system is still running an old release at that point (perhaps as old
as S8, given that we officially support upgrades from release N-2).

Plus, even if I put some new function in smf_include.sh (in order to
avoid exposing this bit of internal design to those packaging
scripts), I couldn't run it, because that file doesn't necessarily
exist anywhere but in the 'archive/none.bz2' file in the package that
delivers it.

I'm a bit hemmed in here.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to