immortalwrt/package/base-files/files/lib
Oldřich Jedlička db6df604f7
base-files: allow reusing of boolean value extraction logic
The `functions.sh` script has `config_get_bool()` function, which is
usable when using UCI config direct access API, but there is no
equivalent for the callback API. Introduce `get_bool()` function to
allow reusing it from init scripts.

Example:

```sh
option_cb() {
    local option="$1"
    local value="$(get_bool "$2")"
    ...
}
```

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2021-01-02 12:04:53 +08:00
..
functions base-files: source functions.sh in /lib/functions/system.sh 2020-10-13 18:54:18 +08:00
preinit base-files: prevent issues w/ overlay on powerloss after sysupgrade 2020-10-13 18:39:53 +08:00
upgrade treewide: replace which with command -v 2020-08-13 23:30:21 +08:00
functions.sh base-files: allow reusing of boolean value extraction logic 2021-01-02 12:04:53 +08:00