Skip to content

replace

daniel edited this page May 15, 2021 · 13 revisions

/bootstrap-plugins/replace - replace string in file (sed pattern "s/.../g")

Config parameters

Name Description Default Value
RPI_REPLACE_FILE file to search & replace pattern in
RPI_REPLACE_PATTERN sed pattern to match (and replace)

Distfiles

none

Examples

RPI_BOOTSTRAP_PLUGINS+=("replace") to append the plugin or RPI_BOOTSTRAP_PLUGINS=( ... "replace" ... ) to place at some position in the current list.

replace "exit 0" with "# exit 0" in /etc/rc.local

RPI_REPLACE_PATTERN="exit 0/# exit 0"
RPI_REPLACE_FILE="${RPI_ROOT}/etc/rc.local"

Tests

Clone this wiki locally