JavaScript is required to for searching.
탐색 링크 건너뛰기
인쇄 보기 종료
Oracle Solaris 11.1 시스템     Oracle Solaris 11.1 Information Library (한국어)
search filter icon
search icon

문서 정보

머리말

제1부Oracle Solaris 11.1 설치 옵션

1.  설치 옵션 개요

제2부설치 매체를 사용하여 설치

2.  설치 준비

3.  라이브 매체 사용

4.  텍스트 설치 프로그램 사용

5.  매체에서 부트하는 자동 설치

6.  Oracle Solaris 인스턴스 구성 해제 또는 재구성

제3부설치 서버를 사용하여 설치

7.  다중 클라이언트의 자동 설치

8.  설치 서버 설정

9.  설치 사용자 정의

10.  클라이언트 시스템 프로비전

11.  클라이언트 시스템 구성

12.  영역 설치 및 구성

13.  처음 부트 중 사용자 정의 스크립트 실행

처음 부트 시 한번 실행 컨트롤 구현

처음 부트 시 한번 실행을 보증하는 방법

처음 부트 시 실행할 스크립트 만들기

SMF 매니페스트 파일 만들기

매니페스트 만들기 도구 사용

생성된 매니페스트 사용자 정의

스크립트 및 서비스에 대한 IPS 패키지 만들기

IPS 패키지를 만들어 게시하는 방법

AI 클라이언트에 처음 부트 패키지 설치

IPS 패키지를 설치하는 방법

처음 부트 서비스 테스트

스크립트 또는 서비스를 업데이트하는 방법

14.  클라이언트 시스템 설치

15.  자동 설치 문제 해결

제4부관련 작업 수행

A.  Oracle Configuration Manager 작업

B.  Device Driver Utility 사용

색인

SMF 매니페스트 파일 만들기

스크립트를 실행하는 서비스를 정의하는 SMF 매니페스트 파일을 만듭니다.

매니페스트 만들기 도구 사용

svcbundle 명령을 사용하여 유효한 서비스 매니페스트를 생성할 수 있습니다. 다음 예에서 기본적으로 svcbundle 명령으로 생성된 매니페스트는 일시적 서비스를 지정하고 multi-user 종속성을 지정합니다.

예 13-3 생성된 SMF 서비스 매니페스트

다음 명령에서 처음 부트 시 실행할 스크립트 만들기에 표시된 스크립트의 이름은 start-method 값으로 지정됩니다. 스크립트 및 서비스에 대한 IPS 패키지 만들기에서 만든 패키지가 first-boot-script.sh 스크립트를 /opt/site/first-boot-script.sh로 설치하므로 스크립트의 이름은 /opt/site/first-boot-script.sh로 지정됩니다.

다음 명령에서 completed 등록 정보는 등록 정보 그룹 이름, 등록 정보 이름, 등록 정보 유형, 초기 등록 정보 값을 콜론으로 구분된 목록으로 지정합니다.

$ svcbundle -s service-name=site/first-boot-script-svc \
-s start-method=/opt/site/first-boot-script.sh \
-s instance-property=config:completed:boolean:false \
> first-boot-script-svc-manifest.xml

아래 표시된 생성된 서비스 매니페스트에서 처음 부트 스크립트 /opt/site/first-boot-script.shstart 메소드의 exec 속성 값입니다. completed 등록 정보는 이 서비스의 기본 인스턴스인 first-boot-script-svc:default를 정의하는 instance 요소에 지정됩니다.

<?xml version="1.0" ?>
<!DOCTYPE service_bundle
  SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
    Manifest created by svcbundle (2012-Jul-13 16:39:30-0700)
