[package] base-files: Add function pi_include the /lib/functions/boot.sh used by...
authorDaniel Dickinson <crazycshore@gmail.com>
Sun, 19 Sep 2010 23:29:40 +0000 (23:29 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Sun, 19 Sep 2010 23:29:40 +0000 (23:29 +0000)
SVN-Revision: 23099

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
+}
+