Print this page
12721 would like svcadm disable -c

*** 20,29 **** --- 20,30 ---- */ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. + * Copyright 2020 Joyent, Inc. */ #include <sys/contract/process.h> #include <assert.h>
*** 1679,1695 **** SCF_PG_DEATHROW_TYPE, SCF_PG_DEATHROW_FLAGS, SCF_PROPERTY_DEATHROW, deathrow)); } /* * Returns 0, ECONNABORTED, ECANCELED, or EPERM. */ int libscf_delete_enable_ovr(scf_instance_t *inst) { return (scf_instance_delete_prop(inst, SCF_PG_GENERAL_OVR, ! SCF_PROPERTY_ENABLED)); } /* * Fails with * ECONNABORTED - repository connection was broken --- 1680,1703 ---- SCF_PG_DEATHROW_TYPE, SCF_PG_DEATHROW_FLAGS, SCF_PROPERTY_DEATHROW, deathrow)); } /* + * Since we're clearing the over-ridden enabled state for the service, we'll + * also take the opportunity to remove any comment. + * * Returns 0, ECONNABORTED, ECANCELED, or EPERM. */ int libscf_delete_enable_ovr(scf_instance_t *inst) { + int r = scf_instance_delete_prop(inst, SCF_PG_GENERAL_OVR, + SCF_PROPERTY_ENABLED); + if (r != 0) + return (r); return (scf_instance_delete_prop(inst, SCF_PG_GENERAL_OVR, ! SCF_PROPERTY_COMMENT)); } /* * Fails with * ECONNABORTED - repository connection was broken