[package] base-files: Add function pi_include the /lib/functions/boot.sh used by...
authorcshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 19 Sep 2010 23:29:40 +0000 (23:29 +0000)
committercshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 19 Sep 2010 23:29:40 +0000 (23:29 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23099 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/lib/functions/boot.sh

index f93eec9..91ab930 100644 (file)
@@ -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
+}
+
This page took 0.025654 seconds and 4 git commands to generate.