Go to main content
Oracle® Solaris 11.3 でのシステムサービスの管理

印刷ビューの終了

更新: 2016 年 11 月
 
 

ttymon プロパティー値の変更方法

この手順では、ttymon に渡されるパラメータを変更する方法を示します。

  1. 変更するサービスを識別します。

    ttymon(1M) のマニュアルページには、変更するサービスが svc:/system/console-login であると記されています。ttymon(1M) のマニュアルページには、ttymon プロパティーグループ内のプロパティーの記述も含まれています。

    次のコマンドを実行すると、このイメージ内の console-login サービスの複数のインスタンスが表示され、default インスタンスが現在オンラインになっている唯一のインスタンスであることが示されます。

    $ svcs console-login
    STATE          STIME    FMRI
    disabled       10:49:43 svc:/system/console-login:terma
    disabled       10:49:43 svc:/system/console-login:termb
    online         10:50:54 svc:/system/console-login:default
  2. 変更するプロパティーを識別します。

    次のコマンドを実行すると、default インスタンスの ttymon プロパティーグループ内の各プロパティーの名前、データ型、値、および簡単な説明が表示されます。

    $ svccfg -s console-login:default describe ttymon
    ttymon                application
    ttymon/device        astring     /dev/console
        The terminal device to be used for the console login prompt.
    ttymon/terminal_type astring
        Sets the initial value of the TERM environment variable

    前述の出力には、terminal_type プロパティーの値は表示されません。次のコマンドは、console-login:default インスタンスの ttymon/terminal_type プロパティーの値が、現在 null であることを確認します。

    $ svcprop -p ttymon/terminal_type console-login:default
    ""
  3. プロパティー値を変更します。

    次のコマンドを入力して、console-login:default インスタンスの ttymon/terminal_type プロパティーの値を xterm に変更します。

    $ svccfg -s system/console-login:default setprop ttymon/terminal_type=xterm
  4. 実行中のスナップショットに新しい値をコミットします。

    次の出力では、terminal_type プロパティーの値が編集中の構成では変更されているが、実行中のスナップショットでは変更されていないことが示されています。

    $ svccfg -s console-login:default listprop ttymon/terminal_type
    ttymon/terminal_type astring     xterm
    $ svcprop -p ttymon/terminal_type console-login:default
    ""

    サービスインスタンスをリフレッシュしたあと、実行中のスナップショットでプロパティー値は変更されます。

    $ svcadm refresh console-login:default
    $ svcprop -p ttymon/terminal_type console-login:default
    xterm