~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to debian/slurm-llnl.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# for details, see http://www.debian.org/doc/debian-policy/ or
17
17
# the debian-policy package
18
18
#
 
19
STARTOPTION="start"
19
20
case "$1" in
20
21
    configure)
 
22
      chown slurm:slurm /var/lib/slurm-llnl
 
23
      chown slurm:slurm /var/lib/slurm-llnl/slurmctld
21
24
      chown slurm:slurm /var/log/slurm-llnl
 
25
 
 
26
      # Check for a major release upgrade from version 1
 
27
      OLDMAJREL=$(echo $2 | sed "s/\..*//")
 
28
      if [ "$OLDMAJREL" = "1" ] ; then
 
29
        STARTOPTION="startclean"
 
30
      fi
 
31
 
22
32
    ;;
23
33
 
24
34
    abort-upgrade|abort-remove|abort-deconfigure)
31
41
    ;;
32
42
esac
33
43
 
34
 
 
 
44
# Those using dependency based boot sequencing with sysv-rc and
 
45
# installing slurm-llnl before version 2.0.5-1 would miss the
 
46
# runlevel 4 symlink.
 
47
# Recover from this.
 
48
if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "2.0.5-1" \
 
49
   && [ -f /etc/rc2.d/K[0-9][0-9]slurm-llnl ] \
 
50
   && ! [ -f /etc/rc4.d/S[0-9][0-9]slurm-llnl ] \
 
51
   && ! [ -f /etc/rc2.d/S[0-9][0-9]slurm-llnl ] ; then
 
52
      update-rc.d -f slurm-llnl remove
 
53
fi
35
54
 
36
55
# dh_installdeb will replace this with shell code automatically
37
56
# generated by other debhelper scripts.
39
58
#DEBHELPER#
40
59
 
41
60
exit 0
42