Show Table of Contents
9.4.3. サイトの設定ファイルを無効化する/拡大する
クライアントシステム上の特定マウントポイントのサイトデフォルト値を無効にする場合に便利です。 たとえば、 次のような状況を想定してみます。
- 自動マウント機能のマップが NIS に格納され、
/etc/nsswitch.confファイルには次のようなディレクティブがあるとします。automount: files nis
auto.masterファイルには次が含まれます。+auto.master
- NIS の
auto.masterマップファイルには次が含まれます。/home auto.home
- NIS の
auto.homeマップには次が含まれます。beth fileserver.example.com:/export/home/beth joe fileserver.example.com:/export/home/joe * fileserver.example.com:/export/home/&
/etc/auto.homeファイルマップは存在しません。
このような状況でクライアントシステムが NIS マップの
auto.home を無効にして、 ホームのディレクトリーを別のサーバーからマウントする必要があると仮定します。 クライアントは次のような /etc/auto.master マップを使用する必要があります。
/home /etc/auto.home +auto.master
/etc/auto.home マップには次のエントリーが含まれます。
* labserver.example.com:/export/home/&
自動マウント機能で処理されるのは 1 番目に出現するマウントポイントのみになるため、
/home には NIS auto.home マップではなく、/etc/auto.home のコンテンツが含まれます。
一方、サイト全体の
auto.home マップにいくつかのエントリーを加えて拡大させたい場合は、 /etc/auto.home ファイルマップを作成して新しいエントリーを組み込み、最後に NIS auto.home マップを組み込みます。/etc/auto.home ファイルマップは次のようになります。
mydir someserver:/export/mydir +auto.home
ls /home を行うと、 上述の NIS auto.home マップに従い、以下のような出力になります。
beth joe mydir
autofs は読み込み中のファイルマップと同じ名前のファイルマップの内容を組み込まないため、上記の例は期待通りに動作します。このように autofs は nsswitch 設定内の次のマップソースに移動します。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.