aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-support/udisks/files/automount.service9
-rwxr-xr-xrecipes-support/udisks/files/automount.sh2
-rw-r--r--recipes-support/udisks/files/udisks.service1
-rw-r--r--recipes-support/udisks/udisks_1.0.5.bbappend10
4 files changed, 20 insertions, 2 deletions
diff --git a/recipes-support/udisks/files/automount.service b/recipes-support/udisks/files/automount.service
new file mode 100644
index 000000000..479452f72
--- /dev/null
+++ b/recipes-support/udisks/files/automount.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Automount Disk Manager
+After=udisk.service
+
+[Service]
+ExecStart=/usr/libexec/automount.sh
+
+[Install]
+WantedBy=default.target
diff --git a/recipes-support/udisks/files/automount.sh b/recipes-support/udisks/files/automount.sh
index 8a3bc86d8..3e4b24b5f 100755
--- a/recipes-support/udisks/files/automount.sh
+++ b/recipes-support/udisks/files/automount.sh
@@ -6,7 +6,7 @@ pathtoname() {
MOUNT_OPTIONS="ro,sync"
-rmdir /media/* || true &> /dev/null
+rmdir /media/* &> /dev/null || true
for DEVNAME in $(udisks --enumerate-device-files|grep -e sd[a-z][0-9]); do
udisks --mount-options $MOUNT_OPTIONS --mount $DEVNAME
done
diff --git a/recipes-support/udisks/files/udisks.service b/recipes-support/udisks/files/udisks.service
index 8b2981a97..75df55b3e 100644
--- a/recipes-support/udisks/files/udisks.service
+++ b/recipes-support/udisks/files/udisks.service
@@ -6,7 +6,6 @@ Documentation=man:udisks(7)
Type=dbus
BusName=org.freedesktop.UDisks
ExecStart=/usr/libexec/udisks-daemon --no-debug
-ExecStartPost=/usr/libexec/automount.sh
[Install]
WantedBy=default.target
diff --git a/recipes-support/udisks/udisks_1.0.5.bbappend b/recipes-support/udisks/udisks_1.0.5.bbappend
index eee64eeec..d55a167a6 100644
--- a/recipes-support/udisks/udisks_1.0.5.bbappend
+++ b/recipes-support/udisks/udisks_1.0.5.bbappend
@@ -1,10 +1,17 @@
SRC_URI += "file://org.freedesktop.UDisks.conf \
file://udisks.service \
+ file://automount.service \
file://automount.sh \
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+FILES_${PN} += "${base_libdir}/systemd/system/automount.service \
+ ${base_libdir}/systemd/system/udisks.service \
+ ${libexecdir}/automount.sh \
+ "
+
SYSTEMD_AUTO_ENABLE = "enable"
+SYSTEMD_SERVICE_${PN} = "udisks.service automount.service"
do_install_append () {
install -d ${D}${sysconfdir}/dbus-1/system.d
@@ -13,6 +20,9 @@ do_install_append () {
install -d ${D}${base_libdir}/systemd/system
install -m 0644 ${WORKDIR}/udisks.service ${D}${base_libdir}/systemd/system
+ install -d ${D}${base_libdir}/systemd/system
+ install -m 0644 ${WORKDIR}/automount.service ${D}${base_libdir}/systemd/system
+
install -d ${D}${libexecdir}
install -m 0755 ${WORKDIR}/automount.sh ${D}${libexecdir}/automount.sh
}