diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 537cce6..3212891 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -29,7 +29,7 @@ be omitted. Most attributes can be abbreviated as a single letter. | - | - | | `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details.| | `user`, `u` | Valid if the value matches the current user. Current user is calculated by running id ‑u ‑n. | -| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si. | +| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si or inspecting /etc/os-release | | `os`, `o` | Valid if the value matches the OS. OS is calculated by running uname ‑s. * | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. | |`hostname`, `h`|Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain.| @@ -37,6 +37,9 @@ be omitted. Most attributes can be abbreviated as a single letter. * The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". +
+* +If `lsb_release` is not available, "distro" will be the ID specified in `/etc/os-release`.
You may use any number of conditions, in any order. An alternate will only be diff --git a/_docs/070_templates.md b/_docs/070_templates.md index 8ace2e9..d23d13a 100644 --- a/_docs/070_templates.md +++ b/_docs/070_templates.md @@ -39,7 +39,7 @@ When template processors run, they will be provided the following set of data. | Default (built-in) | Jinja | Description | Source | | - | - | - | - | | `yadm.class` | `YADM_CLASS` | Locally defined yadm class | yadm config local.class | -| `yadm.distro` | `YADM_DISTRO` | Distribution | lsb_release ‑si | +| `yadm.distro` | `YADM_DISTRO` | Distribution | lsb_release ‑si
or /etc/os-release | | `yadm.hostname` | `YADM_HOSTNAME` | Hostname | `hostname` (without domain) | | `yadm.os` | `YADM_OS` | Operating system | uname ‑s * | | `yadm.user` | `YADM_USER` | Current user | id ‑u ‑n | @@ -47,6 +47,9 @@ When template processors run, they will be provided the following set of data. * The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". +
+* +If `lsb_release` is not available, "distro" will be the ID specified in `/etc/os-release`.
## Supported template processors