We modify tools releases all of the time, if you make modifications to your tools - it is generally best to edit the par file, as opposed to hacking into the weblogic files after you've layed the tools release down. Why? Because you are going to forget that you've made changes and deploy over the top - I guarantee you!
So, The parfile (as was explained about 8 years ago in this blog), is made up of the following structures:
The following is a linux script that tears down all of the zip files and then builds them back up - pausing in between
You do not need to use the entire script, but it does tell you exactly what you need to do to change things and packs up the tools so that you can deploy it.
Upload the file that this creates (as a .par) and ensure that while the script waits for you, you edit
scf-manifest.xml
Remember that it is the first line that you see in server manager, so rename the description to include what you have done! Then you'll see this in server manager.
<scf-manifest targetType="webserver" version="9.2.4.3" componentName="EnterpriseOne HTML Server" description="EnterpriseOne HTML Server 9.2.4.3 04-07-2020_10_22" minimumAgentLevel="112">^M
Back to my script:
I've left some extra stuff in this script for you. It's handy for how it patches files with sed and using the input from other files. You may want to do similar things for your patching requirements.
remember parameter 1 is the complete name and path to the toolsreleasefile.par the second parameter can be anything, but it's going to wait for you to enter a key before it packs everything back up.
You could add your logo copies in here, your colour changes if they are more complex than the UDC in the new tools... You can do any of your paper fixes too. Therefore the tools in SM will have EVERYTHING and no more hacking the owl_deploy and stage dirs.
PS. I just had to do an edit because of the shape of the par files once I was done. It's all tested and working now.
if [ $# -ne 2 && $# -ne 1 ]
then
print "USAGE $0 toolsrelease [confirm]"
exit 1
else
TOOLS=$1
if [ $# -eq 2 ]
then
WAIT=1
fi
fi
tmpDir=/tmp/tools$$
mkdir $tmpDir
if [ $? -eq 0 ]
then
unzip $TOOLS -d $tmpDir
echo "tools found in " $tmpDir
else
echo "could not create dir:" $tmpDir
fi
currDir=`pwd`
unzip $tmpDir/webclient.ear -d $tmpDir/webclient.ear.dir
unzip $tmpDir/webclient.ear.dir/webclient.war -d $tmpDir/webclient.ear.dir/webclient.war.dir
#we have everything exploded - now we need to patch, but let's remove the zip files
rm $tmpDir/webclient.ear
rm $tmpDir/webclient.ear.dir/webclient.war
# strange
# send complete img and share dirs
rm -rf $tmpDir/webclient.ear.dir/webclient.war.dir/share
rm -rf $tmpDir/webclient.ear.dir/webclient.war.dir/img
unzip /home/shannon/Documents/img.zip -d $tmpDir/webclient.ear.dir/webclient.war.dir
unzip /home/shannon/Documents/share.zip -d $tmpDir/webclient.ear.dir/webclient.war.dir
#okay, now we are in a position to patch and then use the recompress script.
patchMaster=/home/shannon/Documents
cp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4login.jsp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4loginbackup.jsp
cp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogout.jsp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogoutbackup.jsp
#now patch - you don't need this for this blog, but the sed
#commands are pretty RAD
sed -i -e '/^<\/HEAD>.*/r /home/shannon/Documents/html4login_append.jsp' $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4login.jsp
sed -i -e '/.*<!-- Display an informative message when the login screen is due.*/r /home/shannon/Documents/html4login_append2.jsp' $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4login.jsp
sed -i '/^<%@ page.*/r /home/shannon/Documents/html4balogin_append.jsp' $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogout.jsp
sed -i '/^framebusting.*/r /home/shannon/Documents/html4balogin_append2.jsp' $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogout.jsp
diff $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4login.jsp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4loginbackup.jsp
diff $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogout.jsp $tmpDir/webclient.ear.dir/webclient.war.dir/share/html4balogoutbackup.jsp
if [ $WAIT -eq 1 ]
then
read -n 1 -p "Do All your Manual patching! Enter Key When done:" mainmenuinput
fi
#now zip
cd $tmpDir/webclient.ear.dir/webclient.war.dir
zip -r $tmpDir/webclient.ear.dir/webclient.war ./*
cd $tmpDir/webclient.ear.dir
rm -rf $tmpDir/webclient.ear.dir/webclient.war.dir
zip -r $tmpDir/webclient.ear ./*
rm -rf $tmpDir/webclient.ear.dir
cd $tmpDir
zip -r $currDir/$TOOLS.new ./*
rm -rf $tmpDir
cd $currDir
No comments:
Post a Comment