17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
53eae19d9Swesolows  * Common Development and Distribution License (the "License").
63eae19d9Swesolows  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
213eae19d9Swesolows 
227c478bd9Sstevel@tonic-gate /*
23*f6e214c7SGavin Maltby  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #include "svccfg.h"
287c478bd9Sstevel@tonic-gate #include "svccfg_grammar.h"
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate struct help_message help_messages[] = {
311f6eb021SLiane Praza 	{ SCC_VALIDATE, "validate [file | fmri]\n\n"
321f6eb021SLiane Praza "Validate a manifest file without changing the repository.\n"
331f6eb021SLiane Praza "Validate an instance FMRI against the template specifications."
341f6eb021SLiane Praza 	},
359444c26fSTom Whitten 	{ SCC_IMPORT, "import [-p outfile] [-V] paths...\n\n"
369444c26fSTom Whitten "Import manifests into the repository.  paths can be one or more\n"
379444c26fSTom Whitten "manifest files or directories.  If directories are specified, they\n"
389444c26fSTom Whitten "will be searched for files with a .xml extension.  If -p is specified,\n"
399444c26fSTom Whitten "a progress message will be written to outfile as each manifest is\n"
409444c26fSTom Whitten "imported.  With -V force strict adherence to the template specifications."
417c478bd9Sstevel@tonic-gate 	},
423eae19d9Swesolows 	{ SCC_EXPORT, "export [-a] {service | pattern} [> file]\n\n"
437c478bd9Sstevel@tonic-gate "Print a manifest for service to file, or standard output if not specified."
447c478bd9Sstevel@tonic-gate 	},
453eae19d9Swesolows 	{ SCC_ARCHIVE, "archive [-a] [> file]\n\n"
467c478bd9Sstevel@tonic-gate "Print an archive to file, or standard output if not specified."
473eae19d9Swesolows 	},
483eae19d9Swesolows 	{ SCC_RESTORE, "restore file\n\n"
493eae19d9Swesolows "Restore the contents of a previously-generated archive."
507c478bd9Sstevel@tonic-gate 	},
517c478bd9Sstevel@tonic-gate 	{ SCC_APPLY, "apply file\n\nApply a profile." },
527c478bd9Sstevel@tonic-gate 	{ SCC_EXTRACT, "extract [> file]\n\n"
537c478bd9Sstevel@tonic-gate "Print a profile to file, or standard output if not specified." },
547c478bd9Sstevel@tonic-gate 	{ SCC_REPOSITORY, "repository file\n\nSet the repository to modify." },
557c478bd9Sstevel@tonic-gate 	{ SCC_INVENTORY, "inventory file\n\n"
567c478bd9Sstevel@tonic-gate 		"Print the services and instances contained in a manifest."
577c478bd9Sstevel@tonic-gate 	},
587c478bd9Sstevel@tonic-gate 	{ SCC_SET, "set [-vV]\n\n"
597c478bd9Sstevel@tonic-gate "Without arguments, display current options.  Otherwise set the given options."
607c478bd9Sstevel@tonic-gate 	},
617c478bd9Sstevel@tonic-gate 	{ SCC_END, "end\n\nStop processing and exit." },
627c478bd9Sstevel@tonic-gate 	{ SCC_HELP, "help [command]\n\nDisplay help." },
637c478bd9Sstevel@tonic-gate 	{ SCC_LIST, "list [glob_pattern]\n\n"
647c478bd9Sstevel@tonic-gate 		"List children of the currently selected entity."
657c478bd9Sstevel@tonic-gate 	},
667c478bd9Sstevel@tonic-gate 	{ SCC_ADD, "add name\n\n"
677c478bd9Sstevel@tonic-gate 		"Add a new child entity to the currently selected entity."
687c478bd9Sstevel@tonic-gate 	},
697c478bd9Sstevel@tonic-gate 	{ SCC_DELETE, "delete [-f] {name | fmri | pattern}\n\n"
707c478bd9Sstevel@tonic-gate "Delete the named child entity or the one indicated by fmri.  With -f, delete\n"
717c478bd9Sstevel@tonic-gate "running services.\n"
727c478bd9Sstevel@tonic-gate 	},
737c478bd9Sstevel@tonic-gate 	{ SCC_SELECT, "select {name | fmri | pattern}\n\n"
747c478bd9Sstevel@tonic-gate 		"Select the named child entity or the one indicated by fmri."
757c478bd9Sstevel@tonic-gate 	},
767c478bd9Sstevel@tonic-gate 	{ SCC_UNSELECT, "unselect\n\n"
777c478bd9Sstevel@tonic-gate 		"Select the parent of the currently selected entity."
787c478bd9Sstevel@tonic-gate 	},
797c478bd9Sstevel@tonic-gate 	{ SCC_LISTPG, "listpg [glob_pattern]\n\n"
807c478bd9Sstevel@tonic-gate 		"List property groups of the currently selected entity."
817c478bd9Sstevel@tonic-gate 	},
827c478bd9Sstevel@tonic-gate 	{ SCC_ADDPG, "addpg name type [P]\n\n"
837c478bd9Sstevel@tonic-gate 		"Add a new property group to the currently selected entity."
847c478bd9Sstevel@tonic-gate 	},
857c478bd9Sstevel@tonic-gate 	{ SCC_DELPG, "delpg name\n\n"
867c478bd9Sstevel@tonic-gate "Delete the named property group from the currently selected entity."
8770cbfe41SPhilippe Jung 	},
8870cbfe41SPhilippe Jung 	{ SCC_DELHASH, "delhash [-d] manifest\n\n"
8970cbfe41SPhilippe Jung "Delete the named manifest hash entry (from smf/manifest).\n"
9070cbfe41SPhilippe Jung "With -d, manifest file doesn't need to exist."
919444c26fSTom Whitten 	},
929444c26fSTom Whitten 	{ SCC_CLEANUP, "cleanup\n\n"
939444c26fSTom Whitten "Cleanup any service or instances that no longer have manifest files that\n"
949444c26fSTom Whitten "support the services or instances in /lib/svc/manifest or /var/svc/manifest."
957c478bd9Sstevel@tonic-gate 	},
967c478bd9Sstevel@tonic-gate 	{ SCC_LISTPROP, "listprop [glob_pattern]\n\n"
977c478bd9Sstevel@tonic-gate "List property groups and properties of the currently selected entity."
987c478bd9Sstevel@tonic-gate 	},
997c478bd9Sstevel@tonic-gate 	{ SCC_SETPROP,
1007c478bd9Sstevel@tonic-gate 		"\tsetprop pg/name = [type:] value\n"
1017c478bd9Sstevel@tonic-gate 		"\tsetprop pg/name = [type:] ([value...])\n\n"
1027c478bd9Sstevel@tonic-gate "Set the pg/name property of the currently selected entity.  Values may be\n"
1037c478bd9Sstevel@tonic-gate "enclosed in double-quotes.  Value lists may span multiple lines."
1047c478bd9Sstevel@tonic-gate 	},
1057c478bd9Sstevel@tonic-gate 	{ SCC_DELPROP, "delprop pg/name\n\n"
1067c478bd9Sstevel@tonic-gate 		"Delete the pg/name property of the currently selected entity."
1077c478bd9Sstevel@tonic-gate 	},
1087c478bd9Sstevel@tonic-gate 	{ SCC_EDITPROP, "editprop\n\n"
1097c478bd9Sstevel@tonic-gate "Invoke $EDITOR to edit the properties of the currently selected entity."
1101f6eb021SLiane Praza 	},
1111f6eb021SLiane Praza 	{ SCC_DESCRIBE, "describe [-v] [-t] [propertygroup/property]\n\n"
1121f6eb021SLiane Praza "Describe the current properties.  With -v, describe verbosely.  With -t,\n"
1131f6eb021SLiane Praza "show only template data, not current properties."
1147c478bd9Sstevel@tonic-gate 	},
1157c478bd9Sstevel@tonic-gate 	{ SCC_ADDPROPVALUE, "addpropvalue pg/name [type:] value\n\n"
1167c478bd9Sstevel@tonic-gate "Add the given value to the named property."
1177c478bd9Sstevel@tonic-gate 	},
1187c478bd9Sstevel@tonic-gate 	{ SCC_DELPROPVALUE, "delpropvalue pg/name glob_pattern\n\n"
1197c478bd9Sstevel@tonic-gate "Delete all values matching the glob pattern fron the given property."
1207c478bd9Sstevel@tonic-gate 	},
1217c478bd9Sstevel@tonic-gate 	{ SCC_SETENV, "setenv [-s | -i | -m method] NAME value\n\n"
1227c478bd9Sstevel@tonic-gate "Set an environment variable for the given service, instance, or method "
1237c478bd9Sstevel@tonic-gate "context."
1247c478bd9Sstevel@tonic-gate 	},
1257c478bd9Sstevel@tonic-gate 	{ SCC_UNSETENV, "unsetenv [-s | -i | -m method] NAME value\n\n"
1267c478bd9Sstevel@tonic-gate "Unset an environment variable for the given service, instance, or method "
1277c478bd9Sstevel@tonic-gate "context."
1287c478bd9Sstevel@tonic-gate 	},
1297c478bd9Sstevel@tonic-gate 	{ SCC_LISTSNAP, "listsnap\n\n"
1307c478bd9Sstevel@tonic-gate 		"List snapshots of the currently selected instance."
1317c478bd9Sstevel@tonic-gate 	},
1327c478bd9Sstevel@tonic-gate 	{ SCC_SELECTSNAP, "selectsnap [snapshot]\n\n"
1337c478bd9Sstevel@tonic-gate "Select a snapshot of the currently selected instance, or the Editing\n"
1347c478bd9Sstevel@tonic-gate "snapshot by default."
1357c478bd9Sstevel@tonic-gate 	},
1367c478bd9Sstevel@tonic-gate 	{ SCC_REVERT, "revert [snapshot]\n\n"
1377c478bd9Sstevel@tonic-gate "Change the properties of the currently selected instance and its ancestors\n"
1387c478bd9Sstevel@tonic-gate "to those in a snapshot, or the currently selected snapshot by default."
139347a77f2Samaguire 	},
140347a77f2Samaguire 	{ SCC_REFRESH, "refresh\n\n"
141347a77f2Samaguire "Commit the values from the current configuration to the running\n"
142347a77f2Samaguire "snapshot, making them available for use by the currently selected\n"
143347a77f2Samaguire "instance.  If the repository subcommand has not been used to select\n"
144347a77f2Samaguire "a repository, inform the instance's restarter to re-read the updated\n"
145347a77f2Samaguire "configuration."
146*f6e214c7SGavin Maltby 	},
147*f6e214c7SGavin Maltby 	{ SCC_DELNOTIFY, "delnotify <[-g] tset | class>\n\n"
148*f6e214c7SGavin Maltby "Delete the existing notification parameters for the specified class or\n"
149*f6e214c7SGavin Maltby "transition set. If the -g option is used, the notification parameters in\n"
150*f6e214c7SGavin Maltby "svc:/system/svc/global:default are deleted.\n"
151*f6e214c7SGavin Maltby 	},
152*f6e214c7SGavin Maltby 	{ SCC_LISTNOTIFY, "listnotify <[-g] tset | class>\n\n"
153*f6e214c7SGavin Maltby "Display the existing notification parameters for the specified class or\n"
154*f6e214c7SGavin Maltby "transition set. If the -g option is used, the notification parameters in\n"
155*f6e214c7SGavin Maltby "svc:/system/svc/global:default are displayed.\n"
156*f6e214c7SGavin Maltby 	},
157*f6e214c7SGavin Maltby 	{ SCC_SETNOTIFY,
158*f6e214c7SGavin Maltby "setnotify {[-g] tset | class} <notification parameters> ...\n\n"
159*f6e214c7SGavin Maltby "Set notification parameters for the specified class or transition set.\n"
160*f6e214c7SGavin Maltby "If the -g option is used, the notification parameters are set in\n"
161*f6e214c7SGavin Maltby "svc:/system/svc/global:default.\n"
162*f6e214c7SGavin Maltby "This command overwrites existing notification parameters."
1637c478bd9Sstevel@tonic-gate 	},
1647c478bd9Sstevel@tonic-gate 	{ 0, NULL }
1657c478bd9Sstevel@tonic-gate };
166