i.minorperm_i386 revision e07d9cb85217949d497b02d7211de8a197d2f2eb
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# CDDL HEADER START
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# The contents of this file are subject to the terms of the
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# Common Development and Distribution License (the "License").
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# You may not use this file except in compliance with the License.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# See the License for the specific language governing permissions
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# and limitations under the License.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# When distributing Covered Code, include this CDDL HEADER in each
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# If applicable, add the following below this CDDL HEADER, with the
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# CDDL HEADER END
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# Use is subject to license terms.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync#ident "%Z%%M% %I% %E% SMI"
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# NOTE: When a change is made to the source file for
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# /etc/minor_perm, a corresponding change must be made to
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# this class-action script.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# - If an existing entry in minor_perm is having its
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# attributes e.g. permissions, ownership changed,
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# add it to the list produced by make_chattr_list below.
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsync# - If an existing entry must be deleted, add it to
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# the list produced by make_delete_list below.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# - If a new entry must be added to the file, add it to the
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# list produced by make_add_list.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# - If a new entry is being added to minor_perm, but there
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# may already be devices of that name on the system (e.g.
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# we used the system default permissions in a previous release),
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# and those old devices now need to have their attributes changed,
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# add it to the make_chattr_list AND the make_add_list lists
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# If an entry in /etc/minor_perm needs to have its attributes
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# changed, identify the entry in the list copied to /etc/chattr.$$
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# by this function. The fields are:
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# <device>:<minor> <old_attrs> <new_attrs> <optional list of logical
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# devices whose attributes
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# will need to be changed>
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# where an <attribute list> := <perm> <user> <group>
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# NOTE: this list should also contain entries for nodes that previously
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsync# were not in /etc/minor_perm (which means the default mode of 600,
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsynccat > /tmp/chattr.$$ << EOF
2c76fd8cdec6f32663a03b16fb5871f7c54330a6vboxsyncvol:volctl 0600 root sys 0666 root sys /dev/volctl
ceb6621fceb6887a8b133abdf9aea2edc8a2cbf2vboxsyncclone:llc1 0600 root sys 0666 root sys /dev/llc1
# If an entry in /etc/minor_perm needs to be deleted, identify
# If an entry needs to be added to /etc/minor_perm, add the first
# remainder of the entry will be extracted from the /etc/minor_perm
export PATH
# Internal routine to convert an entry in a /tmp/chwhatever.$$ file to
if [ ! -f $dest ] ; then
# currently-installed /etc/minor_perm file. Also,
# /etc/minor_perm file. Also, add an entry to the
# currently-installed /etc/minor_perm file.
# the permission/ownership of devices that