Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlink for onconfig and sqlhost #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions informix_entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ then
MSGLOG " [COMPLETED]" N
fi

# If no links exists into $INFORMIXDIR/etc/ for onconfig and/or sqlhosts
# create the links
# It will be mainly used in case on container restart (database initialized).
MSGLOG ">>> Create ONCONFIG and/or SQLHOSTS links into $INFORMIXDIR/etc/ ..." N
. $SCRIPTS/informix_setup_links.sh

###
### Setup sch_init_xxxxxxx.sql script
###
Expand Down
36 changes: 18 additions & 18 deletions informix_setup_links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
#cp $INFORMIX_DATA_DIR/tmp/$ONCONFIG $INFORMIXDIR/etc/$ONCONFIG


# if [ ! -e $INFORMIXDIR/etc/$ONCONFIG ]
# then
# if [ ! -z $env_ONCONFIG_FILE ]
# then
# ln -s $INFORMIX_CONFIG_DIR/$env_ONCONFIG_FILE $INFORMIXDIR/etc/$ONCONFIG
# else
# ln -s $INFORMIX_CONFIG_DIR/$ONCONFIG $INFORMIXDIR/etc/$ONCONFIG
# fi
# fi
if [ ! -e $INFORMIXDIR/etc/$ONCONFIG ]
then
if [ ! -z $env_ONCONFIG_FILE ]
then
ln -s $INFORMIX_CONFIG_DIR/$env_ONCONFIG_FILE $INFORMIXDIR/etc/$ONCONFIG
else
ln -s $INFORMIX_CONFIG_DIR/$ONCONFIG $INFORMIXDIR/etc/$ONCONFIG
fi
fi

# if [ ! -e $INFORMIXDIR/etc/sqlhosts ]
# then
# if [ ! -z $env_SQLHOSTS_FILE ]
# then
# ln -s $INFORMIX_CONFIG_DIR/$env_SQLHOSTS_FILE $INFORMIXDIR/etc/sqlhosts
# else
# ln -s $INFORMIX_CONFIG_DIR/sqlhosts $INFORMIXDIR/etc/sqlhosts
# fi
# fi
if [ ! -e $INFORMIXDIR/etc/sqlhosts ]
then
if [ ! -z $env_SQLHOSTS_FILE ]
then
ln -s $INFORMIX_CONFIG_DIR/$env_SQLHOSTS_FILE $INFORMIXDIR/etc/sqlhosts
else
ln -s $INFORMIX_CONFIG_DIR/sqlhosts $INFORMIXDIR/etc/sqlhosts
fi
fi

2 changes: 1 addition & 1 deletion informix_update_onconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ do
cnt=`sed -n "/^${line}/p" $INFORMIXDIR/etc/$ONCONFIG |wc -l`
if [[ $cnt == "0" ]]
then
echo $line >> $$INFORMIXDIR/etc/$ONCONFIG
echo $line >> $INFORMIXDIR/etc/$ONCONFIG
fi
fi

Expand Down