base-files: Add function pi_include the /lib/functions/boot.sh used by preinit, which...
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 f93eec99a9f126fb53c890c34c619f4e5fb76243..91ab9306e1d99fe13a524d0937bb1f751036f587 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
+}
+