File: preinst

package info (click to toggle)
raidtools2 0.90.20010914-15
  • links: PTS
  • area: main
  • in suites: woody
  • size: 692 kB
  • ctags: 467
  • sloc: ansic: 2,861; sh: 187; makefile: 144
file content (27 lines) | stat: -rw-r--r-- 559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh

set -e

. /usr/share/debconf/confmodule

# All the alpha RAID drivers i have seen put the "unused devices:" line into
# /proc/mdstat, and the RAID drivers in stock kernels do not.
# A better solution would be to look into /proc/sys/dev/md, but im not sure
# whether it's implemented in all versions.

if ! grep -q '^unused devices:' /proc/mdstat &> /dev/null
then

  db_get raidtools2/nosupport || true

  if [ "$RET" = "false" ]; then

    echo "Failing install because new-style RAID isn't supported by the kernel"
    exit 1

  fi

fi

exit 0