When you source a file in a proper script, it does not matter where or what form the file is in as long as what is written in it is understood and valid.Does the script have to be profile.add or can it be any executable script ?
For example, /jffs/scripts/env-vars.sh contains ...
/jffs/scripts dnsmasq.postconf contains ...Code:export IPSET="/usr/sbin/ipset"
Code:#!/bin/sh . /jffs/scripts/env_vars.sh $IPSET options
No reason not to.Scenario #1:
a) When sourcing ". /jffs/configs/profile.add" in /jffs/scripts/dnsmasq.postconf, the environment variable is set.Scenario #2:
a) The profile.add file was copied to /jffs/scripts and renamed to env_vars.sh.
b) The commands in /jffs/configs/profile.add were commented out.
c) When sourcing ". /jffs/scripts/env_vars.sh" in /jffs/scripts/dnsmasq.postconf, the environment variable is not set.
We use essential cookies to make this site work, and optional cookies to enhance your experience.