Changeset 10 for trunk/postinst
- Timestamp:
- 08/01/07 12:34:43 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/postinst
r9 r10 18 18 19 19 20 # Source debconf library. 21 . /usr/share/debconf/confmodule 22 23 20 24 # Also build the tclindexes again for xpbs xpbsmon 21 25 # … … 33 37 # 34 38 create_default_torque_file() { 39 PBS_SERVER=0 40 PBS_MOM=0 41 PBS_SCHED=0 42 43 db_get torque/daemon_list 44 45 for daemon in $RET; do 46 daemon=${daemon%,} 47 48 case "$daemon" in 49 pbs_server) 50 PBS_SERVER=1 51 ;; 52 pbs_mom) 53 PBS_MOM=1 54 ;; 55 pbs_sched) 56 PBS_SCHED=1 57 ;; 58 esac 59 done 60 35 61 cat > $CONFIG_FILE << EOF 36 62 # … … 38 64 # created with install of torque 39 65 # 40 # setting default to run pbs_mom. To enable an service 41 # set the value to 1. 66 # Do not edit this file by hand, use 42 67 # 68 # dpkg-reconfigure -p low torque 43 69 # 44 PBS_MOM=1 45 PBS_SCHED=0 46 PBS_SERVER=0 70 # instead 71 72 PBS_MOM=$PBS_MOM 73 PBS_SCHED=$PBS_SCHED 74 PBS_SERVER=$PBS_SERVER 47 75 48 76 PBS_MOM_OPTS='' … … 53 81 } 54 82 55 if [ ! -f $CONFIG_FILE ] 83 84 if [ "$1" = configure -o ! -f $CONFIG_FILE ] 56 85 then 57 86 create_default_torque_file … … 59 88 # If old style config replace it we new one 60 89 # 90 # adi@2007-07-31: not covered by debconf 61 91 OLD_CONFIG=`awk '/^HOST=/ { print $0 }' $CONFIG_FILE` 62 92 if [ ! -z "$OLD_CONFIG" ] … … 86 116 87 117 118 #DEBHELPER# 119 120 88 121 # Automatically added by dh_installinit 89 122 if [ -x "/etc/init.d/torque" ]; then 90 123 update-rc.d torque defaults >/dev/null 91 124 if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then 125 if [ "$1" = configure ]; then 126 invoke-rc.d torque stop || true 127 fi 92 128 invoke-rc.d torque start || exit 0 93 129 else 130 if [ "$1" = configure ]; then 131 /etc/init.d/torque stop || true 132 fi 94 133 /etc/init.d/torque start || exit 0 95 134 fi 96 135 fi 97 136 # End automatically added section 137 138
Note: See TracChangeset
for help on using the changeset viewer.