#
# hard-set persisdir,port,fileseparator in server.prc, acquire.prc, rasagent-d.rul
#
persisdir='/var'"$BASEDIR"/SUNWesras/DB
echo $persisdir > SUNWESRASEWEEWR
sed 's/\//\\\//g' SUNWESRASEWEEWR >  SUNWESRASXFDE
mv SUNWESRASXFDE SUNWESRASEWEEWR

persisdir=`line < SUNWESRASEWEEWR`
rm SUNWESRASEWEEWR

port=18055
fileseparator=/

pdrepstr='s/??PERSISDIR??/'"$persisdir"/g
ptrepstr='s/??PORT??/'"$port"/g
fsrepstr='s/??FILESEPARATOR??/\'"$fileseparator"/g

#rasagent-d.prc

file="$BASEDIR"/SUNWsymon/modules/cfg/rasagent-d.prc
sed $pdrepstr $file > SUWESRASTEMP
mv SUWESRASTEMP $file
sed $ptrepstr $file > SUWESRASTEMP
mv SUWESRASTEMP $file
sed $fsrepstr $file > SUWESRASTEMP
mv SUWESRASTEMP $file
echo $file is updated

#rasagent-d.rul

file="$BASEDIR"/SUNWsymon/modules/cfg/rasagent-d.rul
sed $pdrepstr $file > SUWESRASTEMP
mv SUWESRASTEMP $file
sed $fsrepstr $file > SUWESRASTEMP
mv SUWESRASTEMP $file
echo $file is updated