-->
<service_bundle type="manifest" name="site/first-boot-script-svc">
    <service version="1" type="service" name="site/first-boot-script-svc">
        <!--
            The following dependency keeps us from starting until the
            multi-user milestone is reached.
        -->
        <dependency restart_on="none" type="service"
            name="multi_user_dependency" grouping="require_all">
            <service_fmri value="svc:/milestone/multi-user"/>
        </dependency>
        <exec_method timeout_seconds="60" type="method" name="start"
            exec="/opt/site/first-boot-script.sh"/>
        <!--
            The exec attribute below can be changed to a command that SMF
            should execute to stop the service.  See smf_method(5) for more
            details.
        -->
        <exec_method timeout_seconds="60" type="method" name="stop"
            exec=":true"/>
        <!--
            The exec attribute below can be changed to a command that SMF
            should execute when the service is refreshed.  Services are
            typically refreshed when their properties are changed in the
            SMF repository.  See smf_method(5) for more details.  It is
            common to retain the value of :true which means that SMF will
            take no action when the service is refreshed.  Alternatively,
            you may wish to provide a method to reread the SMF repository
            and act on any configuration changes.
        -->
        <exec_method timeout_seconds="60" type="method" name="refresh"
            exec=":true"/>
        <property_group type="framework" name="startd">
            <propval type="astring" name="duration" value="transient"/>
        </property_group>
        <instance enabled="true" name="default">
            <property_group type="application" name="config">
                <propval type="boolean" name="completed" value="false"/>
            </property_group>
        </instance>
        <template>
            <common_name>
                <loctext xml:lang="C">
                    <!--
                        Replace this comment with a short name for the
                        service.
                    -->
                </loctext>
            </common_name>
            <description>
                <loctext xml:lang="C">
                    <!--
                        Replace this comment with a brief description of
                        the service
                    -->
                </loctext>
            </description>
        </template>
    </service>
</service_bundle>

생성된 매니페스트 사용자 정의

svcbundle 명령으로 생성된 서비스 매니페스트는 수정할 필요 없이 사용자 요구를 충족했을 수 있습니다. 다음 예는 서비스 매니페스트의 수정을 보여줍니다.

서비스 매니페스트를 수정할 경우 svccfg validate 명령을 사용하여 매니페스트가 여전히 유효한지 확인합니다.

예 13-4 사용자 정의된 SMF 서비스 매니페스트

생성된 서비스 매니페스트의 다음 복사본에서 exec_method 시간 초과 기본값인 60초가 start 메소드에 대해 증가했습니다. start 메소드에 처음 부트 스크립트를 실행할 충분한 시간이 있는지 확인하십시오.

<?xml version="1.0" ?>
<!DOCTYPE service_bundle
  SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
    Manifest created by svcbundle (2012-Jul-13 16:39:30-0700)
-->
<service_bundle type="manifest" name="site/first-boot-script-svc">
    <service version="1" type="service" name="site/first-boot-script-svc">
        <!--
            The following dependency keeps us from starting until the
            multi-user milestone is reached.
        -->
        <dependency restart_on="none" type="service"
            name="multi_user_dependency" grouping="require_all">
            <service_fmri value="svc:/milestone/multi-user"/>
        </dependency>
        <!--
            Make sure the start method has adequate time to run the script.
        -->
        <exec_method timeout_seconds="360" type="method" name="start"
            exec="/opt/site/first-boot-script.sh"/>
        <!--
            The exec attribute below can be changed to a command that SMF
            should execute to stop the service.  See smf_method(5) for more
            details.
        -->
        <exec_method timeout_seconds="60" type="method" name="stop"
            exec=":true"/>
        <!--
            The exec attribute below can be changed to a command that SMF
            should execute when the service is refreshed.  Services are
            typically refreshed when their properties are changed in the
            SMF repository.  See smf_method(5) for more details.  It is
            common to retain the value of :true which means that SMF will
            take no action when the service is refreshed.  Alternatively,
            you may wish to provide a method to reread the SMF repository
            and act on any configuration changes.
        -->
        <exec_method timeout_seconds="60" type="method" name="refresh"
            exec=":true"/>
        <property_group type="framework" name="startd">
            <propval type="astring" name="duration" value="transient"/>
        </property_group>
        <instance enabled="true" name="default">
            <property_group type="application" name="config">
                <propval type="boolean" name="completed" value="false"/>
            </property_group>
        </instance>
        <template>
            <common_name>
                <loctext xml:lang="C">
                    <!--
                        Replace this comment with a short name for the
                        service.
                    -->
                </loctext>
            </common_name>
            <description>
                <loctext xml:lang="C">
                    <!--
                        Replace this comment with a brief description of
                        the service
                    -->
                </loctext>
            </description>
        </template>
    </service>
</service_bundle>
$ svccfg validate first-boot-script-svc-manifest.xml