~ubuntu-branches/ubuntu/precise/util-linux/precise-proposed

« back to all changes in this revision

Viewing changes to tests/ts/fdisk/id

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-06-20 22:31:50 UTC
  • mfrom: (1.6.3 upstream) (4.5.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110620223150-lz8wrv0946ihcz3z
Tags: 2.19.1-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Build for multiarch.
  - Add pre-depends on multiarch-support.
  - configure.ac: don't try to be clever about extracting a path name from
    $libdir to append to /usr in a way that's not overridable; instead,
    reuse the built-in configurable libexecdir.
  - Fix up the .pc.in files to know about libexecdir, so our substitutions
    don't leave us with unusable pkg-config files.
  - Install custom blkid.conf to use /dev/.blkid.tab since we don't
    expect device names to survive a reboot
  - Mention mountall(8) in fstab(5) manpages, along with its special
    options.
  - Since upstart is required in Ubuntu, the hwclock.sh init script is not
    called on startup and the hwclockfirst.sh init script is removed.
  - Drop depends on initscripts for the above.
  - Replace hwclock udev rule with an Upstart job.
  - For the case where mount is called with a directory to mount, look
    that directory up in mountall's /lib/init/fstab if we couldn't find
    it mentioned anywhere else.  This means "mount /proc", "mount /sys",
    etc. work.
  - mount.8 points to the cifs-utils package, not the obsolete smbfs one. 
* Dropped changes:
  - mount.preinst: lsb_release has been fixed in lucid and above to be
    usable without configuration, so we don't have to diverge from Debian
    here anymore.
* Changes merged upstream:
  - sfdisk support for '+' with '-N'
  - mount/umount.c: fix a segfault on umount with empty mtab entry
  - Fix arbitrary unmount with fuse security issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#
 
4
# This file is part of util-linux.
 
5
#
 
6
# This file is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; either version 2 of the License, or
 
9
# (at your option) any later version.
 
10
#
 
11
# This file is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
#
 
16
 
 
17
TS_TOPDIR="$(dirname $0)/../.."
 
18
TS_DESC="doslabel tests"
 
19
 
 
20
. $TS_TOPDIR/functions.sh
 
21
ts_init "$*"
 
22
 
 
23
FDISK_CMD_ID1="x\ni\n0x1\nr\nw\n"
 
24
FDISK_CMD_ID2="x\ni\n0x2\nr\nw\n"
 
25
 
 
26
ts_log "Initialize empty image"
 
27
TEST_IMAGE_NAME=$(ts_image_init 10)
 
28
 
 
29
ts_log "Create MBR with ID=0x1"
 
30
echo -e "${FDISK_CMD_ID1}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
 
31
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
 
32
 
 
33
ts_log "Create MBR with ID=0x2"
 
34
echo -e "${FDISK_CMD_ID2}" | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
 
35
$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} | grep identifier >> $TS_OUTPUT
 
36
 
 
37
ts_finalize