Changeset 12


Ignore:
Timestamp:
08/06/07 17:44:58 (17 years ago)
Author:
adi
Message:

Configure server_name via debconf.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/control

    r9 r12  
    88Package: torque
    99Architecture: any
    10 Depends: ${shlibs:Depends}
     10Depends: ${shlibs:Depends}, coreutils, debconf | debconf-2.0
    1111Description: Tera-scale Open-source Resource and QUEue manager
    1212        This package contains a batch system developed by supercluster.org
  • trunk/postinst

    r11 r12  
    99
    1010SPOOLDIR=/var/spool/torque
     11SERVER_CONF_FILE=${SPOOLDIR}/server_name
    1112CONFIG_FILE=/etc/default/torque
    1213MKDIR="/usr/sbin/pbs_mkdirs"
     
    9899
    99100#
     101# Generate server_name
     102#
     103if [ "$1" = configure -o ! -f $SERVER_CONF_FILE ]; then
     104    db_get torque/server_name || true
     105    NEW_SERVER_NAME="$RET"
     106    OLD_SERVER_NAME="`cat $SERVER_CONF_FILE`"
     107
     108    if [ $OLD_SERVER_NAME != $NEW_SERVER_NAME ]; then
     109        # backup
     110        mv $SERVER_CONF_FILE $SERVER_CONF_FILE.`date +"%Y%m%d-%k%M%S"`
     111    fi
     112
     113    echo $NEW_SERVER_NAME > $SERVER_CONF_FILE
     114fi
     115
     116
     117#
    100118# make the spool directory an set mode bits.
    101119#
     
    112130if [ ! -f $SPOOLDIR/mom_priv/config ]
    113131then
    114     echo -n >> $SPOOLDIR/mom_priv/config
     132    touch $SPOOLDIR/mom_priv/config
    115133fi
    116134
  • trunk/torque.config

    r10 r12  
    1212db_go
    1313
     14# Ask the user for server_name
     15db_input low torque/server_name || true
     16db_go
     17
  • trunk/torque.templates

    r10 r12  
    1414 master node has to run at least pbs_server and pbs_sched (unless replaced by
    1515 Maui), whereas computation nodes usually only run pbs_mom (the Torque client)
     16
     17Template: torque/server_name
     18Type: string
     19Default: localhost
     20Description: Please enter FQDN of your Torque server
     21 Please enter the FQDN (with domain) of your Torque server. This is value will
     22 be stored in /var/spool/torque/server_name.
     23 .
     24 Don't modify this file by hand, it will be overwritten anytime you upgrade
     25 this package. Use "dpkg-reconfigure -p low torque" instead.
Note: See TracChangeset for help on using the changeset viewer.