# HG changeset patch # User Dan Price # Date 1279926932 25200 # Node ID b8a81d02e92bef9fc6a3819199bb3ddef523b44b # Parent 24f955a0d580c9ec2df23ec74aff961b3bb9d946 6970361 delete deferred activation patching hooks from nevada ON diff -r 24f955a0d580 -r b8a81d02e92b usr/src/cmd/boot/bootadm/bootadm.c --- a/usr/src/cmd/boot/bootadm/bootadm.c Fri Jul 23 18:33:39 2010 -0400 +++ b/usr/src/cmd/boot/bootadm/bootadm.c Fri Jul 23 16:15:32 2010 -0700 @@ -161,16 +161,6 @@ } zfs_mnted_t; /* - * The following two defines are used to detect and create the correct - * boot archive when safemode patching is underway. LOFS_PATCH_FILE is a - * contracted private interface between bootadm and the install - * consolidation. It is set by pdo.c when a patch with SUNW_PATCH_SAFEMODE - * is applied. - */ -#define LOFS_PATCH_FILE "/var/run/.patch_loopback_mode" -#define LOFS_PATCH_MNT "/var/run/.patch_root_loopbackmnt" - -/* * Default file attributes */ #define DEFAULT_DEV_MODE 0644 /* default permissions */ @@ -3906,49 +3896,10 @@ } /* - * Check to see if we are in the midst of safemode patching - * If so skip building the archive for /. Instead build it - * against the latest bits obtained by creating a fresh lofs - * mount of root. + * First update archive for current root */ - if (stat(LOFS_PATCH_FILE, &sb) == 0) { - if (mkdir(LOFS_PATCH_MNT, DIR_PERMS) == -1 && - errno != EEXIST) { - bam_error(MKDIR_FAILED, "%s", LOFS_PATCH_MNT, - strerror(errno)); - ret = BAM_ERROR; - goto out; - } - (void) snprintf(multibt, sizeof (multibt), - "/sbin/mount -F lofs -o nosub / %s", LOFS_PATCH_MNT); - if (exec_cmd(multibt, NULL) != 0) { - bam_error(MOUNT_FAILED, LOFS_PATCH_MNT, "lofs"); - ret = BAM_ERROR; - } - if (ret != BAM_ERROR) { - (void) snprintf(rootbuf, sizeof (rootbuf), "%s/", - LOFS_PATCH_MNT); - bam_rootlen = strlen(rootbuf); - if (update_archive(rootbuf, opt) != BAM_SUCCESS) - ret = BAM_ERROR; - /* - * unmount the lofs mount since there could be - * multiple invocations of bootadm -a update_all - */ - (void) snprintf(multibt, sizeof (multibt), - "/sbin/umount %s", LOFS_PATCH_MNT); - if (exec_cmd(multibt, NULL) != 0) { - bam_error(UMOUNT_FAILED, LOFS_PATCH_MNT); - ret = BAM_ERROR; - } - } - } else { - /* - * First update archive for current root - */ - if (update_archive(root, opt) != BAM_SUCCESS) - ret = BAM_ERROR; - } + if (update_archive(root, opt) != BAM_SUCCESS) + ret = BAM_ERROR; if (ret == BAM_ERROR) goto out; diff -r 24f955a0d580 -r b8a81d02e92b usr/src/cmd/initpkg/umountall.sh --- a/usr/src/cmd/initpkg/umountall.sh Fri Jul 23 18:33:39 2010 -0400 +++ b/usr/src/cmd/initpkg/umountall.sh Fri Jul 23 16:15:32 2010 -0700 @@ -20,8 +20,7 @@ # CDDL HEADER END # # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. # # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T # All Rights Reserved @@ -71,9 +70,6 @@ PATH=/sbin:/usr/sbin:/usr/bin -DEFERRED_ACTIVATION_PATCH_FLAG="/var/run/.patch_loopback_mode" -SVC_STARTD="/lib/svc/bin/svc.startd" - # Clear these in case they were already set in our inherited environment. FSType= FFLAG= @@ -170,24 +166,6 @@ ZONENAME=`zonename` # -# If we are in deferred activation patching, and the caller is -# svc.startd, then exit without unmounting any of the remaining -# file systems since the call path is from shutdown. Note that -# by the time we get here, smf stop methods for nfs, cachefs -# etc, will have run. -# -if [ -f $DEFERRED_ACTIVATION_PATCH_FLAG ] ; then - ppid=`ps -o ppid= -p $$` # parent of umountall will be sh - # from system() - - ppid=`ps -o ppid= -p $ppid` # parent of sh will be svc.startd - COMM=`ps -o comm= -p $ppid` - if [ "$COMM" = "$SVC_STARTD" ] ; then - exit - fi -fi - -# # Take advantage of parallel unmounting at this point if we have no # criteria to match and we are in the global zone #