32.5. autofs 사이트 설정 파일 덮어쓰기 또는 보강
경우에 따라 클라이언트 시스템의 특정 마운트 지점에 대한 사이트 기본값을 덮어쓰는 것이 유용합니다.
예 32.3. 초기 조건
예를 들어 다음 조건을 고려하십시오.
자동 마운터 맵은 NIS에 저장되고
/etc/nsswitch.conf
파일에는 다음 지시문이 있습니다.automount: files nis
automount: files nis
Copy to Clipboard Copied! Toggle word wrap Toggle overflow auto.master
파일에는 다음이 포함됩니다.+auto.master
+auto.master
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NIS
auto.master
맵 파일에는 다음이 포함됩니다./home auto.home
/home auto.home
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NIS
auto.home
맵에는 다음이 포함됩니다.beth fileserver.example.com:/export/home/beth joe fileserver.example.com:/export/home/joe * fileserver.example.com:/export/home/&
beth fileserver.example.com:/export/home/beth joe fileserver.example.com:/export/home/joe * fileserver.example.com:/export/home/&
Copy to Clipboard Copied! Toggle word wrap Toggle overflow autofs
설정 옵션BROWSE_MODE
가yes
로 설정됩니다.BROWSE_MODE="yes"
BROWSE_MODE="yes"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
파일 맵
/etc/auto.home
이 없습니다.
절차
이 섹션에서는 다른 서버의 홈 디렉토리 마운트 및 선택된 항목만 사용하여 auto.home
을 보강하는 예를 설명합니다.
예 32.4. 다른 서버의 홈 디렉터리 마운트
앞의 조건에 따라 클라이언트 시스템이 NIS 맵 auto.home
을 재정의하고 다른 서버의 홈 디렉터리를 마운트해야 한다고 가정하겠습니다.
이 경우 클라이언트는 다음
/etc/auto.master
맵을 사용해야 합니다./home /etc/auto.home +auto.master
/home /etc/auto.home +auto.master
Copy to Clipboard Copied! Toggle word wrap Toggle overflow /etc/auto.home
맵에는 항목이 포함되어 있습니다.* host.example.com:/export/home/&
* host.example.com:/export/home/&
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
자동 마운터는 마운트 지점의 첫 번째 발생만 처리하므로 /home
디렉토리에는 NIS auto.home 맵 대신 /etc/
콘텐츠가 포함되어 있습니다.
auto.home
예 32.5. auto.home과 선택한 항목만 늘리기
또는 사이트 전체 auto.home
맵을 몇 개의 항목으로 보강하기 위해 다음을 수행하십시오.
/etc/auto.home
파일 맵을 만들고 새 항목이 배치됩니다. 끝에 NISauto.home
맵을 포함합니다. 그런 다음/etc/auto.home
파일 맵은 다음과 유사합니다.mydir someserver:/export/mydir +auto.home
mydir someserver:/export/mydir +auto.home
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 이러한 NIS
auto.home
맵 조건을 사용하여/home
디렉토리 출력의 내용을 나열합니다.ls /home
$ ls /home beth joe mydir
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
이 마지막 예는 {} 에서
읽은 이름과 동일한 이름의 파일 맵 콘텐츠를 포함하지 않기 때문에 예상대로 작동합니다. 따라서 autofs
는 nsswitch
구성의 다음 맵 소스로 이동합니다.