
if [[ -x varDefs.sh ]] ; then
source varDefs.sh
elif [[ -x /root/varDefs.sh ]] ; then
source /root/varDefs.sh
elif [[ -x /root/resources/varDefs.sh ]] ; then
source /root/resources/varDefs.sh
elif [[ -x /root/distro/resources/varDefs.sh ]] ; then
source /root/distro/resources/varDefs.sh
else
echo "didn't find a varDefs.sh file"
fi
#Generate a key and sign the package
/root/resources/AppPGPKey.sh
# Create our Application channel
/root/resources/createAppSatChannel.py
# put rpm file locally on satellite
mkdir -p /var/satellite/mychannels/ourapps
#Figure out the package name
JFILE=`ls /root/resources/javaApp-*.noarch.rpm`
JNUM=`echo $JFILE | wc -w`
if [[ $JNUM -eq 0 ]]
then
echo "No javaApp rpm!"
exit -2
elif [[ $JNUM -gt 1 ]]
then
echo "Too many javaApp RPMs!"
exit -3
fi
# copy the file to a known area on the satellite
/bin/cp ${JFILE} /var/satellite/mychannels/ourapps
# Push the rpm into satellite
rhnpush -v -courapps --server=http://localhost/APP
--dir=/var/satellite/mychannels/ourapps -u ${SAT_TENANT_USER} -p $
{SAT_TENANT_PW}
• AppPGPKey.sh does the following:
◦ generates GPG key
◦ prepares ~/.rpmmacros for signing packages
◦ signs the RPM
◦ makes the public key available
#!/bin/bash
71 www.redhat.com
Komentáře k této Příručce