--- etc/rc.initdiskless 2012-03-13 10:17:09.000000000 +0100 +++ etc/rc.initdiskless 2012-03-13 10:17:09.000000000 +0100 @@ -39,7 +39,10 @@ # for which memory filesystems will be created and filled, # and T is one of the "template" directories below: # -# base universal base, typically a replica of the original root; +# base.${rel} universal base for the given major release, typically a +# replica of the original root; +# base universal base, typically a replica of the original root, +# effective only if base.${rel} does not exist; # default secondary universal base, typically overriding some # of the files in the original root; # ${ipba} where ${ipba} is the assigned broadcast IP address @@ -53,7 +56,9 @@ # ip/${ip} same as above # # Template directories are scanned in the order they are listed above, -# with each successive directory overriding (merged into) the previous one; +# with each successive directory overriding (merged into) the previous one +# (except in the case of the base directory, where the release-specific +# base is chosen if exists to help multiple major releases to work together); # non-existing directories are ignored. The subdirectory forms exist to # help keep the top level /conf manageable in large installations. # @@ -261,7 +266,7 @@ done # The list of directories with template files -templates="base default" +templates="default" if [ -n "${bootp_ipbca}" ]; then templates="${templates} ${bootp_ipbca} bcast/${bootp_ipbca}" fi @@ -275,7 +280,17 @@ # If /conf/diskless_remount exists, remount all of /conf. handle_remount /conf -# Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca}, +# Extract the major revision from uname +rel=`expr \`uname -r\` : '\(.\)'` +# If we have a "base.${rel}" directory, use that as base, otherwise fall back +# to "base" +if [ -d "/conf/base.${rel}" ]; then + templates="base.${rel} ${templates}" +else + templates="base ${templates}" +fi + +# Resolve templates in /conf/base[.${rel}], /conf/default, /conf/${bootp_ipbca}, # and /conf/${bootp_ipa}. For each subdirectory found within these # directories: # --- share/man/man8/diskless.8 2011-08-08 15:13:22.000000000 +0200 +++ share/man/man8/diskless.8 2012-03-13 10:14:56.000000000 +0100 @@ -255,6 +255,7 @@ .Pp The scripts provide four overriding directories situated in +.Pa /conf/base. or .Pa /conf/base , .Pa /conf/default , .Pa /conf/ , @@ -267,6 +268,14 @@ on the .Nm machine. +If you run different major releases, you should maintain a base /etc for +each one to provide backwards compatibility for older releases. +You can do this by installing major release specific /etc into +.Pa /conf/base. +The +.Nm +boot script will first look for this release specific base, then +the standard base in this order. The more specific base will be used. You can clone the server's .Pa /etc here or you can create a special file which tells the