block-mount base-files: Added additional check to pi_include to ensure that a directo...
authorDaniel Dickinson <crazycshore@gmail.com>
Tue, 5 Apr 2011 12:12:57 +0000 (12:12 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Tue, 5 Apr 2011 12:12:57 +0000 (12:12 +0000)
SVN-Revision: 26479

package/base-files/files/etc/functions.sh
package/block-mount/Makefile

index acea6175300b40c5774d74f37c4be6e11d36e155..e4b3badb4629af874820f268f350e827616b17b8 100755 (executable)
@@ -299,13 +299,17 @@ pi_include() {
        elif [ -f "$1" ]; then
                . "$1"
        elif [ -d "/tmp/overlay/$1" ]; then
-               for src_script in /tmp/overlay/$1/*.sh; do
-                       . "$src_script"
-               done
+               if [ -n "$(ls /tmp/overlay/$1/*.sh 2>/dev/null)" ]; then
+                       for src_script in /tmp/overlay/$1/*.sh; do
+                               . "$src_script"
+                       done
+               fi
        elif [ -d "$1" ]; then
-               for src_script in $1/*.sh; do
-                       . "$src_script"
-               done
+               if [ -n "$(ls $1/*.sh 2>/dev/null)" ]; then
+                       for src_script in $1/*.sh; do
+                               . "$src_script"
+                       done
+               fi
        else
                echo "WARNING: $1 not found"
                return 1
index d2313f77f4b043f1d92ef142146f550fc5e70742..c2c9d33f134e53eca6057290a5785d90cfb5cd62 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=block-mount
 PKG_VERSION:=0.2.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -50,7 +50,7 @@ define Package/block-mount/install
        $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
        $(INSTALL_DIR) $(1)/etc/config
        $(INSTALL_DATA) ./files/fstab.config $(1)/etc/config/fstab
-       $(INSTALL_DIR) $(1)/lib/functions
+       $(INSTALL_DIR) $(1)/lib/functions/fsck
        $(INSTALL_DATA) ./files/mount.sh $(1)/lib/functions/
        $(INSTALL_DATA) ./files/fsck.sh $(1)/lib/functions/
        $(INSTALL_DATA) ./files/block.sh $(1)/lib/functions/