Ignore:
Timestamp:
02/14/14 09:01:23 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
aba3187
Parents:
5ae7c8e
Message:

Fix warden.conf getting clobbered during package upgrade

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/install.sh

    rc60c604 r1aede14  
    2323chmod 755 ${LB}/bin/warden 
    2424 
    25 # Save existing settings  
    26 if [ -e "${LB}/etc/warden.conf" ] ; then 
    27   NIC=`grep '^NIC:' ${LB}/etc/warden.conf | awk '{print $2}'` 
    28   WTMP=`grep '^WTMP:' ${LB}/etc/warden.conf | awk '{print $2}'` 
    29   JDIR=`grep '^JDIR:' ${LB}/etc/warden.conf | awk '{print $2}'` 
    30   ONIC=`grep '^NIC:' conf/warden.conf` 
    31   OWTMP=`grep '^WTMP:' conf/warden.conf` 
    32   OJDIR=`grep '^JDIR:' conf/warden.conf` 
    33 fi 
    34  
    35 cp conf/warden.conf ${LB}/etc/warden.conf 
    36 chmod 644 ${LB}/etc/warden.conf 
    37  
    38 # Save the settings 
    39 if [ -n "$NIC" ] ; then 
    40    sed -i '' "s|$ONIC|NIC: $NIC|g" ${LB}/etc/warden.conf 
    41    sed -i '' "s|$OWTMP|WTMP: $WTMP|g" ${LB}/etc/warden.conf 
    42    sed -i '' "s|$OJDIR|JDIR: $JDIR|g" ${LB}/etc/warden.conf 
    43 fi 
     25cp conf/warden.conf ${LB}/etc/warden.conf.dist 
     26chmod 644 ${LB}/etc/warden.conf.dist 
    4427 
    4528if [ -d "${PROGDIR}/linux-installs" ] ; then 
Note: See TracChangeset for help on using the changeset viewer.