ubox: add a uci-default script for fstab generation
authorJohn Crispin <john@openwrt.org>
Mon, 8 Jul 2013 09:01:42 +0000 (09:01 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 8 Jul 2013 09:01:42 +0000 (09:01 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37199

package/system/ubox/Makefile
package/system/ubox/files/fstab.default [new file with mode: 0644]

index 3824148f939c771db80c9c133b7366a7dc5278ea..e964506385819bafd3711e852d1d4257ef1e42a3 100644 (file)
@@ -48,9 +48,10 @@ define Package/ubox/install
 endef
 
 define Package/block-mount/install
-       $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/
+       $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/etc/hotplug.d/block $(1)/etc/init.d/ $(1)/etc/uci-defaults/
 
        $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
+       $(INSTALL_DATA) ./files/fstab.default $(1)/etc/uci-defaults/10-fstab
        $(INSTALL_DATA) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount
 
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/
diff --git a/package/system/ubox/files/fstab.default b/package/system/ubox/files/fstab.default
new file mode 100644 (file)
index 0000000..dd4ba1c
--- /dev/null
@@ -0,0 +1 @@
+[ ! -f /etc/config/fstab ] && ( block detect > /etc/config/fstab )