Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130144 - nagios-core 2.0 problem with external command file
Summary: nagios-core 2.0 problem with external command file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Eldad Zack (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-16 02:13 UTC by Milan Dadok
Modified: 2006-04-16 17:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Dadok 2006-04-16 02:13:49 UTC
I am using nagios 2.0 on gentoo since rc stage ebuilds 
 
All time I have one problem - after I emerge new version of ebuild or
reemerge same ebuild I got lost /var/nagios/rw directory - a have to
setup this directory and external command file manually.
 
Today I look at nagios-core-2.2.ebuild and found that my problem
disappear after I move lines keepdir from pkg_preinst() function to the end of src_install() 
  
     fi

+    keepdir /etc/nagios
+    keepdir /var/nagios
+    keepdir /var/nagios/archives
+    keepdir /usr/nagios/share/ssi
+    keepdir /var/nagios/rw

     for dir in etc/nagios usr/nagios var/nagios ; do
         chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/ {dir}"
     done
 }

 pkg_preinst() {

-    keepdir /etc/nagios
-    keepdir /var/nagios
-    keepdir /var/nagios/archives
-    keepdir /usr/nagios/share/ssi
-    keepdir /var/nagios/rw

     if use noweb; then
  
 Is keepdir allowed inside pkg_preinst() function?
Comment 1 Eldad Zack (RETIRED) gentoo-dev 2006-04-16 17:18:02 UTC
There's no problem with either, though I looked around and seems it is used on src_install.

Tested with binary install as well and this works when moved to src_install.

I fixed this for all the versions in portage. (1.2-r4, 1.3, 2.0, 2.1, 2.2)

in CVS.