diff --git a/docs/user/urls.md b/docs/user/urls.md index 3b486a2..f9f404e 100644 --- a/docs/user/urls.md +++ b/docs/user/urls.md @@ -27,6 +27,30 @@ In addition to those schemes, Agama supports a set of specific ones which can be - [`label`](#label) for finding files in a file system with a given label. - [`cd`, `dvd`, `hd`](#cd-dvd-and-hd) for finding files on specific devices (prefer `device`). +## Relative references + +For `"scripts"` and `"files"` in the Agama JSON config, the `"url"` property +can be a relative reference, where the resolution base is the URL of the containing config. + +This is a replacement for the ~~`relurl`~~ scheme used in AutoYaST. + +For example, if the configuration below is retrieved from +`https://example.com/machines/sles16.jsonnet`, it refers to +`https://example.com/machines/scripts/snapshot.sh`. + +```jsonnet +{ + scripts: { + postPartitioning: [ + { + name: "snapshot", + url: "scripts/snapshot.sh" + } + ] + } +} +``` + ## Agama specific schemes The typical protocols are enough for most use cases. However, more specific URLs can be handy in @@ -90,12 +114,14 @@ hd:/sles.jsonnet?devices=/dev/sr0 dvd:/autoinst.xml?devices=sr1 ``` -:::note Prefer `device` to `cd`, `dvd` or `hd` Given that `cd`, `dvd` and `hd` do not offer any -advantage, using `device` might be a better option. ::: +:::note +Prefer `device` to `cd`, `dvd` or `hd` Given that `cd`, `dvd` and `hd` do not offer any +advantage, using `device` might be a better option. +::: ### Not supported yet -The `repo://` and `relurl://` URLs are not supported yet, but there are plans to implement them. +The `repo://` URLs are not supported yet, but there are plans to implement them. [^1]: Agama relies on [curl](https://curl.se/) to support generic protocols (network protocols and `file://`). So it might happen that some protocol is supported "by accident". However, only the