/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1995 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
#include <libintl.h>
#include <pkglocs.h>
#include <pkglib.h>
#include "libinst.h"
/* setlist.c */
extern struct cl_attr **cl_Classes;
extern int cl_NClasses;
static int pkg_has_arch;
/* Return the install class action script associated with this class index */
char *
{
return (NULL);
}
/*
* This resets an input class action script pointer and the various
* codes that are associated with special treatment available to a class
* action script. It returns 1 if there was a script there in the first
* place and 0 if there wasn't.
*/
int
{
} else
return (0);
return (1);
}
/* Return the remove class action script associated with this class index */
char *
{
return (NULL);
}
/*
* This scans the admin directories for the class acton scripts associated
* with the classes to be installed. It will look for install or remove
* scripts and place appropriate pointers into the cl_Classes list. There's
* no reason why it couldn't look for both except that I haven't seen a
* need for it yet.
*/
void
{
int i;
quit(99);
}
for (i = 0; i < cl_NClasses; i++) {
/*
* Locate appropriate installation class action
* script, if any; look on media for script,
* since it might be on the system due to a
* previous installation.
*/
cl_nam(i));
cl_nam(i));
continue;
}
continue;
}
/*
* Provide CAS to uncompress and distribute a
* compressed cpio archive for those older packages
* that don't include their own. This is the first
* point at which we know, it's an old package
* without all the various pkginfo items set.
* The default script is provided for all classes
* in an old package which do not have their own
* class action script. These are the criteria used
* by the script that packs the archives.
*/
if (pkg_has_arch &&
cl_Classes[i]->inst_script =
continue;
} else {
quit(99);
}
}
}
for (i = 0; i < cl_NClasses; i++) {
cl_nam(i));
cl_nam(i));
continue;
}
continue;
}
}
} else {
quit(99);
}
}
/*
* This function deals with the special case of an old WOS package
* with a compressed cpio'd file set but no class action script.
* We find out it doesn't have a CAS later in find_CAS() and deal
* with it then. The only reason for this variable is to let
* findscripts() know to get the default script if it can't find it in
* the usual places.
*/
void
is_WOS_arch(void)
{
pkg_has_arch++;
}