Changeset 22


Ignore:
Timestamp:
11/07/07 17:21:56 (16 years ago)
Author:
adi
Message:

Handle PBS_{SCHED,MOM,SERVER}_OPTS via debconf

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/postinst

    r20 r22  
    3838#
    3939create_default_torque_file() {
     40    set_conf_options() {
     41        RESULT=""
     42        db_get torque/$1 || true
     43        if [ $? -eq 0 ]; then
     44            RESULT=$RET
     45        fi
     46    }
     47
    4048    PBS_SERVER=0
    4149    PBS_MOM=0
    4250    PBS_SCHED=0
     51    PBS_MOM_OPTS=""
     52    PBS_SCHED_OPTS=""
     53    PBS_SERVER_OPTS=""
    4354
    4455    db_get torque/daemon_list
     
    4758        daemon=${daemon%,}
    4859
     60        # this sets $RESULT
     61        set_conf_options ${daemon}_opts
     62
    4963        case "$daemon" in
    5064            pbs_server)
    5165                PBS_SERVER=1
     66                PBS_SERVER_OPTS=$RESULT
    5267                ;;
    5368            pbs_mom)
    5469                PBS_MOM=1
     70                PBS_MOM_OPTS=$RESULT
    5571                ;;
    5672            pbs_sched)
    5773                PBS_SCHED=1
     74                PBS_SCHED_OPTS=$RESULT
    5875                ;;
    5976        esac
     
    6986#     dpkg-reconfigure -p high torque
    7087#
    71 # instead
     88# to change which daemons to start or
     89#
     90#     dpkg-reconfigure -p medium torque
     91#
     92# to even change startup options (PBS_{MOM,SCHED,SERVER}_OPTS).
    7293
    7394PBS_MOM=$PBS_MOM
     
    7596PBS_SERVER=$PBS_SERVER
    7697
    77 PBS_MOM_OPTS=''
    78 PBS_SCHED_OPTS=''
    79 PBS_SERVER_OPTS='-a t'
     98PBS_MOM_OPTS="$PBS_MOM_OPTS"
     99PBS_SCHED_OPTS="$PBS_SCHED_OPTS"
     100PBS_SERVER_OPTS="$PBS_SERVER_OPTS"
    80101
    81102EOF
  • trunk/torque.config

    r14 r22  
    1616db_go
    1717
     18# If the user wants daemons, ask for any options to be passed
     19db_get torque/daemon_list
     20for daemon in $RET; do
     21    daemon=${daemon%,}
     22    db_input medium torque/${daemon}_opts || true
     23    db_go
     24done
     25
  • trunk/torque.templates

    r12 r22  
    11Template: torque/disclaimer
    22Type: note
    3 Description: This debconf isn't fully functional. Configure in /etc/default/torque
     3Description: This debconf isn't fully functional.
    44 We currently do not provide full-featured torque configuration via debconf.
    5  See /etc/default/torque to define which daemons to start and use qmgr or the
    6  files in /var/spool/torque for everything else.
     5 We just care about /etc/default/torque to define which daemons to start.
     6 .
     7 Use qmgr or the files in /var/spool/torque for everything else.
    78
    89Template: torque/daemon_list
     
    2324 .
    2425 Don't modify this file by hand, it will be overwritten anytime you upgrade
    25  this package. Use "dpkg-reconfigure -p low torque" instead.
     26 this package. Use "dpkg-reconfigure -p high torque" instead.
     27
     28Template: torque/pbs_mom_opts
     29Type: string
     30Description: Please enter the options to be passed to pbs_mom
     31 Please enter the commandline options for pbs_mom. You can usually leave it
     32 empty.
     33 .
     34 The value will be stored in /etc/default/torque.
     35 .
     36 Don't modify this file by hand, it will be overwritten anytime you upgrade
     37 this package. Use "dpkg-reconfigure -p medium torque" instead.
     38
     39Template: torque/pbs_sched_opts
     40Type: string
     41Description: Please enter the options to be passed to pbs_sched
     42 Please enter the commandline options for pbs_sched. You can usually leave it
     43 empty.
     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
     50Template: torque/pbs_server_opts
     51Type: string
     52Default: -a t
     53Description: Please enter the options to be passed to pbs_server
     54 Please enter the commandline options for pbs_server.
     55 The default is "-a t"
     56 .
     57 The value will be stored in /etc/default/torque.
     58 .
     59 Don't modify this file by hand, it will be overwritten anytime you upgrade
     60 this package. Use "dpkg-reconfigure -p medium torque" instead.
Note: See TracChangeset for help on using the changeset viewer.