답변:
Afaik에서는 update-alternatives 명령 의 --install 옵션을 사용하여 대안을 만듭니다 . 패키지를 대안으로 등록하려면이 명령을 패키지 설치 후 스크립트에 추가 할 수 있습니다.
--set 옵션을 사용하거나 대체 그룹을 자동 모드로 설정하고 패키지의 우선 순위를 가장 높게 설정하여 패키지 를 설치시 기본값으로 만들 수 있습니다 .
중앙 저장소는 없으며이 명령에서 사용되는 두 개의 두 디렉토리 만 있습니다.
alternatives directory
A directory, by default /etc/alternatives, containing the symlinks.
administrative directory
A directory, by default /var/lib/dpkg/alternatives, containing update-alternatives’ state infor‐
mation.
업데이트 대안 매뉴얼 페이지 의 관련 스 니펫 :
--install genname symlink altern priority [--slave genname symlink altern]...
Add a group of alternatives to the system. genname is the generic name for the master link, sym‐
link is the name of its symlink in the alternatives directory, and altern is the alternative
being introduced for the master link. The arguments after --slave are the generic name, symlink
name in the alternatives directory and the alternative for a slave link. Zero or more --slave
options, each followed by three arguments, may be specified.
If the master symlink specified exists already in the alternatives system’s records, the informa‐
tion supplied will be added as a new set of alternatives for the group. Otherwise, a new group,
set to automatic mode, will be added with this information. If the group is in automatic mode,
and the newly added alternatives’ priority is higher than any other installed alternatives for
this group, the symlinks will be updated to point to the newly added alternatives.
--set name path
Set the program path as alternative for name. This is equivalent to --config but is non-interac‐
tive and thus scriptable.
--auto link
Switch the master symlink link to automatic mode. In the process, this symlink and its slaves
are updated to point to the highest priority installed alternatives.