Loading recipes-core/images/core-image-elphel393.bb +1 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ IMAGE_INSTALL_append += " python-core \ init-elphel393 \ init-elphel393 \ init-tempmon \ init-tempmon \ ahci-blacklist \ ahci-blacklist \ udev-rules \ " " #kernel-modules #kernel-modules Loading recipes-core/udev-rules/files/90-elphel-automount.rules 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line KERNEL!="sd[a-z][0-9]", GOTO="quit_automount" # Import file system parameters; these parameters can be obtained with 'udevadm monitor --environment' command IMPORT{program}="/sbin/blkid -o udev -p %N" # Device has a label ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}" # Device has no file system, do not mount it ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount" # Device has no label, but has a file system ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k" # Mount device to /media if it is not SSD ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount /dev/%k /media/%E{dir_name}" # Mound device to /mnt if it is SSD ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /mnt/%E{dir_name}" # Delete directory after removal ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /media/%E{dir_name}" ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /mnt/%E{dir_name}" # Exit point LABEL="quit_automount" recipes-core/udev-rules/udev-rules_1.0.bb 0 → 100644 +27 −0 Original line number Original line Diff line number Diff line SUMMARY = "Extra initscripts for the Elphel 10393 board" DESCRIPTION = "udev rules for automounting disk drives to /mnt or /media directories" AUTHOR = "Elphel Inc." HOMEPAGE = "http://www3.elphel.com/" PRIORITY = "optional" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891" PV = "${SRCDATE}" PR = "r0" SRC_URI = "file://90-elphel-automount.rules \ " RDEPENDS_${PN} = "udev" PACKAGES = "udev-rules" UDEV_RULES_DIR = "${sysconfdir}/udev/rules.d" FILES_${PN} += "${UDEV_RULES_DIR}/90-elphel-automount.rules" do_install() { install -d ${D}${UDEV_RULES_DIR} install -m 644 ${WORKDIR}/90-elphel-automount.rules ${D}${UDEV_RULES_DIR} } Loading
recipes-core/images/core-image-elphel393.bb +1 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,7 @@ IMAGE_INSTALL_append += " python-core \ init-elphel393 \ init-elphel393 \ init-tempmon \ init-tempmon \ ahci-blacklist \ ahci-blacklist \ udev-rules \ " " #kernel-modules #kernel-modules Loading
recipes-core/udev-rules/files/90-elphel-automount.rules 0 → 100644 +26 −0 Original line number Original line Diff line number Diff line KERNEL!="sd[a-z][0-9]", GOTO="quit_automount" # Import file system parameters; these parameters can be obtained with 'udevadm monitor --environment' command IMPORT{program}="/sbin/blkid -o udev -p %N" # Device has a label ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}" # Device has no file system, do not mount it ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount" # Device has no label, but has a file system ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k" # Mount device to /media if it is not SSD ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount /dev/%k /media/%E{dir_name}" # Mound device to /mnt if it is SSD ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /mnt/%E{dir_name}" # Delete directory after removal ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /media/%E{dir_name}" ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /mnt/%E{dir_name}" # Exit point LABEL="quit_automount"
recipes-core/udev-rules/udev-rules_1.0.bb 0 → 100644 +27 −0 Original line number Original line Diff line number Diff line SUMMARY = "Extra initscripts for the Elphel 10393 board" DESCRIPTION = "udev rules for automounting disk drives to /mnt or /media directories" AUTHOR = "Elphel Inc." HOMEPAGE = "http://www3.elphel.com/" PRIORITY = "optional" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891" PV = "${SRCDATE}" PR = "r0" SRC_URI = "file://90-elphel-automount.rules \ " RDEPENDS_${PN} = "udev" PACKAGES = "udev-rules" UDEV_RULES_DIR = "${sysconfdir}/udev/rules.d" FILES_${PN} += "${UDEV_RULES_DIR}/90-elphel-automount.rules" do_install() { install -d ${D}${UDEV_RULES_DIR} install -m 644 ${WORKDIR}/90-elphel-automount.rules ${D}${UDEV_RULES_DIR} }