Lines Matching refs:fmri

496  * communicate whether the action is requested from a tty and the fmri of the
502 restarter_setup(const char *fmri, const scf_instance_t *inst)
515 uu_warn(emsg_permission_denied, fmri);
517 uu_warn(emsg_create_pg_perm_denied, fmri,
535 uu_warn(emsg_permission_denied, fmri);
537 uu_warn(emsg_prop_perm_denied, fmri,
547 uu_warn(gettext("%s: Repository read-only.\n"), fmri);
550 "(repository read-only).\n"), fmri,
562 set_astring_prop(fmri, SCF_PG_RESTARTER_ACTIONS,
568 "my_ct_name failed.\n"), fmri,
584 set_inst_enabled(const char *fmri, scf_instance_t *inst, boolean_t temp,
596 if (restarter_setup(fmri, inst))
622 fmri);
625 "(repository read-only).\n"), fmri,
653 fmri);
656 "(repository read-only).\n"), fmri,
668 gettext("%s temporarily disabled.\n"), fmri);
704 "read-only.\n"), fmri);
708 fmri, SCF_PG_GENERAL,
734 uu_warn(emsg_no_service, fmri);
743 pgname, SCF_PROPERTY_ENABLED, fmri);
749 pgname, SCF_PROPERTY_ENABLED, fmri);
758 gettext("%s disabled.\n"), fmri);
767 uu_warn(emsg_permission_denied, fmri);
769 uu_warn(emsg_pg_perm_denied, fmri, pgname);
777 * Set inst to the instance which corresponds to fmri. If fmri identifies
781 * ENOTSUP - fmri has an unsupported scheme
782 * EINVAL - fmri is invalid
783 * ENOTDIR - fmri does not identify a service or instance
785 * E2BIG - fmri is a service with multiple instances (warning not printed)
788 get_inst_mult(const char *fmri, scf_instance_t *inst)
797 if (strncmp(fmri, "lrc:", sizeof ("lrc:") - 1) == 0) {
798 uu_warn(gettext("FMRI \"%s\" is a legacy service.\n"), fmri);
803 cfmri = strdup(fmri);
810 uu_warn(gettext("FMRI \"%s\" is invalid.\n"), fmri);
820 fmri);
826 if (scf_handle_decode_fmri(h, fmri, NULL, NULL, inst, NULL,
833 uu_warn(gettext("No such instance \"%s\".\n"), fmri);
844 if (scf_handle_decode_fmri(h, fmri, NULL, svc, NULL, NULL, NULL,
849 uu_warn(emsg_no_service, fmri);
865 fmri);
893 get_inst(const char *fmri, scf_instance_t *inst)
897 r = get_inst_mult(fmri, inst);
902 "instance specification needed.\n"), fmri);
922 dep_get_astring(const char *fmri, const char *pgname,
935 "lacks \"%s\" property.)\n"), fmri, pgname, propname);
940 "is not single-valued.)\n"), fmri, pgname, propname);
945 "is not of astring type.)\n"), fmri, pgname, propname);
1009 * Enable the service or instance identified by fmri and its dependencies,
1010 * recursively. Specifically, call get_inst(fmri), enable the result, and
1019 * fmri must point to a writable max_scf_fmri_sz buffer. Returns EINVAL if fmri
1020 * is invalid, E2BIG if fmri identifies a service with multiple instances, ELOOP
1024 enable_fmri_rec(char *fmri, boolean_t temp)
1038 len = scf_canonify_fmri(fmri, fmri, max_scf_fmri_sz);
1045 switch (visited_find_or_add(fmri, &he)) {
1065 switch (get_inst_mult(fmri, inst)) {
1078 set_inst_enabled(fmri, inst, temp, B_TRUE);
1114 "property group).\n"), fmri, SCF_PG_GENERAL);
1123 "\"%s/%s\" is too long).\n"), fmri, SCF_PG_GENERAL,
1134 "invalid.\n"), fmri);
1139 "a service with multiple instances.\n"), fmri);
1157 "property is not single-valued).\n"), fmri,
1164 "property is not of astring type).\n"), fmri,
1185 if (dep_get_astring(fmri, pgname, pg, SCF_PROPERTY_TYPE, prop,
1192 if (dep_get_astring(fmri, pgname, pg, SCF_PROPERTY_GROUPING,
1203 "unknown type \"%s\".\n"), pgname, fmri, buf);
1213 "dependency lacks \"%s\" property.)\n"), fmri,
1223 "\"%s/%s\" is not of fmri type).\n"), fmri, pgname,
1234 fmri);
1286 fmri, buf);
1291 "multiple instances.\n"), fmri, buf);
1324 * fmri here is only used for verbose messages.
1327 set_inst_action(const char *fmri, const scf_instance_t *inst,
1348 if (restarter_setup(fmri, inst)) {
1368 uu_warn(emsg_permission_denied, fmri);
1371 fmri, scf_pg_restarter_actions);
1396 uu_warn(emsg_permission_denied, fmri);
1398 uu_warn(emsg_pg_perm_denied, fmri,
1446 uu_warn(emsg_permission_denied, fmri);
1448 uu_warn(emsg_prop_perm_denied, fmri,
1463 (void) printf(gettext("Action %s set for %s.\n"), action, fmri);
1480 * In these cases, fmri is used to print a warning.
1487 inst_get_state(scf_instance_t *inst, char *state, const char *fmri,
1506 "group).\n"), fmri ? fmri : inst_get_fmri(inst),
1518 fmri ? fmri : inst_get_fmri(inst), SCF_PG_RESTARTER,
1525 fmri ? fmri : inst_get_fmri(inst), SCF_PG_RESTARTER,
1532 fmri ? fmri : inst_get_fmri(inst), SCF_PG_RESTARTER,
1543 "is too long).\n"), fmri ? fmri : inst_get_fmri(inst),
1561 set_astring_prop(const char *fmri, const char *pgname, const char *pgtype,
1576 if (get_inst(fmri, inst) != 0)
1607 uu_warn(emsg_permission_denied, fmri);
1610 fmri, pgname);
1625 uu_warn(emsg_permission_denied, fmri);
1627 uu_warn(emsg_pg_perm_denied, fmri, pgname);
1653 uu_warn(emsg_permission_denied, fmri);
1655 uu_warn(emsg_prop_perm_denied, fmri, pgname,
1696 if (inst_get_state(wip->inst, state, wip->fmri, NULL) != 0)
1711 /* scf_walk_fmri() guarantees that fmri isn't too long */
1712 assert(strlen(wip->fmri) <= max_scf_fmri_sz);
1713 (void) strlcpy(fmri_buf, wip->fmri, max_scf_fmri_sz);
1730 set_inst_enabled(wip->fmri, wip->inst,
1750 if (inst_get_state(wip->inst, state, wip->fmri, &pg) != 0) {
1768 " state.\n"), wip->fmri);
1778 " by another entity.\n"), wip->fmri);
1789 " dependencies.\n"), wip->fmri);
1820 if (inst_get_state(wip->inst, state, wip->fmri, &pg) != 0) {
1837 " by another entity.\n"), wip->fmri);
1847 " unavailable.\n"), wip->fmri);
1875 if (inst_get_state(wip->inst, state, wip->fmri, NULL) != 0)
1882 set_inst_action(wip->fmri, wip->inst, SCF_PROPERTY_MAINT_OFF);
1885 set_inst_action(wip->fmri, wip->inst, SCF_PROPERTY_RESTORE);
1888 "maintenance or degraded state.\n"), wip->fmri);
1904 if (inst_get_state(wip->inst, state, wip->fmri, NULL) != 0)
1910 set_inst_action(wip->fmri, wip->inst, action);
1927 if (inst_get_state(wip->inst, state, wip->fmri, NULL) != 0) {
1936 uu_warn(gettext("Instance \"%s\" is not online.\n"), wip->fmri);
1941 set_inst_action(wip->fmri, wip->inst, (flags & MARK_IMMEDIATE) ?
1956 if (inst_get_state(wip->inst, state, wip->fmri, NULL) != 0)
1972 set_inst_action(wip->fmri, wip->inst, prop);
1978 set_milestone(const char *fmri, boolean_t temporary)
1987 SCF_PROPERTY_MILESTONE, fmri);
2006 fmri);
2015 uu_warn(emsg_no_service, fmri);
2097 * of a milestone fmri, or on the boundary between