103831d3stevel/*
203831d3stevel * CDDL HEADER START
303831d3stevel *
403831d3stevel * The contents of this file are subject to the terms of the
503831d3stevel * Common Development and Distribution License, Version 1.0 only
603831d3stevel * (the "License").  You may not use this file except in compliance
703831d3stevel * with the License.
803831d3stevel *
903831d3stevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1003831d3stevel * or http://www.opensolaris.org/os/licensing.
1103831d3stevel * See the License for the specific language governing permissions
1203831d3stevel * and limitations under the License.
1303831d3stevel *
1403831d3stevel * When distributing Covered Code, include this CDDL HEADER in each
1503831d3stevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1603831d3stevel * If applicable, add the following below this CDDL HEADER, with the
1703831d3stevel * fields enclosed by brackets "[]" replaced with your own identifying
1803831d3stevel * information: Portions Copyright [yyyy] [name of copyright owner]
1903831d3stevel *
2003831d3stevel * CDDL HEADER END
2103831d3stevel */
2203831d3stevel/*
2303831d3stevel * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
2403831d3stevel * Use is subject to license terms.
2503831d3stevel */
2603831d3stevel
2703831d3stevel#pragma ident	"%Z%%M%	%I%	%E% SMI"
2803831d3stevel
2903831d3stevel/*
3003831d3stevel * scadm.c: main function
3103831d3stevel */
3203831d3stevel
3303831d3stevel#include <libintl.h>
3403831d3stevel#include <locale.h>
3503831d3stevel#include <stdio.h>
3603831d3stevel#include <sys/types.h>
3703831d3stevel#include <unistd.h>
3803831d3stevel
3903831d3stevel#include "adm.h"
4003831d3stevel
4103831d3stevel
4203831d3stevelint
4303831d3stevelmain(int argc,  char *argv[])
4403831d3stevel{
4503831d3stevel	(void) textdomain(TEXT_DOMAIN);
4603831d3stevel	(void) setlocale(LC_MESSAGES, "");
4703831d3stevel
4803831d3stevel	if (getuid() != 0) {
4903831d3stevel		(void) fprintf(stderr, "\n%s\n\n",
5003831d3stevel		    gettext("This program MUST be run as root"));
5103831d3stevel		exit(-1);
5203831d3stevel	}
5303831d3stevel
5403831d3stevel	if (argc < 2) {
5503831d3stevel		ADM_Usage();
5603831d3stevel		exit(-1);
5703831d3stevel	}
5803831d3stevel
5903831d3stevel	ADM_Init();
6003831d3stevel	ADM_Process_command(argc, argv);
6103831d3stevel
6203831d3stevel	return (0);
6303831d3stevel}
64