Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51452 - sys-apps/apcupsd multimoncss.cgi has incorrect URI for stylesheet
Summary: sys-apps/apcupsd multimoncss.cgi has incorrect URI for stylesheet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Michael Imhof (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-18 21:26 UTC by Ray Russell Reese III (RETIRED)
Modified: 2004-05-24 15:33 UTC (History)
0 users

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 Ray Russell Reese III (RETIRED) gentoo-dev 2004-05-18 21:26:38 UTC
multimoncss.cgi which is one of the webapps included with apcupsd, will load a stylesheet that users can define.

However by default the URI being output by multimoncss.cgi is an absolute path on the webserver: 

/css/multimon.css

However the Gentoo web app is installed as an alias on the webserver:

/apcupsd/

So when multimoncss.cgi references /css/multimon.css this obviously breaks out of /apcupsd/. To resolve that quickly simply changing that to a relative path such as "multimon.css", fixed this. I just put a simple sed in the src_unpack function of the ebuild:

sed -i -e 's:^#define CSS_DIR "/css/multimon.css":#define CSS_DIR "multimon.css":' src/cgi/multimoncss.c

This will work out of the box now. 

Let me know if you guys want me to go ahead and commit this into the ebuild. It just drove me freaking nuts not being able to change the horrible, horrible default colors multimon.cgi uses :)
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-05-23 12:14:21 UTC
I'd say go ahead, but this seems to be tantive's baby
Comment 2 Michael Imhof (RETIRED) gentoo-dev 2004-05-24 15:33:10 UTC
Fixed.
Thanks for your help!