Philip Brown wrote: > Bart Smaalders wrote: >> Philip Brown wrote: >>> "This is the New and Improved way of doing postinstall scripts. This >>> is why it is an improvement. And oh by the way, here are some tools >>> for you, to help you transition your existing postinstall scripts, to >>> the new-and-better way". >> I'm hesitant to call these post-install scripts. They won't take the same >> arguments, they don't run at the same time, and the order of their >> execution isn't determined by pkg dependencies, but (likely) >> by service dependencies. >> >> They're going to be quite different, but should be much easier to >> write correctly, since your script/action runs in the context of the >> installed image, rather than in the context of the machine creating the >> image. You can actually invoke binaries that are part of the pkg you've >> installed, .... > > > Sounds like "a postinstall script, that doesnt have to use > chroot $PKG_INSTALL_ROOT > any more". > > Why would that be "quite different"? > > I could see "quite simplified" :-) in that it doesnt need chroot any more, > etc. but why should it have to be "quite different"? >
chroot $PKG_INSTALL_ROOT will only work for images that are the exact duplicate of the hostmachine, and will fail spectacularly on diskless machines, cross-architecture images, etc. > If you chose to implement them in a compatible fashion, it sounds like from > your description, it might theoretically be possible to take a *cleanly > written* old-style postinstall script, and drop it inside some kind of SMF > wrapper to run it at the most appropriate time. > It would think it was just running with PKG_INSTALL_ROOT=/, and do what it > needed to do. > When should this script run? > >> Because we avoid running unknown scripts as root in installation >> context, we will able to install pkgs into zones w/o having >> to boot each one as we do today; instead we can do all the >> pkgs ops on zone clones... this will greatly speed up zone >> packaging/patching operations. > > I dont see what the big fuss is about "unknown scripts in installation > context", compared to "unknown scripts being run through an SMF harness". > Have you ever patched a zone? - Bart -- Bart Smaalders Solaris Kernel Performance [EMAIL PROTECTED] http://blogs.sun.com/barts "You will contribute more with mercurial than with thunderbird". _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
