/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* svccfg - modify service configuration repository
*/
#include <errno.h>
#include <libintl.h>
#include <libscf.h>
#include <libscf_priv.h>
#include <libuutil.h>
#include <locale.h>
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "svccfg.h"
#ifndef TEXT_DOMAIN
#endif /* TEXT_DOMAIN */
static const char *myname;
int g_verbose = 0;
const char *fmri;
static void
usage()
{
"Usage:\tsvccfg [-v] [-s FMRI] [-f file]\n"
"\tsvccfg [-v] [-s FMRI] <command> [args]\n"));
}
void *
{
void *p;
return (p);
}
char *
{
char *result;
return (result);
}
/*
* Send a message to the user. If we're interactive, send it to stdout.
* Otherwise send it to stderr.
*/
static void
{
const char *ptr;
if (!interactive) {
else
}
}
/*
* Display a warning. Should usually be predicated by g_verbose.
*/
/* PRINTFLIKE1 */
void
{
}
/*
* Syntax error.
*/
void
{
return;
}
exit(1);
}
/*
* Semantic error. Display the warning and exit if we're not interactive.
*/
/* PRINTFLIKE1 */
void
{
exit(1);
}
/*ARGSUSED*/
static void
{
(void) atexit(lscf_cleanup);
(void) textdomain(TEXT_DOMAIN);
(void) lxml_init();
engine_init();
lscf_init(); /* must follow engine_init() */
tmpl_init();
}
int
{
int c;
switch (c) {
case 'v':
g_verbose = 1;
break;
case 's':
break;
case 'f':
break;
default:
usage();
break;
}
if (command_file != NULL)
return (engine_source(command_file, 0));
return (engine_interp());
else
return (engine_source("-", 0));
}
/*
* Knit together remaining arguments into a single statement.
*/
}
return (engine_exec(cmd));
}