1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2025-06-06 09:34:00 +00:00

Updated yadm.1 to remove weighting docs.

This commit is contained in:
AaronYoung5 2025-02-25 06:07:29 -05:00
parent c3b7950267
commit 0507d68764

54
yadm.1
View File

@ -493,14 +493,12 @@ See the TEMPLATES section for more details.
Valid if the value matches the current user. Valid if the value matches the current user.
Current user is calculated by running Current user is calculated by running
.BR "id \-u \-n" . .BR "id \-u \-n" .
.BR [ weight\ = \ 64]
.TP .TP
.BR hostname ,\ h .BR hostname ,\ h
Valid if the value matches the short hostname. Valid if the value matches the short hostname.
Hostname is calculated by running Hostname is calculated by running
.BR "uname \-n" , .BR "uname \-n" ,
and trimming off any domain. and trimming off any domain.
.BR [ weight\ = \ 32]
.TP .TP
.BR class ,\ c .BR class ,\ c
Valid if the value matches the Valid if the value matches the
@ -510,7 +508,6 @@ Class must be manually set using
.BR "yadm config local.class <class>" . .BR "yadm config local.class <class>" .
See the CONFIGURATION section for more details about setting See the CONFIGURATION section for more details about setting
.BR local.class . .BR local.class .
.BR [ weight\ = \ 16]
.TP .TP
.BR distro ,\ d .BR distro ,\ d
Valid if the value matches the distro. Valid if the value matches the distro.
@ -518,26 +515,22 @@ Distro is calculated by running
.B "lsb_release \-si" .B "lsb_release \-si"
or by inspecting the ID from or by inspecting the ID from
.BR "/etc/os-release" . .BR "/etc/os-release" .
.BR [ weight\ = \ 8]
.TP .TP
.BR distro_family ,\ f .BR distro_family ,\ f
Valid if the value matches the distro family. Valid if the value matches the distro family.
Distro family is calculated by inspecting the ID_LIKE line from Distro family is calculated by inspecting the ID_LIKE line from
.B "/etc/os-release" .B "/etc/os-release"
(or ID if no ID_LIKE line is found). (or ID if no ID_LIKE line is found).
.BR [ weight\ = \ 4]
.TP .TP
.BR os ,\ o .BR os ,\ o
Valid if the value matches the OS. Valid if the value matches the OS.
OS is calculated by running OS is calculated by running
.BR "uname \-s" . .BR "uname \-s" .
.BR [ weight\ = \ 2]
.TP .TP
.BR arch ,\ a .BR arch ,\ a
Valid if the value matches the architecture. Valid if the value matches the architecture.
Architecture is calculated by running Architecture is calculated by running
.BR "uname \-m" . .BR "uname \-m" .
.BR [ weight\ = \ 1]
.TP .TP
.B default .B default
Valid when no other alternate is valid. Valid when no other alternate is valid.
@ -614,56 +607,11 @@ Windows Subsystem for Linux, where the os is reported as WSL, the link will be:
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##~os.Linux,~os.Darwin,~os.SunOS .IR $HOME/path/example.txt " -> " $HOME/path/example.txt##~os.Linux,~os.Darwin,~os.SunOS
Negative conditions use the weight which corresponds to the attached attribute. Negative conditions use the same weight which corresponds to the attached attribute.
If no "##default" version exists and no files have valid conditions, then no If no "##default" version exists and no files have valid conditions, then no
link will be created. link will be created.
Weighting for multiple valid alternatives is calculated using the weights specified
above. For instance, on a Linux server named "host1" with class set to "Work", the
alternatives will have the following weights:
- $HOME/path/example.txt##default
Used if there are no other valid alternatives.
- $HOME/path/example.txt##class.Work
1064 = (1000 + 64 (class)) * 1 (valid)
- $HOME/path/example.txt##os.Darwin
0 = (1000 + 2 (os)) * 0 (invalid)
- $HOME/path/example.txt##os.Darwin,hostname.host1
0 = (1000 + 2 (os) + 32 (hostname)) * 0 (invalid)
- $HOME/path/example.txt##os.Darwin,hostname.host2
0 = (1000 + 2 (os) + 32 (hostname)) * 0 (invalid)
- $HOME/path/example.txt##os.Linux
1002 = (1000 + 2 (os)) * 1 (valid)
- $HOME/path/example.txt##os.Linux,hostname.host1
1034 = (1000 + 2 (os) + 32 (hostname)) * 1 (valid)
- $HOME/path/example.txt##os.Linux,hostname.host2
1034 = (1000 + 2 (os) + 32 (hostname)) * 0 (invalid)
- $HOME/path/example.txt##~os.Linux,~os.Darwin,~os.SunOS
1006 = (1000 + 2 (~os) + 2 (~os) + 2 (~os)) * 0 (invalid)
In this case, with a Linux server named "host1" with class set to "Work", the link will
be:
.IR $HOME/path/example.txt " -> " $HOME/path/example.txt##class.Work
Links are also created for directories named this way, as long as they have at Links are also created for directories named this way, as long as they have at
least one yadm managed file within them. least one yadm managed file within them.