diff options
author | SARL ENR-68 <david@david.david> | 2014-05-09 14:20:39 +0200 |
---|---|---|
committer | SARL ENR-68 <david@david.david> | 2014-05-09 14:20:39 +0200 |
commit | d4d6c7665d51a0100201049e004e4a0b29a57d23 (patch) | |
tree | bd99a34ed1edbabdfa26fc8a05489d210b7e7f11 /lib/find_devices.sh | |
parent | 41774d166676112ae8cfda11387ea9642fb7d8e0 (diff) | |
download | isodumper-d4d6c7665d51a0100201049e004e4a0b29a57d23.tar isodumper-d4d6c7665d51a0100201049e004e4a0b29a57d23.tar.gz isodumper-d4d6c7665d51a0100201049e004e4a0b29a57d23.tar.bz2 isodumper-d4d6c7665d51a0100201049e004e4a0b29a57d23.tar.xz isodumper-d4d6c7665d51a0100201049e004e4a0b29a57d23.zip |
Merge branch '0.30' of https://github.com/papoteur-mga/isodumper
- from 0.30 branch to master branch
Diffstat (limited to 'lib/find_devices.sh')
-rwxr-xr-x | lib/find_devices.sh | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/find_devices.sh b/lib/find_devices.sh deleted file mode 100755 index b371be0..0000000 --- a/lib/find_devices.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# Copyright 2007-2009 Canonical Ltd. -# -# 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 the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -for device in $(hal-find-by-capability --capability storage); do - VENDOR=$(hal-get-property --udi $device --key storage.vendor) - NAME=$(hal-get-property --udi $device --key storage.model) - PLUGGABLE=$(hal-get-property --udi $device --key storage.hotpluggable) - TYPE=$(hal-get-property --udi $device --key storage.drive_type) - DEVPATH=$(hal-get-property --udi $device --key block.device) - AVAIL=$(hal-get-property --udi $device --key storage.removable.media_available) - - if [ "${AVAIL}" = true ] && [ "${PLUGGABLE}" = true ] && \ - ( [ "${TYPE}" = "disk" ] || [ "${TYPE}" = "sd_mmc" ] ); then - VENDOR=${VENDOR:-"Unknown"} - NAME=${NAME:-"Unknown"} - echo "$VENDOR $NAME, $DEVPATH" - fi -done |