mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:55:55 +02:00
[package] 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.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23099 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6a672ca0eb
commit
92a1aaeba2
@ -98,3 +98,16 @@ ramoverlay() {
|
||||
mount -t tmpfs root /tmp/root
|
||||
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
Block a user