udisks: add systemd support

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-04 17:47:03 +02:00
parent 6a9f6f2d9a
commit cbc02056b5
5 changed files with 41 additions and 27 deletions

View File

@ -48,5 +48,11 @@ PKG_CONFIGURE_OPTS_TARGET="--datadir=/usr/share \
post_makeinstall_target() {
rm -rf $INSTALL/etc/profile.d
rm -rf $INSTALL/lib/udev/rules.d
mkdir -p $INSTALL/lib/systemd
cp -P $PKG_DIR/scripts/udisks-mount-disks $INSTALL/lib/systemd
}
post_install() {
enable_service udisks-mount-disks.service
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,15 +19,7 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
#
# automount internal disks
#
# runlevels: openelec, textmode
(
progress "automount internal disks"
wait_for_dbus
drive_dump () {
udisks --dump | tr -d ' ' | grep 'device-file:' | cut -d ':' -f2
@ -44,6 +37,4 @@
if [ "$REMOVABLE" = "0" -a "$MOUNTED" = "0" -a "$USAGE" = "filesystem" ]; then
udisks --mount "$DEVICE" >/dev/null
fi
done
)&

View File

@ -0,0 +1,9 @@
[Unit]
Description=Mount internal disks
[Service]
ExecStart=/lib/systemd/udisks-mount-disks
Type=oneshot
[Install]
WantedBy=remote-fs.target

View File

@ -0,0 +1,8 @@
[Unit]
Description=Disk Manager
Documentation=man:udisks(8)
[Service]
Type=dbus
BusName=org.freedesktop.UDisks
ExecStart=/usr/lib/udisks/udisks-daemon