mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Revert "udisks: automount internally partitions via udev"
This reverts commit 74d4582b055c9e536a6638c081d5d9774293bda9.
This commit is contained in:
parent
6cf6f5d967
commit
b41e77c039
@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||
# http://www.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,13 +18,30 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
ACTION!="add|change", GOTO="end"
|
||||
SUBSYSTEM!="block", GOTO="end"
|
||||
#
|
||||
# automount internal disks
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
# mount the partition on add/change, if its a filesystem and on a ata drive
|
||||
KERNEL=="sd[a-z][0-9]*", \
|
||||
ENV{ID_BUS}=="ata", \
|
||||
ENV{ID_FS_USAGE}=="filesystem", \
|
||||
RUN+="/usr/bin/udisks --mount /dev/%k"
|
||||
(
|
||||
progress "automount internal disks"
|
||||
|
||||
LABEL="end"
|
||||
drive_dump () {
|
||||
udisks --dump | tr -d ' ' | grep 'device-file:' | cut -d ':' -f2
|
||||
}
|
||||
|
||||
show_info () {
|
||||
udisks --show-info $2 | grep "$1:" | tr -d ' ' | cut -d ":" -f2
|
||||
}
|
||||
|
||||
for DEVICE in `drive_dump`; do
|
||||
REMOVABLE="`show_info "removable" $DEVICE`"
|
||||
MOUNTED="`show_info "is mounted" $DEVICE`"
|
||||
USAGE="`show_info "usage" $DEVICE`"
|
||||
|
||||
if [ "$REMOVABLE" = "0" -a "$MOUNTED" = "0" -a "$USAGE" = "filesystem" ]; then
|
||||
udisks --mount "$DEVICE" >/dev/null
|
||||
fi
|
||||
|
||||
done
|
||||
)&
|
Loading…
x
Reference in New Issue
Block a user