~ubuntu-branches/ubuntu/hardy/mdadm/hardy-updates

« back to all changes in this revision

Viewing changes to debian/mkconf

  • Committer: Package Import Robot
  • Author(s): Scott James Remnant
  • Date: 2006-07-11 17:23:21 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20060711172321-070tz7lox9adujtw
Tags: 2.4.1-6ubuntu1
* Merge from debian unstable, remaining changes:
  - integration with initramfs-tools,
  - autocreate devices when udev is in use,
  - use lstat in mdopen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -eu
 
2
#
 
3
# mkconf -- outputs valid mdadm.conf contents for the local system
 
4
#
 
5
# Copyright © 2006 martin f. krafft <madduck@madduck.net>
 
6
# distributed under the terms of the Artistic Licence.
 
7
#
 
8
 
 
9
MDADM=/sbin/mdadm
 
10
 
 
11
if [ -r /proc/partitions ]; then
 
12
  echo DEVICE partitions
 
13
else
 
14
  echo E: cannot read /proc/partitions and thus cannot do my magic. >&2
 
15
  exit 1
 
16
fi
 
17
 
 
18
if [ ! -r /proc/mdstat ]; then
 
19
  echo W: RAID subsystem is not loaded, thus I cannot scan for arrays. >&2
 
20
else
 
21
  # || : is workaround for #367901
 
22
  $MDADM --examine --scan --config=partitions || :
 
23
fi
 
24
 
 
25
exit 0