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.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!