xref: /illumos-gate/usr/src/cmd/svc/svccfg/svccfg_help.c (revision e4d060fb4c00d44cd578713eb9a921f594b733b8)
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 
28 #include "svccfg.h"
29 #include "svccfg_grammar.h"
30 
31 struct help_message help_messages[] = {
32 	{ SCC_VALIDATE, "validate [file | fmri]\n\n"
33 "Validate a manifest file without changing the repository.\n"
34 "Validate an instance FMRI against the template specifications."
35 	},
36 	{ SCC_IMPORT, "import [-V] file\n\n"
37 "Import a manifest into the repository.  With -V force strict adherence\n"
38 "to the template specifications."
39 	},
40 	{ SCC_EXPORT, "export [-a] {service | pattern} [> file]\n\n"
41 "Print a manifest for service to file, or standard output if not specified."
42 	},
43 	{ SCC_ARCHIVE, "archive [-a] [> file]\n\n"
44 "Print an archive to file, or standard output if not specified."
45 	},
46 	{ SCC_RESTORE, "restore file\n\n"
47 "Restore the contents of a previously-generated archive."
48 	},
49 	{ SCC_APPLY, "apply file\n\nApply a profile." },
50 	{ SCC_EXTRACT, "extract [> file]\n\n"
51 "Print a profile to file, or standard output if not specified." },
52 	{ SCC_REPOSITORY, "repository file\n\nSet the repository to modify." },
53 	{ SCC_INVENTORY, "inventory file\n\n"
54 		"Print the services and instances contained in a manifest."
55 	},
56 	{ SCC_SET, "set [-vV]\n\n"
57 "Without arguments, display current options.  Otherwise set the given options."
58 	},
59 	{ SCC_END, "end\n\nStop processing and exit." },
60 	{ SCC_HELP, "help [command]\n\nDisplay help." },
61 	{ SCC_LIST, "list [glob_pattern]\n\n"
62 		"List children of the currently selected entity."
63 	},
64 	{ SCC_ADD, "add name\n\n"
65 		"Add a new child entity to the currently selected entity."
66 	},
67 	{ SCC_DELETE, "delete [-f] {name | fmri | pattern}\n\n"
68 "Delete the named child entity or the one indicated by fmri.  With -f, delete\n"
69 "running services.\n"
70 	},
71 	{ SCC_SELECT, "select {name | fmri | pattern}\n\n"
72 		"Select the named child entity or the one indicated by fmri."
73 	},
74 	{ SCC_UNSELECT, "unselect\n\n"
75 		"Select the parent of the currently selected entity."
76 	},
77 	{ SCC_LISTPG, "listpg [glob_pattern]\n\n"
78 		"List property groups of the currently selected entity."
79 	},
80 	{ SCC_ADDPG, "addpg name type [P]\n\n"
81 		"Add a new property group to the currently selected entity."
82 	},
83 	{ SCC_DELPG, "delpg name\n\n"
84 "Delete the named property group from the currently selected entity."
85 	},
86 	{ SCC_DELHASH, "delhash [-d] manifest\n\n"
87 "Delete the named manifest hash entry (from smf/manifest).\n"
88 "With -d, manifest file doesn't need to exist."
89 	},
90 	{ SCC_LISTPROP, "listprop [glob_pattern]\n\n"
91 "List property groups and properties of the currently selected entity."
92 	},
93 	{ SCC_SETPROP,
94 		"\tsetprop pg/name = [type:] value\n"
95 		"\tsetprop pg/name = [type:] ([value...])\n\n"
96 "Set the pg/name property of the currently selected entity.  Values may be\n"
97 "enclosed in double-quotes.  Value lists may span multiple lines."
98 	},
99 	{ SCC_DELPROP, "delprop pg/name\n\n"
100 		"Delete the pg/name property of the currently selected entity."
101 	},
102 	{ SCC_EDITPROP, "editprop\n\n"
103 "Invoke $EDITOR to edit the properties of the currently selected entity."
104 	},
105 	{ SCC_DESCRIBE, "describe [-v] [-t] [propertygroup/property]\n\n"
106 "Describe the current properties.  With -v, describe verbosely.  With -t,\n"
107 "show only template data, not current properties."
108 	},
109 	{ SCC_ADDPROPVALUE, "addpropvalue pg/name [type:] value\n\n"
110 "Add the given value to the named property."
111 	},
112 	{ SCC_DELPROPVALUE, "delpropvalue pg/name glob_pattern\n\n"
113 "Delete all values matching the glob pattern fron the given property."
114 	},
115 	{ SCC_SETENV, "setenv [-s | -i | -m method] NAME value\n\n"
116 "Set an environment variable for the given service, instance, or method "
117 "context."
118 	},
119 	{ SCC_UNSETENV, "unsetenv [-s | -i | -m method] NAME value\n\n"
120 "Unset an environment variable for the given service, instance, or method "
121 "context."
122 	},
123 	{ SCC_LISTSNAP, "listsnap\n\n"
124 		"List snapshots of the currently selected instance."
125 	},
126 	{ SCC_SELECTSNAP, "selectsnap [snapshot]\n\n"
127 "Select a snapshot of the currently selected instance, or the Editing\n"
128 "snapshot by default."
129 	},
130 	{ SCC_REVERT, "revert [snapshot]\n\n"
131 "Change the properties of the currently selected instance and its ancestors\n"
132 "to those in a snapshot, or the currently selected snapshot by default."
133 	},
134 	{ SCC_REFRESH, "refresh\n\n"
135 "Commit the values from the current configuration to the running\n"
136 "snapshot, making them available for use by the currently selected\n"
137 "instance.  If the repository subcommand has not been used to select\n"
138 "a repository, inform the instance's restarter to re-read the updated\n"
139 "configuration."
140 	},
141 	{ 0, NULL }
142 };
143