File: openmpi-bin.postinst

package info (click to toggle)
openmpi 1.6.5-9.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 91,628 kB
  • ctags: 44,305
  • sloc: ansic: 408,966; cpp: 44,454; sh: 27,828; makefile: 10,486; asm: 3,882; python: 1,239; lex: 805; perl: 549; csh: 253; fortran: 232; f90: 126; tcl: 12
file content (34 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (5)
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
#!/bin/sh

set -e

case "$1" in
   configure)
      # Continue below
      ;;
   abort-upgrade|abort-remove|abort-deconfigure)
      exit 0;
      ;;
   *)
      echo "postinst called with unknown argument \`$1'" >&2
      exit 0;
      ;;
esac

# so, we are running with $1 = configure
# openmpi versions before 1.3.3-2 were using two alternatives where other
# MPI implementations were using only one, which breaks. Clean up
# our mess.
if [ "$2" != "" ] && dpkg --compare-versions "$2" le "1.3.3-2"; then
    update-alternatives --remove mpiexec /usr/bin/mpiexec.openmpi
fi

update-alternatives \
	--install /usr/bin/mpirun mpirun /usr/bin/mpirun.openmpi 50 \
	--slave /usr/share/man/man1/mpirun.1.gz mpirun.1.gz /usr/share/man/man1/mpirun.openmpi.1.gz \
	--slave /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.openmpi \
	--slave /usr/share/man/man1/mpiexec.1.gz mpiexec.1.gz /usr/share/man/man1/mpiexec.openmpi.1.gz 

#DEBHELPER#

exit 0