manifest-import revision adfc3118ca8c6b541b6a93d4bc24583eb4ebd73d
12877N/A# The contents of this file are subject to the terms of the 12877N/A# Common Development and Distribution License (the "License"). 12877N/A# You may not use this file except in compliance with the License. 12877N/A# See the License for the specific language governing permissions 12877N/A# and limitations under the License. 12877N/A# When distributing Covered Code, include this CDDL HEADER in each 12877N/A# If applicable, add the following below this CDDL HEADER, with the 12877N/A# fields enclosed by brackets "[]" replaced with your own identifying 12877N/A# information: Portions Copyright [yyyy] [name of copyright owner] 12877N/A# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 12877N/A# then there is work to be done by the cleanup process. 12877N/A awk '(/^lib_/ && /\/manifestfile /) {print $3}'` 12877N/A# Upon upgrading to early manifest import code, preserve hashes of system 12877N/A# not re-apply the profiles and overwrite user customizations. Simply 12877N/A# migrate manifestfile and hash values to new property groups named after 12877N/A# svccfg cleanup will remove the property groups in a later step. 12877N/A # If /var is a separate fs, return and let Late Import 12877N/A # Preserve hashes for the following profiles: generic (two 12877N/A # cases) and platform (uname -i, uname -m outputs). echo "Preserving platform hash ($plh)." echo "Preserving platform hash ($plmh)." # 2. Manifest import. Application directories first, then # site-specific manifests. echo "Changed manifests to import:" # Attempt of moving the repository to tmpfs. If that doesn't # work, reset doswitch so we don't attempt switching back. # Import the manifests while giving a running display of imports on # console, and a final count in the logfile. msg="svccfg import warnings. See" # 3. Profile application. We must create the platform profile upon # first boot, as we may be a diskless client of a platform or # architecture distinct from our NFS server. # Generic and platform profiles are only supported in /etc. # this is very likely an import after upgrade so call # preserve_system_profiles in that case. pln="etc_svc_profile_platform_${pl}_xml" [ $plm != $pl ] && plmn="etc_svc_profile_platform_${plm}_xml" echo "/etc/svc system profiles not found: upgrade system profiles" # 4. Upgrade handling. The upgrade file generally consists of a series # of svcadm(1M) and svccfg(1M) commands. # Rename the datalink upgrade script file. This script is used in the # the file cannot be renamed until now (when the file system becomes if [ -f "${datalink_script}" ]; then "${datalink_script}".app.`date +\%Y\%m\%d\%H\%M\%S` # 5. Giving administrator the final say, apply site.xml profile and profiles if [
"$early" =
"false" ];
then # svc.startd has unconfigured the services found in deathrow, # Delete services and instances from the deathrow file. # Remove deathrow manifest hash. if [
"$early" =
"false" ];
then echo "Converting obsolete repository entries: \c" > /
dev/
msglog echo $
1 |
sed 's:/: :' |
( echo "addpg v$pg framework") | echo "setprop v$pg/md5sum = opaque: $value") | echo "Converted $n obsolete repository entries" # Call import and apply profiles here if [
"$early" =
"true" ];
then # during late manifest-import # First import the manifests # If the filesystem is NOT read only then move the repo back to perm # There is no care wether the switch was made or not, but just want # to move it. If it is already perm this does not affect anything # at least on the surface. REALLY want to improve on this... echo "Repository switch back operation failed, \c" echo "please check the system log for the" echo "possible fatal error messages."