mirror of https://github.com/hak5/openwrt.git
base-files: Add function pi_include the /lib/functions/boot.sh used by preinit, which safely sources files as well as working correctly whether the script using it is a package added to the jffs2 part of a squashfs or built into an image or on some other root filesystem.
SVN-Revision: 23099lede-17.01
parent
46803a3b75
commit
1385904dfa
|
@ -98,3 +98,16 @@ ramoverlay() {
|
||||||
mount -t tmpfs root /tmp/root
|
mount -t tmpfs root /tmp/root
|
||||||
fopivot /tmp/root /rom 1
|
fopivot /tmp/root /rom 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pi_include() {
|
||||||
|
if [ -f "/tmp/overlay/$1" ]; then
|
||||||
|
. "/tmp/overlay/$1"
|
||||||
|
elif [ -f "$1" ]; then
|
||||||
|
. "$1"
|
||||||
|
else
|
||||||
|
echo "WARNING: $1 not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue