Activity log for bug #1132415

Date Who What changed Old value New value Message
2013-02-24 12:18:59 James Cole bug added bug
2013-02-24 12:25:52 James Cole description When installing cacti on a system with lighttpd already installed debian/cacti.postinst runs but fails to set up a symlink for the file lighttpd.conf An excerpt of the code I believe to be at fault is here: # Only try to add a symlink on a fresh install to respect # changes done by the administrator if [ "$2" = '' ]; then for server in $webservers; do if [ -d "/etc/${server}/conf.d" ]; then if [ ! -e "/etc/${server}/conf.d/cacti.conf" ] ; then ln -s ../../cacti/apache.conf "/etc/${server}/conf.d/cacti.conf" fi invoke-rc.d $server reload || true elif [ -d "/etc/${server}/conf-available" ]; then if [ ! -e "/etc/${server}/conf-available" ] ; then ln -s ../../cacti/lighttpd.conf "/etc/${server}/conf-available/cacti.conf" fi fi done fi I've included the part about apache to show where in regards to the full statement that the web server is restarted. I believe the correct behavior should be as follows: if [ "$2" = '' ]; then for server in $webservers; do if [ -d "/etc/${server}/conf.d" ]; then if [ ! -e "/etc/${server}/conf.d/cacti.conf" ] ; then ln -s ../../cacti/apache.conf "/etc/${server}/conf.d/cacti.conf" fi elif [ -d "/etc/${server}/conf-available" ]; then if [ ! -e "/etc/${server}/conf-available/20-cacti.conf" ] ; then ln -s ../../cacti/lighttpd.conf "/etc/${server}/conf-available/20-cacti.conf" lighty-enable-mod cacti fi invoke-rc.d $server reload || true fi done fi My changes reflect the fact that: - it needs to check if the file already exists rather than checking the directory - I've changed the file name to reflect what I believe to be an appropriate interpretation of the naming convention for the debian take on conf files for lighttpd which is nn-name where nn reflects the priority number - included a call to lighty-enable-mod to then enable the cacti conf file (as we are installing cacti aren't we?) - shifted the call to invoke a http reboot to after lighttpd statements so that in both apache and lighttpd cases the daemon is restarted There is also a problem with the lighttpd.conf file that is provided, it is as so: # Cacti Alias alias.url += ( "/cacti" => "usr/share/cacti/site", ) it should be: # Cacti Alias alias.url += ( "/cacti" => "/usr/share/cacti/site", ) to reflect that it is relative to the root directory rather than current. When installing cacti on a system with lighttpd already installed, debian/cacti.postinst runs but fails to set up a symlink for the file lighttpd.conf An excerpt of the code I believe to be at fault is here: # Only try to add a symlink on a fresh install to respect # changes done by the administrator if [ "$2" = '' ]; then     for server in $webservers; do         if [ -d "/etc/${server}/conf.d" ]; then             if [ ! -e "/etc/${server}/conf.d/cacti.conf" ] ; then                 ln -s ../../cacti/apache.conf "/etc/${server}/conf.d/cacti.conf"             fi             invoke-rc.d $server reload || true  elif [ -d "/etc/${server}/conf-available" ]; then             if [ ! -e "/etc/${server}/conf-available" ] ; then                 ln -s ../../cacti/lighttpd.conf "/etc/${server}/conf-available/cacti.conf"             fi         fi     done fi I've included the part about apache to show where in regards to the full statement that the web server is restarted. I believe the correct behavior should be as follows: if [ "$2" = '' ]; then    for server in $webservers; do        if [ -d "/etc/${server}/conf.d" ]; then            if [ ! -e "/etc/${server}/conf.d/cacti.conf" ] ; then                ln -s ../../cacti/apache.conf "/etc/${server}/conf.d/cacti.conf"            fi        elif [ -d "/etc/${server}/conf-available" ]; then            if [ ! -e "/etc/${server}/conf-available/20-cacti.conf" ] ; then                   ln -s ../../cacti/lighttpd.conf "/etc/${server}/conf-available/20-cacti.conf"                   lighty-enable-mod cacti            fi            invoke-rc.d $server reload || true        fi    done fi My changes reflect the fact that: - it needs to check if the file already exists rather than checking the directory - I've changed the file name to reflect what I believe to be an appropriate interpretation of the naming convention for the debian take on conf files for lighttpd which is nn-name where nn reflects the priority number - included a call to lighty-enable-mod to then enable the cacti conf file (as we are installing cacti aren't we?) - shifted the call to invoke a http reboot to after lighttpd statements so that in both apache and lighttpd cases the daemon is restarted There is also a problem with the lighttpd.conf file that is provided, it is as so: # Cacti Alias alias.url += (         "/cacti" => "usr/share/cacti/site", ) it should be: # Cacti Alias alias.url += (         "/cacti" => "/usr/share/cacti/site", ) to reflect that it is relative to the root directory rather than current.
2013-03-25 21:08:57 Paul Gevers cacti (Ubuntu): assignee Paul Gevers (paul-climbing)
2013-03-25 21:09:41 Paul Gevers cacti (Ubuntu): status New Confirmed
2013-03-25 21:10:08 Paul Gevers cacti (Ubuntu): status Confirmed Triaged
2013-03-25 21:10:35 Paul Gevers cacti (Ubuntu): importance Undecided Low
2013-04-25 18:59:07 Paul Gevers cacti (Ubuntu): status Triaged In Progress
2013-05-05 22:24:41 Launchpad Janitor branch linked lp:debian/cacti
2013-05-05 23:40:25 Launchpad Janitor cacti (Ubuntu): status In Progress Fix Released
2013-05-07 00:50:59 Launchpad Janitor branch linked lp:ubuntu/cacti
2013-08-30 06:05:44 Launchpad Janitor branch linked lp:ubuntu/saucy-proposed/cacti