File: postinst

package info (click to toggle)
raidtools2 0.90.990824-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 688 kB
  • ctags: 468
  • sloc: ansic: 2,631; makefile: 143; sh: 114
file content (55 lines) | stat: -rw-r--r-- 1,279 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /bin/sh

set -e
cd /dev

if [ ! -e md0 -o ! -e md1 -o ! -e md1 -o ! -e md2 -o ! -e md3 ]; then
    echo -n Creating
    for i in 0 1 2 3
    do
        if [ ! -e md$i ]; then
                echo -n " /dev/md$i"
                mknod -m 600 md$i b 9 $i
                chown root.disk md$i
                chmod 660 md$i
        fi
    done
    echo " done."
fi

update-modules

if [ -f /etc/mdtab ]; then

   cat <<END

/etc/mdtab is present in your system, this probably means that you were
using old-style RAID arrays. In order to use these arrays with this package
you need to upgrade their superblocks using mkraid --upgrade.
Superblockless RAID0 and linear arrays can be run with raid0run without
modifications.

See /usr/doc/raidtools2 for more information.
Press enter to continue
END

  read ans

fi

if [ "$1" = "configure" ]
then

    update-rc.d raid2 start 50 0 6 . start 25 S . > /dev/null

    if [ -d /usr/doc -a ! -e /usr/doc/raidtools2 -a -d /usr/share/doc/raidtools2 ]; then

       ln -sf ../share/doc/raidtools2 /usr/doc/raidtools2

    fi

fi

echo "Note: If you plan on running only persistant RAID devices, and have compiled" 
echo "autodetection in your kernel, you can remove the raid init script"
echo "with the command  # update-rc.d raid2 remove"