Lines Matching refs:pg

198 	scf_propertygroup_t *pg = NULL;
204 if ((pg = scf_pg_create(h)) == NULL) {
211 SCF_PG_FLAG_NONPERSISTENT, pg) == 0) {
214 return (pg);
234 scf_pg_destroy(pg);
235 pg = NULL;
239 if (scf_service_get_pg(svc, pg_name, pg) != 0) {
251 scf_pg_destroy(pg);
252 pg = NULL;
259 scf_pg_destroy(pg);
260 pg = NULL;
265 * See if the pg has the name property. If it has, that
267 * should re-run it anyway, but not modify the existing pg;
272 * remove the pg fully after a script failed to run.
275 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_NAME, prop) == 0) {
278 scf_pg_destroy(pg);
279 pg = NULL;
282 scf_pg_destroy(pg);
283 pg = NULL;
292 return (pg);
300 scf_propertygroup_t *pg = NULL;
304 if ((pg = scf_pg_create(h)) == NULL) {
330 while (scf_iter_next_pg(iter, pg) > 0) {
336 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_SUFFIX,
357 if (scf_pg_get_property(pg, SCF_LEGACY_PROPERTY_INODE,
375 scf_pg_destroy(pg);
376 pg = NULL;
382 return (pg);
397 scf_propertygroup_t *pg;
406 pg = pg_match(h, svc, st.st_ino, NULL);
407 if (pg != NULL)
412 if ((pg = pg_match(h, svc, st.st_ino, suffix)) != NULL)
415 if ((pg = pg_match(h, svc, st.st_ino, NULL)) != NULL)
418 if ((pg = pg_match(h, svc, 0, suffix)) == NULL) {
428 return (pg);
437 scf_propertygroup_t *pg = NULL;
486 pg = get_start_pg(script, h, svc, ok);
488 pg = get_stop_pg(script, h, svc, ok);
493 return (pg);
559 cleanup_pg(scf_propertygroup_t *pg)
564 if (scf_pg_delete(pg) == 0)
569 if (scf_pg_to_fmri(pg, buf, sizeof (buf)) != 0)
703 set_legacy_service(scf_propertygroup_t *pg, const char *script, ino_t inode)
714 h = scf_pg_handle(pg);
734 if (scf_transaction_start(tx, pg) != 0) {
776 if (scf_pg_update(pg) == -1) {
812 scf_propertygroup_t *pg;
848 * Look for the pg & exit if appropriate. Also, if we're starting,
849 * add the pg now so we can exit before launching the script if we
854 pg = get_script_pg(script, start_flag, &pg_ok);
866 if (start_flag && pg != NULL)
867 cleanup_pg(pg);
876 if (start_flag && pg != NULL)
877 cleanup_pg(pg);
900 if (start_flag && pg != NULL)
901 cleanup_pg(pg);
956 if (pg != NULL)
957 cleanup_pg(pg);
976 if (pg != NULL) {
978 set_legacy_service(pg, script, st.st_ino);
980 cleanup_pg(pg);
981 scf_pg_destroy(pg);