RINSTALL(1) General Commands Manual RINSTALL(1)

rinstallfetch and install scripts from local or http source

rinstall [-a URL] [-m mode] [-o owner:group] source [target]

rinstall is shipped to remote machines by rset(1) to provide a standard method of installing files made available over HTTP, or from the current working directory for files already staged.

The target must be an absolute path, and is created if it does not exist. If the target exists but is not the same as source, then diff(1) is used to display the difference before it is updated. If the target is omitted, the source is placed in the staging directory defined by the SD environment variable.

If the source is defined absolute path it must exist on a file system on the remote host. If the source is defined with a relative path, then rinstall first checks if the source already exists in the SD and then tries to fetch it from the HTTP resource defined by INSTALL_URL or the -a option.

rinstall always checks for a local copy of the source before attempting to fetch a file from the location defined by the environment variable INSTALL_URL.

The arguments are as follows:

URL to an alternative file location.
Mode to set when a file is updated. This argument is passed to chmod(1).
Owner and/or group to set. This argument is passed to chown(8).

Arguments for diff(1) tool. Default is "-U 2"

The rinstall utility exits with one of the following values:

0
Target file was installed or updated
1
No changes were made
2
Unknown Operating System
3
Unable to fetch requested file

Install configuration file and set permissions

$SD/rinstall -m 644 -o www:www resolv.conf /var/www/etc/

Fetch latest copy of sources and extract

$SD/rinstall wodpress.tar.gz
tar -xzf $SD/wordpress.tar.gz -C /var/www

Fetch a file from an alternative location and store it in the staging directory under tools/sys/ if it's not already there and it's not available at $INSTALL_URL/tools/sys/sometool.tgz

$SD/rinstall -a https://example.org/files/tool.tar.gz tools/sys/sometool.tgz
September 24, 2024 OpenBSD 7.6