2010-05-20 Miguel de Dios <miguel.dedios@artica.es>

* DEBIAN/postinst, DEBIAN/make_deb_package.sh: fixed the script to generate
	deb package.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2780 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-05-20 16:16:34 +00:00
parent d80f3eb28a
commit 88a7e52238
3 changed files with 60 additions and 40 deletions

View File

@ -1,3 +1,8 @@
2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/postinst, DEBIAN/make_deb_package.sh: fixed the script to generate
deb package.
2010-05-20 Miguel de Dios <miguel.dedios@artica.es> 2010-05-20 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package. * DEBIAN/make_deb_package.sh: fixed the permissions to DEBIAN temp package.

View File

@ -29,53 +29,68 @@ fi
cd .. cd ..
echo "Make a \"temp_package\" temp dir for job." echo "Make a \"temp_package\" temp dir for job."
mkdir -p temp_package/usr/share/pandora_agent #~ mkdir -p temp_package/usr/share/pandora_agent
mkdir -p temp_package/var/spool/pandora/data_out #~ mkdir -p temp_package/var/spool/pandora/data_out
mkdir -p temp_package/var/log/pandora/ #~ mkdir -p temp_package/var/log/pandora/
mkdir -p temp_package/etc/pandora #~ mkdir -p temp_package/etc/pandora
#~ mkdir -p temp_package/etc/init.d/
#~ mkdir -p temp_package/usr/bin
mkdir -p temp_package/usr
mkdir -p temp_package/usr/share/pandora_agent/
mkdir -p temp_package/usr/bin/
mkdir -p temp_package/usr/sbin/
mkdir -p temp_package/etc/pandora/
mkdir -p temp_package/etc/init.d/ mkdir -p temp_package/etc/init.d/
mkdir -p temp_package/usr/bin mkdir -p temp_package/var/log/pandora/
echo "Make directory system tree for package." echo "Make directory system tree for package."
cp DEBIAN temp_package -R cp DEBIAN temp_package -R
chmod 755 -R temp_package/DEBIAN chmod 755 -R temp_package/DEBIAN
PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log cp -aRf * temp_package/usr/share/pandora_agent/
PANDORA_BIN=temp_package/usr/bin/pandora_agent cp -aRf tentacle_client temp_package/usr/bin/
PANDORA_HOME=temp_package/usr/share/pandora_agent cp -aRf pandora_agent temp_package/usr/bin/
TENTACLE=temp_package/usr/bin/tentacle_client cp -aRf pandora_agent_daemon temp_package/etc/init.d/pandora_agent_daemon
PANDORA_CFG=temp_package/etc/pandora cp Linux/pandora_agent.conf temp_package/etc/pandora/
PANDORA_STARTUP=temp_package/etc/init.d/pandora_agent_daemon
#~ PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log
#~ PANDORA_BIN=temp_package/usr/bin/pandora_agent
#~ PANDORA_HOME=temp_package/usr/share/pandora_agent
#~ TENTACLE=temp_package/usr/bin/tentacle_client
#~ PANDORA_CFG=temp_package/etc/pandora
#~ PANDORA_STARTUP=temp_package/etc/init.d/pandora_agent_daemon
# Create logfile # Create logfile
if [ ! -z "`touch $PANDORA_LOG`" ] #~ if [ ! -z "`touch $PANDORA_LOG`" ]
then #~ then
echo "Seems to be a problem generating logfile ($PANDORA_LOG) please check it"; #~ echo "Seems to be a problem generating logfile ($PANDORA_LOG) please check it";
exit #~ exit
else #~ else
echo "Creating logfile at $PANDORA_LOG..." #~ echo "Creating logfile at $PANDORA_LOG..."
fi #~ fi
# Copying agent #~ # Copying agent
echo "Copying Pandora FMS Agent to $PANDORA_BIN..." #~ echo "Copying Pandora FMS Agent to $PANDORA_BIN..."
cp pandora_agent $PANDORA_BIN #~ cp pandora_agent $PANDORA_BIN
#~
echo "Copying Pandora FMS Agent contrib dir to $PANDORA_HOME/..." #~ echo "Copying Pandora FMS Agent contrib dir to $PANDORA_HOME/..."
cp pandora_agent_daemon $PANDORA_HOME #~ cp pandora_agent_daemon $PANDORA_HOME
#~
echo "Copying default agent configuration to $PANDORA_HOME/pandora_agent.conf" #~ echo "Copying default agent configuration to $PANDORA_HOME/pandora_agent.conf"
cp pandora_agent.conf $PANDORA_HOME/pandora_agent.conf #~ cp pandora_agent.conf $PANDORA_HOME/pandora_agent.conf
#~
echo "Copying Pandora FMS Agent plugins to $PANDORA_HOME/plugins..." #~ echo "Copying Pandora FMS Agent plugins to $PANDORA_HOME/plugins..."
cp -r plugins $PANDORA_HOME #~ cp -r plugins $PANDORA_HOME
#~
echo "Copying tentacle client to $TENTACLE" #~ echo "Copying tentacle client to $TENTACLE"
cp tentacle_client $TENTACLE #~ cp tentacle_client $TENTACLE
#~
echo "Linking start-up daemon script at $PANDORA_STARTUP"; #~ echo "Linking start-up daemon script at $PANDORA_STARTUP";
cp pandora_agent_daemon $PANDORA_STARTUP #~ cp pandora_agent_daemon $PANDORA_STARTUP
#~
touch $PANDORA_CFG/pandora_agent.conf #~ touch $PANDORA_CFG/pandora_agent.conf
echo "Remove the SVN files and other temp files." echo "Remove the SVN files and other temp files."
for item in `find temp_package` for item in `find temp_package`

View File

@ -13,8 +13,8 @@ rm $PANDORA_CFG/plugins 2> /dev/null
ln -s $PANDORA_HOME/plugins $PANDORA_CFG 2> /dev/null ln -s $PANDORA_HOME/plugins $PANDORA_CFG 2> /dev/null
echo "Linking Pandora FMS Agent configuration to $PANDORA_CFG/pandora_agent.conf..." echo "Linking Pandora FMS Agent configuration to $PANDORA_CFG/pandora_agent.conf..."
rm $PANDORA_CFG/pandora_agent.conf 2> /dev/null #~ rm $PANDORA_CFG/pandora_agent.conf 2> /dev/null
ln -s $PANDORA_HOME/pandora_agent.conf $PANDORA_CFG/pandora_agent.conf #~ ln -s $PANDORA_HOME/pandora_agent.conf $PANDORA_CFG/pandora_agent.conf
echo "Start log of agent." echo "Start log of agent."
echo "$LOG_TIMESTAMP Pandora FMS installer has created this file at startup" > $PANDORA_LOG echo "$LOG_TIMESTAMP Pandora FMS installer has created this file at startup" > $PANDORA_LOG