~ubuntu-branches/ubuntu/karmic/debian-installer-utils/karmic

« back to all changes in this revision

Viewing changes to block-attr

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-05-12 14:19:48 UTC
  • mfrom: (1.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090512141948-pdh2v2be3423hfos
Tags: 1.68ubuntu1
* Resynchronise with Debian. Remaining changes:
  - user-params: Don't propagate vga=* or break=* to installed system.
  - Use /proc/self/fd/4 rather than /dev/fd/4 in fetch-url-methods/http;
    the latter doesn't seem to exist in d-i.
  - list-devices: new "usb-partition" type for detecting partitions on USB
    drives; new "mmc-partition" type for detecting partitions on MMC
    devices.
  - Don't include the battery subsystem on calls to udevadm trigger.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
usage () {
 
4
        echo "Usage: $0 --type|--label|--uuid <device>"
 
5
}
 
6
 
 
7
case $1 in
 
8
        --type)
 
9
                vol_id_opt=--type
 
10
                blkid_tag=TYPE
 
11
                ;;
 
12
        --label)
 
13
                vol_id_opt=--label
 
14
                blkid_tag=LABEL
 
15
                ;;
 
16
        --uuid)
 
17
                vol_id_opt=--uuid
 
18
                blkid_tag=UUID
 
19
                ;;
 
20
        *)
 
21
                usage >&2
 
22
                exit 1
 
23
                ;;
 
24
esac
 
25
shift
 
26
 
 
27
if PATH="/lib/udev:$PATH" type vol_id >/dev/null 2>&1; then
 
28
        PATH="/lib/udev:$PATH" vol_id "$vol_id_opt" "$1"
 
29
elif type blkid >/dev/null 2>&1; then
 
30
        blkid -o value -s "$blkid_tag" "$1"
 
31
else
 
32
        exit 1
 
33
fi