James Carlson wrote: > As part of fixing CR 6392582, I need to detect whether the system > being upgraded has ever run SMF and thus avoid the gymnastics > necessary for upgrade from non-SMF. I able do so by checking for the > existence of one of these symlinks, created by the undocumented > "svcadm _smf_backup" feature added by CR 5102864: > > $BASEDIR/etc/svc/repository-boot > $BASEDIR/etc/svc/repository-manifest_import > > Doing this seems like the simplest and easiest to defend > implementation. The problem, of course, is that it's an undocumented > interface, and it could be ripped out from under me. I thus need to > make it Stable. > > Alternatives include creating some sort of utility to abstract this > away, but that's problematic. The utility wouldn't necessarily work > in all the scenarios where detection is required (such as using LU to > upgrade from Solaris 9 or S10u[1-4] to Nevada), so we'd need to code > around the missing utility and fall back on something else to solve > the problem. That puts us back where we started. > > Any comments? If not, I'm going to draft up a PSARC case to make one > of those two symlinks (probably the latter one) a Stable interface so > that, where necessary, package and patch authors can check for SMF. > > Hi James,
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? -tony