1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
|
'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
.\" 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 or http://www.opensolaris.org/os/licensing.
.\" 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]
.TH SVCCFG 1M "Jun 29, 2009"
.SH NAME
svccfg \- import, export, and modify service configurations
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR]
.fi
.LP
.nf
\fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR] \fIsubcommand\fR [\fBargs\fR]...
.fi
.LP
.nf
\fB/usr/sbin/svccfg\fR [\fB-v\fR] [\fB-s\fR \fIFMRI\fR] \fB-f\fR \fIcommand-file\fR
.fi
.SH DESCRIPTION
.sp
.LP
The \fBsvccfg\fR command manipulates data in the service configuration
repository. \fBsvccfg\fR can be invoked interactively, with an individual
subcommand, or by specifying a command file that contains a series of
subcommands.
.sp
.LP
Changes made to an existing service in the repository typically do not take
effect for that service until the next time the service instance is refreshed.
See the \fBrefresh\fR subcommand on the \fBsvcadm\fR(1M) man page for more
details.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-f\fR \fIcommand-file\fR\fR
.ad
.sp .6
.RS 4n
Reads and executes \fBsvccfg\fR subcommands from \fIcommand-file\fR.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIFMRI\fR\fR
.ad
.sp .6
.RS 4n
Selects the entity indicated by \fIFMRI\fR (a fault management resource
identifier) before executing any subcommands. See \fBsmf\fR(5).
.RE
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Verbose.
.RE
.SH SUBCOMMANDS
.sp
.LP
Subcommands are divided into the categories specified in the subsections that
follow.
.sp
.LP
All subcommands that accept \fIFMRI\fRs also accept abbreviated or globbed
patterns. Instances and services can be abbreviated by specifying the instance
name, or the trailing portion of the service name. For example, given the
\fIFMRI\fR:
.sp
.in +2
.nf
svc:/network/smtp:sendmail
.fi
.in -2
.sp
.sp
.LP
All the following are valid abbreviations:
.sp
.in +2
.nf
sendmail
:sendmail
smtp
smtp:sendmail
network/smtp
.fi
.in -2
.sp
.sp
.LP
While the following are invalid:
.sp
.in +2
.nf
mail
network
network/smt
.fi
.in -2
.sp
.sp
.LP
Abbreviated forms of \fIFMRI\fRs are unstable, and should not be used in
scripts or other permanent tools. If a pattern matches more than one instance
or service, an error message is printed and no action is taken.
.SS "General Subcommands"
.sp
.ne 2
.na
\fB\fBend\fR\fR
.ad
.br
.na
\fB\fBexit\fR\fR
.ad
.br
.na
\fB\fBquit\fR\fR
.ad
.sp .6
.RS 4n
Exits immediately.
.RE
.sp
.ne 2
.na
\fB\fBrepository\fR \fIrepfile\fR\fR
.ad
.sp .6
.RS 4n
Uses \fIrepfile\fR as a repository. By default, \fBsvccfg\fR(1M) uses the
system repository.
.sp
Use repository only with files from the identical version of Solaris, including
patches, that you are currently running. Do not use this subcommand with the
system repository, \fB/etc/svc/repository.db\fR.
.RE
.sp
.ne 2
.na
\fB\fBset\fR [\fB-v\fR|\fB-V\fR]\fR
.ad
.sp .6
.RS 4n
Sets optional behavior. If no options are specified, set displays the options
currently in effect.
.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
Turns on verbose mode.
.RE
.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.sp .6
.RS 4n
Turns off verbose mode.
.RE
.RE
.SS "Service Profile Subcommands"
.sp
.ne 2
.na
\fB\fBapply\fR [\fB-n\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
If a \fIfile\fR is a service profile, properties, including general/enabled,
that are specified in the file are modified in the SMF repository.
Not-yet-existent properties and property groups will be created. The type of
the pre-existing property \fBgroups\fR will not be changed by the profile.
Existing properties (as distinguished from property groups) \fBcan\fR have
their type changed by the profile. Nonexistent services and instances are
ignored. Services and instances modified by the profile will be refreshed. If
\fB-n\fR is specified, the profile is processed and no changes are applied to
the SMF repository. Any syntax error found will be reported on stderr and an
exit code of \fB1\fR will be returned. See \fBsmf\fR(5) for a description of
service profiles. This command requires privileges to modify properties in the
service and instance. See \fBsmf_security\fR(5) for the privileges required to
modify properties. If \fIfile\fR is not a service profile, the subcommand
fails.
.RE
.sp
.ne 2
.na
\fB\fBextract\fR [\fI> file\fR]\fR
.ad
.sp .6
.RS 4n
Prints a service profile which represents the enabled status of the service
instances in the repository to standard output. The output may be redirected to
a file.
.RE
.SS "Service Manifest Subcommands"
.sp
.ne 2
.na
\fB\fBarchive\fR [\fB-a\fR]\fR
.ad
.sp .6
.RS 4n
Dumps a full \fBXML\fR service description for all services, instances, and
their persistent properties in the repository. This does not include transient
properties such as service state, and is suitable for a relocatable repository
backup.
.sp
Without the \fB-a\fR option, property groups containing protected information
(identified by the presence of the \fBread_authorization\fR property\(emsee
\fBsmf_security\fR(5)) will be archived without their property values. When the
\fB-a\fR option is specified, all values will be archived. An error results if
there are insufficient privileges to read these values.
.RE
.sp
.ne 2
.na
\fB\fBexport\fR [\fB-a\fR] \fIservice_FMRI\fR [\fI>file\fR]\fR
.ad
.sp .6
.RS 4n
The service description for the specified service and its instances is written
to standard output or redirected to the given file. Dependencies with a boolean
"external" property set to true are omitted in the belief that they were
created on behalf of another service.
.sp
Without the \fB-a\fR option, property groups containing protected information
(identified by the presence of the \fBread_authorization\fR property\(emsee
\fBsmf_security\fR(5)) will be exported without their property values. When the
\fB-a\fR option is specified, all values will be archived. An error results if
there are insufficient privileges to read these values.
.sp
Note that \fBexport\fR requires a service FMRI. If you specify an instance
(including an abbreviation, such as \fBapache2\fR or \fBsendmail\fR, that
specifies an instance), the command fails.
.RE
.sp
.ne 2
.na
\fB\fBimport\fR [\fB-V\fR] \fIfile\fR\fR
.ad
.sp .6
.RS 4n
If \fIfile\fR is a service manifest, then the services and instances it
specifies are imported into the repository. According to the file, dependencies
may be created in other services. See \fBsmf\fR(5) for a description of service
manifests. See \fBsmf_security\fR(5) for the privileges required to create and
modify service configurations.
.sp
Services and instances in the manifest will be validated against template data
in the manifest and the repository, and warnings will be issued for all
template violations. See \fBsmf_template\fR(5) for a description of templates.
If the \fB-V\fR option is specified, manifests that violate the defined
templates will fail to import. In interactive invocations of \fBsvccfg\fR,
\fB-V\fR is the default behavior.
.sp
For existing services and instances, properties which have not changed since
the last \fBimport\fR snapshot was taken are upgraded to those specified by the
manifest. Conflicts (properties which have been changed both in the repository
and the manifest) are reported on the standard error stream. \fBsvccfg\fR will
never upgrade the "general/enabled" and "general/restarter" properties, since
they represent administrator preference.
.RE
.sp
.ne 2
.na
\fB\fBinventory\fR \fIfile\fR\fR
.ad
.sp .6
.RS 4n
If \fIfile\fR is determined to be a service manifest, then the \fBFMRI\fRs of
the services and instances the \fIfile\fR describes are printed. For each
service, the \fBFMRI\fRs of its instances are displayed before the \fBFMRI\fR
of the service.
.RE
.sp
.ne 2
.na
\fB\fBrestore\fR\fR
.ad
.sp .6
.RS 4n
Restores the contents of the repository from a full XML service description
previously created by the \fBarchive\fR subcommand. If the archive was
generated without the use of the \fB-a\fR option, the contents of the
repository following completion of the restore will not include the values of
any read-protected properties (see \fBsmf_security\fR(5)). If these are
required, they must be restored manually.
.sp
Restoring an archive which is inconsistent with currently installed software
(including patch revisions) might yield unpredictable results. Therefore, prior
to restoring an archive, all system and application software, including any
service manifests, should be restored to the same state it was in at the time
the archive was made.
.RE
.sp
.ne 2
.na
\fB\fBvalidate\fR [\fIfile\fR | \fIfmri\fR]\fR
.ad
.sp .6
.RS 4n
The \fBvalidate\fR subcommand can operate on a manifest file, an instance FMRI,
or the current instance or snapshot entity selection. When an argument is
specified, \fBsvccfg\fR will check to see whether the specified file exists. If
the file exists, it will be validated. If a file of the specified name does not
exist, the argument is treated as an FMRI pattern. If a conflict arises between
a filename and an FMRI, use the \fBsvc:\fR and \fBfile:\fR prefixes to tell
\fBsvccfg\fR how to interpret the argument.
.sp
When you specify a file, the file is processed in a manner similar to
\fBimport\fR \fB-V\fR, but no changes are made to the repository. If any errors
are detected, \fBsvccfg\fR displays the errors and exits with a nonzero exit
status.
.sp
For an instance \fIfmri\fR, instance entity selection, or snapshot entity
selection, the specified instance in its composed form (see "Properties and
Property Groups" in \fBsmf\fR(5)) will be validated against template data in
the repository. Instance FMRIs and instance entity selections use the "running"
snapshot for validation. Warnings will be issued for all template violations.
See \fBsmf_template\fR(5) for a description of templates.
.RE
.SS "Entity Selection, Modification, and Navigation Subcommands"
.sp
.LP
An "entity" refers to a scope, service, or service instance.
.sp
.ne 2
.na
\fB\fBadd\fR \fIname\fR\fR
.ad
.sp .6
.RS 4n
A new entity with the given name is created as a child of the current
selection. See \fBsmf_security\fR(5) for the privileges required to create
entities.
.RE
.sp
.ne 2
.na
\fB\fBdelete\fR [\fB-f\fR] \fB{\fIname\fR | \fIfmri\fR}\fR\fR
.ad
.sp .6
.RS 4n
The named child of the current selection or the entity specified by \fIfmri\fR
is deleted. Attempts to delete service instances in the "online" or "degraded"
state will fail unless the \fB-f\fR flag is specified. If a service or service
instance has a "dependents" property group of type "framework", then for each
of its properties with type "astring" or "fmri", if the property has a single
value which names a service or service instance then the dependency property
group in the indicated service or service instance with the same name as the
property will be deleted. See \fBsmf_security\fR(5) for the privileges required
to delete service configurations.
.RE
.sp
.ne 2
.na
\fB\fBlist\fR [\fIpattern\fR]\fR
.ad
.sp .6
.RS 4n
The child entities of the current selection whose names match the glob pattern
\fIpattern\fR are displayed (see \fBfnmatch\fR(5)). \&':properties' is also
listed for property-bearing entities, namely services and service instances.
.RE
.sp
.ne 2
.na
\fB\fBselect\fR {\fIname\fR | \fIfmri\fR}\fR
.ad
.sp .6
.RS 4n
If the argument names a child of the current selection, it becomes the current
selection. Otherwise, the argument is interpreted as an \fBFMRI\fR and the
entity that the argument specifies becomes the current selection.
.RE
.sp
.ne 2
.na
\fB\fBunselect\fR\fR
.ad
.sp .6
.RS 4n
The parent of the current selection becomes the current selection.
.RE
.SS "Property Inspection and Modification Subcommands"
.sp
.ne 2
.na
\fB\fBaddpg\fR \fIname\fR \fItype\fR [\fIflags\fR]\fR
.ad
.sp .6
.RS 4n
Adds a property group with the given \fIname\fR and type to the current
selection. \fIflags\fR is a string of characters which designates the flags
with which to create the property group. 'P' represents
\fBSCF_PG_FLAG_NONPERSISTENT\fR (see \fBscf_service_add_pg\fR(3SCF)). See
\fBsmf_security\fR(5) for the privileges required to create property groups.
.RE
.sp
.ne 2
.na
\fB\fBaddpropvalue\fR \fIpg\fR\fI/name\fR [\fItype:\fR] \fIvalue\fR\fR
.ad
.sp .6
.RS 4n
Adds the given value to a property. If \fItype\fR is given and the property
exists, then if \fItype\fR does not agree with the property's \fItype\fR, the
subcommand fails. The values may be enclosed in double-quotes. String values
containing double-quotes or backslashes must be enclosed by double-quotes and
the contained double-quotes and backslashes must be quoted by backslashes.
Nonexistent properties are created, in which case the \fItype\fR specifier must
be present. See \fBscf_value_create\fR(3SCF) for a list of available property
types. See \fBsmf_security\fR(5) for the privileges required to modify
properties. The new value will be appended to the end of the list of property
values associated with the property.
.RE
.sp
.ne 2
.na
\fB\fBdelpg\fR \fIname\fR\fR
.ad
.sp .6
.RS 4n
Deletes the property group \fIname\fR of the current selection. See
\fBsmf_security\fR(5) for the privileges required to delete property groups.
.RE
.sp
.ne 2
.na
\fB\fBdelprop\fR \fIpg\fR[\fI/name\fR]\fR
.ad
.sp .6
.RS 4n
Deletes the named property group or property of the current selection. See
\fBsmf_security\fR(5) for the privileges required to delete properties.
.RE
.sp
.ne 2
.na
\fB\fBdelpropvalue\fR \fIpg/name\fR \fIglobpattern\fR\fR
.ad
.sp .6
.RS 4n
Deletes all values matching the given \fIglob\fR pattern in the named property.
Succeeds even if no values match. See \fBsmf_security\fR(5) for the privileges
required to modify properties.
.RE
.sp
.ne 2
.na
\fB\fBdescribe\fR [\fB-v\fR] [\fB-t\fR] [\fIpropertygroup\fR/\fIproperty\fR]\fR
.ad
.sp .6
.RS 4n
Describes either the current or the possible settings.
.sp
When invoked without arguments, \fBdescribe\fR gives basic descriptions (if
available) of the currently selected entity and all of its currently set
property groups and properties. A property group or specific property can be
queried by specifying either the property group name, or the property group
name and property name, separated by a slash (\fB/\fR), as an argument.
.sp
The \fB-v\fR option gives all information available, including descriptions for
current settings, constraints, and other possible setting choices.
.sp
The \fB-t\fR option shows only the template data for the selection (see
\fBsmf_template\fR(5)), and does not display the current settings for property
groups and properties.
.RE
.sp
.ne 2
.na
\fB\fBeditprop\fR\fR
.ad
.sp .6
.RS 4n
Comments of commands to reproduce the property groups and properties of the
current selection are placed in a temporary file and the program named by the
\fBEDITOR\fR environment variable is invoked to edit it. Upon completion, the
commands in the temporary file are executed. The default editor is \fBvi\fR(1).
See \fBsmf_security\fR(5) for the privileges required to create, modify, or
delete properties.
.RE
.sp
.ne 2
.na
\fB\fBlistpg\fR [\fIpattern\fR]\fR
.ad
.sp .6
.RS 4n
Displays the names, types, and flags of property groups of the current
selection. If an argument is given, it is taken as a glob pattern and only
property groups with names which match the argument are listed.
.sp
In interactive mode, a basic description of the property groups is also given.
.RE
.sp
.ne 2
.na
\fB\fBlistprop\fR [\fIpattern\fR]\fR
.ad
.sp .6
.RS 4n
Lists property groups and properties of the current selection. For property
groups, names, types, and flags are listed. For properties, names (prepended by
the property group name and a slash (/)), types, and values are listed. See
\fBscf_value_create\fR(3SCF) for a list of available property types. If an
argument is supplied it is taken as a glob pattern and only property groups and
properties with names which match the argument are listed.
.RE
.sp
.ne 2
.na
\fB\fBsetenv\fR [\fB-i\fR | \fB-s\fR] [\fB-m\fR \fImethod_name\fR] \fIenvvar
value\fR\fR
.ad
.sp .6
.RS 4n
Sets a method environment variable for a service or instance by changing the
"environment" property in the \fImethod_name\fR property group, if that
property group has type "method". If \fImethod_name\fR is not specified and the
\fB-i\fR option is used, the "method_context" property group is used, if an
instance is currently selected. If the \fB-s\fR option is used and a service is
currently selected, its "method_context" property group is used. If the
\fB-s\fR option is used and an instance is currently selected, the
"method_context" property group of its parent is used. If neither the \fB-i\fR
option nor the \fB-s\fR option is used, the "start" property group is searched
for in the currently selected entity and, if an instance is currently selected,
its parent is also searched. If the "inetd_start" property group is not
located, it is searched for in a similiar manner.
.sp
Once the property is located, all values which begin with \fIenvvar\fR followed
by a "=" are removed, and the value "\fIenvvar\fR=\fIvalue\fR" is added. See
\fBsmf_security\fR(5) for the privileges required to modify properties.
.RE
.sp
.ne 2
.na
\fB\fBsetprop\fR \fIpg/name\fR = [\fItype:\fR] \fIvalue\fR\fR
.ad
.br
.na
\fBsetprop \fIpg/name\fR = [\fItype:\fR] ([\fIvalues ...\fR])\fR
.ad
.sp .6
.RS 4n
Sets the \fIname\fR property of the \fIpg\fR property group of the current
selection to the given values of type \fItype\fR. See
\fBscf_value_create\fR(3SCF) for a list of available property types. If the
property already exists and the \fItype\fR disagrees with the existing
\fItype\fR on the property, the subcommand fails. Values may be enclosed in
double-quotes. String values which contain double-quotes or backslashes must be
enclosed by double-quotes and the contained double-quotes and backslashes must
be quoted by backslashes. If the named property does not exist, it is created,
as long as the type is specified. See \fBsmf_security\fR(5) for the privileges
required to create or modify properties. Multiple values will be stored in the
order in which they are specified.
.RE
.sp
.ne 2
.na
\fB\fBunsetenv\fR [\fB-i\fR | \fB-s\fR] [\fB-m\fR \fImethod_name\fR] \fIenvvar
value\fR\fR
.ad
.sp .6
.RS 4n
Removes a method environment variable for a service or instance by changing the
"environment" property in the \fImethod_name\fR property group, if that
property group has type "method". If \fImethod_name\fR is not specified and the
\fB-i\fR option is used, the "method_context" property group is used, if an
instance is currently selected. If the \fB-s\fR option is used and a service is
currently selected, its "method_context" property group is used. If the
\fB-s\fR option is used and an instance is currently selected, the
"method_context" property group of its parent is used. If neither the \fB-i\fR
option nor the \fB-s\fR option is used, the "start" property group is searched
for in the currently selected entity and, if an instance is currently selected,
its parent is also searched. If the "inetd_start" property group is not
located, it is searched for in a similiar manner.
.sp
Once the property is located, all values which begin with \fIenvvar\fR followed
by "=" are removed. See \fBsmf_security\fR(5) for the privileges required to
modify properties.
.RE
.SS "Snapshot Navigation and Selection Subcommands"
.sp
.ne 2
.na
\fB\fBlistsnap\fR\fR
.ad
.sp .6
.RS 4n
Displays snapshots available for the currently selected instance.
.RE
.sp
.ne 2
.na
\fB\fBrevert\fR [\fIsnapshot\fR]\fR
.ad
.sp .6
.RS 4n
Reverts the properties of the currently selected instance and its service to
those recorded in the named snapshot. If no argument is given, use the
currently selected snapshot and deselect it on success. The changed property
values can be made active via the \fBrefresh\fR subcommand of \fBsvcadm\fR(1M).
See \fBsmf_security\fR(5) for the privileges required to change properties.
.RE
.sp
.ne 2
.na
\fB\fBselectsnap\fR [\fIname\fR]\fR
.ad
.sp .6
.RS 4n
Changes the current snapshot to the one named by \fIname\fR. If no \fIname\fR
is specified, deselect the currently selected snapshot. Snapshots are
read-only.
.RE
.SS "Instance Subcommands"
.sp
.ne 2
.na
\fB\fBrefresh\fR\fR
.ad
.sp .6
.RS 4n
Commit the values from the current configuration to the running snapshot,
making them available for use by the currently selected instance. If the
repository subcommand has not been used to select a repository, direct the
instance's restarter to reread the updated configuration.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRImporting a Service Description
.sp
.LP
The following example imports a service description for the \fBseismic\fR
service in the XML manifest specified on the command line.
.sp
.in +2
.nf
# \fBsvccfg import /var/svc/manifest/site/seismic.xml\fR
.fi
.in -2
.sp
.sp
.LP
Note that the manifest must follow the format specified in
\fBservice_bundle\fR(4).
.LP
\fBExample 2 \fRExporting a Service Description
.sp
.LP
To export a service description on the local system:
.sp
.in +2
.nf
# \fBsvccfg export dumpadm >/tmp/dump.xml\fR
.fi
.in -2
.sp
.LP
\fBExample 3 \fRDeleting a Service Instance
.sp
.LP
To delete a service instance:
.sp
.in +2
.nf
# \fBsvccfg delete network/inetd-upgrade:default\fR
.fi
.in -2
.sp
.LP
\fBExample 4 \fRChecking Properties in an Alternate Repository
.sp
.LP
To examine the state of a service's properties after loading an alternate
repository, use the sequence of commands shown below. One might use such
commands, for example, to determine whether a service was enabled in a
particular repository backup.
.sp
.in +2
.nf
# \fBsvccfg\fR
svc:> \fBrepository /etc/svc/repository-boot\fR
svc:> \fBselect telnet:default\fR
svc:/network/telnet:default> \fBlistprop general/enabled\fR
general/enabled boolean false
svc:/network/telnet:default> \fBexit\fR
.fi
.in -2
.sp
.LP
\fBExample 5 \fREnabling Debugging
.sp
.LP
To modify \fBLD_PRELOAD\fR for a start method and enable the use of
\fBlibumem\fR(3LIB) with debugging features active:
.sp
.in +2
.nf
$ \fBsvccfg -s system/service setenv LD_PRELOAD libumem.so\fR
$ \fBsvccfg -s system/service setenv UMEM_DEBUG default\fR
.fi
.in -2
.sp
.LP
\fBExample 6 \fRUsing \fBdescribe\fR Subcommand
.sp
.LP
The following command illustrates the use of the \fBdescribe\fR subcommand.
.sp
.in +2
.nf
# \fBsvccfg -s console-login describe ttymon\fR
ttymon application
ttymon/device astring /dev/console
\fBterminal device to be used for the console login prompt\fR
ttymon/label astring console
\fBappropriate entry from /etc/ttydefs\fR
...
.fi
.in -2
.sp
.SH ENVIRONMENTAL VARIABLES
.sp
.ne 2
.na
\fBEDITOR\fR
.ad
.sp .6
.RS 4n
The command to run when the \fBeditprop\fR subcommand is used. The default
editor is \fBvi\fR(1).
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful execution.
.RE
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.sp .6
.RS 4n
One or more subcommands resulted in failure. Error messages are written to the
standard error stream.
.RE
.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.sp .6
.RS 4n
Invalid command line options were specified.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability See below.
.TE
.sp
.LP
The interactive output is Uncommitted. The invocation and non-interactive
output are Committed.
.SH SEE ALSO
.sp
.LP
\fBsvcprop\fR(1), \fBsvcs\fR(1), \fBsvcadm\fR(1M), \fBsvc.configd\fR(1M),
\fBlibscf\fR(3LIB), \fBlibumem\fR(3LIB), \fBscf_service_add_pg\fR(3SCF),
\fBscf_value_create\fR(3SCF), \fBcontract\fR(4), \fBservice_bundle\fR(4),
\fBattributes\fR(5), \fBfnmatch\fR(5), \fBsmf\fR(5), \fBsmf_method\fR(5),
\fBsmf_security\fR(5), \fBsmf_template\fR(5)
|