checkinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
d657c51f14601d0235434ffb78cf6ac0f27cc83cLennart Poettering#!/bin/sh
220a21d38f675eb835f5758e3d23e896573aa5eaLennart Poettering#
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# CDDL HEADER START
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann#
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# The contents of this file are subject to the terms of the
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# Common Development and Distribution License, Version 1.0 only
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# (the "License"). You may not use this file except in compliance
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# with the License.
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann#
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10fa421cd2abdc2ae1a07f7c13bfaa4ee6d6de4fDavid Herrmann# or http://www.opensolaris.org/os/licensing.
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# See the License for the specific language governing permissions
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# and limitations under the License.
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann#
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# When distributing Covered Code, include this CDDL HEADER in each
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11811e856b0c63439d45edc9c9834ad427e1bb6aDavid Herrmann# If applicable, add the following below this CDDL HEADER, with the
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann# fields enclosed by brackets "[]" replaced with your own identifying
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann# information: Portions Copyright [yyyy] [name of copyright owner]
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann# CDDL HEADER END
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann# Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved.
01608bc86a104423d192364f9534b83d0c75db7fKay Sievers# Use is subject to license terms.
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#pragma ident "%Z%%M% %I% %E% SMI"
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann#
e57eaef8a187762ca92838c24b9b6460878a800cDavid HerrmannPATH=/usr/sadm/bin:$PATH
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack# figure out CLASSES to install
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
37d54b938faeefd0a5a74f9197a33d78bbb8d6bfDaniel MackCLASSES="none"
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#determine the version of SDS.
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack# Classify into 3 group, SLVM, 421 and pre421
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#Need to check if its an update, ie someone is simply pkgadding because
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack# a file was deleted.
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#if we were upgrading from pre SDS 4.2.1, legacy class action script needs to
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack# be run to create symlinks from old to the new location.
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mackif [ "$UPDATE" != "yes" ]; then
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack pkginfo -R ${PKG_INSTALL_ROOT:-/} -q SUNWmd\*;
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack if [ $? -eq 0 ]; then
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack CLASSES="${CLASSES} legacy"
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack fi
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mackfi
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack
931618d08c64083ff7b29c494f482c40a5b05608Daniel Mack#
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmann# export environment variables to install
f5f113f66692abaf72e83698cb7b4f3690b90cf8David Herrmann#
f5f113f66692abaf72e83698cb7b4f3690b90cf8David Herrmannecho CLASSES="${CLASSES}" >> $1
f5f113f66692abaf72e83698cb7b4f3690b90cf8David Herrmann
e57eaef8a187762ca92838c24b9b6460878a800cDavid Herrmannexit 0
01608bc86a104423d192364f9534b83d0c75db7fKay Sievers