4623N/A#!/usr/bin/python2.7
3199N/A
4623N/A# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3199N/A#
3199N/A# Licensed under the Apache License, Version 2.0 (the "License"); you may
3199N/A# not use this file except in compliance with the License. You may obtain
3199N/A# a copy of the License at
3199N/A#
3199N/A# http://www.apache.org/licenses/LICENSE-2.0
3199N/A#
3199N/A# Unless required by applicable law or agreed to in writing, software
3199N/A# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
3199N/A# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
3199N/A# License for the specific language governing permissions and limitations
3199N/A# under the License.
3199N/A
3199N/Aimport errno
3199N/Aimport os
3199N/Aimport sys
3199N/A
3199N/Aimport smf_include
3199N/A
3199N/A
3199N/Adef start():
3199N/A # All the Heat services do essentially the same thing, so there's no need
3199N/A # to have different method executables. Just look at the FMRI and run the
3199N/A # appropriate executable from /usr/lib/heat.
3199N/A fmri = os.environ["SMF_FMRI"]
3199N/A exefile = os.path.basename(fmri.split(":")[1])
3199N/A exepath = os.path.join("/usr/lib/heat", exefile)
3199N/A
3199N/A smf_include.smf_subprocess(exepath)
3199N/A
3199N/Aif __name__ == "__main__":
3199N/A os.putenv("LC_ALL", "C")
3199N/A smf_include.smf_main()