install.h revision 9781:ccf49524d5dc
1130803Smarcel/* 2130803Smarcel * CDDL HEADER START 3130803Smarcel * 4130803Smarcel * The contents of this file are subject to the terms of the 5130803Smarcel * Common Development and Distribution License (the "License"). 6130803Smarcel * You may not use this file except in compliance with the License. 7130803Smarcel * 8130803Smarcel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9130803Smarcel * or http://www.opensolaris.org/os/licensing. 10130803Smarcel * See the License for the specific language governing permissions 11130803Smarcel * and limitations under the License. 12130803Smarcel * 13130803Smarcel * When distributing Covered Code, include this CDDL HEADER in each 14130803Smarcel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15130803Smarcel * If applicable, add the following below this CDDL HEADER, with the 16130803Smarcel * fields enclosed by brackets "[]" replaced with your own identifying 17130803Smarcel * information: Portions Copyright [yyyy] [name of copyright owner] 18130803Smarcel * 19130803Smarcel * CDDL HEADER END 20130803Smarcel */ 21130803Smarcel 22130803Smarcel/* 23130803Smarcel * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24130803Smarcel * Use is subject to license terms. 25130803Smarcel */ 26130803Smarcel 27130803Smarcel/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 28130803Smarcel/* All Rights Reserved */ 29130803Smarcel 30130803Smarcel#ifndef __INSTALL_H 31130803Smarcel#define __INSTALL_H 32130803Smarcel 33130803Smarcel 34130803Smarcel#ifdef __cplusplus 35130803Smarcelextern "C" { 36130803Smarcel#endif 37130803Smarcel 38#include <sys/types.h> 39#include <limits.h> 40#include <pkgstrct.h> 41 42/* Settings for procedure scripts */ 43#define PROC_USER "root" 44#define PROC_GRP "other" 45#define PROC_STDIN "/dev/null" 46#define PROC_XSTDIN "/dev/tty" 47#define PROC_STDOUT "/dev/tty" 48 49/* Settings for class action scripts */ 50#define CAS_USER "root" 51#define CAS_GRP "other" 52#define CAS_STDIN "/dev/null" 53#define CAS_STDOUT "/dev/tty" 54 55/* Settings for non-privileged scripts */ 56#define CHK_USER "install" /* default user i.d. to use */ 57#define CHK_USER_ALT "noaccess" /* alternate non-priv user */ 58#define CHK_USER_ROOT "root" /* root user */ 59#define CHK_USER_NON "root" /* user for non-compliant pkg's */ 60#define CHK_GRP "other" 61#define CHK_STDIN "/dev/null" 62#define CHK_STDOUT "/dev/tty" 63 64/* Settings for admin "rscriptalt" option */ 65#define RSCRIPTALT rscriptalt 66#define RSCRIPTALT_KEYWORD "rscriptalt" 67#define RSCRIPTALT_ROOT "root" 68#define RSCRIPTALT_NOACCESS "noaccess" 69 70#define OAMBASE "/usr/sadm/sysadm" 71#define MAILCMD "/usr/bin/mail" 72#define DATSTRM "datastream" 73#define SHELL "/sbin/sh" 74#define PKGINFO "pkginfo" 75#define PKGMAP "pkgmap" 76#define LIVE_CONT "__live_cont__" 77#define RELOC "reloc" 78#define ROOT "root" 79 80/* Additional cfent/cfextra codes. */ 81#define BADFSYS (short)(-1) /* an fsys is needed */ 82#define BADINDEX (-1) /* pkg class idx not yet set */ 83 84/* This holds admin file data. */ 85struct admin { 86 char *mail; 87 char *instance; 88 char *partial; 89 char *runlevel; 90 char *idepend; 91 char *rdepend; 92 char *space; 93 char *setuid; 94 char *conflict; 95 char *action; 96 char *networktimeout; 97 char *networkretries; 98 char *authentication; 99 char *keystore; 100 char *proxy; 101 char *basedir; 102 char *rscriptalt; 103}; 104 105/* 106 * This table details the status of all filesystems available to the target 107 * host. 108 */ 109struct fstable { 110 char *name; /* name of filesystem, (mount point) */ 111 int namlen; /* The length of the name (mountpoint) */ 112 fsblkcnt_t bsize; /* fundamental file system block size */ 113 fsblkcnt_t frsize; /* file system fragment size */ 114 fsblkcnt_t bfree; /* total # of free blocks */ 115 fsblkcnt_t bused; /* total # of used blocks */ 116 fsblkcnt_t ffree; /* total # of free file nodes */ 117 fsblkcnt_t fused; /* total # of used file nodes */ 118 char *fstype; /* type of filesystem - nfs, lo, ... */ 119 char *remote_name; /* client's mounted filesystem */ 120 unsigned writeable:1; /* access permission */ 121 unsigned write_tested:1; /* access permission fully tested */ 122 unsigned remote:1; /* on a remote filesystem */ 123 unsigned mounted:1; /* actually mounted right now */ 124 unsigned srvr_map:1; /* use server_map() */ 125 unsigned cl_mounted:1; /* mounted in client space */ 126 unsigned mnt_failed:1; /* attempt to loopback mount failed */ 127 unsigned served:1; /* filesystem comes from a server */ 128}; 129 130#define ADM(x, y) ((adm.x != NULL) && (y != NULL) && \ 131 strcmp(adm.x, y) == 0) 132#define ADMSET(x) (adm.x != NULL) 133#define PARAMETRIC(x) (x[0] == '$') 134#define RELATIVE(x) (x[0] != '/') 135 136#if defined(lint) && !defined(gettext) 137#define gettext(x) x 138#endif /* defined(lint) && !defined(gettext) */ 139 140#ifdef __cplusplus 141} 142#endif 143 144#endif /* __INSTALL_H */ 145