/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 1996 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <fcntl.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <locale.h>
int sflag = 0;
extern int errno;
int copy();
void usage();
int
{
extern char *optarg;
extern int optind;
char *dirname;
int ch;
int i;
int rc;
int dflag = 0;
int gflag = 0;
int oflag = 0;
int mflag = 0;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
switch((char)ch) {
case 'c':
break; /* always do "copy" */
case 'd':
dflag++;
break;
case 'g':
gflag++;
break;
case 'm':
mflag++;
break;
case 'o':
oflag++;
break;
case 's':
sflag++;
break;
case '?':
default:
usage();
}
/* get group and owner id's */
exit(1);
}
exit(1);
}
if (dflag) { /* install a directory */
int exists = 0;
if (argc != 1)
usage();
if (!exists) {
exit(1);
}
}
exit(1);
}
}
/* make sure directory setgid bit is inherited */
if (!exists)
exit(1) ;
}
if (!exists)
exit(1) ;
}
if (!exists)
exit(1) ;
}
exit(0);
}
if (argc < 2)
usage();
usage();
usage();
}
rc = 0;
for (i = 0; i < argc-1; i++)
return (rc);
}
int
{
int to_fd;
int devnull;
int status = 0;
char *path;
/* check source */
return (1);
}
/* special case for removing files */
return (1);
}
/* build target path, find out if target is same as source */
char *C, *strrchr();
goto nocompare;
}
return (1);
}
return (1);
}
/* unlink now... avoid ETXTBSY errors later */
}
/* open target, set mode, owner, group */
return (1);
}
status = 1;
goto inst_done;
}
if (!devnull) {
}
if (sflag) {
}
status = 1;
}
if (status)
return (status);
}
/*
* copy --
* copy from one file to another
*/
int
int to_fd;
{
int n, from_fd;
int status = 0;
return (1);
}
status = 1;
goto copy_done;
}
if (n == -1) {
status = 1;
goto copy_done;
}
return (status);
}
/*
* atoo --
* octal string to int
*/
int
char *str;
{
int val;
return(val);
}
/*
* usage --
* print a usage message and die
*/
void
usage()
{
fputs(gettext("usage: install [-cs] [-g group] [-m mode] [-o owner] file ... destination\n"), stderr);
exit(1);
}
/*
* mkdirp --
* make a directory and parents if needed
*/
int
char *dir;
int mode;
{
int err;
char *slash;
char *strrchr();
extern int errno;
return (0);
return (-1);
return (-1);
*slash = '\0';
*slash = '/';
if (err)
return (err);
}