summaryrefslogtreecommitdiff
path: root/recipes/trdx-config
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2012-06-19 09:54:51 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-06-19 09:54:51 +0200
commitbb2361e8a991efac07776aef69f813999874771c (patch)
treef00e24e15733924e6712cb3dafed7f473c4699f2 /recipes/trdx-config
parent362c0d8250ae1b8d7b2afce5bc4b27075fe82c68 (diff)
Add binary package of GPIOConfig, Tegrastats
Add udev-late-mount
Diffstat (limited to 'recipes/trdx-config')
-rwxr-xr-xrecipes/trdx-config/files/udev-late-mount31
-rw-r--r--recipes/trdx-config/trdx-config.bb25
2 files changed, 46 insertions, 10 deletions
diff --git a/recipes/trdx-config/files/udev-late-mount b/recipes/trdx-config/files/udev-late-mount
new file mode 100755
index 0000000..f0506e0
--- /dev/null
+++ b/recipes/trdx-config/files/udev-late-mount
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# mount drives missed during the udev 'add' action due to not yet avaliable filesytem
+#
+# Based on debian apmd scripts
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ #get all found drives
+ LIST=`ls /dev/sd??`
+
+ for DRIVEFILE in $LIST
+ do
+ #if the drive is not in the already mounted drives generate an add event
+ DRIVE=`basename $DRIVEFILE`
+ cat /proc/mounts | awk '{print $1}' | grep -q "^$DRIVEFILE" || udevadm trigger --subsystem-match=block --sysname-match=$DRIVE --action=add ; echo "mounted $DRIVEFILE"
+ done
+ ;;
+ *)
+ echo "Usage: /etc/init.d/udev-late-mount {start}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
+
diff --git a/recipes/trdx-config/trdx-config.bb b/recipes/trdx-config/trdx-config.bb
index 81c0191..097fb78 100644
--- a/recipes/trdx-config/trdx-config.bb
+++ b/recipes/trdx-config/trdx-config.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "setup files"
LICENSE = "Public Domain"
-PR = "r2"
+PR = "r4"
inherit update-rc.d
@@ -8,23 +8,28 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI = " file://inittab \
file://nvrm_daemon \
+ file://udev-late-mount \
file://COPYING \
"
LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=1c3a7fb45253c11c74434676d84fe7dd"
-PACKAGES = "${PN}"
+PACKAGES = "${PN} ${PN}-udev-late-mount"
-FILES_${PN} = "/etc/* ${sysconfdir}"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+FILES_${PN}-udev-late-mount = "${sysconfdir}/init.d/udev-late-mount"
+FILES_${PN} = "${sysconfdir}/inittab ${sysconfdir}/init.d/nvrm_daemon"
DEPENDS_${PN} += "update-rc.d"
-RDEPENDS_${PN} += "update-rc.d"
+RDEPENDS_${PN} += "update-rc.d ${PN}-udev-late-mount"
do_install () {
- install -d ${D}/etc/init.d
- install -m 0644 ${WORKDIR}/inittab ${D}/etc/
- install -m 0755 ${WORKDIR}/nvrm_daemon ${D}/etc/init.d
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}
+ install -m 0755 ${WORKDIR}/nvrm_daemon ${D}${sysconfdir}init.d
+ install -m 0755 ${WORKDIR}/udev-late-mount ${D}${sysconfdir}/init.d
}
-INITSCRIPT_NAME = "nvrm_daemon"
-INITSCRIPT_PARAMS = "defaults 91" \ No newline at end of file
+INITSCRIPT_PACKAGES = "${PN} ${PN}-udev-late-mount"
+INITSCRIPT_NAME_${PN} = "nvrm_daemon"
+INITSCRIPT_PARAMS_${PN} = "defaults 91"
+INITSCRIPT_NAME_${PN}-udev-late-mount = "udev-late-mount"
+INITSCRIPT_PARAMS_${PN}-udev-late-mount = "defaults 60"