Changeset 31 for trunk


Ignore:
Timestamp:
09/15/09 09:22:12 (15 years ago)
Author:
bas
Message:

postinst:

  • restart if we configure the package.
  • added pbs_mom_restart_opts options. get it from debconf

torque.config, torque.templates:

  • added pbs_mom_restart_opts to debconf

init.d:

  • restart failed, fixed it


Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/init.d

    r29 r31  
    144144                stop_daemons
    145145                sleep 1
    146                 PBS_MOM_OPTS='$PBS_MOM_RESTART_OPTS'
     146                PBS_MOM_OPTS="$PBS_MOM_RESTART_OPTS"
    147147                start_daemons
    148148        ;;
  • trunk/postinst

    r30 r31  
    7070                PBS_MOM=1
    7171                PBS_MOM_OPTS=$RESULT
     72
     73                set_conf_options ${daemon}_restart_opts
     74                PBS_MOM_RESTART_OPTS=$RESULT
     75
    7276                ;;
    7377            pbs_sched)
     
    161165if [ -x "/etc/init.d/torque" ]; then
    162166        update-rc.d torque defaults >/dev/null
    163         if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
    164         if [ "$1" = configure ]; then
    165             invoke-rc.d torque stop || true
    166         fi
    167                 invoke-rc.d torque start || exit 0
     167        if [ -x "`which invoke-rc.d 2>/dev/null`" ]
     168        then
     169                if [ "$1" = configure ]
     170                then
     171                        invoke-rc.d torque restart || true
     172                else
     173                        invoke-rc.d torque start || exit 0
     174                fi
    168175        else
    169         if [ "$1" = configure ]; then
    170             /etc/init.d/torque stop || true
    171         fi
    172                 /etc/init.d/torque start || exit 0
     176                if [ "$1" = configure ]
     177                then
     178                        /etc/init.d/torque restart || true
     179                else
     180                        /etc/init.d/torque start || exit 0
     181                fi
    173182        fi
    174183fi
  • trunk/torque.config

    r22 r31  
    2424done
    2525
     26# Let the user specify which option must be used when pbs_mom restart
     27db_input medium torque/pbs_mom_restart_opts || true
     28db_go
  • trunk/torque.templates

    r22 r31  
    3737 this package. Use "dpkg-reconfigure -p medium torque" instead.
    3838
     39Template: torque/pbs_mom_restart_opts
     40Type: string
     41Description: Please enter the options to be passed to pbs_mom when it restarts
     42 Please enter the commandline options when pbs_mom restarts. You can use
     43 -r (delete the jobs) or -p (leave jobs running)
     44 .
     45 The value will be stored in /etc/default/torque.
     46 .
     47 Don't modify this file by hand, it will be overwritten anytime you upgrade
     48 this package. Use "dpkg-reconfigure -p medium torque" instead.
     49
    3950Template: torque/pbs_sched_opts
    4051Type: string
Note: See TracChangeset for help on using the changeset viewer.