INTEGRATION: CWS sdkinstaller (1.14.8); FILE MERGED
2005/10/31 12:19:01 obr 1.14.8.1: made user install scripts work with SDK and URE packages as well
This commit is contained in:
@@ -86,7 +86,13 @@ fi
|
|||||||
#
|
#
|
||||||
|
|
||||||
INSTALLDIR=$2
|
INSTALLDIR=$2
|
||||||
RPM_DB_PATH=${INSTALLDIR}/.RPM_OFFICEDATABASE
|
|
||||||
|
# Check for old style .RPM_OFFICEDATABASE first
|
||||||
|
if [ -d ${INSTALLDIR}/.RPM_OFFICEDATABASE ]; then
|
||||||
|
RPM_DB_PATH=${INSTALLDIR}/.RPM_OFFICEDATABASE
|
||||||
|
else
|
||||||
|
RPM_DB_PATH=${INSTALLDIR}/.RPM_DATABASE
|
||||||
|
fi
|
||||||
|
|
||||||
# Check for versionrc
|
# Check for versionrc
|
||||||
if [ -f ${INSTALLDIR}/program/versionrc ]; then VERSIONRC=versionrc; fi
|
if [ -f ${INSTALLDIR}/program/versionrc ]; then VERSIONRC=versionrc; fi
|
||||||
@@ -117,6 +123,21 @@ p
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
elif [ -d $RPM_DB_PATH ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "The following packages are already installed in $INSTALLDIR"
|
||||||
|
echo
|
||||||
|
rpm --dbpath `cd $RPM_DB_PATH; pwd` --query --all
|
||||||
|
echo
|
||||||
|
while [ "$UPDATE" != "yes" ]
|
||||||
|
do
|
||||||
|
read -a UPDATE -p "Do you want to continue with this installation (yes/no)? "
|
||||||
|
if [ "$UPDATE" = "no" ]
|
||||||
|
then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
UPDATE="no"
|
UPDATE="no"
|
||||||
fi
|
fi
|
||||||
@@ -129,7 +150,7 @@ fi
|
|||||||
if [ "$UPDATE" = "yes" ]
|
if [ "$UPDATE" = "yes" ]
|
||||||
then
|
then
|
||||||
# restore original bootstraprc
|
# restore original bootstraprc
|
||||||
mv -f ${INSTALLDIR}/program/bootstraprc.orig ${INSTALLDIR}/program/bootstraprc
|
mv -f ${INSTALLDIR}/program/bootstraprc.orig ${INSTALLDIR}/program/bootstraprc 2>/dev/null
|
||||||
|
|
||||||
# the RPM_DB_PATH must be absolute
|
# the RPM_DB_PATH must be absolute
|
||||||
if [ ! "${RPM_DB_PATH:0:1}" = "/" ]; then
|
if [ ! "${RPM_DB_PATH:0:1}" = "/" ]; then
|
||||||
@@ -193,9 +214,23 @@ then
|
|||||||
ln -sf $INSTALLDIR/program/soffice $HOME/soffice
|
ln -sf $INSTALLDIR/program/soffice $HOME/soffice
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$UPDATE" = "yes" -a ! -f $INSTALLDIR/program/bootstraprc ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "Update failed due to a bug in RPM, uninstalling .."
|
||||||
|
rpm --erase -v --nodeps --dbpath $RPM_DB_PATH `rpm --query --queryformat "%{NAME} " --package $RPMLIST $GNOMERPM --dbpath $RPM_DB_PATH`
|
||||||
|
echo
|
||||||
|
echo "Now re-installing new packages .."
|
||||||
|
echo
|
||||||
|
rpm --upgrade --nodeps --ignoresize -vh $RELOCATIONS --dbpath $RPM_DB_PATH $RPMLIST $GNOMERPM
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
# patch the "bootstraprc" to create a self-containing installation
|
# patch the "bootstraprc" to create a self-containing installation
|
||||||
mv $INSTALLDIR/program/bootstraprc $INSTALLDIR/program/bootstraprc.orig
|
if [ -f $INSTALLDIR/program/bootstraprc ]; then
|
||||||
sed 's/UserInstallation=$SYSUSERCONFIG.*/UserInstallation=$ORIGIN\/..\/UserInstallation/g' $INSTALLDIR/program/bootstraprc.orig > $INSTALLDIR/program/bootstraprc
|
mv $INSTALLDIR/program/bootstraprc $INSTALLDIR/program/bootstraprc.orig
|
||||||
|
sed 's/UserInstallation=$SYSUSERCONFIG.*/UserInstallation=$ORIGIN\/..\/UserInstallation/g' $INSTALLDIR/program/bootstraprc.orig > $INSTALLDIR/program/bootstraprc
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installation done ..."
|
echo "Installation done ..."
|
||||||
|
@@ -153,11 +153,14 @@ then
|
|||||||
INSTALL_ROOT=`cd ${INSTALL_ROOT}; pwd`
|
INSTALL_ROOT=`cd ${INSTALL_ROOT}; pwd`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INSTALL_DIR=${INSTALL_ROOT}`pkgparam -f ${INSTALL_ROOT}/var/sadm/pkg/*core01/pkginfo BASEDIR`
|
OFFICE_DIR=${INSTALL_ROOT}`pkgparam -f ${INSTALL_ROOT}/var/sadm/pkg/*core01/pkginfo BASEDIR 2>/dev/null`
|
||||||
|
|
||||||
# restore original "bootstraprc" and "soffice" prior to patching
|
# restore original "bootstraprc" and "soffice" prior to patching
|
||||||
mv -f ${INSTALL_DIR}/program/bootstraprc.orig ${INSTALL_DIR}/program/bootstraprc
|
if [ "${OFFICE_DIR}" != "" ]
|
||||||
mv -f ${INSTALL_DIR}/program/soffice.orig ${INSTALL_DIR}/program/soffice
|
then
|
||||||
|
mv -f ${OFFICE_DIR}/program/bootstraprc.orig ${OFFICE_DIR}/program/bootstraprc
|
||||||
|
mv -f ${OFFICE_DIR}/program/soffice.orig ${OFFICE_DIR}/program/soffice
|
||||||
|
fi
|
||||||
|
|
||||||
# copy INST_RELEASE file
|
# copy INST_RELEASE file
|
||||||
if [ ! -f ${INSTALL_ROOT}/var/sadm/system/admin/INST_RELEASE ]
|
if [ ! -f ${INSTALL_ROOT}/var/sadm/system/admin/INST_RELEASE ]
|
||||||
@@ -167,20 +170,22 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
LD_PRELOAD_32=$GETUID_SO /usr/sbin/patchadd -R ${INSTALL_ROOT} -M ${PATCH_PATH} ${PATCH_LIST} 2>&1 | grep -v '/var/sadm/patch'
|
LD_PRELOAD_32=$GETUID_SO /usr/sbin/patchadd -R ${INSTALL_ROOT} -M ${PATCH_PATH} ${PATCH_LIST} 2>&1 | grep -v '/var/sadm/patch'
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Create /usr directory required by co-packages like SUNWfreetype2
|
# Create BASEDIR directories to avoid manual user interaction
|
||||||
mkdir -m 0755 -p ${INSTALL_ROOT}/usr
|
for i in ${PKG_LIST}; do
|
||||||
|
mkdir -m 0755 -p ${INSTALL_ROOT}`pkgparam -d ${PACKAGE_PATH} $i BASEDIR` 2>/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check/Create installation directory
|
# Determine office installation directory
|
||||||
#
|
#
|
||||||
|
|
||||||
for i in ${PKG_LIST}; do
|
for i in ${PKG_LIST}; do
|
||||||
echo $i | grep core01 > /dev/null
|
echo $i | grep core01 > /dev/null
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
INSTALL_DIR=${INSTALL_ROOT}`pkgparam -d ${PACKAGE_PATH} $i BASEDIR`
|
OFFICE_DIR=${INSTALL_ROOT}`pkgparam -d ${PACKAGE_PATH} $i BASEDIR`
|
||||||
mkdir -p ${INSTALL_DIR}
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -217,21 +222,25 @@ fi
|
|||||||
if [ "$LINK" = "yes" ]
|
if [ "$LINK" = "yes" ]
|
||||||
then
|
then
|
||||||
echo
|
echo
|
||||||
echo "Creating link from $INSTALL_DIR/program/soffice to $HOME/soffice"
|
echo "Creating link from $OFFICE_DIR/program/soffice to $HOME/soffice"
|
||||||
rm -f $HOME/soffice 2>/dev/null
|
rm -f $HOME/soffice 2>/dev/null
|
||||||
ln -s $INSTALL_DIR/program/soffice $HOME/soffice
|
ln -s $OFFICE_DIR/program/soffice $HOME/soffice
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# patch the "bootstraprc" to create a self-containing installation
|
# patch the "bootstraprc" to create a self-containing installation
|
||||||
mv ${INSTALL_DIR}/program/bootstraprc ${INSTALL_DIR}/program/bootstraprc.orig
|
if [ "${OFFICE_DIR}" != "" ]; then
|
||||||
sed 's/UserInstallation=$SYSUSERCONFIG.*/UserInstallation=$ORIGIN\/..\/UserInstallation/g' \
|
mv ${OFFICE_DIR}/program/bootstraprc ${OFFICE_DIR}/program/bootstraprc.orig
|
||||||
${INSTALL_DIR}/program/bootstraprc.orig > ${INSTALL_DIR}/program/bootstraprc
|
sed 's/UserInstallation=$SYSUSERCONFIG.*/UserInstallation=$ORIGIN\/..\/UserInstallation/g' \
|
||||||
|
${OFFICE_DIR}/program/bootstraprc.orig > ${OFFICE_DIR}/program/bootstraprc
|
||||||
|
fi
|
||||||
|
|
||||||
# patch the LD_LIBRARY_PATH in the "soffice" script so that it finds a suitable libfreetype
|
# patch the LD_LIBRARY_PATH in the "soffice" script so that it finds a suitable libfreetype
|
||||||
mv ${INSTALL_DIR}/program/soffice ${INSTALL_DIR}/program/soffice.orig
|
if [ "${OFFICE_DIR}" != "" ]; then
|
||||||
sed 's| LD_LIBRARY_PATH=\"\$sd_prog\"| LD_LIBRARY_PATH=/usr/sfw/lib:"$sd_prog":"$sd_prog/../../../usr/sfw/lib"|' \
|
mv ${OFFICE_DIR}/program/soffice ${OFFICE_DIR}/program/soffice.orig
|
||||||
${INSTALL_DIR}/program/soffice.orig > ${INSTALL_DIR}/program/soffice
|
sed 's| LD_LIBRARY_PATH=\"\$sd_prog\"| LD_LIBRARY_PATH=/usr/sfw/lib:"$sd_prog":"$sd_prog/../../../usr/sfw/lib"|' \
|
||||||
chmod a+x ${INSTALL_DIR}/program/soffice
|
${OFFICE_DIR}/program/soffice.orig > ${OFFICE_DIR}/program/soffice
|
||||||
|
chmod a+x ${OFFICE_DIR}/program/soffice
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Installation done ..."
|
echo "Installation done ..."
|
||||||
|
Reference in New Issue
Block a user