[OpenIndiana-discuss] preserve configuration files on image-update - how?

Alan Coopersmith alan.coopersmith at oracle.com
Thu Jan 17 16:38:10 UTC 2013


On 01/17/13 05:01 AM, Jim Klimov wrote:
> Well, not that my answer is immediately relevant, but back in the
> days of Solaris, SVR4 packages (where config files were marked as
> "editable" or "volatile" FS object type, and/or had some "class"
> assigned to them to trigger update/merge scripts), the LiveUpgrade
> system copied the old files to something like hosts.~10 and then
> replaced or intellectually merged them with those in the update.

The IPS equivalent is marking files you expect users to edit with the
"preserve" tag:

     preserve

         This specifies that the file's contents  should  not  be
         overwritten on upgrade if the contents are determined to
         have changed  since  the  file  was  installed  or  last
         upgraded.  On  initial  installs, if an existing file is
         found,    the    file    is    salvaged    (stored    in
         /var/pkg/lost+found).

         If the value of preserve is renameold, then the existing
         file  is  renamed  with  the extension .old, and the new
         file is put in its place.

         If the value of preserve is renamenew, then the existing
         file  is  left alone, and the new file is installed with
         the extension .new.

         If the value of preserve is legacy, then  this  file  is
         not installed for initial package installs. On upgrades,
         any existing file is renamed with the extension .legacy,
         and then the new file is put in its place.

         If the value of preserve is true (or a value not  listed
         above,  such  as  strawberry), then the existing file is
         left alone, and the new file is not installed.

Mmm, strawberry preserves...

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc



More information about the OpenIndiana-discuss mailing list