PDA

View Full Version : Problem with .bash_profile afret recovering of Home partition lost



Bordon
14th August 2008, 06:57 PM
Dear friends,
i've had somme thoubles with my Fedora Core 6. My mistake was that i've created root partition by 10Gb and Home partition of 30Gb.
On the root partition i have Oracle 10g database and i assume that it is very little space for it in order to do some test with Oracle. I've decidet to decrease the size of Home partition and to increase the size of Root partition. I've used gparted. After decreasing the size, Home partition was corrupted and it was unrecoverable (fsck, e2fsck, gparted,recsue discs, many, many recoverable programs, ...) I've managed to delete Home partition and create new Home partition with new oracle user, ....
But, now i have some problems with .bash_profile:
Before upper mantioned disaster, when i start bash terminal, when i use
echo $ORACLE_HOME i get the result of path to Oracle home. Now, i did not get anything (empty space).
My .bash_profile is like this:
####################################
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp
export TMP
TMPDIR=$TMP
export TMPDIR
ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
ORACLE_SID=ORCLMAN
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
PATH=/usr/sbin:$PATH
export PATH
PATH=$ORACLE_HOME/bin:$PATH
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
####################################

If i execute all this manualy, row by row, it is OK but when i connect to Fedora by Putty from my Notebook i get this:
': not a valid identifier
': not a valid identifier
': not a valid identifierSE
': not a valid identifierME
': not a valid identifierD
': not a valid identifierRM
': not a valid identifier
': not a valid identifier
': not a valid identifierY_PATH
': not a valid identifier
-bash: /home/oracle/.bash_profile: line 37: syntax error near unexpected token `fi'
-bash: /home/oracle/.bash_profile: line 37: `fi'

You can notice SE, ME D, RM which is part of export ORACLE_BASE, ORACLE_HOME, ORACLE_SID, ORACLE_TERM. It look like that there was some overlaping, like some interference. Maybe Fedora somewhere keep old .bash_profile on the root, ... i dont know.
If someone know what it could be, please help. I have spoked with some administrators and thei dont know much about it.

Thanks.