summaryrefslogtreecommitdiffstats
path: root/recipes-support/udisks/files
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-07-09 03:19:30 +0000
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-07-09 05:54:56 +0000
commite55d64dbd811b4c6b7a97161ac899007411026c9 (patch)
tree0bd7cf84a27758c4b61095159aef29f7ba8073e5 /recipes-support/udisks/files
parent3b53fd5c20e5c18ad85a3f2ca7e891c420c54405 (diff)
udisks: make automount it's own service
To avoid a timeout condition in udisks.service the automount script needs to be ran as it's own systemd service. Bug-AGL: SPEC-735 Change-Id: Idbfb21b1a2fccfa55ac149830d4af591222b697d Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'recipes-support/udisks/files')
-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
3 files changed, 10 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