xref: /titanic_52/usr/src/cmd/svc/svccfg/svccfg_help.c (revision 31925ed2254d4e4e9ce3632df5ee99a1d9b3294c)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 #include "svccfg.h"
30 #include "svccfg_grammar.h"
31 
32 struct help_message help_messages[] = {
33 	{ SCC_VALIDATE, "validate file\n\n"
34 		"Process a manifest file without changing the repository."
35 	},
36 	{ SCC_IMPORT, "import file\n\nImport a manifest into the repository." },
37 	{ SCC_EXPORT, "export [-a] {service | pattern} [> file]\n\n"
38 "Print a manifest for service to file, or standard output if not specified."
39 	},
40 	{ SCC_ARCHIVE, "archive [-a] [> file]\n\n"
41 "Print an archive to file, or standard output if not specified."
42 	},
43 	{ SCC_RESTORE, "restore file\n\n"
44 "Restore the contents of a previously-generated archive."
45 	},
46 	{ SCC_APPLY, "apply file\n\nApply a profile." },
47 	{ SCC_EXTRACT, "extract [> file]\n\n"
48 "Print a profile to file, or standard output if not specified." },
49 	{ SCC_REPOSITORY, "repository file\n\nSet the repository to modify." },
50 	{ SCC_INVENTORY, "inventory file\n\n"
51 		"Print the services and instances contained in a manifest."
52 	},
53 	{ SCC_SET, "set [-vV]\n\n"
54 "Without arguments, display current options.  Otherwise set the given options."
55 	},
56 	{ SCC_END, "end\n\nStop processing and exit." },
57 	{ SCC_HELP, "help [command]\n\nDisplay help." },
58 	{ SCC_LIST, "list [glob_pattern]\n\n"
59 		"List children of the currently selected entity."
60 	},
61 	{ SCC_ADD, "add name\n\n"
62 		"Add a new child entity to the currently selected entity."
63 	},
64 	{ SCC_DELETE, "delete [-f] {name | fmri | pattern}\n\n"
65 "Delete the named child entity or the one indicated by fmri.  With -f, delete\n"
66 "running services.\n"
67 	},
68 	{ SCC_SELECT, "select {name | fmri | pattern}\n\n"
69 		"Select the named child entity or the one indicated by fmri."
70 	},
71 	{ SCC_UNSELECT, "unselect\n\n"
72 		"Select the parent of the currently selected entity."
73 	},
74 	{ SCC_LISTPG, "listpg [glob_pattern]\n\n"
75 		"List property groups of the currently selected entity."
76 	},
77 	{ SCC_ADDPG, "addpg name type [P]\n\n"
78 		"Add a new property group to the currently selected entity."
79 	},
80 	{ SCC_DELPG, "delpg name\n\n"
81 "Delete the named property group from the currently selected entity."
82 	},
83 	{ SCC_LISTPROP, "listprop [glob_pattern]\n\n"
84 "List property groups and properties of the currently selected entity."
85 	},
86 	{ SCC_SETPROP,
87 		"\tsetprop pg/name = [type:] value\n"
88 		"\tsetprop pg/name = [type:] ([value...])\n\n"
89 "Set the pg/name property of the currently selected entity.  Values may be\n"
90 "enclosed in double-quotes.  Value lists may span multiple lines."
91 	},
92 	{ SCC_DELPROP, "delprop pg/name\n\n"
93 		"Delete the pg/name property of the currently selected entity."
94 	},
95 	{ SCC_EDITPROP, "editprop\n\n"
96 "Invoke $EDITOR to edit the properties of the currently selected entity."
97 	},
98 	{ SCC_ADDPROPVALUE, "addpropvalue pg/name [type:] value\n\n"
99 "Add the given value to the named property."
100 	},
101 	{ SCC_DELPROPVALUE, "delpropvalue pg/name glob_pattern\n\n"
102 "Delete all values matching the glob pattern fron the given property."
103 	},
104 	{ SCC_SETENV, "setenv [-s | -i | -m method] NAME value\n\n"
105 "Set an environment variable for the given service, instance, or method "
106 "context."
107 	},
108 	{ SCC_UNSETENV, "unsetenv [-s | -i | -m method] NAME value\n\n"
109 "Unset an environment variable for the given service, instance, or method "
110 "context."
111 	},
112 	{ SCC_LISTSNAP, "listsnap\n\n"
113 		"List snapshots of the currently selected instance."
114 	},
115 	{ SCC_SELECTSNAP, "selectsnap [snapshot]\n\n"
116 "Select a snapshot of the currently selected instance, or the Editing\n"
117 "snapshot by default."
118 	},
119 	{ SCC_REVERT, "revert [snapshot]\n\n"
120 "Change the properties of the currently selected instance and its ancestors\n"
121 "to those in a snapshot, or the currently selected snapshot by default."
122 	},
123 	{ SCC_REFRESH, "refresh\n\n"
124 "Commit the values from the current configuration to the running\n"
125 "snapshot, making them available for use by the currently selected\n"
126 "instance.  If the repository subcommand has not been used to select\n"
127 "a repository, inform the instance's restarter to re-read the updated\n"
128 "configuration."
129 	},
130 	{ 0, NULL }
131 };
132