pax_global_header00006660000000000000000000000064134222015760014514gustar00rootroot0000000000000052 comment=ed12ddf49a6cabf3a095f69ad70c2b123866a019 smokeping-2.7.3/000077500000000000000000000000001342220157600135215ustar00rootroot00000000000000smokeping-2.7.3/CHANGES000066400000000000000000007050071342220157600145250ustar00rootroot00000000000000commit 0992229546c3732d12ac5af348672c58b6ad8e74 Author: Tobias Oetiker Date: Thu Dec 20 11:23:55 2018 +0100 release 2.7.3 commit 3eb7434cecc23df3cb7dd23d1fc97a41d206102d Author: Pete Heist Date: Wed Dec 19 10:56:55 2018 +0100 Add optional require_zero_status parameter (closes oetiker/SmokePing#142). commit 2ab17461671cba0c740326882f970d5da299d0e7 Author: Pete Heist Date: Wed Dec 19 10:07:13 2018 +0100 Update email address. commit cb9b9b146d7d7c7d79829913c2300fa2ab1c055f Author: Tobias Oetiker Date: Fri Nov 30 22:47:05 2018 +0100 fix cpanmin.us url commit 7d2260ec2a2d4eec2544555a54049bb9a10b2b58 Author: Alexander Koch Date: Tue Oct 9 12:54:27 2018 +0200 Do not show whole page if in ajax display mode After sending the PNG file in get_detail the returned undef was not honored. Now checks for undef and will return also. commit a2948059960f06fdc8b0060bbeb7b39708574eac Author: Tobias Oetiker Date: Tue Oct 2 11:49:30 2018 +0200 fix cpanmin.us url ... resolves #127 commit b5741263093e13d7970c64e7dbc96e1926eea105 Author: Pete Heist Date: Wed Sep 5 20:01:17 2018 +0200 Remove unnecessary use Switch. commit 681457d0872057f79e2b2f97fa6ff8b6b415b48c Author: Gabriel Filion Date: Wed Aug 29 04:09:04 2018 -0400 FPing: create new parameter to force using IPv4 or IPv6 fixes#95 (#125) * FPing: create new parameter to force using IPv4 or IPv6 fixes#95 Starting with FPing 3.16, the IPv6 functionality was merged in the main binary and fping now respects the system-wide setting for address resolution. This means that when we add a target that has both an A record and a AAAA record, the probe tests the IPv6 address by default. This breaks the expectation that the FPing probe tests IPv4 and that the FPing6 probe checks IPv6. To restore this, we can now add a parameter to the probes to force the protocol version to be 4 or 6. * FPing: set default value for protocol This ensures we have a meaningful default value. It was suggested by Tobias Oetiker. commit c1bcf1f9077b1ef1c3baedefb355c9fdb7db2f2b Author: diorgesl Date: Thu Jul 19 02:29:02 2018 -0400 Added rport option (#121) Added the option to specify the port of the remote host commit 8a528b13d85414eb9162bc045c0e222049a721bd Author: Tobias Oetiker Date: Fri Apr 13 14:07:47 2018 +0200 release 2.7.2 commit 7cc29e42ebe5a11c2d58f39b93a6365a2c5bb1b4 Author: Tobias Oetiker Date: Fri Apr 13 14:06:52 2018 +0200 fix syntax commit 435d3d575603d1e8c156776b41f4bdc0b63f515e Author: Pete Heist Date: Mon Mar 5 08:12:11 2018 +0100 Improve handling of one-way delay and documentation (#111) * Initial revision of IRTT probe. * Return 0 values for negative one-way delays. Improve documentation and fix some white space issues. * Add Path::Tiny to PERL_MODULES and update IRTT probe doc. ew. commit b926090aabcb6d0fd9e57e91d81949ec8b2a1192 Merge: 7820885 2552386 Author: Tobias Oetiker Date: Sun Feb 25 22:07:42 2018 +0100 Merge branch 'master' of github.com:oetiker/SmokePing commit 78208854ec68363ee43bacfce804c9991b9216ca Author: Tobias Oetiker Date: Sun Feb 25 22:07:34 2018 +0100 let sidebar scroll ... commit 2552386ec4ef0097622d45ca435d337d4ebd6a03 Author: Pete Heist Date: Sun Feb 18 10:39:52 2018 +0100 Initial revision of IRTT probe. (#110) commit b29242fdd1bf931511be52507ce1c09966802dff Author: Tobias Oetiker Date: Sun Feb 4 14:35:27 2018 +0100 update release script commit 6afb2f2ac97a718821c0d2368094d68370e79658 Author: Tobias Oetiker Date: Sun Feb 4 14:26:55 2018 +0100 fix referer commit bd38d05b856d2310032ac56c06454b91a345dc02 Author: Tobias Oetiker Date: Sun Feb 4 14:26:39 2018 +0100 going https! commit 9b2ecb96c69b0b0ec294fb858c878327b96ed293 Author: Tobias Oetiker Date: Fri Feb 2 22:14:55 2018 +0100 release 2.7.0 commit bf2e13afb06387d54faba62a2a2cbf38abafa3d1 Author: Tobias Oetiker Date: Fri Feb 2 22:08:49 2018 +0100 add note on pressing return commit 8c7fb0aaebf6ad425fef0052419ec41c5b0269e9 Author: Tobias Oetiker Date: Tue Jan 30 21:43:12 2018 +0100 update release script commit 31969f3156479061ce7d1487c72a4dcbb5e800ab Author: Tobias Oetiker Date: Tue Jan 30 21:40:29 2018 +0100 update install instructions commit dcc17c1ce60504d8052ea639354b5660f598768a Author: Tobias Oetiker Date: Tue Jan 30 21:10:00 2018 +0100 rebuilt build system commit 62a588d379f1ca7177faf448a377a27acfa2dace Author: Louis Sautier Date: Fri Jan 19 10:45:53 2018 +0100 Fix typo in doc (#106) commit fc24b7ca86bd7e0d9c07b66805c115b49cc82fa1 Author: Rick van der Zwet Date: Fri Jan 19 10:45:26 2018 +0100 Fix ipv6 in multigraph (#108) * Fix rendering multigraph with host ipv6 address A host IPv6 adress in [RFC5952] representation contains colons which should be escaped in legends since colons are part of rddtool syntax. [RFC5952]: https://tools.ietf.org/html/rfc5952 * Fix rendering minigrah with host ipv6 address commit 44682b6d3aec8d2063adae4dca1ce251c44e2fed Author: Rick van der Zwet Date: Wed Dec 6 11:17:42 2017 +0100 Fix typo in WHAT description text (#102) commit 2e4f6fb7cbf6458a8634092ed00c1b892ca77e6b Author: diegospd Date: Wed Dec 6 02:17:12 2017 -0600 Fix typo: prolem -> problem (#98) commit 72ed1570fbb4ae0b90846625e1a3bd5d2bade531 Author: Tobias Oetiker Date: Sun Jun 25 20:19:47 2017 +0200 fing compatibility update. fix for #90 commit 30d3032b5a8fc529c09bcdc31d9a4baf2bfecd66 Author: Nick Date: Thu Jun 22 08:35:33 2017 +0200 Improve mobile support (#89) * Move javascript under the fold. Render speed optimization. * Move css to separate file. Becomes a bit too much in the basepage and since js is included as well, this should be just fine. * Make the site work a lot better on mobile devices Set viewport, auto hide sidemenu and some margin changes to make it a bit nicer.. * Remove the no-cache pragma's. Not valid html anymore, instead this should be in the header so in the smokeping config for nginx/apache. * Add css for printing pages. * Fix typo in css. * Use utf-8 charset by default. Recommended by w3.org. * Remove border=0 and add alt="" An attempt to make everything html complaint... * Use cgiurl in hswitch form. Action was empty, which is not valid, use the absolute path to the site here. * Uptimize the cropper.js file. * Add panel for navigator graph. commit 38bd70634c960c76203c30e58e55825fe080d809 Author: Nick Date: Wed Jun 21 11:54:09 2017 +0200 Nick (#88) * Add panel block around zoom image. * Update basebase to hide menu and make it more spaceious Add navbar and move stuff around a bit to give it some more free space for the menu and contents. Use the prototype framework to toggle the sidebar. * Move javascript files around Mv files so we actully know which file belongs to what library. * Update js prototype to 1.7.3. * Update js script.aculo.us to 1.9.0. * Update js cropper to 1.2.2. * Add option graphborders If option is set to 'no' borders will be hidden and background and canvas will be transparent. Use central function for this, so all generated pngs look identical. * Add new options to config.dist. * Fix compiler warnings. Apparently Switch adviced not to be used... commit 0088c1b4fef363b09ff992223a4c50f32e4067ea Author: Martin DiViaio Date: Fri Jun 16 03:40:33 2017 -0400 Fix unitialized value warnings when rrd returns undef. Add slave support (#42) Got rid of the warning that happens when RRD returns 'undef' in the math on line 125. Added support for slave rrd files using a cli option. If option exists all slaves are used. If a csv list of slaves is submitted with the option then only those slaves are used. Exact name match is required. Added regex substitution for a '~' in the rrd name to make it readable as 'host from server' in morning email. Added support for 'nomasterpoll' but only if processing for slaves. Having 'nomasterpoll' set for a host and no slaves configured for it is technically a configuration error, isn't it? If so, then this will show up as a 'down host' in the morning email this way. commit afb95d5dd350c7dddbcf2fce5a31f970ebe26304 Author: Nick Date: Fri Jun 16 09:38:12 2017 +0200 Improve smokeping dashboard (#87) * Generate unordered list for menu html List are much easier to style with css * Add div blocks around images in html layout

Title

IMG or content
* Add config option htmltitle to render in div headings If the option is set to yes; the title is not rendered in the rrd image, but added to the html panel as a h2 heading. * Update filter html Use a label instead of a div and use classes since this is a bit more obvious for styling. * Use label for hierarchy popup And add classes for consistency. * Properly close the div tag Fix for previous commit * Add alt to rddtool and smokeping logos 2 errors less in html validator... * Initial commit of new basepage * Smaller smokeping and rrdtool logos. Update the rrdlogo to the one currently used on the website (with background that matches the sidebar) and make both 100x30px. * Complete sidebar css. commit 48eb6391d95f0ddc53d632729f998dcec6edd472 Author: Ivan Zahariev Date: Mon May 22 17:41:37 2017 +0300 Display the master host "display_name" in the chart title (#85) When having multiple slaves, and in general, it is more clear if all chart titles contain an explicit "from XYZ" label where XYZ is either the master host name or the slave's name. This gives us an immediate insight for source of the ping check. Otherwise we need to remember that if "from" is missing, then this comes from the master host. This brings inconsistency in the user experience. You can also consider the case when the CGI is behind a web reverse proxy. The user opens "https://web-proxy-server/smokeping.cgi?target=dc1.myhost" but the chart titles don't show a "from". In such a case, the user must know which is the actual master host which did the ping check. This could become even harder to remember if we have multiple instances of SmokePing. commit 5ce690e3aaece79a57404f73a47caa62c4f9cbb4 Author: Daniel Néri Date: Mon May 1 17:36:58 2017 +0200 Download cpanminus securely (#83) commit fff19a73e0058e56b07834b37bf56b5b787681f0 Author: Simon Arlott Date: Tue Apr 18 15:53:43 2017 +0100 Call RRDs::fetch() with a zero length time period (#81) The default fetch time period (1 day) can be very slow when the RRD file is not in the filesystem cache. The info2create function doesn't even use the data, it's just trying to get the DS definition. Specify a start and time of 0 so that no data is retrieved. commit 4ea88bc384f6852fba891b62973286df67189dec Author: 有张纸 Date: Mon Apr 3 22:11:08 2017 +0800 Update Smokeping.pm (#76) * Update Smokeping.pm add support for smtp authentication * Update Smokeping.pm add doc for username and userpass commit 21f4715f6f06c5165bf3e46b5731f34edab67db6 Author: runout-at Date: Mon Apr 3 15:20:52 2017 +0200 add xmpp/jabber alerts (#78) * add xmpp alerts lets have alerts sent to xmpp/jabber servers/accounts/chatrooms needs sendxmpp installed. (it's similar to sendmail) Example for the Alerts config: to = xmpp:-t -u -j -p @ * bugfix * more lines where xmpp: is needed fix using xmpp: in alertee,... commit f993798d1597a0302c13ed972c7a7855068e85d9 Merge: ed7f7ec 7fa1612 Author: Tobias Oetiker Date: Wed Mar 8 06:06:52 2017 +0100 Merge pull request #75 from bobbwest/master Fix white-on-white CSS bug with filter commit 7fa161250dbb3cedb2a65c139ce50355705f3865 Author: Bob West Date: Wed Mar 8 11:51:44 2017 +1100 Fix white-on-white CSS bug with filter commit ed7f7ec1c512a1876b2474dc2485b4ba98b098d5 Merge: 88c7360 77253c3 Author: Tobias Oetiker Date: Thu Jan 5 02:52:21 2017 -0500 Merge pull request #70 from rborgmaster/patch-1 Update CheckLoss.pm commit 88c736037559772e1623a46d6946f94d50678542 Merge: 3479284 716ffcf Author: Tobias Oetiker Date: Thu Jan 5 02:51:58 2017 -0500 Merge pull request #71 from rborgmaster/patch-2 Update CheckLatency.pm commit 716ffcf3abfc90350203f525ebc090dba2687fd0 Author: rborgmaster Date: Wed Jan 4 20:49:38 2017 +0100 Update CheckLatency.pm Address issue #69 commit 77253c3c3cf158cabb1a0503dec1186c6fd49ff1 Author: rborgmaster Date: Wed Jan 4 20:42:17 2017 +0100 Update CheckLoss.pm Adress issuse #69 commit 3479284f786fb7683ef6dab442447903f42a10a0 Author: Tobias Oetiker Date: Wed Aug 31 21:45:27 2016 +0200 properly check alertee commit 2b1dbf9c3d1347e21933d6bdc62de8f954a50b21 Merge: 5ac48fa 8334e15 Author: Tobias Oetiker Date: Sat Jul 23 09:02:27 2016 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit 5ac48fab69cfb674b0e43153e70444f1caff1a50 Author: Tobias Oetiker Date: Sat Jul 23 09:02:18 2016 +0200 fix for #65 commit 8334e159d8bec5ca66317b7f29323ab5b8220d7d Merge: 7ca84ed e260302 Author: Tobias Oetiker Date: Thu May 12 10:59:12 2016 +0200 Merge pull request #59 from fgtb/master re: issue #58 commit e260302502f7ac8be18a7007b4b33ca9e1bdb371 Merge: 7ca84ed 52976ea Author: fgtb Date: Mon May 9 17:31:50 2016 +0100 Merge pull request #1 from fgtb/fgtb-patch-1 Update OpenSSHJunOSPing.pm commit 52976eaedbaa64a22685d28668b260507c2e52ff Author: fgtb Date: Mon May 9 17:29:40 2016 +0100 Update OpenSSHJunOSPing.pm commit 7ca84ed877bc761759473a80e471b87948bfb3da Merge: f3d2aee 7870ad8 Author: Tobias Oetiker Date: Thu Apr 28 11:34:13 2016 +0200 Merge pull request #54 from dne/auth-dns Add support for probing authoritative nameservers to AnotherDNS commit f3d2aee6f8dfdcf152756cc555a9b47106ba853d Merge: 962f3f4 e4c34a2 Author: Tobias Oetiker Date: Wed Apr 13 17:20:03 2016 +0200 Merge pull request #57 from mpawlik/master Add support for ldaps in LDAP probe. commit e4c34a2b4949bf80167e8f26283e61540c63d479 Author: Maciej Pawlik Date: Wed Apr 13 17:07:23 2016 +0200 Add support to ldaps in LDAP probe. commit 962f3f458a11bc4bdd5a2ceebd3be7f4a1e7d204 Merge: de9fb3b cf8d202 Author: Tobias Oetiker Date: Sat Apr 2 09:09:22 2016 +0200 Merge pull request #56 from NickHibma/master More details on mailtemplate commit cf8d202ef5315bc6920f4be8ba0df9e6208274c2 Author: Nick Hibma Date: Fri Apr 1 22:40:25 2016 +0200 More details on mailtemplate commit 7870ad812ac0f0b1650a683e1dc0dfa5332eec17 Author: Daniel Néri Date: Sat Feb 20 18:12:10 2016 +0100 AnotherDNS: Add 'authoritative' option When enabled, send non-recursive queries (RD=0) and require authoritative answers (AA=1). commit f24b83651d2eebc258036668ea0b9c39e7813fa9 Author: Daniel Néri Date: Sat Feb 20 02:29:01 2016 +0100 AnotherDNS: Avoid reusing query IDs for each run and match responses with queries commit de9fb3bc9fcdf7f690524ef3aec494a5edc0eda9 Merge: 4a10386 f9ba643 Author: Tobias Oetiker Date: Mon Feb 8 10:56:42 2016 +0100 Merge pull request #52 from mdiehm/patch-1 Add even a little more valuable data to the syslog commit f9ba6432cf0d73832e77931d47cf231fa5083f3f Author: mdiehm Date: Fri Jan 29 10:38:00 2016 +0100 Add even a little more valuable data to the syslog Maybe some of this data is also wanted in the mail - esp. ratio number and prevmatch? commit 4a103866e3e7df3d09185df397d13d4f9cde44af Merge: 6e8fcc8 361c017 Author: Tobias Oetiker Date: Thu Jan 28 09:53:05 2016 +0100 Merge pull request #51 from mdiehm/patch-1 Little more verbose syslog-message in Smokeping.pm commit 361c0179c60de6c05c5ba5231a7d5b82cdda3f38 Author: mdiehm Date: Wed Jan 27 18:18:25 2016 +0100 Update Smokeping.pm commit 6e8fcc8bb9dcb944e2efc832c27ecc6909d81b31 Author: Tobias Oetiker Date: Mon Jan 25 14:03:10 2016 +0100 added timeout to sipsak commit 2ed0b369276f188544edbadd81e505520522c816 Merge: 8c67c29 3a8546b Author: Tobias Oetiker Date: Tue Dec 22 13:20:34 2015 +0100 Merge pull request #49 from mmazur/high_precision_sleep_timer Add high precision timer for sleeps between steps commit 3a8546ba52448c54ca522027a599fb05039c19af Author: Mariusz Mazur Date: Tue Dec 22 12:08:52 2015 +0100 Add high precision timer for sleeps between steps This code does two things: 1. Calculates sleep time till next step start as a float instead of an integer, so next probe starts much more precisely when it should instead of up to 0.9999 seconds later. 2. Adds a fail safe in which if the current step is overdue by less than 300ms, it is not skipped. In other words: - let's have step 60s - probe took 60.1s - old code would sleep for 60s (and skip a step) - new code notices it's only 100ms overdue, so it runs the probe anyway. This patch allows me to run fping every minute (step 60) with each run taking almost a minute (120 pings total, one every 500ms) for constant link monitoring. commit 8c67c298cf2c19be0c9b6cde58964d02c64da9a4 Merge: 6547500 707a9ca Author: Tobias Oetiker Date: Fri Nov 27 08:37:18 2015 +0100 Merge pull request #47 from eskyuu/master - Add the FPingContinuous probe commit 707a9ca656bb75e15c84baf056d82b58fff43651 Author: Steven Wilton Date: Wed Nov 25 16:30:55 2015 +0800 - Add the FPingContinuous probe commit 65475007b7879132b3cbc6565d6c11cdc907ee33 Author: Tobias Oetiker Date: Thu Sep 24 16:32:10 2015 +0200 add support for -T option from gurhan.ozen@gmail.com commit 4c6dec645583a8ddeea73335ed5abc0a0ed0813f Merge: a8c3b00 cd0879a Author: Tobias Oetiker Date: Fri Jul 3 09:28:40 2015 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit a8c3b00dff57a3b62a6b4dc92d6d2c9ca02617a7 Author: Tobias Oetiker Date: Fri Jul 3 09:28:23 2015 +0200 fix echoping location commit cd0879a24707cc4ec30182c71205359e86bc3374 Merge: 943f986 6041983 Author: Tobias Oetiker Date: Thu Jun 11 23:56:36 2015 +0200 Merge pull request #39 from mad-ady/master Remove RRD max limit of 180 - so that the RRD can store values larger… commit 60419834f224a0735094fd4ad0aac8eac3b15289 Author: Adrian Popa Date: Thu Jun 11 10:35:20 2015 +0300 Remove RRD max limit of 180 - so that the RRD can store values larger than 180 (e.g. for non-time data). commit 943f98660f16be1a7370f44efa656895b6090b57 Merge: 0e2179c 6622ee2 Author: Tobias Oetiker Date: Thu Apr 30 06:00:55 2015 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit 0e2179cbb917c15539a90a8d88866f06a3d1e93e Author: Tobias Oetiker Date: Thu Apr 30 05:59:56 2015 +0200 the tcpping script does not support the -e switch ... fix for #37 commit 6622ee22785c1ccd1543392605f28ee2d36e2e02 Merge: ac57e1d 367e874 Author: Tobias Oetiker Date: Fri Apr 3 01:58:14 2015 +0200 Merge pull request #35 from fenner/master Minor markup fixes. commit 367e874034d424171ee1b6b11644fddbf52f0fa0 Merge: ad76d30 ac57e1d Author: Bill Fenner Date: Thu Apr 2 09:08:50 2015 -0700 Merge remote-tracking branch 'upstream/master' commit ad76d3052ed1d830083b0f413568c27b190c5e0d Author: Bill Fenner Date: Thu Apr 2 09:08:32 2015 -0700 Minor markup fixes. commit ac57e1d3ac69d20533d6cb6215247a89b6887967 Merge: 258a010 003ad71 Author: Tobias Oetiker Date: Wed Mar 4 10:55:16 2015 +0100 Merge pull request #34 from slesru/patch-1 Update TelnetIOSPing.pm commit 003ad71f44772265732374a9c66974f75c6f13a0 Author: slesru Date: Wed Mar 4 13:32:48 2015 +0400 Update TelnetIOSPing.pm added VRF support commit 258a01011604dd3d65d6be4148cdbb745ccbbf0b Author: Tobias Oetiker Date: Wed Feb 25 14:47:17 2015 +0100 TOS can be 0-255 fix for #33 commit ca230332389b3402484791eae0d826cf6d4b223e Author: Tobias Oetiker Date: Wed Feb 25 14:46:46 2015 +0100 TOS can be 0-255 fix for #33 commit 08fa8bb3313ce9e085945e5c100c811154832a4f Author: Tobias Oetiker Date: Mon Feb 16 17:45:17 2015 +0100 allow more precise waittime fix for #31 commit 8c641451e5a79ce64391c2d5d531bbae1b1a2832 Merge: 34a95b6 a4ab7d7 Author: Tobias Oetiker Date: Mon Feb 16 17:42:52 2015 +0100 Merge pull request #28 from SaaldjorMike/fix-typo Fixed typo in comment commit 34a95b6c5d745ee53d4671911fbeba07d7696bc4 Merge: 6920029 2a3947f Author: Tobias Oetiker Date: Mon Feb 16 17:42:37 2015 +0100 Merge pull request #27 from cgull/traceroute_ping New TraceroutePing probe module commit 692002997e1ba98601c977a4050f31440793c8d7 Author: Tobias Oetiker Date: Sun Jan 11 22:58:10 2015 +0100 must be tos not packetsize commit 9afefe173b0ab08240336258e12cc17f151bf0a9 Author: Tobias Oetiker Date: Wed Jan 7 08:01:55 2015 +0100 add support for tos configuration commit 2a3947f500dfd810182d4b0c4cff6b85d43f3265 Author: John Hood Date: Sat Dec 27 00:51:40 2014 -0500 Fix bugs. Make IPv6 work on FreeBSD and Linux. Improve docs. commit f3c7e385e61192851739e7f5c66110d77a1f7de8 Author: John Hood Date: Sun Nov 23 20:11:40 2014 -0500 fix variable renaming commit c990501fcd19ed1c2d8a752419ac856311a0e182 Author: John Hood Date: Sun Nov 23 19:38:12 2014 -0500 New TraceroutePing probe module commit a4ab7d7368e05b06302501dceece400f7a456493 Author: Mike Rostermund Date: Mon Dec 8 20:15:20 2014 +0100 Fixed typo in comment commit 85050b8e0d0810dc934d44c13e68ce362f40da2a Merge: d035e91 5aa35dd Author: Tobias Oetiker Date: Mon Dec 8 17:10:35 2014 +0100 Merge branch 'master' of github.com:oetiker/SmokePing commit d035e91affa33615a074bbfce79e6de67dee7c07 Author: Tobias Oetiker Date: Mon Dec 8 17:10:06 2014 +0100 added word of caution regarding the cgi file commit 5aa35dd768af3a28c622dcd88d63baddf210f850 Merge: 9e8c570 a72d1b7 Author: Tobias Oetiker Date: Tue Nov 18 11:39:15 2014 -0800 Merge pull request #24 from jbfavre/feat_add_custom_curl_probe Add a custom Curl probe. commit 9e8c5705c5cf4cbdf179e8630019b15e4f3a5fd1 Merge: 14301f3 56f9e7d Author: Tobias Oetiker Date: Tue Nov 18 11:38:13 2014 -0800 Merge pull request #26 from skoef/master bugfixed AnotherDNS commit 56f9e7d452a770405b13cee1c70b9309a46fcb5a Author: Reinier Schoof Date: Tue Nov 18 20:29:59 2014 +0100 cleaned handling defaults commit f0866c5f6fe68fd5834b8c488d7d25ee5b4c5e51 Author: Reinier Schoof Date: Tue Nov 18 20:26:44 2014 +0100 fixed protocol and ipversion support commit 14301f3377d4bc1351d8090e4c5b340612cc9e7b Author: Tobias Oetiker Date: Tue Nov 4 23:55:19 2014 +0100 updated changes commit 9395d663c2675a2073658e5e8114e7722dbc25aa Author: Tobias Oetiker Date: Tue Nov 4 23:50:28 2014 +0100 add missing PERL_MODULES file commit bd46feebee11262d37cf5e4743a6ebd607786354 Author: Tobias Oetiker Date: Wed Oct 29 10:07:08 2014 +0100 getting ready for 2.6.10 commit 52001917bd5f635e5118a0503e242ebbce76e5a4 Author: Tobias Oetiker Date: Wed Oct 29 09:35:03 2014 +0100 ready for 2.6.10 commit b48e6b51a43e09170d164d67539788bd05663076 Merge: 57b3aa5 7467c47 Author: Tobias Oetiker Date: Wed Oct 29 09:03:10 2014 +0100 suync up Merge branch 'master' of github.com:oetiker/SmokePing commit 57b3aa5b4c863417b720413c76eb26c6b03fd2bc Author: Tobias Oetiker Date: Wed Oct 29 09:02:40 2014 +0100 actually override defaults commit 60be7048597cbc3b4239ed18df24f56fa2648e82 Author: Tobias Oetiker Date: Wed Oct 29 09:02:35 2014 +0100 have 443 as default port commit a72d1b7585859ed9d9f84701e7589139edd27552 Author: Jean Baptiste Favre Date: Tue Oct 14 11:34:20 2014 +0200 Add a custom Curl probe. Update curl output to support all timers (see bellow). Add new configuration option 'write_out'. This option designate which timer information we want to get from curl output. 'write_out' can take one of the following values: * time_namelookup * time_redirect * time_connect * time_appconnect * time_pretransfer * time_starttransfer * time_total Default behaviour is the same than current Curl probe: total - DNS commit 7467c476624b666bfbe752801af5d86a22c7ae15 Merge: a3e3e36 0672331 Author: Tobias Oetiker Date: Fri Aug 1 11:44:56 2014 +0200 Merge pull request #22 from felderado/master Support Net::DNS 0.75+ commit 0672331840d935b3a03d75b6cb0af5f7ed818a32 Author: felderado Date: Mon Jul 14 09:58:10 2014 -0500 Update AnotherDNS.pm &Net::DNS::PACKETSZ has been removed from Net::DNS and was not officially part of the API. Set packet size to 512, which was default value for &Net::DNS::PACKETSZ anyway. commit a3e3e36f7c41171b1a437cb2d47fa05785e36c2c Merge: f36b413 e4f9b60 Author: Tobias Oetiker Date: Mon Feb 17 00:17:31 2014 +0100 Merge pull request #18 from jimpop-at-gmail-dot-com/master Added IPv6 (ipversion) and TCP (protocol) support commit e4f9b6093694f76b55fa2cecc9499977b98e3db4 Author: jimpop-at-gmail-dot-com Date: Sat Feb 15 18:53:38 2014 -0500 Added IPv6 (ipversion) and TCP (protocol) support commit f36b413bb8c5f287c205b64b743973065157c5d2 Merge: 3e1e3cc 34af662 Author: Tobias Oetiker Date: Thu Nov 14 21:16:21 2013 -0800 Merge pull request #15 from fenner/master DismanPing updates: don't return stale data, log more helpful errors, and rename weird variable commit 3e1e3cc5ac714f6193336d35297dbb3fa54b5c89 Merge: b23d5ad d0f28aa Author: Tobias Oetiker Date: Thu Nov 14 21:13:19 2013 -0800 Merge pull request #17 from hufman/feature-qstat Adds a Qstat probe plugin commit d0f28aaa3c1c691dde4d5656c7727d538bd64f50 Author: Walter Huf Date: Thu Nov 14 19:30:16 2013 -0600 Fixes up parameter passing to qstat commit ccb33eab568a971e953e76db92b4bcb8983827b3 Author: Walter Huf Date: Thu Nov 14 18:20:55 2013 -0600 Cleans out remnants of Fping plugin commit fa098cb2302da3ddcd528e43d7d985dc9d41e00b Author: Walter Huf Date: Thu Nov 14 17:02:02 2013 -0600 Adds a Qstat probe plugin commit b23d5ad4b24ee26393585fd069261f0fb2263b18 Author: Tobias Oetiker Date: Thu Nov 14 10:43:05 2013 +0100 fix fping commit 51aa7f39f221a55cd39d4664c3748a2d17f7ecc0 Author: Tobias Oetiker Date: Thu Oct 24 09:14:16 2013 +0200 make sure locale settings are now screwing with the creation of the rfc2822 timestamp commit f043ccf9587e429bfea382872e4260357ec388f8 Merge: 8cdd000 8024031 Author: Tobias Oetiker Date: Wed Oct 23 16:26:14 2013 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit 8cdd0005f737c9cff83c31a8d33b1342b47ba061 Author: Tobias Oetiker Date: Wed Oct 23 16:26:02 2013 +0200 PERL5LIB is : separated while use lib expects an Array commit 80240313453e1f302f1ad8bff64c7c5eb4a98966 Merge: b388be2 ebf63a9 Author: Tobias Oetiker Date: Wed Sep 4 11:46:30 2013 -0700 Merge pull request #16 from Bluewind/working Misc fixes commit ebf63a98adae5ea84d044b73a03612a9fd75af26 Author: Florian Pritz Date: Wed Sep 4 19:20:06 2013 +0200 Fix wrong hardcoded path in fcgi example file Signed-off-by: Florian Pritz commit fec626d9e26dbdce91db6eed42d898eb671a7906 Author: Florian Pritz Date: Wed Sep 4 19:19:28 2013 +0200 Fix syntax error in POD Possible perl 5.18 related, I didn't look into that. Signed-off-by: Florian Pritz commit 34af662d2dfe8be1cc433a2395186dc20c25d9cf Author: Bill Fenner Date: Tue Apr 23 19:28:58 2013 -0700 Better error logging, and support unpriv'd accounts commit 3bdee9c96d27a65836b6ef3ba018d3d437699ad3 Author: Bill Fenner Date: Tue Apr 16 07:44:45 2013 -0700 A probe to use the EOS "ping" cli command Based on OpenSSHJunOSPing, this probe ssh's to a device and uses the EOS "ping" command to collect data. commit b388be244855778ff87899b040ac0c565b4dc456 Author: Tobias Oetiker Date: Thu Mar 21 22:55:32 2013 +0100 remove duplicate entries commit bad9f9c28f0939b269f90072aa4cf41f20f15563 Author: Tobias Oetiker Date: Sun Mar 17 13:11:10 2013 +0100 xss fix from Steven Chamberlain commit af24c7886e48d97bc226a123d12e6b15cd089b51 Author: Tobias Oetiker Date: Mon Mar 4 14:07:39 2013 +0100 update release number commit 6085244986b5f6d76c824553c166d8fee13f9d9a Author: Tobias Oetiker Date: Mon Mar 4 14:04:22 2013 +0100 updated changes log commit 01eb8afb8030f9c0fe1316e4558023f37dd710e4 Author: Tobias Oetiker Date: Mon Mar 4 13:54:29 2013 +0100 be more careful about preventing xss attacks, re http://bugs.debian.org/659899 commit fd1067f6ac2733818f00909c161b6e084e97ebf9 Author: Tobias Oetiker Date: Wed Feb 27 16:10:48 2013 +0100 provide more configurable replacements for remocular integration commit d8b0a0001fa8945e93cac5e4f1294272848c9576 Author: Bill Fenner Date: Tue Feb 5 09:48:49 2013 -0800 Improved logging from SNMP errors. commit 704fa685408de843e7d0a9e13aa75524ce0bb502 Author: Bill Fenner Date: Tue Feb 5 08:53:34 2013 -0800 Don't reuse $t, even if perl scoping rules allow it. Reusing $t to iterate over the ping results is just confusing, especially since one line later we assign to the other $t. Use a new locally-scoped $result variable instead. commit 8b1020fe6a877eee16fdbdcb873b95b0368b14c7 Author: Bill Fenner Date: Tue Feb 5 07:00:26 2013 -0800 Empty out any RTTs from the last round. If we don't empty the hash before starting this round, then if we get an SNMP error for a target, we'll report his results from the previous round. commit efcd36cf069f51f52fdd9c6b4f433fc979d93e23 Merge: 7dac529 7719ba5 Author: Tobias Oetiker Date: Thu Nov 8 00:03:34 2012 -0800 Merge pull request #9 from couloum/master new probe SendEmail commit 7719ba573effcbd0ac35203c0c6f5ebf79921ee6 Author: Florian Coulmier Date: Wed Nov 7 22:13:42 2012 +0100 Added new probe SendEmail commit 7dac5296d1e490adf5fcbfa8de0c398e1a5cf55a Merge: ef24bb2 70b3337 Author: Tobias Oetiker Date: Wed Oct 24 21:06:10 2012 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit ef24bb21f91c066129d1fbb4fb72493029a17c6a Author: Niko Tyni Date: Wed Oct 24 21:04:53 2012 +0200 As spotted by Gert Doering, rand() gives the same results in each pinger subprocess. This is because they all inherit the same RNG state from their parent. Fix this undesired behaviour by reseeding the RNG with the current time and the process ID. The argument of srand() shouldn't really matter much on modern Perls, but we're not very concerned about the quality of the random numbers either, and time()+$$ should make sure it's different for each process. commit 70b3337a26a5cf8e3a4ef49f3491017715bf212b Merge: 49572f3 75dcab2 Author: Tobias Oetiker Date: Wed Sep 12 22:02:34 2012 -0700 Merge pull request #8 from jweather/master add "expect" parameter to Curl.pm commit 75dcab25f99f7f074514e9d184c6de268fd18601 Author: Jeremy Weatherford Date: Wed Sep 12 08:36:16 2012 -0700 fix stray spaces commit 7d68f748c5fdb8e1fe8d5daeb1deda2b9dafa435 Author: Jeremy Weatherford Date: Wed Sep 12 08:34:35 2012 -0700 add expect parameter to Curl.pm commit 49572f3da6f0e62adbcb3d326c698fad941164f4 Author: Tobias Oetiker Date: Wed Aug 29 11:01:18 2012 +0200 fix regression - added missing ) commit 491498b57a427230069604d10b68073c0f6f5e33 Author: Tobias Oetiker Date: Wed Aug 29 09:49:57 2012 +0200 allow to configure FPing probe to read fping output form stdout instead of stderr commit 7e4c58744dc9f8b8656f88612fd58f54b7e522e4 Author: Tobias Oetiker Date: Fri Jul 13 09:34:59 2012 +0200 allow title to be defined via cgi parameter when calling navigator interface directly commit c15e166eb9b2331348f7729c394e37a7e88c1870 Author: Tobias Oetiker Date: Mon Jul 9 11:46:19 2012 +0200 it's milliseconds not miliseconds, thanks frank habicht commit 372a20962b00cf3974e8530eb3ee981df11caba4 Author: Tobias Oetiker Date: Fri Jul 6 09:06:30 2012 +0200 respect the probe timeout -- Dmitry Melekhov commit dde47e5461dbbe07ce5653971f98912625ea233e Author: Tobias Oetiker Date: Tue Jul 3 22:37:14 2012 +0200 set a default for end too commit 689cbec359940d2eead85d9567a4b3be530507af Author: Tobias Oetiker Date: Tue Jul 3 21:09:48 2012 +0200 fix smokeinfo to actually consider --start and --end commit 972673d1c94305ad6631e15b3b4213a0b4aef728 Author: Tobias Oetiker Date: Wed May 23 18:02:27 2012 +0200 exec the cgi to make sure fastcgi is tracking the right process - Eric Searcy commit e145ab1abf091802da4aad8e9106d2c234f9251e Author: Tobias Oetiker Date: Wed May 23 09:33:59 2012 +0200 must provide the actual width when finding max or consolidation will cause problems - thanks david for the hint! commit 11838ebc2ae0661130544c383643046803d8d45b Merge: 8837a8d 6fae074 Author: Tobias Oetiker Date: Mon Apr 2 09:20:35 2012 +0200 Merge branch 'master' of github.com:oetiker/SmokePing commit 8837a8d3a033a124644d6085555d70afa1372a30 Author: Tobias Oetiker Date: Mon Apr 2 09:20:07 2012 +0200 wait for the first gen child to terminate commit 6fae074f1a8a305b0a8361626902110e7351a65b Merge: 79b6c93 11cf1d9 Author: Tobias Oetiker Date: Sat Mar 24 13:00:28 2012 -0700 Merge pull request #6 from mcdarren/integration HTTP auth user template support commit 11cf1d954dc92e4d4f2a8dc8fed729f0ef04bf7a Merge: 8e9692b 79b6c93 Author: Darren Murphy Date: Fri Mar 23 13:25:28 2012 +0800 Merge remote branch 'tobi/master' into integration commit 8e9692b5f8a39eea12521f7ae9ad9b62c28ae6f5 Author: Darren Murphy Date: Fri Mar 23 13:10:55 2012 +0800 Template support for HTTP auth user * Updated doc * Added section to basepage.html.dist commit 79b6c9346c950d0b3e22dc9ba337bbcdcbed052e Author: Tobias Oetiker Date: Thu Mar 22 23:01:14 2012 +0100 fork alert handlers, so that smokeping does not block commit 82162859fa9bc528fedf284e5bf6618ae98f1a7d Author: Tobias Oetiker Date: Thu Mar 22 23:00:25 2012 +0100 fork alert handlers, so that smokeping does not block commit c3539403a5ba22a633488764a68200a06aa3ba95 Author: Tobias Oetiker Date: Mon Feb 13 06:53:21 2012 +0100 added hacking notes commit 872cadbfdf1ee27db786389c941671a2e0df1b4f Author: Tobias Oetiker Date: Tue Feb 7 07:00:56 2012 +0100 added release commit cb1c7d001fd4a410e50112585f03694edf4a1474 Author: Tobias Oetiker Date: Tue Feb 7 06:43:36 2012 +0100 update RRD location commit 9672c02ac02b2a152dc786b57053cc93d4f510fe Author: Tobias Oetiker Date: Mon Feb 6 23:18:25 2012 +0100 update for release commit 589ea56efaa087811c2bf0cf37781843f9992c51 Author: Tobias Oetiker Date: Mon Feb 6 23:17:32 2012 +0100 make SipSak work with sip servers implementing OPTIONS commit 50333cf052a6fc2ed29f16639ac1d0c891978b38 Author: Darren Murphy Date: Mon Feb 6 20:25:06 2012 +0800 Add template support for http auth user commit 8c8ed47542783991ed4639783607334f2e52bb70 Author: Tobias Oetiker Date: Thu Feb 2 23:34:38 2012 +0100 fix documentation commit f18024c3a610238aaf7d7101308367f72bc75e7d Author: Tobias Oetiker Date: Thu Feb 2 23:21:31 2012 +0100 handle servers actually implementing OPTIONS commit f4f50a94f1beacfea12b3b1f1eb06251909cccc5 Author: Tobias Oetiker Date: Wed Jan 11 10:01:44 2012 +0100 add relese date to changes file commit 4b1cc570fe684968f7afee3c39dfb69791c969be Author: Tobias Oetiker Date: Wed Jan 11 09:27:18 2012 +0100 prep for release commit ea18202ce6ecd0ff619f7fbc7c2329db3bd3d086 Author: Tobias Oetiker Date: Wed Jan 11 09:26:18 2012 +0100 be more careful in handling input from the web to prevent xss. Thanks to Russ McRee for pointing this out. commit 0c43c8b653065862d6dd10ffd6789b168c138b21 Author: Tobias Oetiker Date: Tue Dec 20 07:37:33 2011 +0100 integrated NFSping probe by Matt Provost - https://github.com/mprovost/NFSping commit cda6cb8ef889fd0d7f08848025ea4687b41b2c1d Author: Tobias Oetiker Date: Sat Dec 3 12:58:33 2011 +0100 From: Chris Wilson Date: Fri, 2 Dec 2011 20:38:26 +0000 (GMT) I tried to use the tcpping probe but it didn't work for me (centos 5). It seems that the tcptraceroute output format has changed or there is a problem with the script's ability to parse options. It also doesn't report tcptraceroute errors properly or have much in the way of debugging support. And it required smokeping to be run as root. I think I have fixed these issues, and posted updated versions here: https://github.com/aptivate/network-scripts/blob/master/TCPPing.pm https://github.com/aptivate/network-scripts/blob/master/tcpping I hope that you will consider these for inclusion in your projects. Richard, are you still maintaining tcpping? If not, is it worth merging this functionality into the TCPPing module? (integrated the TCPPing.pm for now -- tobi) commit 0f421fbf603b2427a6c010cdd375bf40b3aacabb Author: Tobias Oetiker Date: Thu Nov 24 11:28:52 2011 +0100 use max index instead of count ... then it all works nicely commit 77890232a5020dc5caf034da9a2d1bc1392b1a3b Author: Tobias Oetiker Date: Thu Nov 24 11:25:53 2011 +0100 fixed off by 1 error commit c332d31fbf2f398455c4a7dfc8f9eec19943fed0 Author: Tobias Oetiker Date: Wed Nov 23 22:42:08 2011 +0100 added ken commit 8bb8c6817b082fd11ece24119064607bc287dfec Author: Tobias Oetiker Date: Wed Nov 23 14:14:01 2011 +0100 add missing } ... syntax error commit 91d090167d30c90a7f4daff1e468ad7d0f717049 Author: Tobias Oetiker Date: Wed Nov 23 07:05:03 2011 +0100 make sure we stay within the bounds of the array commit 3c1ce9f1d0ca20479d10d5d18d66a2af416ad42a Author: Tobias Oetiker Date: Tue Nov 22 09:26:13 2011 +0100 make Median matcher work fine on startup and when unknown values are in the stream commit 1c6f909c977061ace3e5bc00af8adc8b1b8b84ab Author: Tobias Oetiker Date: Tue Nov 22 09:25:02 2011 +0100 make Median matcher work fine on startup and when unknown values are in the stream commit 1e9842ca33991ba4c395ed1a457866c7189d8aa6 Author: Tobias Oetiker Date: Sat Nov 12 11:57:32 2011 +0100 prep for 2.6.6 release commit 7cef01f0089476f9b39e28cda0871c2a5ced72d9 Author: Tobias Oetiker Date: Sat Nov 12 11:56:27 2011 +0100 fix version patching commit 913c728d0d06bd67d5e9db29de8794ee596a347f Author: Tobias Oetiker Date: Sun Oct 30 11:36:09 2011 +0100 updated changes for 2.6.5 release commit e6332c5a1a098fbf6d5a44795d96d26dcc099e5c Author: Tobias Oetiker Date: Sun Oct 30 11:35:45 2011 +0100 updated changes for 2.6.5 release commit b061046f26e01821761ce7381f5782bc629dda17 Merge: 677f0b4 89f91c4 Author: Tobias Oetiker Date: Sun Oct 30 03:32:45 2011 -0700 Merge pull request #4 from twilde/master Automatically configure config.dist paths commit 89f91c4e71fa85bc992cabe001da01d762770fdd Author: Tim Wilde Date: Sun Oct 30 01:16:35 2011 +0000 Update gitignore for auto generation of config.dist commit a40ae75d8c76fe578f54cd5afd879de4ae0b744f Author: Tim Wilde Date: Sun Oct 30 00:54:08 2011 +0000 Automatically configure etc/config.dist paths commit 677f0b4d837b4b040d085aedce6f09120a912cdf Merge: 81d0718 c72affb Author: Tobias Oetiker Date: Sat Oct 29 16:11:04 2011 -0700 Merge pull request #3 from twilde/master Make $prefix available for HTDOCSDIR commit c72affb3a8387d606eb837bd9b47e238aa6edec3 Author: Tim Wilde Date: Sat Oct 29 22:08:51 2011 +0000 Make $prefix available for HTDOCSDIR Code lifted from the Tor Project's configure.in commit 81d0718bbb09fbf098a84f16278d51d9058e63ec Author: Tobias Oetiker Date: Sat Oct 29 01:43:17 2011 +0200 properly version sync commit e1cf85743f68c43d0eb2476b22d5747bd28a58c5 Author: Tobias Oetiker Date: Fri Oct 21 14:26:08 2011 +0200 prep for release 2.6.4 commit c2907861471223bc08c2d68ea3ac7f0e8cf6b179 Author: Tobias Oetiker Date: Fri Oct 21 14:24:40 2011 +0200 one more naked gettimeofday eliminated commit c6f817fcb7e49495de647e43729c910223468ba7 Author: Tobias Oetiker Date: Thu Oct 20 09:28:27 2011 +0200 allow for conftools to exist commit 4658580d38d6866dcd4d6a7b1822de8ce7ec2057 Author: Tobias Oetiker Date: Thu Oct 20 09:27:29 2011 +0200 added ignore file commit d093ababdb99883921f5855c46989ed782438f9d Author: Tobias Oetiker Date: Thu Oct 20 09:25:07 2011 +0200 prep for 2.6.3 release commit ccd03bfead2c62f3541a6ee944270789f18b8f38 Author: Tobias Oetiker Date: Thu Oct 20 09:24:17 2011 +0200 it seems some version of perl bulk at gettimeofday without () commit 4b4dc3a97a0b77a12ac036b4a1985f083ae11cdb Author: Tobias Oetiker Date: Tue Oct 11 09:12:04 2011 +0200 ready for 2.6.2 commit bbba546ca670562a0d2aa2dd5e98d61c2b0d516e Author: Tobias Oetiker Date: Thu Oct 6 09:34:26 2011 +0200 fix helptext formatting commit 30d4bb237aa397bb407d90680657a445a50e2f02 Author: Tobias Oetiker Date: Thu Oct 6 09:34:10 2011 +0200 help rebuilding autoconf commit d7a08344bb0c229d9133f688ac45cac4e5c7b889 Merge: e3c26a5 8643c2f Author: Tobias Oetiker Date: Wed Oct 5 22:58:18 2011 -0700 Merge pull request #2 from twilde/master Minor documentation nit-pickery commit 8643c2fa2b5955ffda759d0fbf735a84e68d2da8 Author: Tim Wilde Date: Thu Oct 6 00:27:03 2011 +0000 Minor documentation nit-pickery commit e3c26a55acf046586bd94219f6873a8734c0c66e Author: Tobias Oetiker Date: Wed Oct 5 23:44:07 2011 +0200 include more files into distribution commit 8b2e076704cd3cd249ea4054ef741cd42dd58f75 Merge: 0a83e73 34d6cd6 Author: Tobias Oetiker Date: Wed Oct 5 13:10:03 2011 -0700 Merge pull request #1 from mcdarren/34d6cd69e4b075ba732c44ebdad25cf4db744e7b Some minor document fixes commit 34d6cd69e4b075ba732c44ebdad25cf4db744e7b Author: Darren Murphy Date: Wed Oct 5 23:09:44 2011 +0800 Innocuous first commit - corrected a few typos in the docs commit 0a83e73c871b94d2c8df4abe18034ab1fd41e202 Author: Tobias Oetiker Date: Wed Oct 5 12:09:40 2011 +0200 no need to mention DESTDIR in normal Makefile.am use ... only in command options. Thanks to Jeff Bilyk for tha patch. commit f1601f6f97589e5011f10ff1b528606903dd8c62 Author: Tobi Oetiker Date: Thu Sep 29 11:53:30 2011 +0000 wait before syncing commit 7937c1a3a41a477aede9325476a71cd253853c06 Author: Tobi Oetiker Date: Thu Sep 29 11:47:42 2011 +0000 do not distribute non existing files commit bc78b2af7c82cced422e4dc424b8ae45589be2fd Author: Tobi Oetiker Date: Thu Sep 29 11:44:31 2011 +0000 create htdocs dor commit 1930d47ac9b2635b610a74ea1e4302731fe7be20 Author: Tobi Oetiker Date: Thu Sep 29 11:37:28 2011 +0000 better install system commit 4ab769579b0aeafd81878ddb332b726c44dc2ffc Author: Tobi Oetiker Date: Thu Sep 29 11:36:39 2011 +0000 improve webserver docu and sample script commit d6136cf5bb98c3b52d54f9b0c9042a54169bfb5b Author: Tobi Oetiker Date: Thu Sep 29 07:18:33 2011 +0000 improve release system commit dce506ebf931914e915cde7c7ec5c8be51b516df Author: Tobi Oetiker Date: Thu Sep 29 07:16:13 2011 +0000 improve release sytem commit 90ea2254d53adbf61bfa62c573f0fae1958a7f0d Author: Tobi Oetiker Date: Thu Sep 29 07:11:41 2011 +0000 add missing js file commit 0f4f0f82bdbd329b93b5598fa6b59b50d6e1e9a7 Author: Tobi Oetiker Date: Thu Sep 29 07:06:21 2011 +0000 add missing js file commit df41fd1716a16baa47b388c588eb572be1bcdb30 Author: Tobi Oetiker Date: Thu Sep 29 07:02:41 2011 +0000 improve release system commit 58ae5f7ec98bf360ab5cc9a2aeab7d4349083de7 Author: Tobi Oetiker Date: Thu Sep 29 06:54:51 2011 +0000 improve release system commit 2d52bd6a6ac81b6cb5c75a93f28a6c2ba6e2743b Author: Tobi Oetiker Date: Thu Sep 29 06:54:10 2011 +0000 improve release system commit ba384d7679698812140a3ef3dd92c12b30816dfd Author: Tobi Oetiker Date: Thu Sep 29 06:52:21 2011 +0000 improve release mechanism and add DESTDIR to binary paching commit d0444c7bd2713466995b986c8d47fb467f79a458 Author: Tobi Oetiker Date: Thu Sep 29 06:38:28 2011 +0000 include thirdparty libs when building docs commit 15273596f42e24f86d48b502f48414714ee4971c Author: Tobi Oetiker Date: Thu Sep 29 06:34:04 2011 +0000 preparing for the release of smokeping- commit 43cfbeb810d245bb4095f1bea4f917557cb14175 Author: Tobi Oetiker Date: Thu Sep 29 06:33:00 2011 +0000 deal with missing variables commit a39594e10328d8acd06f113282d081cde5d3f72b Author: Tobi Oetiker Date: Thu Sep 29 06:31:30 2011 +0000 preparing for the release of smokeping- commit a93be0e71209b34d6c371e3d4876846975fcd812 Author: Tobi Oetiker Date: Thu Sep 29 06:30:54 2011 +0000 include conftools commit 45eaeac285e281d808ac45e6a736628765e6c55a Author: Tobi Oetiker Date: Thu Sep 29 06:30:14 2011 +0000 preparing for the release of smokeping- commit 6ffd03fa16badf0d5454ea2cfbf47796b9d5643c Author: Tobi Oetiker Date: Thu Sep 29 06:21:08 2011 +0000 make sure version if Smokeping.pm is synced on distbuild commit eb2af9461f2a1282701a68505b1ba00eddd99adf Author: Tobi Oetiker Date: Thu Sep 29 06:06:26 2011 +0000 update install documentation commit 3acd454b9c2d9c5e2f6255c5c6472a99b2d0f1dc Author: Tobi Oetiker Date: Thu Sep 29 04:49:59 2011 +0000 check for gnumake in configure commit bac2ea4e099770cdf3074e093da085769f97a04f Author: Tobi Oetiker Date: Wed Sep 28 23:20:03 2011 +0000 tweak build rules commit 261f28813c8154a70349d4fdbf51645cd509906c Author: Tobi Oetiker Date: Wed Sep 28 23:07:55 2011 +0000 add note about building missing modules to configure commit f05d11a794291157f39778907c698c9008cd7edf Author: Tobi Oetiker Date: Wed Sep 28 22:34:38 2011 +0000 * silent build * add perl and library path to the scripts on install commit a0d01155dc7b2774435721aa319625c9c42d9e59 Author: Tobi Oetiker Date: Wed Sep 28 21:32:22 2011 +0000 make install destination configurable commit 109efdb60386dbabd451162f3f3145a1eaf47f5e Author: Tobi Oetiker Date: Wed Sep 28 21:19:38 2011 +0000 remove some old un-used directories commit 5fae780ff1fe39322a370957bb004f8046faeafb Author: Tobi Oetiker Date: Wed Sep 28 21:18:47 2011 +0000 start modifying commit c7fd04defd13eb3d962156292bf6abaaa893619d Author: Tobi Oetiker Date: Wed Sep 28 21:18:01 2011 +0000 fix to work with new automake build commit 4b3cafae64c7c562cbec2231488f63d912f269ca Author: Tobi Oetiker Date: Wed Sep 28 21:17:26 2011 +0000 added automake support commit 039861d743c2993959aca1a3e52045e8f6073d0a Author: Tobi Oetiker Date: Wed Sep 28 19:45:11 2011 +0000 standard modules from CPAN ... get them there commit c8936eaeaf0d642d66b48cd1cf126924725a8f48 Author: Tobi Oetiker Date: Wed Sep 28 19:44:42 2011 +0000 add missing POSIX prefix commit b3c0fa34dd27dbe1fd89bc8dfd63705c5ea4e927 Author: Tobi Oetiker Date: Mon Sep 26 12:52:29 2011 +0000 prepare for the release of smokeping-2.5.1 commit f638a6d39525dded01b5bcde64bd65e47ec10110 Author: Tobi Oetiker Date: Sun Sep 25 21:04:58 2011 +0000 fix pod commit 2e72f71bcbb2e50a5e74557c0707774153e6ccb0 Author: Tobi Oetiker Date: Sun Sep 25 19:56:53 2011 +0000 prepare for the release of smokeping-2.5.0 commit 4197b239883707b5f40433f39c4796e886beaa9b Author: Tobi Oetiker Date: Sun Sep 25 19:56:34 2011 +0000 sync version commit b34700bd5c300dcf5326871c2b490b3ad8e267ee Author: Tobi Oetiker Date: Sun Sep 25 16:08:07 2011 +0000 do not exit in zoom ajax mode commit 5d9cbae7cb53a12719f7bc649f7d3c11bbf7d412 Author: Tobi Oetiker Date: Sun Sep 25 15:50:18 2011 +0000 fix makefile commit 07104cc21206d40ce7d212133733d8ec99adacde Author: Tobi Oetiker Date: Sun Sep 25 15:48:47 2011 +0000 fix tagging commit 2e7e8a27536ad204ec4b6d60a6a2e75cd35245ad Author: Tobi Oetiker Date: Sun Sep 25 15:45:03 2011 +0000 sample scripts commit 6735adcb1d8a03b3d6e3309233335b32c9b9404c Author: Tobi Oetiker Date: Sun Sep 25 15:44:45 2011 +0000 initial commit 595d31e93b261519631191330c9bde764064ede1 Author: Tobi Oetiker Date: Sun Sep 25 15:39:36 2011 +0000 added sample scripts commit 7e6820cc9127828f84640831852f6a5badc784dc Author: Tobi Oetiker Date: Sun Sep 25 15:18:57 2011 +0000 prepare for the release of smokeping-2.5.0 commit e63c27dac0ca039b67e284235df8238bd0012cfc Author: Tobi Oetiker Date: Wed Sep 21 16:18:29 2011 +0000 * switch from speedy to fastcgi * improved installation, no file editing required anymore * update installation instructions commit 11d1224adf4208f5122c2e87bb18007e95443490 Author: Tobi Oetiker Date: Mon Sep 12 19:41:55 2011 +0000 fixed alert pattern parser for range alerts commit 28c1837b9b13debd296cfee32426584505b28e66 Author: Tobi Oetiker Date: Sun Sep 11 10:13:37 2011 +0000 track changes commit 791c6625f49ff446fcca3e403cc00bc630fb99eb Author: Tobi Oetiker Date: Sun Sep 11 10:13:25 2011 +0000 track changes commit 2a854c9b0fd0742fdd5a05c9bcce27da7bf35f82 Author: Tobi Oetiker Date: Sun Sep 11 10:12:28 2011 +0000 fixed name JunoOS -> JunOS commit 6d003965b51b8b20aec52c320ae215ad3b0caf6e Author: Tobi Oetiker Date: Sun Sep 11 10:10:05 2011 +0000 added not on connecting by hand once commit 4f079b6837b7698dc92fadebd92dd90dd55ea443 Author: Tobi Oetiker Date: Sun Sep 11 10:05:31 2011 +0000 initial junos probe commit 664349b51b620cee8afbbd94dff00f8998f86014 Author: Tobi Oetiker Date: Sun Sep 11 10:04:53 2011 +0000 added scripts to build required perl modules commit 5e4b9fe9ed3975e519e317e07288fcee1a2180a3 Author: Tobi Oetiker Date: Sun Sep 11 10:03:03 2011 +0000 fix library paths and start perl via env, following todays custom commit 72898b7566ea545be6ee94a91a5ec29ef9bf0aa0 Author: Tobi Oetiker Date: Tue Aug 23 16:18:52 2011 +0000 disman integration looks good now commit d2815512ed313bf5ce7800c8b84e61aa173566df Author: Tobi Oetiker Date: Tue Aug 23 16:14:20 2011 +0000 alter probe names to be based on local hostname AND target host commit 55490b1bfb539386b63e25a8fd90e56c0200c1e8 Author: Tobi Oetiker Date: Tue Aug 23 13:59:15 2011 +0000 clean out smoketrace commit a1fbf832f9f0ba3043c3300aa0ca3a3d841ce41c Author: Tobi Oetiker Date: Tue Aug 23 13:58:56 2011 +0000 started integration of DismanPing support with modules from Bill Fenners: Bill's Permanently Unfinished but Potentially Useful scripts http://code.google.com/p/pupu/ --- thanks bill! commit 7bcda72c21f3d1d28760427455b3b1c9b2f48b44 Author: Tobi Oetiker Date: Tue Aug 23 13:53:40 2011 +0000 updated to SNMP_Session 1.13 commit 454e8ff564da151b1ad8bb56140a582ea827a4f9 Author: Tobi Oetiker Date: Tue Jun 7 06:47:51 2011 +0000 updated the download link commit 5108700d36b8c565c01301795bbacc4827bac0c2 Author: Tobi Oetiker Date: Fri Feb 18 13:26:01 2011 +0000 suggest to get a copy of fping from here ... commit 1aa624d182cdec1d1f5caa69f814df29947a76f0 Author: Tobi Oetiker Date: Sat Aug 28 07:59:55 2010 +0000 I run smokeping on many boxes and and my Gentoo/Funtoo boxes frequently run into localization setup issues which will bomb out Smokeping's web interface. It works fine invoked from the shell. I use the attached patch to help me diagnose the server setup problem. The behavior is identical to current Smokeping in that it logs a message and throws a HTTP 500 error. The basic Smokeping localization sanity check has uncovered "insane" setups where the PERL %ENV environment variables are being ignored by "setlocale" on several of my boxes for unknown reasons. Obviously, smokeping should quit, which it does... -- Lee Thompson stagr.lee gmail.com commit 3f7adcc5b693de323fd921cf34678e41bbf6d154 Author: Tobi Oetiker Date: Sun Mar 14 11:31:13 2010 +0000 added SipSak probe for SIP ping testing commit bf2a5c2c1de2a1b20348bfb6c1f49b850f0db4f6 Author: Tobi Oetiker Date: Wed Mar 10 05:53:36 2010 +0000 port the timeout fix from CiscoRTTMon ICMPPing to DNS and TcpConnect versions commit 98421ee8ba3adf8545f4a35e673ff8ef6881b65e Author: Tobi Oetiker Date: Tue Mar 9 08:19:12 2010 +0000 raise timeout to 5s and twist basefork.pm into allowing this by providing a higher _default timeout for the probe. commit ccac2c707170b3e4ccb8c3f714abcaf9e1ceb962 Author: Tobi Oetiker Date: Fri Feb 19 13:57:43 2010 +0000 fix spaceing in alert from slave commit 9eb3e9ccd4d3d9fa6494a4e543d2948ceacf3639 Author: Tobi Oetiker Date: Wed Dec 30 16:04:14 2009 +0000 add support for TOS setting in fping commit 892f12c656500ae9460250db5337cb12eb70ffe2 Author: Tobi Oetiker Date: Wed Dec 16 07:23:51 2009 +0000 fix 'bad' link commit decdf04f8089301848801650957b951c85a9cb91 Author: Niko Tyni Date: Sun Dec 13 12:01:07 2009 +0000 make the build system compatible with HTML::Parser >= 3.64 reported as Debian bug #560562 commit 0763259d1aeab109b9396e486ff2e106147174e1 Author: Tobi Oetiker Date: Sat Aug 8 11:51:32 2009 +0000 updated to lates prototype and scriptaculous libraries commit 150e62aad688c3143a1a9c2c4c890dd81b91cc54 Author: Tobi Oetiker Date: Wed Jun 24 20:15:53 2009 +0000 improved docs, added me to the author and copyright list commit 80c593387051f0a7c72e44dc855d8ca5459a73b9 Author: Tobi Oetiker Date: Mon Jun 15 05:38:14 2009 +0000 fix url in alert emails for alerts triggered by slaves commit a4b49e45557677dd854bc84cb38bed952fd9588d Author: Tobi Oetiker Date: Thu Apr 16 21:19:41 2009 +0000 lowercase charset commit b697133c514e296cc47904cb7c8403095a7b34c6 Author: Tobi Oetiker Date: Thu Apr 16 20:42:41 2009 +0000 * improved documentation * made location of service modules configurable * made method prefix configurable commit 16f3a3e84d2c25073d7ac1c40bf42852421ef5cc Author: Niko Tyni Date: Fri Feb 13 14:23:53 2009 +0000 fix a typo in configuration example 4, spotted by Guglielmo Bondioni commit 3c2ad106f30d111731d460b5274471d7cafe5cf8 Author: Niko Tyni Date: Fri Feb 13 07:46:16 2009 +0000 From: Jeremy Laidman > Please consider including the patch below. It allows specifying a parameter > of "allowreject" in the Radius probe configuration. When allowreject=true, > rejected RADIUS authentications are treated as OK. This means I can test > the RTT of a RADIUS request without using a valid account. As long as the > RADIUS secret is correct, the timings should be reasonable. The default is > "false". commit d27bd1a9015c9c1e9fe2d862d136e96e8a80f706 Author: Tobi Oetiker Date: Fri Jan 30 17:21:52 2009 +0000 fix for static implementation commit d3a10222b0262b103d1fc6ad855a81017f4943a2 Author: Tobi Oetiker Date: Tue Jan 27 15:13:49 2009 +0000 no filter gets us all commit 8380a62bdbecb16f6623afff21059e914d09364b Author: Tobi Oetiker Date: Tue Jan 27 14:25:08 2009 +0000 we want pattern to be called filter ... really ! commit 76b82782a9ecf7c4066399703c4f7e1a9fe975b3 Author: Tobi Oetiker Date: Sun Jan 25 15:38:30 2009 +0000 added updates accorrding to arnas suggestions commit 4e6be34511159935b2f2f833961265743c3a827a Author: Tobi Oetiker Date: Fri Jan 23 13:37:16 2009 +0000 disable __DIE__ inside eval commit 111f2f3d4f584eed8ecbf902d4770dceaab2390c Author: Tobi Oetiker Date: Wed Jan 21 06:51:14 2009 +0000 fix broken error message in spdomed commit bd1904210d02ff63b4c6ccc8775e901d6663e49c Author: Tobi Oetiker Date: Thu Jan 15 10:28:10 2009 +0000 * make it work with missing rrd files * make it work correctly for nomasterpoll option commit 428b580ac543bef7c96899dd1e30ffae46a6ea3e Author: Tobi Oetiker Date: Mon Jan 5 17:28:52 2009 +0000 added some examples commit efdba627ad20b396b7c9ce080200ee62bd066f84 Author: Tobi Oetiker Date: Mon Jan 5 17:25:57 2009 +0000 initial checkin commit 64ad4077fc99a8476a27ad61c243db1077300286 Author: Tobi Oetiker Date: Mon Jan 5 07:52:50 2009 +0000 minor qooxdoo updates commit 2a08e0d8ca5f3e2f64ca2771e20764a953515d2f Author: Tobi Oetiker Date: Mon Dec 22 12:55:28 2008 +0000 minor fixes commit 9389d56b0f20bd7e35d0f181259fc6906e258e7c Author: Tobi Oetiker Date: Mon Dec 15 18:35:51 2008 +0000 ExpLoss.pm matcher produces an exponential weighted average and supports RMON-like thresholds to obtain stable node status detection. -- Veniamin Konoplev. commit f9d6f26cbf330d3c951a8801f963e685f64cc39c Author: Tobi Oetiker Date: Mon Nov 17 08:56:24 2008 +0000 added initial 0.8 port ... not quite working yet commit d8b465e26599268b8eded0732e8f29062556997e Author: Tobi Oetiker Date: Thu Nov 6 14:40:55 2008 +0000 initial commit commit 996d9e92e597bc462d874b335865ff7844e2d332 Author: Tobi Oetiker Date: Tue Nov 4 10:14:06 2008 +0000 added 0.8 port commit 2bb54a7dd3145c431b0e63cfd83df37f9a4b40d4 Author: Tobi Oetiker Date: Mon Nov 3 12:22:05 2008 +0000 fixed normans address commit 50f3fd2f1cc7312ef548c3682f9af978b18e1dcd Author: Tobi Oetiker Date: Sun Sep 14 20:49:09 2008 +0000 make this work even when ipv6 addresses are around -- Olaf Jaehrling commit 68d0715bf459cba1e94cdb8644d6f44036fe5694 Author: Tobi Oetiker Date: Tue Sep 9 05:30:26 2008 +0000 updated snmp session to 1.12 commit 09a4089d927f4c63fdab1b8bded2a73ac398d412 Author: Tobi Oetiker Date: Sat Aug 30 13:09:37 2008 +0000 properly fix the handling of multiple writes to the cache file commit ae5a24062aec7a5eeb2e984989dc3a9ba84e5560 Author: Tobi Oetiker Date: Sat Aug 30 09:46:28 2008 +0000 track smokeping changes commit a05629a54acff49c918859b01d6a4bf177af9051 Author: Tobi Oetiker Date: Sat Aug 30 09:38:41 2008 +0000 seek to start of the file prior to storing commit 3e3de0ed8ad6b87df4b2409373ebb6708e55f9c3 Author: Tobi Oetiker Date: Sat Aug 30 08:56:38 2008 +0000 order updates to slavecash to minimize writing commit aa0e0cf4c72d609899932e85d33e983dc0b25792 Author: Tobi Oetiker Date: Wed Aug 27 17:16:23 2008 +0000 fixed numbering commit 388f957a3615c5b52ebf52e16462bf693700a0b7 Author: Tobi Oetiker Date: Wed Aug 27 16:41:01 2008 +0000 fixed install instructions commit a325ac6b477255914f016da340e1bfe1ae833fd0 Author: Tobi Oetiker Date: Thu Aug 21 20:38:12 2008 +0000 fix speedy settings commit 69b86b80304329c14b225613609847922f34ebd7 Author: Tobi Oetiker Date: Thu Aug 21 20:37:59 2008 +0000 be a bit smarter about handling updates comming in from a client by doing all updates to a name in a single round. commit f160d040a25f4bc6c33787326b581a49c2e38cce Author: Tobi Oetiker Date: Wed Aug 13 20:13:37 2008 +0000 In cgi mode, do NOT reload the cfg file since this can cause a storm on the webserver. Die instead AFTER working through the current request. commit 31ee5f8285215545e9de4c5cc0ea169832b5390e Author: Tobi Oetiker Date: Fri Jul 25 05:56:46 2008 +0000 autoreap zombies commit cad5654594f4ff6865795809376d19e15272cd5b Author: Tobi Oetiker Date: Thu Jul 24 18:24:37 2008 +0000 prepare for the release of smokeping-2.4.2 commit 8c3005527f64d656e4d9321116fd893525a150da Author: Tobi Oetiker Date: Thu Jul 24 17:37:05 2008 +0000 prepare for the release of smokeping-2.4.2 commit 6f4833870c8de9fbcc0fa96f87c783fa9e280b5e Author: Tobi Oetiker Date: Thu Jul 24 17:36:57 2008 +0000 * added strict and warnings to the cgi and the daemon wrappers ... * fixed regression introduced while fixing taint issues commit 11299344ee659123b8fe18794da4e7a7b24c6e5c Author: Tobi Oetiker Date: Mon Jun 30 20:55:50 2008 +0000 improved documentation for master/slave fixed taint error in Smokeping.pm commit fae328cd534c1f700cdf8576cd370f68d62d585a Author: Tobi Oetiker Date: Sun Jun 29 15:09:46 2008 +0000 do some more checking on the slave name we get from the cgi commit f28283f29111269f6de963411f80748692186153 Author: Tobi Oetiker Date: Wed Jun 18 13:52:42 2008 +0000 stop loading sys_wait_h in Tr.cgi commit 184fb3f6fc4f71cef2a417d117f2fc0c1c4d979a Author: Tobi Oetiker Date: Fri Jun 13 22:01:24 2008 +0000 prepare for the release of smokeping-2.4.1 commit 7106bff788bb0193045c9eef4fba8dd6d675abf4 Author: Tobi Oetiker Date: Fri Jun 13 21:55:35 2008 +0000 prepare for the release of smokeping-2.4.1 commit c004881d0261bbe21d1fed756f08f8f00aadf00d Author: Tobi Oetiker Date: Fri Jun 13 21:54:05 2008 +0000 initial commit f658d2b70e0f2b1a89fbef367ad3f06e50d3f4e2 Author: Tobi Oetiker Date: Fri Jun 13 21:44:56 2008 +0000 explain about the purpose of this tree commit ee4a5b6562a3bc371459a701afc99e5d9c7d8ef0 Author: Tobi Oetiker Date: Fri Jun 13 21:42:34 2008 +0000 added footer commit 4ac6bf769b09ba7bd39778297f0e9699ee263256 Author: Tobi Oetiker Date: Fri Jun 13 21:34:28 2008 +0000 prepare for the release of smokeping-2.4.1 commit 64d0fc90d7df5a188a5ce9ed9cd562f76d7b139f Author: Tobi Oetiker Date: Fri Jun 13 18:43:25 2008 +0000 prepare for the release of smokeping-2.4.1 commit bd16c367fc755f976fa9c0febca9ede065b61f2f Author: Tobi Oetiker Date: Fri Jun 13 12:38:07 2008 +0000 fixed messages commit 84a43df0c40d9e384c99f58ebec6751f26184f69 Author: Tobi Oetiker Date: Fri Jun 13 12:01:50 2008 +0000 fixed version string creation in javascript output commit a5e329fddd18ad7ed43edbcd37f0979a189c6979 Author: Tobi Oetiker Date: Tue Jun 10 16:12:25 2008 +0000 fix install instructions commit 9dd3d5370282a4ef62977d33ebb7ecda4efe7a91 Author: Tobi Oetiker Date: Tue Jun 10 15:31:53 2008 +0000 prepare for the release of smokeping-2.4.0 commit 32d5832640525150ef005ec7dc755507051291cd Author: Tobi Oetiker Date: Tue Jun 10 15:23:29 2008 +0000 prepare for the release of smokeping-2.4.0 commit c3fad903ed660295184a59c627726c6eb52bf497 Author: Tobi Oetiker Date: Tue Jun 10 13:37:37 2008 +0000 prepare for the release of smokeping-2.4.0 commit 67081a4ef640897e45ec459162b4911b9270d68a Author: Tobi Oetiker Date: Tue Jun 10 13:29:06 2008 +0000 prepare for the release of smokeping-2.4.0 commit 437c288690b3a0db6957edf06e5b4f5e7eb07e72 Author: Tobi Oetiker Date: Tue Jun 10 13:20:41 2008 +0000 prepare for the release of smokeping-2.4.0 commit 3e3229ba507fed2d6b2a48a4cb999a73e35ee433 Author: Tobi Oetiker Date: Tue Jun 10 13:17:45 2008 +0000 prepare for the release of smokeping-2.4.0 commit b35df772b8bf6a12fba237557c65e5be9740cd14 Author: Tobi Oetiker Date: Tue Jun 10 13:16:13 2008 +0000 prepare for the release of smokeping-2.4.0 commit 424e08410b2cdbf963c07cca0834ba66a541b703 Author: Tobi Oetiker Date: Tue Jun 10 13:08:07 2008 +0000 prepare for the release of smokeping-2.4.0 commit 8d5f45365467584b313528c60c6f3a902e02c1a4 Author: Tobi Oetiker Date: Tue Jun 10 13:01:02 2008 +0000 removed another debug print commit 761d11b28863424cc69f853dce7db9dbadfadba9 Author: Tobi Oetiker Date: Tue Jun 10 06:33:56 2008 +0000 updated translation commit d946daa0b527161ca5334d907e6db3055c549781 Author: Tobi Oetiker Date: Tue Jun 10 06:29:53 2008 +0000 we call it smoke trace now commit 0ac7fb08ce9b39e0ff02435bb413720050021569 Author: Tobi Oetiker Date: Mon Jun 9 21:57:38 2008 +0000 let the server only return if he has something to say. commit 129d59bc63a690e750a0e4f55ee8389495e2882a Author: Tobi Oetiker Date: Mon Jun 9 05:20:13 2008 +0000 added dummy script_name methode commit 156fc3d2ef35ff525d13ee3d693728596a62ab82 Author: Tobi Oetiker Date: Sun Jun 8 22:22:03 2008 +0000 fix the name and reduce the spacing commit 45f079de478517c0e4d3dd47d0c5566a000a1db0 Author: Tobi Oetiker Date: Sun Jun 8 22:21:01 2008 +0000 added notes on smoketrace install commit 79bd2e62e2ba21294f40b9814661dbfe2ee9e2ee Author: Tobi Oetiker Date: Sun Jun 8 22:14:29 2008 +0000 added smokeping traceroute doc commit 30e99f32be378fd13ceb9d70b905b9b53f92d919 Author: Tobi Oetiker Date: Sun Jun 8 21:49:42 2008 +0000 added blazemode to fping probe commit 55a86f815d5f60e4d734be4f67d7968eb1a67281 Author: Tobi Oetiker Date: Sun Jun 8 21:41:37 2008 +0000 fixed telnetJunOSPing commit 400065442d62705a6cebcf6f5c5aa53a3bccf34f Author: Tobi Oetiker Date: Sun Jun 8 21:37:10 2008 +0000 fixed regression from r680 which broken old fping detection commit 9a6c0d09fb7ac906607f5fd2f4ec18d126ee5b72 Author: Tobi Oetiker Date: Thu Jun 5 16:17:11 2008 +0000 sleep properly inbetween checks commit f7c8c95ddc80c3b26f0d7978b776e02bc950a9fa Author: Tobi Oetiker Date: Thu Jun 5 15:36:43 2008 +0000 improved handling of non responsive hosts routes flapping hosts with multiple ip addresses commit 6650ea2659e4817aedfe5e634afebfe487e83175 Author: Tobi Oetiker Date: Thu Jun 5 07:29:51 2008 +0000 tr must quit after run commit c5d21994f26ffee7ebd80fc226220152d3d48ce5 Author: Tobi Oetiker Date: Thu Jun 5 07:13:36 2008 +0000 use menuclass and not just class for menuextra {CLASS} commit 3fabc095b23f030883bbfc613b7ae423c71a3054 Author: Tobi Oetiker Date: Thu Jun 5 07:10:36 2008 +0000 disable sleep code for now commit cfccce8a1c63ecf5b3233259d012f9ac8a426550 Author: Tobi Oetiker Date: Thu Jun 5 07:04:16 2008 +0000 added missing } commit fc9d545ce142680a5fb1fedfd0286c0acd0e1ebe Author: Tobi Oetiker Date: Thu Jun 5 06:56:06 2008 +0000 add the hash to the hostname commit 5c8d6da392323b37fd85a398b2a493034635c65e Author: Tobi Oetiker Date: Thu Jun 5 06:43:21 2008 +0000 let the webif sleep between runs (cut the comets tail) replace {CLASS} too commit a26e2b5d5d5634e4653c7081dd3dd5a94fdcbb8f Author: Tobi Oetiker Date: Wed Jun 4 23:43:32 2008 +0000 working version commit fd6ba4e8d6e87f1c7c43527ecf9ad4c06893551e Author: Tobi Oetiker Date: Wed Jun 4 23:20:58 2008 +0000 more nameing fixes commit 967063d2a1aa032eecede67b4f1d891bd1964a15 Author: Tobi Oetiker Date: Wed Jun 4 23:00:32 2008 +0000 working version commit 18ad1210282362b6ab636ccbd58a86bbf210ac19 Author: Tobi Oetiker Date: Wed Jun 4 21:35:35 2008 +0000 rename Mtr service to Tr service as well commit 983c2446c51db710e482bdbfd86e0a94723f76d8 Author: Tobi Oetiker Date: Wed Jun 4 21:35:07 2008 +0000 rename Mtr service to Tr service as well commit 8364e6bbedf919008da50cc1b54dbb8a49dee88d Author: Tobi Oetiker Date: Wed Jun 4 21:33:02 2008 +0000 alter name to Tr since we do not use mtr anmore commit 4940f51d54f1f4b994c02138defbcd8ff36a95ec Author: Tobi Oetiker Date: Wed Jun 4 21:08:59 2008 +0000 converted everything to traceroute propper ... much better commit 1ede2f2620e6d40f0cadc2b196324e9de9bcd1ce Author: Tobi Oetiker Date: Tue Jun 3 22:46:38 2008 +0000 prepping for traceroute switch commit 9c59d668c6d0611f1ea611ca0e9ea5a5954eaa20 Author: Tobi Oetiker Date: Tue Jun 3 13:16:17 2008 +0000 fixed extrahost integration commit 39eded37581cfe09d85d1225355fd1e22264cbf3 Author: Tobi Oetiker Date: Mon Jun 2 20:52:26 2008 +0000 mtr integration commit 45e158a30e69573f044605e74d65c9f283d89569 Author: Tobi Oetiker Date: Mon Jun 2 20:03:45 2008 +0000 mtr integration commit 8793d83042d5cf388a30ee5f8637fa6554334aa6 Author: Tobi Oetiker Date: Mon Jun 2 20:03:33 2008 +0000 initial support for mrt integration commit 6b239270a134ef8f26d59a7ab9b35eeeeceb9c47 Author: Tobi Oetiker Date: Sun May 18 13:30:34 2008 +0000 fixed rawlog name commit bfa39ae5e98f3d18f43b95a80a0d4315c795e0db Author: Tobi Oetiker Date: Mon May 12 23:35:12 2008 +0000 make sure target sections have no dots commit c9b5c598e4f74e00713a11c2ca47c6226c965821 Author: Tobi Oetiker Date: Sat Apr 26 13:02:18 2008 +0000 prepare for the release of smokeping-2.3.6 commit b1b170a129e0a7ff1fdbca3d0f2138d8d6291acb Author: Tobi Oetiker Date: Sat Apr 26 13:00:16 2008 +0000 set hovercolor to balck commit ad4960d32b3d5bc6d8ee58dc5cb0f6553a36f21d Author: Tobi Oetiker Date: Sat Apr 26 12:56:56 2008 +0000 integrated menuactive patch commit e1aa9c368e3ad73b576d4410ffc937d1d03c50f1 Author: Niko Tyni Date: Fri Apr 25 18:34:31 2008 +0000 honour the 'linkstyle' variable when zooming commit e942ada8af8b54bb34b9a5a3a7ab34e7ae7ca347 Author: Tobi Oetiker Date: Wed Apr 16 21:20:48 2008 +0000 complain properly when the secrets file can not be read commit 4654618b5ca4b8c6b3bfb4d508eb1da8c47eddec Author: Tobi Oetiker Date: Thu Apr 3 14:37:35 2008 +0000 display all the smoke even when the graph is limited in height commit d6ea346a961f7579627bb789f875219ae10c8592 Author: Niko Tyni Date: Sat Mar 29 19:00:06 2008 +0000 bah, missed one commit d3f95bc4662de8aed1fe8a22cfc6bdddbd31be71 Author: Niko Tyni Date: Sat Mar 29 18:54:21 2008 +0000 add a target to recreate the docdirs just in case a "git clean -d -f" removed them... commit be80594b5a59c846d5fa601f2b9144d39f03b60c Author: Tobi Oetiker Date: Sat Mar 29 07:47:19 2008 +0000 prepare for the release of smokeping-2.3.5 commit 631517a8504550d44c6b7de348ebcddf0486c8b2 Author: Niko Tyni Date: Fri Mar 28 22:58:55 2008 +0000 * make slaves kill their old children off before forking new ones when the configuration changes. Reported by David Behr. --niko commit b65e64cb134d2c44ed85dbcbd755f3fba0e1cf4e Author: Tobi Oetiker Date: Fri Mar 28 00:13:51 2008 +0000 prepare for the release of smokeping-2.3.4 commit e3fc044125095d397693cc4f34105beb5423bdc6 Author: Niko Tyni Date: Thu Mar 27 21:01:28 2008 +0000 another typo fix commit 8dac72c2ba0a24a27886c7f4544cf01f7efd14d8 Author: Niko Tyni Date: Thu Mar 27 20:54:09 2008 +0000 properly initialize the target count commit 01c57c9c97359fd531896c10baff94c2010dd609 Author: Niko Tyni Date: Thu Mar 27 20:51:23 2008 +0000 fix a typo commit cd27423857677170b3a8d8305115e81495b1b094 Author: Niko Tyni Date: Thu Mar 27 06:05:37 2008 +0000 * fix 'loss_background' documentation. Reported by David Tomic. --niko commit 4a2ee52a92ce7a2f4f62ff039bddeaaa7080309c Author: Tobi Oetiker Date: Wed Mar 19 21:40:22 2008 +0000 added nikos fixes for nomasterpoll commit b6edbe8a83658ca1b35e502e6353e9b3d3762073 Author: Niko Tyni Date: Wed Mar 19 18:22:55 2008 +0000 undo the previous change: it is arguably cleaner to send+expect the protocol number only with signed data commit 53c31b5e314f2717f730969974cd6ef36d9fe76c Author: Niko Tyni Date: Wed Mar 19 15:29:04 2008 +0000 send the protocol number with OK too, the slave is expecting it commit bac48a06638f1e8dfdc23980c3cea2fa30ae16e8 Author: Niko Tyni Date: Wed Mar 19 12:57:03 2008 +0000 revisit the locking error paths a bit commit 2944cb07be67d87e1a93ca6abf058dd6ce23d276 Author: Niko Tyni Date: Wed Mar 19 12:36:25 2008 +0000 unrevert the locking change, LOCK_SH should work commit 3ed78f950e7bf1c1af00ab497fbf8da1959848e2 Author: Tobi Oetiker Date: Tue Mar 18 22:55:01 2008 +0000 fixed spelling of protocol commit 43e65375aa5d23b7cbee07996a5e10c2b95b0ffd Author: Tobi Oetiker Date: Tue Mar 18 22:54:03 2008 +0000 added protocol level checks and upgrade notes commit e06a42e7920eb3ad2cafc62b5db21746126ce37c Author: Tobi Oetiker Date: Tue Mar 18 22:21:33 2008 +0000 fix order for non ordered entries commit 877ac7fb8e93efcf0d7b547168749984bd4aa99d Author: Niko Tyni Date: Tue Mar 18 16:25:29 2008 +0000 bail out if the master/slave shared secret file is world-readable or writable commit c11e056ea3338b001a78f37a257db6fe3554b0d9 Author: Niko Tyni Date: Tue Mar 18 16:20:35 2008 +0000 fix a syntax error commit 8227b83b7337c57d9c8a5820792626ab5c196426 Author: Niko Tyni Date: Tue Mar 18 16:12:13 2008 +0000 add some security notes to the master/slave documentation --niko commit ce9013c52ea8299c608d9cdf3f3697454057a5d4 Author: Niko Tyni Date: Tue Mar 18 12:26:12 2008 +0000 add Digest-HMAC license information commit a002bbdae7018d7c23f857780074ef00e3e6f31e Author: Tobi Oetiker Date: Tue Mar 18 08:10:40 2008 +0000 switch to HMAC digest to avert extension attack commit efe9d8dafd6a8bc5845eae3b4dbc172ad68aa187 Author: Niko Tyni Date: Tue Mar 18 06:46:15 2008 +0000 revert the locking change in r951 for portability reasons commit 6b3f4223b367af243c978815ac46cb344a2a0777 Author: Tobi Oetiker Date: Mon Mar 17 23:19:26 2008 +0000 added changelog entry for sortercache load fileter commit fdf500019c8c0a7a589c54f78ff0b9a293790e84 Author: Tobi Oetiker Date: Mon Mar 17 23:18:05 2008 +0000 just to be on the save side, make sure when loading the sortercache that we only load info about graphs presently in the config. --tobi commit 340239dd0fdf7e8a63ebaae809e548df3cda105b Author: Niko Tyni Date: Mon Mar 17 19:56:48 2008 +0000 * optionally precreate the directory structure under 'dyndir' if 'precreateperms' is set --niko commit 2fc87dbdce71a29396ad0236edc044f27596bdc0 Author: Niko Tyni Date: Mon Mar 17 19:55:33 2008 +0000 * store the slave updates in dyndir, defaulting to datadir --niko commit 1d4de6409ce490f5b33b2187372de7ea9c9ed307 Author: Niko Tyni Date: Mon Mar 17 19:53:09 2008 +0000 * change the slave update locking code so that reading works without write access to the temporary storage file --niko commit 3236c4eea1ba9de7e1dc0d2cdf232d6c9c9c728f Author: Tobi Oetiker Date: Fri Mar 14 16:19:39 2008 +0000 added rsa1 patch commit 6735939fcebafa14b2ce6918f086ca0da3c898c3 Author: Tobi Oetiker Date: Thu Mar 13 14:50:50 2008 +0000 make ajax zooming take time ranges 'time range' fields into consideration commit 3c5735fa2eda3ddc65e639a73a0956bfb7af608d Author: Tobi Oetiker Date: Thu Mar 13 14:09:38 2008 +0000 switch range form to POST commit bc3c6e5b5c482a2003772d9e4bf5c2a878c5fcae Author: Tobi Oetiker Date: Mon Mar 10 10:55:20 2008 +0000 prepare for the release of smokeping-2.3.3 commit 73fb8150992d02888d083581e86b83002e0050c8 Author: Tobi Oetiker Date: Thu Mar 6 06:21:12 2008 +0000 fix retrun value processing (regression from last patch) commit 6c15f78cac4a0b94907352c4184d6d7d5ca87164 Author: Tobi Oetiker Date: Wed Mar 5 23:13:24 2008 +0000 longer timeout for slaves and separate cache files per slave for improved scaling -- Phillip Moore commit 31e4fcaa45fb5dca6018a1ef70b71bdfbbac4965 Author: Niko Tyni Date: Tue Mar 4 21:57:30 2008 +0000 * add an optional --pid-dir option to specify the pid directory when running as a slave. --niko commit 06144c93db3c0cc7bc5434740a76b9eac6c23ee4 Author: Tobi Oetiker Date: Mon Feb 25 23:29:31 2008 +0000 added log entry for nomasterpoll fix commit b3e2473cc1a5d1dcf84632758741f6e4f7933c55 Author: Tobi Oetiker Date: Mon Feb 25 23:29:14 2008 +0000 cosmetic fix .. commit 30f47a24f4ee7cd5f825ae9e14891920a6cd8bca Author: Tobi Oetiker Date: Mon Feb 25 23:18:52 2008 +0000 slaves must poll even with nomasterpoll commit 296d9bf573e5981407c85d35bc9e339d777321cb Author: Tobi Oetiker Date: Mon Feb 25 10:24:40 2008 +0000 prepare for the release of smokeping-2.3.2 commit 0ec3c991d771c0856a39f60824849f58680987c0 Author: Tobi Oetiker Date: Mon Feb 25 10:23:24 2008 +0000 make navigator work for nomaster poll commit bc22f15ad9322086da631f7bb0854c2a0d2e5424 Author: Tobi Oetiker Date: Mon Feb 25 10:08:02 2008 +0000 do not use key '' for the default hierarchy commit 4ddd6688d16443d84aabd6ce5d0d540f71b9b4b5 Author: Tobi Oetiker Date: Mon Feb 25 09:53:02 2008 +0000 nomasterpoll does not get a default value automatically ... so lets check for nothing as well commit 0c1233317fb699e800d109160a11ff79b3d07dfc Author: Tobi Oetiker Date: Fri Feb 22 17:15:01 2008 +0000 fixed ordering overview vs menu commit 3e576f158fc4a0dda23a872d9ef8d69dfad7c8e2 Author: Tobi Oetiker Date: Fri Feb 22 06:55:36 2008 +0000 fixed section title spelling commit d181a809046d4f59be93e447b33ccf71e5edaf8f Author: Tobi Oetiker Date: Sun Feb 17 10:29:13 2008 +0000 prepare for the release of smokeping-2.3.1 commit b9e4dcf06ed56ddbb0ee0f6a040142e21ab2f4a9 Author: Tobi Oetiker Date: Thu Feb 14 12:36:33 2008 +0000 added nomasterpoll note commit 0db9048eb16ac58d9298fea62830a0ac1c4a4ce8 Author: Tobi Oetiker Date: Thu Feb 14 12:35:55 2008 +0000 ignore master for alerts if nomasterpoll is set commit c3e144bdb68b7dbee7b1b6249453a1c61dc18497 Author: Tobi Oetiker Date: Tue Feb 12 10:04:06 2008 +0000 mkae errors with missing hide values go away commit b9828ab2e237efd59e662b4305e866a33519a9a4 Author: Tobi Oetiker Date: Mon Feb 4 17:00:46 2008 +0000 fixed html syntax issues fixed spelling of standard deviation commit 74783005860524bbdf1be4fe0ec2924e650c1652 Author: Tobi Oetiker Date: Wed Jan 30 17:02:27 2008 +0000 updated ... working commit 0e6c3c629a18c9989e4cd8b9d3cd2f7cf7da4aef Author: Tobi Oetiker Date: Wed Jan 23 21:11:11 2008 +0000 added 2.3.0 notes commit 90bcb19f4df9fa7c022a30b346d7c7f56c9c669f Author: Tobi Oetiker Date: Wed Jan 23 16:50:54 2008 +0000 prepare for the release of smokeping-2.3.0 commit 69390f906f4ea56781db63a68ddb416e8d42009b Author: Tobi Oetiker Date: Wed Jan 23 16:26:07 2008 +0000 prepare for the release of smokeping-2.3.0 commit 8f75cc658717b4409d2eb3c37f6704c7f9d84e59 Author: Tobi Oetiker Date: Wed Jan 23 15:07:05 2008 +0000 prepare for the release of smokeping-2.3.0 commit d7ef1c5cc614185fe2e9dd83442edb824620335c Author: Tobi Oetiker Date: Wed Jan 23 15:06:23 2008 +0000 prepare for the release of smokeping-2.3.0 commit d39831a3c4296fe4f56bf9b7e48bb443ad9239fc Author: Tobi Oetiker Date: Wed Jan 23 15:05:19 2008 +0000 allow empty slaves list to remove inherited slave list commit 95a4c5498b09ed883af512142c860c57bc65d0c0 Author: Tobi Oetiker Date: Wed Jan 23 13:08:20 2008 +0000 added tcpping probe commit 3809f4928c67b774515d0cbd6dfcbb0587ec4dd1 Author: Tobi Oetiker Date: Wed Jan 23 12:56:35 2008 +0000 added new hide and noserverpoll properties to target configuration commit aeb75494086a98101cdf22ba3dc6767cb03939a5 Author: Tobi Oetiker Date: Tue Jan 22 15:46:41 2008 +0000 ignore case when searching commit 044a430a2c453780113aec59e37ee5160d777b0a Author: Tobi Oetiker Date: Tue Jan 22 15:06:16 2008 +0000 interated filter function to interface commit 1c86305fb4234cf4e8d81c461dc515ef1db6ec06 Author: Tobi Oetiker Date: Tue Jan 22 06:47:05 2008 +0000 fix hierarchy property problem introduced in previouse patch commit 88c73fdb0c653f6366a06c21aa9c055245b8641a Author: Tobi Oetiker Date: Mon Jan 21 22:18:48 2008 +0000 added alternate presentation hierarchies. Configure via Presentation->hierarchies and Targets ... -> parents -- tobi commit f0d944ab93f7603843ba3a8ec825261d339c7eef Author: Tobi Oetiker Date: Mon Jan 21 14:02:04 2008 +0000 add support for alternate hierarchies commit f0f6e11c69efa0d8703557a19c14c15d3ed34c9b Author: Tobi Oetiker Date: Sat Dec 22 23:47:37 2007 +0000 not change on javascript commit 4f4795e90f9b6e6029c31ee01ed325016161d6e8 Author: Tobi Oetiker Date: Sat Dec 22 23:41:41 2007 +0000 test if zoom is here commit 17a23d3e899c888d28d85c1884cb6cd2f8e1120c Author: Tobi Oetiker Date: Fri Dec 21 10:48:54 2007 +0000 missing my added commit 8722b99cc4b3a4f264c757f22c10c485e1ee0dc4 Author: Tobi Oetiker Date: Fri Dec 21 10:48:04 2007 +0000 fixed sample configs commit 441d1fe53008898441eddc9289b2e0148bf351d1 Author: Tobi Oetiker Date: Thu Dec 20 23:25:04 2007 +0000 make this work even when no initial file is here commit 0898e91fb2a96607fe3919fc2330092a6c63a367 Author: Tobi Oetiker Date: Thu Dec 20 20:41:42 2007 +0000 remove check for timeredirects since this does not work without manual commit e5090ee1fc507ac3ad5943b7d323b198bd4710d0 Author: Tobi Oetiker Date: Thu Dec 20 20:40:06 2007 +0000 use --help instead of --manual since manual is not compiled everywere commit 7091adae1bc9aac0e8b363d320e3efdcfd84e71f Author: Tobi Oetiker Date: Thu Dec 20 20:28:08 2007 +0000 portability fix for %.1f commit 68ea224e043c83de1d185cb6fa329997a34ec74d Author: Tobi Oetiker Date: Thu Dec 13 20:46:27 2007 +0000 working towards fixing the master config commit 1f7c876a44f4bcb28affa098c283979b2bc08f32 Author: Tobi Oetiker Date: Thu Dec 13 20:43:15 2007 +0000 use different syntax to open and lock client cache commit 41a1b1a239810f5d06e286331f8a7dd607224cfe Author: Niko Tyni Date: Thu Dec 13 11:50:06 2007 +0000 clean the last remains of echoping live test code commit f3e27df9021d2ba92b54cb9e8a82c66336a477e8 Author: Niko Tyni Date: Thu Dec 13 11:48:09 2007 +0000 EchoPingHttp: add the 'accept_redirects' option commit 7362792c380114c774fd01120c978360e81360d3 Author: Tobi Oetiker Date: Sun Dec 9 22:24:30 2007 +0000 initial commit 05eb797de4c547890e373587d768b88335d37c44 Author: Tobi Oetiker Date: Thu Dec 6 20:37:37 2007 +0000 added note commit a4496fa65282fd3e618e15bc7619beb59b1783a1 Author: Tobi Oetiker Date: Wed Dec 5 21:33:55 2007 +0000 update the locking code. Try updating the file multiple times if lockig fails the first time round ... also open the file with +< for reading, since solaris will not grant us a writelock unless we are opening the file read/write. commit daeb391ff2c9e47f656a8089b326625d43ffc5a3 Author: Tobi Oetiker Date: Mon Dec 3 23:38:23 2007 +0000 removed excess ) commit 9edc0ff6eaa82d51970299a76106952e9bc4ac2a Author: Tobi Oetiker Date: Mon Dec 3 23:36:50 2007 +0000 trying to make slave reload realy work commit c81ee6051263e7039bff5125b6732905ba6a5ba3 Author: Niko Tyni Date: Sat Dec 1 13:56:18 2007 +0000 remove a leftover 'use HTTP::Request' from Smokeping::Master -- niko commit d00f1075a67fbf2be46e6114848eec5cefbf6684 Author: Niko Tyni Date: Sat Dec 1 13:55:09 2007 +0000 document the LWP dependency of the Smokeping::Slave module -- niko commit 2c5ebb1437447dbc653881dbf1269784517b9b4e Author: Tobi Oetiker Date: Sat Dec 1 11:44:38 2007 +0000 document what I changed in the change log commit 1eeea07d34fec85eb09fbc5504b588f7ee9bfcd4 Author: Tobi Oetiker Date: Sat Dec 1 11:31:33 2007 +0000 fix restart behaviour of slaves commit 610bab43a1ddd085a1c272c5cf6aaf4a85ed8fee Author: Tobi Oetiker Date: Wed Nov 21 23:41:39 2007 +0000 introduction of Shadow graph causes step back ... commit 6dbc90c295cb0fbf895ac259dabf9dfa22cbe803 Author: Tobi Oetiker Date: Wed Nov 21 19:14:50 2007 +0000 jres2007 work commit 97e7c02aa1ba779325072cdb8dba96f3454de584 Author: Tobi Oetiker Date: Tue Nov 20 07:36:56 2007 +0000 latest updates commit 3d2d01044276848e16d61550e090d1e5001be7de Author: Tobi Oetiker Date: Sun Nov 18 22:16:29 2007 +0000 removed useless debug messages commit 7b131fd1e445b836af83a4dbeb79dd91be06bbdb Author: Tobi Oetiker Date: Sun Nov 18 22:10:09 2007 +0000 added some more documentation commit 2f05acc547db3624a75e37522ba5dabe394dae11 Author: Tobi Oetiker Date: Sun Nov 18 22:06:48 2007 +0000 added flipping zoom mode commit c075aed46ee0dceb6bf3a3569da67daf0a50bdde Author: Tobi Oetiker Date: Sun Nov 18 15:04:33 2007 +0000 working version ... schluss fuer den moment commit 7bc9f4e73f3893735b96e48bb2664f7c2b5b0a68 Author: Tobi Oetiker Date: Sun Nov 18 12:40:41 2007 +0000 added grapher to distro commit d0b4894f58ca17de2b434d37ce4c070cf4cd7515 Author: Tobi Oetiker Date: Sun Nov 18 12:39:21 2007 +0000 added grapher commit 823d40c77053c8fb30359de896d7e30b85de2a3a Author: Tobi Oetiker Date: Sun Nov 18 12:04:33 2007 +0000 more updates commit 688bea6958d0f12613fab7bfefe5f94e831ce05f Author: Tobi Oetiker Date: Sat Nov 17 16:36:30 2007 +0000 new classes commit 1620cd2abeb29cd7cd24e1258f6398053a4234f7 Author: Tobi Oetiker Date: Sat Nov 17 16:35:53 2007 +0000 script is generated this does not belong here commit 11d3b5e19d271f50ecea15d68dc51828e7b24f49 Author: Tobi Oetiker Date: Sat Nov 17 16:35:20 2007 +0000 ui cleaned up commit 6d0c470a6bbc643438243d1aecd0415a0b793373 Author: Tobi Oetiker Date: Sat Nov 17 03:13:07 2007 +0000 added windows commit c8daf4f31084534e58dd90ccdfa88ba2285ec324 Author: Tobi Oetiker Date: Fri Nov 16 21:34:40 2007 +0000 added more sample data commit 5d13d53762933c306e595079efd1f69b1807fb1a Author: Tobi Oetiker Date: Fri Nov 16 20:05:00 2007 +0000 working version commit c34f404e3fe41e7ca3890fa66a8b4625ee3269ac Author: Tobi Oetiker Date: Thu Nov 15 06:22:46 2007 +0000 added a missing file commit 77709fd6296cf90f93dd62ad3fc2b7b0303f7884 Author: Tobi Oetiker Date: Thu Nov 15 06:22:21 2007 +0000 more woring cooxdoo code commit 1470bd43a79a679132d6523e92e99f81e2892119 Author: Tobi Oetiker Date: Wed Nov 14 17:33:46 2007 +0000 updated message file commit ff7b9de82908baf1d5f9af71e35dad2369bfdc2f Author: Tobi Oetiker Date: Wed Nov 14 17:33:19 2007 +0000 initial qooxdoo drop for smokeping commit d546419d19b89633f8ac3c461eb900f4c4f29b90 Author: Tobi Oetiker Date: Tue Nov 6 07:41:28 2007 +0000 make sure tsmoke sends mime conformant mails commit 2fe8ba68414b66a7f68f4876916ba3a98648858d Author: Tobi Oetiker Date: Mon Nov 5 21:59:38 2007 +0000 prepare for the release of smokeping-2.2.7 commit 65ae52a910578163e0b5e821fb75fc3cf5d28528 Author: Tobi Oetiker Date: Mon Nov 5 07:02:39 2007 +0000 make tsmoke work with multihost targets commit 485377cf03560635c8590f5f053752b805e5f2fa Author: Tobi Oetiker Date: Sat Nov 3 01:06:27 2007 +0000 fixed slave check commit 35490069d03df22ec290f707eba31d7b26e8517d Author: Tobi Oetiker Date: Fri Nov 2 22:04:36 2007 +0000 added slaves consistancy test commit fbcdaf2188f3dfa5d74beade8ab3e8d7390402e9 Author: Tobi Oetiker Date: Fri Nov 2 21:49:51 2007 +0000 don't reload the pages more frequently than every 2 minutes commit ec431db3b0948bb8f4400d611325ce0b0495a3ad Author: Tobi Oetiker Date: Sun Oct 28 23:23:17 2007 +0000 make sure we got the changes in commit bf38cbffc3460a4dd1a0a9c411c9aba421e99e1d Author: Tobi Oetiker Date: Sun Oct 28 23:17:14 2007 +0000 prepare for the release of smokeping-2.2.6 commit 07608687a2dac998c782608cf230f0b019c8f8e9 Author: Tobi Oetiker Date: Sun Oct 28 12:15:52 2007 +0000 prepare for the release of smokeping-2.2.6 commit 9f82cdecb8422667ca6477c4776a7a050e2c06ff Author: Tobi Oetiker Date: Sun Oct 28 12:14:06 2007 +0000 prepare for the release of smokeping-2.2.6 commit 05deed3f20a37849eddb1805a39a1c9730eead52 Author: Tobi Oetiker Date: Sun Oct 28 12:13:24 2007 +0000 prepare for the release of smokeping-2.2.6 commit ac20fec31573327eb7269a8a76e5a55459285256 Author: Tobi Oetiker Date: Sun Oct 28 12:12:59 2007 +0000 prepare for the release of smokeping-2.2.6 commit e2c7e39802934501cb2f01b864b5fa1f52cc969f Author: Tobi Oetiker Date: Sun Oct 28 12:12:32 2007 +0000 prepare for the release of smokeping-2.2.6 commit 0cd23826de9b7549c845f7e44203ae037a1c44c1 Author: Tobi Oetiker Date: Sun Oct 28 12:09:35 2007 +0000 prepare for the release of smokeping-2.2.6 commit cf006837234c697cb37bd1d2acb6955ac34d513e Author: Tobi Oetiker Date: Sun Oct 28 12:06:23 2007 +0000 prepare for the release of smokeping-2.2.5 commit 306b180bcc0469dbafa9ebe27ad517aaf533a1c0 Author: Tobi Oetiker Date: Sun Oct 28 12:05:03 2007 +0000 prepare for the release of smokeping-2.2.5 commit c000f6f0d252f523897bb70eab4f3b102d0b7428 Author: Tobi Oetiker Date: Sun Oct 28 12:03:36 2007 +0000 prepare for the release of smokeping-2.2.5 commit 73ee67ababcf2e418d6da2800ebe248dc28ed59f Author: Tobi Oetiker Date: Sat Oct 27 16:00:10 2007 +0000 fixed makefile commit 6e6af23e38283f334414a9d11261ec4e496977dc Author: Tobi Oetiker Date: Sat Oct 27 15:58:42 2007 +0000 prepare for the release of smokeping-2.2.5 commit b49d3eb65f65aaa75219d9754b1b137f46c82d0e Author: Tobi Oetiker Date: Sat Oct 27 15:55:42 2007 +0000 rmove -S warning unless sourceaddressing is used commit b2974cc84cbbefb8d117765acb7230530963aa5c Author: Niko Tyni Date: Sat Oct 27 13:00:42 2007 +0000 * removed all the 'live' tests from the echoping probes --niko * log a warning message on the first 'round' of pinging if curl or echoping exits with non-zero status --niko commit 51243891b9e493882c59e582c5188f48e1127bed Author: Niko Tyni Date: Sat Oct 27 12:05:57 2007 +0000 count the rounds when pinging, needed for smarter logging commit 15ce7b9d28dda1afb6b892c1e2a34e057f3fdb60 Author: Tobi Oetiker Date: Mon Oct 15 07:49:18 2007 +0000 * fixed parsing of slaves statements in config file, broeken since I seemingly relaxed the hostname constraints. * removed all online testing from Curl and EchoPing probes commit 03d504e82b3e6c77c0b59af415ff740de1b483f3 Author: Tobi Oetiker Date: Mon Oct 15 07:44:40 2007 +0000 I wonder how it did work at all like this commit ee70defccd3a3f4d9a7830ba2783c145a8c215ae Author: Tobi Oetiker Date: Sat Sep 29 14:51:47 2007 +0000 allow rightclicks in the legend area commit 8d9ecb5de29a91d0fa71c889516ec557508616fd Author: Tobi Oetiker Date: Sat Sep 29 14:30:24 2007 +0000 disable right click commit 2b09417b8ca76689f147f1097806af9820cfc9b8 Author: Tobi Oetiker Date: Fri Sep 28 21:42:45 2007 +0000 the \ must stay in the string! commit 397a932de585aa078c5c2a1fceae10c3e85093ee Author: Tobi Oetiker Date: Fri Sep 28 17:58:32 2007 +0000 * allow the slave name to be configured * be more liberal in what is allowed for slave names * allow port configuration in the SSH probe commit e8783b5de226f8c5e338e04c38aa4b692c986fd8 Author: Tobi Oetiker Date: Wed Sep 26 09:07:57 2007 +0000 integrated real config grammar 1.10 commit 57c07d927088455b47ad42d2d49b1ddb8bf324f7 Author: Tobi Oetiker Date: Tue Sep 25 22:15:20 2007 +0000 added notes on hostname to master slave doc commit 4e23d2b3b310038131e8952aef1150c392b4f448 Author: Tobi Oetiker Date: Tue Sep 25 12:29:53 2007 +0000 updated to config grammar 1.10 commit 7b910a7d34a768f75e03ce357a0e8446e3237677 Author: Tobi Oetiker Date: Fri Sep 21 17:11:35 2007 +0000 force a config reread on reload_config commit 306508c440ba0717e63b94511bf4ea3414def403 Author: Tobi Oetiker Date: Mon Sep 17 20:46:04 2007 +0000 make the smokeping zoomer calc a little simpler commit 6a75268cbeb2297729926bcf6041188f2b758cae Author: Tobi Oetiker Date: Mon Sep 17 20:43:11 2007 +0000 commit d6a366a132c133b90705e56aace2d24f6e735d7b Author: Tobi Oetiker Date: Mon Sep 17 20:30:49 2007 +0000 added changenote on cropper zoom out commit 72de4410e1c8d2d79384dce8eabe884252f0290c Author: Tobi Oetiker Date: Mon Sep 17 20:30:14 2007 +0000 when selecting something outside the graph, multiply by 10. Use this to zoom out commit 3ab95c6f225b3cc697e0431ec5e23c782279acf9 Author: Tobi Oetiker Date: Sun Sep 16 18:48:36 2007 +0000 prepare for the release of smokeping-2.2.4 commit 13122a1eb2aa80ffe830fddf256e7557048fda8d Author: Tobi Oetiker Date: Sun Sep 16 18:45:51 2007 +0000 added id target to target commit cf08931e47349f96a5793124a5b939ff607a3cd9 Author: Tobi Oetiker Date: Sun Sep 16 18:41:08 2007 +0000 added missing form id to zoom mode form commit 303af5df15b6fabfb56cfb12482fef9809873f09 Author: Tobi Oetiker Date: Sun Sep 16 18:38:36 2007 +0000 added missing hidden fields to zooming graph commit 823350a44e048d358bb7545eca95d2c43b447105 Author: Tobi Oetiker Date: Sun Sep 16 18:17:49 2007 +0000 tell theuser thatsmokeping is taking 80% of the time available to complete its polling cycle -- tobi commit cc8921fdf54244edad3895514a3c9c80ca2f563f Author: Tobi Oetiker Date: Sun Sep 16 15:24:22 2007 +0000 oops the tree points right at the node and not at its parent ... -- tobi commit b5b7c0f2dc7420cb4c322f571ae16743bd621b39 Author: Tobi Oetiker Date: Sun Sep 16 15:12:25 2007 +0000 * don't complain when there is no data in a graph yet while calculation stddev -- tobi * in a multihost graph take the number of pings for each component into consideration -- tobi commit 246f2b329811de06711d2c60c1010106034a7eec Author: Niko Tyni Date: Fri Sep 14 12:41:46 2007 +0000 * fix Smokeping.pm POD documentation -- niko commit 7200da12e6f38bc18d0b32f71bb3557eed442b90 Author: Niko Tyni Date: Thu Sep 13 20:43:39 2007 +0000 * include the prototype.js license for completeness -- niko [ apologies for the license nitpicking; Debian requires that all the applicable licenses are included instead of referrals to their possibly volatile locations on the web, and I think the requirement makes sense. ] commit 7176812d4b8f8520557aab44c3ac7378374b676b Author: Tobi Oetiker Date: Wed Sep 12 21:35:13 2007 +0000 should not have my mail address in the config example commit 3586889c03cae00263de98129b1662e9abc7b14a Author: Tobi Oetiker Date: Tue Sep 11 06:12:01 2007 +0000 rounding error fix for sqrt commit fa5abd5d25b193c47400f116c852c0a0b176322a Author: Tobi Oetiker Date: Thu Sep 6 15:43:45 2007 +0000 prepare for the release of smokeping-2.2.3 commit 36ab642eaaa3a27e346659bef7fff07b3733ca30 Author: Tobi Oetiker Date: Thu Sep 6 15:42:52 2007 +0000 fixed timezone issues in zoomer commit 07465f9e04a8b0c92e047365971957b7250d9433 Author: Tobi Oetiker Date: Thu Sep 6 12:24:54 2007 +0000 remove iso date stuff and go for real time only commit 4410709a93b9c8d0f464f52b793966a3af573eb7 Author: Tobi Oetiker Date: Wed Sep 5 22:49:38 2007 +0000 we need rrdtool 1.2 now commit 84c432fa1e16ccb3173101d0b7dea811f2363ac3 Author: Tobi Oetiker Date: Wed Sep 5 22:44:08 2007 +0000 added js min/max check to cropper commit 7a16ae0476245170acf984676aa8c093af430c9e Author: Tobi Oetiker Date: Wed Sep 5 22:33:34 2007 +0000 mode docs on multihost commit 9e8f6c24f74b110febe27ebc2343c28fbe40c22e Author: Tobi Oetiker Date: Wed Sep 5 18:00:19 2007 +0000 js is cropper now commit 25d4c21620dd04ce9c472ec5141560cefdf9ae29 Author: Tobi Oetiker Date: Wed Sep 5 06:13:24 2007 +0000 * fixes for pod generation * skip multi target hosts for slaves * report content-lengh in header commit 4280c7413ee558d1e19f993a85b675d3c4598a05 Author: Niko Tyni Date: Mon Sep 3 11:21:58 2007 +0000 typo fixes commit a930766439a857d04be7c248ea6b934d50f57424 Author: Tobi Oetiker Date: Thu Aug 30 12:21:34 2007 +0000 prepare for the release of smokeping-2.2.2 commit b5e24ab91e1d66459e12bb8f25ef411f95fe9de8 Author: Tobi Oetiker Date: Thu Aug 30 12:17:42 2007 +0000 adding 1.5 for max is too much commit 2151f50214096be6983e7e3e7215bf87e635cd07 Author: Tobi Oetiker Date: Thu Aug 30 12:12:34 2007 +0000 reserver space for sd commit 8de423b57ed5265fe7a2681cd581a0b30261a5e6 Author: Tobi Oetiker Date: Thu Aug 30 12:07:23 2007 +0000 links in chart mode to slaves were wrong commit af82e636a8f3a83fd22f475fefdf5f98d9be8a9c Author: Tobi Oetiker Date: Thu Aug 30 09:49:08 2007 +0000 prepare for the release of smokeping-2.2.1 commit 109d05affef8762a0d27fb956f27d8762e0a22d8 Author: Tobi Oetiker Date: Thu Aug 30 09:46:30 2007 +0000 prepare for the release of smokeping-2.2.0 commit e262eac461d5b037b20ff7446c6c99137d7e2e2e Author: Tobi Oetiker Date: Thu Aug 30 09:45:38 2007 +0000 get ready for 2.2.0 dist commit 371043ac25913355a7239ccbe35f341ab65d800a Author: Tobi Oetiker Date: Thu Aug 30 09:43:28 2007 +0000 fixes after testing commit 66e499975a20daf698545dcadd80a572a1df0eb9 Author: Tobi Oetiker Date: Thu Aug 30 07:54:51 2007 +0000 do not start when we get no config commit fec4230894e1c24460031f4ac3ae7f10ed1cf815 Author: Tobi Oetiker Date: Thu Aug 30 07:49:16 2007 +0000 some fixes after intitial slave testing commit 044798e9867a8d20319f8714e43090fe2bc85979 Author: Tobi Oetiker Date: Thu Aug 30 07:07:08 2007 +0000 added missing graph module .. commit a7bd89a24de51921637ce3f297be362ad17d65ab Author: Tobi Oetiker Date: Thu Aug 30 06:55:46 2007 +0000 integrated multi-host feature commit 923cb59acf4245c851093b4fe465a62f97e1543d Author: Tobi Oetiker Date: Tue Aug 28 20:39:55 2007 +0000 try to kill split warning commit 25e6ce94b50e5f2fdc9e0c4d708d5660083c4a71 Author: Tobi Oetiker Date: Mon Aug 27 20:46:14 2007 +0000 implemented working multihost graphs commit 080753b7ed8f31d314210e4f85024da90a9471b2 Author: Tobi Oetiker Date: Mon Aug 27 20:23:32 2007 +0000 integrated multihost overview commit 0f345b5386ba78d2aaeaffae975b666f7e9034c9 Author: Tobi Oetiker Date: Mon Aug 27 18:25:19 2007 +0000 added new hostsyntax commit d6c26eba5bc06be2952265881e4666a159a91dfb Author: Tobi Oetiker Date: Sat Aug 25 22:21:33 2007 +0000 use the safe module in the slave part of smokeping to reduce the problems we may run into due to using eval on the input from the master. commit 0eb5011f946b9e9e9ff2315a710730003ae5bf76 Author: Tobi Oetiker Date: Fri Aug 24 12:36:51 2007 +0000 two more var statements added to js code commit e6124dcdd53763c601f6c2f6186abae59c45237c Author: Tobi Oetiker Date: Fri Aug 24 12:34:49 2007 +0000 fixed unknonwn variables commit 3f641e37b99d5aa18ecf2f58364696ac17f859d2 Author: Tobi Oetiker Date: Thu Aug 23 20:58:01 2007 +0000 * improved handling of slave updates * added median/sdev to graphs commit ed8e591272fa1c7ca012db03b45568ec81ff9cfd Author: Tobi Oetiker Date: Tue Aug 21 19:41:56 2007 +0000 * add notes about new target-path hosts for multi source graphs * fix slave zoom graph (we were showing the non slave graph with the slave title) * better error messages form rrd update commit d011593577316a9782b6dca8cc4d09dc0b98aba3 Author: Tobi Oetiker Date: Tue Aug 21 19:40:36 2007 +0000 improve handling of storable for for communication between cgi and daemon commit ba4e1c581d671ca47bed2ba19bae37849c27a935 Author: Tobi Oetiker Date: Tue Aug 21 19:38:19 2007 +0000 fix cache handling commit a7516a949c37dca39141dee7baeb72b01f262b29 Author: Tobi Oetiker Date: Tue Aug 21 19:36:35 2007 +0000 remove cache after reading it commit 4909ade650a31797ee4d305565a91061e8a5b812 Author: Tobi Oetiker Date: Tue Aug 21 14:39:54 2007 +0000 added some extra vars commit ebe189c85bfedaaf70e5657c8334bf7e0b750a99 Author: Tobi Oetiker Date: Tue Aug 21 08:39:36 2007 +0000 * add ms unit to stddev * set date for graph according to last displayed time commit c8a54c6943d42a23d54d25b18a5724fab7a6f996 Author: Tobi Oetiker Date: Tue Aug 21 08:39:01 2007 +0000 * do not select '0' * more flexible date parsing commit 4a54b26849a3edd2dcdfcfbb76310887a8bb44d0 Author: Tobi Oetiker Date: Mon Aug 20 21:12:45 2007 +0000 replaed jquery stuff with cropper script commit c2701cd9f6ce10f7b92a997559e64ca7c516cd8c Author: Tobi Oetiker Date: Mon Aug 20 15:54:05 2007 +0000 execute js code only if there is a #zoom image commit 16b678a3b085fea2b60aceb6c489439b4eba0a4b Author: Tobi Oetiker Date: Mon Aug 20 15:43:56 2007 +0000 made chars mode work commit f6760febddac8e72743e6b3fc592ec3992461d78 Author: Tobi Oetiker Date: Mon Aug 20 15:12:40 2007 +0000 fixed color in slave detail graph fixed max setting in charts module commit eacecb176b5f4d4cdfdb80808f2a24384960846e Author: Tobi Oetiker Date: Mon Aug 20 14:44:22 2007 +0000 more zoom fixes commit c410011f2d8102ae927bda7f5223471ce387c9fc Author: Tobi Oetiker Date: Mon Aug 20 14:42:26 2007 +0000 integrate helper and updated changelog commit f0b493945725fef85bfe2dc110ad37388e36aa58 Author: Tobi Oetiker Date: Mon Aug 20 14:36:13 2007 +0000 fixed broken slave split commit 1aff1fefe02d169f24b49be8775b77237dd25fcd Author: Tobi Oetiker Date: Mon Aug 20 14:32:12 2007 +0000 interoduced std dev commit 201c1d43ebf73e70032309978a0704a29e3537fd Author: Tobi Oetiker Date: Mon Aug 20 12:16:11 2007 +0000 make navigator work for slave graphs commit 80e63dbd61a1d431e4a338316a14a099cdea434b Author: Tobi Oetiker Date: Mon Aug 20 05:59:44 2007 +0000 finally working code on ie (although it looks quite bad) and firefox commit 3999a99132f2bc44c5e532dae3a89225944ca746 Author: Tobi Oetiker Date: Sun Aug 19 20:25:59 2007 +0000 added slave mode support to details graph commit e4e484588e384e9572123b7d21900f6257be8147 Author: Tobi Oetiker Date: Sun Aug 19 19:47:46 2007 +0000 integrated navigator graph commit 081d224c879e6851712a950768d5173afbfbb82d Author: Tobi Oetiker Date: Thu Aug 16 14:36:17 2007 +0000 * in ajax mode return graph and do not guess imagepath * im overview page display standard deviation of pings in graph commit 38ae209aa0461d2c7aca1af9d805e78389011a62 Author: Tobi Oetiker Date: Thu Aug 16 12:17:10 2007 +0000 introduce slave color commit 67f512ec9cd208c05a6a37599f0073fcba266999 Author: Tobi Oetiker Date: Thu Aug 16 11:34:39 2007 +0000 we are only dealing with uri componentes, so decode everything ... commit a7db0e688693f175f4812da932aea2598fa9af60 Author: Tobi Oetiker Date: Thu Aug 16 11:25:36 2007 +0000 split uri on & and ; commit 0d36f50e05d91267ed72dbe7236c5d09d14764bc Author: Tobi Oetiker Date: Thu Aug 16 10:02:17 2007 +0000 Interactive (Ajax) Zooming of Graphs -- Roman Plessl commit dedbd98b8522b7da27dcae51cd7b50d6c5ff1c8d Author: Tobi Oetiker Date: Thu Aug 16 09:17:49 2007 +0000 fix smokeping pid configurable commit b62fb4f30a53a932d9b760ea119f830d63b828a7 Author: Tobi Oetiker Date: Mon Aug 13 16:54:45 2007 +0000 make master code work commit 61689a58908b4741f83b4aa2f9faf676bcecf163 Author: Tobi Oetiker Date: Mon Aug 13 16:54:30 2007 +0000 make slave code work commit a178628cbb7364319cf7c27bc0270545015be5ea Author: Tobi Oetiker Date: Mon Aug 13 12:25:55 2007 +0000 only push data when there is data commit 23af83eeef3d6a307034291ac72d30418e987137 Author: Tobi Oetiker Date: Mon Aug 13 12:25:12 2007 +0000 removed excell function call arguments commit 6d1e217ce8d598b81b54a934c6ae8f7217445818 Author: Tobi Oetiker Date: Mon Aug 13 12:21:07 2007 +0000 add all arguments to slave config call commit 1c948851e2075ec02d48ac30ebfd4efe9efb8453 Author: Tobi Oetiker Date: Mon Aug 13 10:04:40 2007 +0000 another variable name fixed commit b72d4f8b4febf466c16d1d6775e4e4ba8746db83 Author: Tobi Oetiker Date: Mon Aug 13 10:03:25 2007 +0000 fix some missing variable declarations commit c98e512bc9dd3f93eed5cad53476cc8b4fd803fd Author: Tobi Oetiker Date: Mon Aug 13 09:49:27 2007 +0000 master slave code drop to start debugging commit 546c89ee565a0cd905053f5e7edb6d50655a486f Author: Tobi Oetiker Date: Sun Aug 12 16:37:41 2007 +0000 added pointer to debian package commit 1fcc211ee9ad24d6e00776e6482d86c08b004b5a Author: Tobi Oetiker Date: Sun Aug 12 16:32:07 2007 +0000 only mention fping reporting resolution if abnormal commit 4b147a40568beb0fb8ae6cfb8e5e1c024d669cd0 Author: Tobi Oetiker Date: Fri Jul 27 19:54:11 2007 +0000 * completed master/slave infrastructure ... * updated documentation * presentation is pending commit 6f6466013b64af7e906dc12b5a49a39c127f0ac5 Author: Tobi Oetiker Date: Fri Jul 27 10:12:41 2007 +0000 more changes on the road to the master/slave setup commit 6daef9205280f61b5830c13836b849eb11462471 Author: Tobi Oetiker Date: Wed Jul 25 22:14:53 2007 +0000 for retreive the network byteorder gets detected automagically commit d6b423034c57cdaf2181216ad46afdc4cfbcbe10 Author: Tobi Oetiker Date: Wed Jul 25 20:19:57 2007 +0000 this is nfreeze not freesze commit ee4a86c7e444cd51e0914227087582ac1b87c82e Author: Tobi Oetiker Date: Tue Jul 24 21:47:24 2007 +0000 master slave changes ... commit 335b83906ffdcc67dc8e835a1f7e01c2c2212ab5 Author: Tobi Oetiker Date: Sun Jul 22 08:53:11 2007 +0000 further simplified communication concept ... slaves call the master commit a0641940e2bc3a1b0490529d37212f98204042b8 Author: Niko Tyni Date: Tue Jul 17 10:44:51 2007 +0000 fix uses of uninitialized value in the loss_background code commit 4f7bb7081fa7abb24508df16b2f25db369c55df7 Author: Tobi Oetiker Date: Fri Jul 13 22:32:28 2007 +0000 added some missing curlies back in commit b1d582fbc5d72229be60160fda13f9e92e6f50ca Author: Tobi Oetiker Date: Mon Jul 9 20:27:48 2007 +0000 initial master slave modules commit 700759a76d39dc1cfd729414508f542fd37f66ed Author: Tobi Oetiker Date: Mon Jul 9 19:31:54 2007 +0000 added override section commit ff0a9573f019d834a3fa1525ab27ff0fc2e5f474 Author: Tobi Oetiker Date: Mon Jul 9 15:27:58 2007 +0000 prepare for master/slave implementation commit 1bdc6ae9270bf77bc983ef661142c89e12464466 Author: Tobi Oetiker Date: Wed May 30 12:34:09 2007 +0000 draw smoke properly even when there is a lot of loss commit 72804714f5a4a15706215c0ea3f0b4a288b3428f Author: Tobi Oetiker Date: Mon May 28 15:23:51 2007 +0000 do not test echoping and curl functionality with 127.0.0.1 since there may be someone behind this address commit d13567a129969c4c3ca0548d08a0d34473aca66d Author: Niko Tyni Date: Fri May 11 18:03:52 2007 +0000 revert the previous Curl change, it doesn't even work... commit 82050d908e18016a65a9573fcfb8025d4bca4bcf Author: Niko Tyni Date: Thu May 10 19:32:57 2007 +0000 fix Curl usage regexp that would match webpage contents too easily https://bugs.launchpad.net/ubuntu/+bug/73437 hopefully this is just a temporary fix until we start checking the return code instead commit bac139a24caca3f26a55968b4f9a9db333411ce5 Author: Niko Tyni Date: Thu May 10 19:27:08 2007 +0000 fix lost smoke (Debian #412826) commit 7bc36ce39e814253406d6a045e567065026ba7f4 Author: Niko Tyni Date: Mon May 7 11:27:57 2007 +0000 ignore svn-commit.tmp when releasing commit b8ebbe2adad757a0592d6d02ec71f6bf196c0e1b Author: Tobi Oetiker Date: Wed May 2 18:17:48 2007 +0000 fixed spelling commit ad473a60116fb231b2c5232cc914c28fb1af4fea Author: Tobi Oetiker Date: Wed May 2 16:16:07 2007 +0000 prepare for the release of smokeping-2.1.1 commit 7e10ce2db865158e1c3216214ff18c2997160345 Author: Tobi Oetiker Date: Wed May 2 16:14:07 2007 +0000 fix scaling of detail graphs commit d5b4a21e9ee46a1a4ebe39f2d2d507961506a910 Author: Tobi Oetiker Date: Mon Apr 30 22:07:36 2007 +0000 fixed spelling commit 96c0901c6922d814d4c8f061e8c60c8380988f7e Author: Tobi Oetiker Date: Sun Apr 29 10:42:50 2007 +0000 prepare for the release of smokeping-2.1.0 commit e9c56f1259a5b0fa9706a9244fca23bb9cd069ab Author: Tobi Oetiker Date: Sun Apr 29 10:42:01 2007 +0000 prepare for the release of smokeping-2.1.0 commit 0d7856c86555136c1b1d9bbd1cb5c84e6833fcf7 Author: Tobi Oetiker Date: Sun Apr 29 10:40:31 2007 +0000 prepare for the release of smokeping-2.1.0 commit e02bd6d388dcd4898ed5d14af97c7f02f78355f0 Author: Niko Tyni Date: Sun Apr 15 11:59:27 2007 +0000 add links commit aebb3fb352f326c0f72967ed24e3255ee677f9e2 Author: Niko Tyni Date: Sun Apr 15 11:55:07 2007 +0000 add comment commit 68256963c77579525aca2cba503072ae4dd26e28 Author: Niko Tyni Date: Sun Apr 15 11:53:41 2007 +0000 improve the echoping 6 note commit 098e051a4475708a48f589cdf24f78beef23c926 Author: Niko Tyni Date: Sun Apr 15 11:48:17 2007 +0000 r1065@rispa: niko | 2007-04-15 14:44:20 +0300 add comments commit aea0aa3fdfaf06c2093363d690ce8c6738c1b6e4 Author: Niko Tyni Date: Sun Apr 15 11:48:14 2007 +0000 r1064@rispa: niko | 2007-04-15 14:39:57 +0300 add examples commit b0a8245fe56e8fb1ace0dc2524ce7b1ca6f694a1 Author: Niko Tyni Date: Sat Apr 14 20:46:55 2007 +0000 r1061@rispa: niko | 2007-04-14 23:46:31 +0300 smokeping_upgrade echoping6 entry commit a2e1e5362389bc23f8b3826de3034feda5a10793 Author: Niko Tyni Date: Sat Apr 14 20:46:52 2007 +0000 r1060@rispa: niko | 2007-04-14 21:51:42 +0300 add EchoPingWhois commit 58f0290fdd16e480c42c558bc4a2a8c19a56215a Author: Niko Tyni Date: Sat Apr 14 18:11:56 2007 +0000 r1049@rispa: niko | 2007-04-14 21:11:21 +0300 changelog entry commit ee9fe37aa2e14a2dcb7e12c773a45ac7d8033616 Author: Niko Tyni Date: Sat Apr 14 18:11:54 2007 +0000 r1048@rispa: niko | 2007-04-14 21:01:51 +0300 add echoping ldap probe commit b3a821582cc383947831954f9c562f8e8dddffd8 Author: Niko Tyni Date: Sat Apr 14 18:11:52 2007 +0000 r1047@rispa: niko | 2007-04-14 12:15:40 +0300 don't test for the plugin, since the user may have overridden it commit ed89ca2a7173da7ec19f207be121e40df14f051b Author: Niko Tyni Date: Sat Apr 14 18:11:50 2007 +0000 r1046@rispa: niko | 2007-04-14 11:44:40 +0300 fix documentation commit a014a07efb6b9ec156de0e8d49b9630c08ac6bc7 Author: Niko Tyni Date: Sat Apr 14 18:11:48 2007 +0000 r1045@rispa: niko | 2007-04-14 11:26:44 +0300 fix post_args commit e4e9810641b2804bdf25b5adf824e41bf90625e7 Author: Niko Tyni Date: Sat Apr 14 18:11:46 2007 +0000 r1044@rispa: niko | 2007-04-14 10:55:19 +0300 r1043@rispa (orig r713): ntyni | 2007-04-14 10:55:07 +0300 don't test usage if running as CGI commit 71ced95ec446391172c5f84be3950498a2a0a728 Author: Niko Tyni Date: Sat Apr 14 18:11:44 2007 +0000 r1042@rispa: niko | 2007-04-14 08:24:57 +0300 post args commit ee78a2434ef77fdce97546aca173ebbd0391676a Author: Niko Tyni Date: Sat Apr 14 18:11:42 2007 +0000 r1041@rispa: niko | 2007-04-14 08:14:10 +0300 targetvars skeleton commit c3c3661714df4dd4eaefd4c8bb9573f873d78461 Author: Niko Tyni Date: Sat Apr 14 18:11:40 2007 +0000 r1040@rispa: niko | 2007-04-13 22:50:40 +0300 documentation commit e8f080ca27f06e945747201fbd7a941e859bb4f0 Author: Niko Tyni Date: Sat Apr 14 18:11:37 2007 +0000 r1039@rispa: niko | 2007-04-13 21:57:43 +0300 initial version for a base plugin module commit aeb0b49ee5c442ce66e675c83dadf44ee0ea8bbf Author: Niko Tyni Date: Sat Apr 14 07:55:07 2007 +0000 don't test usage if running as CGI commit e940342e10e11fdc8142e18bc64f31494c1268d3 Author: Tobi Oetiker Date: Sun Mar 11 12:40:13 2007 +0000 if max_rtt is set, use it! http://bugs.debian.org/412826 commit f791cc4b4470c90ac8b4fd2205a840d0f222513e Author: Niko Tyni Date: Sat Mar 10 18:40:25 2007 +0000 bail out at startup with an error message if LC_ALL is set commit 77692aa0168d42f9db7bcef9c40ee1cb4dbf5734 Author: Tobi Oetiker Date: Mon Jan 15 23:11:11 2007 +0000 fixed some bugs that only showed when releasing ... commit 7ec773d7d21690744619f364855dd02e04949d4d Author: Tobi Oetiker Date: Mon Jan 15 16:25:13 2007 +0000 smokeping charts added -- first drop commit c13a80d2aa273f42d6c3f67f384ed3c7fd1d969a Author: Tobi Oetiker Date: Sun Jan 14 20:27:50 2007 +0000 improve -S note when launching FPing probe commit fb2b5def3024bc60f82e2d976a26b3b7a7ba36ab Author: Tobi Oetiker Date: Sat Jan 13 17:39:57 2007 +0000 median was lacking a new method ... commit 6c0ca319ff8ae3a2b4c518e61225a87ccc514228 Author: Tobi Oetiker Date: Thu Dec 14 08:41:21 2006 +0000 make the error more friently ... commit b95c089ddd3a2123b27e47ce21ab35e1819c38a7 Author: Tobi Oetiker Date: Tue Dec 12 07:22:12 2006 +0000 new beta release for virtela commit 1ee77b9f56eb1d450c8bedc6e43037d7d5b632c9 Author: Tobi Oetiker Date: Tue Dec 12 07:14:34 2006 +0000 added new Median ratio matcher - comparing two medians fixed classic Median matcher commit 6a6ad273bb1d9e53835c045ff09fa222bfd9c0a8 Author: Niko Tyni Date: Thu Oct 26 12:03:35 2006 +0000 * make the CGI not croak if a password file is not readable. -- niko commit 7c6e090f868e6f750c24ca4da3d31c69a8bdd99d Author: Niko Tyni Date: Wed Oct 25 21:24:04 2006 +0000 r402@rebekka: niko | 2006-10-26 00:26:37 +0300 add better ipv6 source address example commit f917ffe38c78c224952b87aa833d059f7f030101 Author: Niko Tyni Date: Wed Oct 25 20:11:18 2006 +0000 r378@rebekka: niko | 2006-10-25 23:13:14 +0300 don't complain about '-S' missing if it isn't. commit 11f5b17c55654c838a2aa1ad5842224b541a2424 Author: Niko Tyni Date: Wed Oct 25 20:11:16 2006 +0000 r377@rebekka: niko | 2006-10-25 23:12:34 +0300 don't die at startup if syslogd is missing, just warn. commit 556a41ddf75f302643b9f81c344ffb731a5d0093 Author: Tobi Oetiker Date: Wed Oct 25 19:59:22 2006 +0000 lets be less extreem with regexps ... :-) commit 48ac00bb2d537725a61fde25ad37c61035bf2d5f Author: Tobi Oetiker Date: Wed Oct 25 17:50:21 2006 +0000 add missing if statement ... commit 16c2d510b85f036fd411d05ef27f665170ed9413 Author: Niko Tyni Date: Tue Oct 24 21:38:11 2006 +0000 fix typo commit 84c23d3be428bb2b2dc1d572e664b228b790dd3f Author: Niko Tyni Date: Tue Oct 24 19:04:12 2006 +0000 handle a dead syslogd (Debian bug #395056) commit 242cc6534d04d0b226219f0cd0674b03a92b4816 Author: Tobi Oetiker Date: Tue Oct 24 05:45:29 2006 +0000 added link to -S patch in debian bugs commit 2308a4663349102ad0f00989da53b0b0f2e89586 Author: Tobi Oetiker Date: Tue Oct 24 05:43:58 2006 +0000 added source address patch with -S check ... updated version numbers in files ... commit c975730e045c5b32944cb6756e8091519ec65d0c Author: Tobi Oetiker Date: Sun Oct 22 22:13:59 2006 +0000 use only the base name not the path of the src file for the destionation commit 4afa8d737f18a3a1241a8b71f96d28b7fdb1ffa5 Author: Tobi Oetiker Date: Sun Oct 22 22:13:11 2006 +0000 allow . in section names commit 1f1f9c50e4b18d9bdbe0a90874d9f92fa9c1e3ae Author: Tobi Oetiker Date: Sun Oct 22 22:11:43 2006 +0000 add propper pod NAME section commit cef00a141fcccd95c3eaaac5e05d1b2aead6b49f Author: Tobi Oetiker Date: Wed Sep 20 19:16:30 2006 +0000 fixed FTPtransfer probe to use srcfile as default for destfile. commit d9d02e26fe34b577f5b2dab1d654a3da49190449 Author: Tobi Oetiker Date: Fri Sep 8 13:01:16 2006 +0000 updated version strings intergrated fixes for alert priority settings commit 1947fa82b24b9f5d526f5909454c8c7168ce3bd4 Author: Tobi Oetiker Date: Fri Sep 8 09:31:35 2006 +0000 added alert priority to _vars array to make the parser recognize it. commit 9778fbf78c1db9f5c77f8e82cbb0ada29f6f3913 Author: Tobi Oetiker Date: Thu Sep 7 22:06:21 2006 +0000 fix name of FTPtransfer probe in its own documentation commit 9a56f383b726082c3a8f3bb5982ec3a5a334e29c Author: Tobi Oetiker Date: Thu Sep 7 22:05:49 2006 +0000 make sure we do not redistribute old copies of ourselves commit 680d11861f6222f38b46f18ecc552af3ec8917f8 Author: Tobi Oetiker Date: Thu Sep 7 22:05:10 2006 +0000 added new priority property for alerts commit 8a4c23496d19915818b87a9050e01a478b94a5cc Author: Tobi Oetiker Date: Thu Sep 7 22:02:35 2006 +0000 added WebProxyFilter probe commit edbe6f2aa91d6d8d3ce6092aaf97fe5d08ecbbc1 Author: Niko Tyni Date: Thu Sep 7 06:31:39 2006 +0000 make the LDAP 'scope' option actually work. commit 364743d3606928e114cedc84e9d6c2f7cef7c7a3 Author: Niko Tyni Date: Wed Sep 6 21:31:44 2006 +0000 typo fix commit a0f42d4ccf2c4637cf2e40fd58c9cd9b36466909 Author: Niko Tyni Date: Wed Sep 6 21:29:46 2006 +0000 yes|no needs to parenthesized, as Config::Grammar matches it as /^$re$/ so eg. "yessssssss" and "abceuano" match otherwise. commit 425d5b5be4e76469c0c95bbdce4ade33466e624f Author: Niko Tyni Date: Wed Sep 6 21:09:00 2006 +0000 typo fixes commit 0e8a6e46497e5a152e3434b556538ffd1d913a5d Author: Tobi Oetiker Date: Thu Aug 31 08:08:54 2006 +0000 2.0.901 internal release with minor touchups. Especially the FTPtransfer probe now reports in seconds like everyone else ... commit 8edaa7fee41f9d5597a656123a481f2483906053 Author: Tobi Oetiker Date: Wed Aug 30 23:12:31 2006 +0000 added alert mailtemplates and new probe config ProbeUnit commit a1e648c79fc9300d981b45c0d31b594c819b51c7 Author: Tobi Oetiker Date: Wed Aug 30 08:36:34 2006 +0000 images shoud be written in binmode commit e0f339933ed2ab70a1b6d48f962a0b091ea9337e Author: Tobi Oetiker Date: Wed Aug 30 08:35:38 2006 +0000 make perl binary configurable in makefile commit a8e660624f549afabf3b175107263693a3aca454 Author: Tobi Oetiker Date: Wed Aug 30 08:34:16 2006 +0000 fixed compatibility with newer echoping versions commit dd3accda13569f43b6aa83025698a3a247b2c5a1 Author: Tobi Oetiker Date: Wed Aug 30 08:33:17 2006 +0000 log the fact that no replies came back from a device commit c4c40a6046548f022440d8ccfdae49da9fa3a5e5 Author: Tobi Oetiker Date: Wed Aug 30 08:15:07 2006 +0000 * spelling fix * call rrdupdate_string only once commit fb7a20fbf7d55ecc6990918ea099f44daf8b9dd0 Author: Tobi Oetiker Date: Tue Aug 29 16:17:12 2006 +0000 initial version of the Virtela FTPtransfer probe commit afb0fe8401909a0087a5425337bfa2a2b6692a1f Author: Tobi Oetiker Date: Tue Aug 29 15:56:34 2006 +0000 merge bug fixed (GetOptions lost a line) commit 9b1b305a1677443fc6f627d10f597331d29f08e7 Author: Tobi Oetiker Date: Tue Aug 29 09:17:36 2006 +0000 fixed merge in upgrade docs again ... selfreferencing links were earlier commit ed2fcf4de53126ae7dc3973f2a27aa15c00e9160 Author: Tobi Oetiker Date: Tue Aug 29 09:15:25 2006 +0000 merged missing upgrade docs commit f86998b3e0c689ca234245343aa75e7cdc5519d3 Author: Tobi Oetiker Date: Tue Aug 29 09:08:31 2006 +0000 merge back to trunk commit c2b6279de0c09f62ef2a43e1f35955046600e74c Author: Tobi Oetiker Date: Mon Aug 28 23:00:59 2006 +0000 prepare for the release of smokeping-20060829_trunk commit ec5c8efba55d43c65630564024aabdb51e34224f Author: Tobi Oetiker Date: Sun Aug 27 23:01:07 2006 +0000 prepare for the release of smokeping-20060828_trunk commit a2b37b9b3fadba2dcfc093cdba6d0fee2e532222 Author: Tobi Oetiker Date: Fri Aug 25 23:01:06 2006 +0000 prepare for the release of smokeping-20060826_trunk commit 96cc81ec26b5990187ac78815178706d02fda035 Author: Tobi Oetiker Date: Thu Aug 24 23:01:15 2006 +0000 prepare for the release of smokeping-20060825_trunk commit 39ddbcd0fd52495a25800655a36b6d1931f676d1 Author: Tobi Oetiker Date: Wed Aug 23 23:01:18 2006 +0000 prepare for the release of smokeping-20060824_trunk commit 3e9b23aa8d437920c422e70040bd6f96a739fdbb Author: Tobi Oetiker Date: Tue Aug 22 23:01:12 2006 +0000 prepare for the release of smokeping-20060823_trunk commit 1887b577e96b5d45aed013afcf32a9f3382e19dc Author: Tobi Oetiker Date: Mon Aug 21 23:01:06 2006 +0000 prepare for the release of smokeping-20060822_trunk commit f1d826700d09b3783c44b49f9502cb381d9cda45 Author: Tobi Oetiker Date: Sun Aug 20 23:01:18 2006 +0000 prepare for the release of smokeping-20060821_trunk commit 2e1beb69d82a6d7b1aeb138aa8d3bf9ab733939f Author: Tobi Oetiker Date: Sat Aug 19 23:01:00 2006 +0000 prepare for the release of smokeping-20060820_trunk commit 879fb4247906dd9eac91acc9a055e51aa20917e5 Author: Tobi Oetiker Date: Fri Aug 18 23:01:03 2006 +0000 prepare for the release of smokeping-20060819_trunk commit 0ca7a5fd001a3d159e741ab88a306ba0508e55ad Author: Tobi Oetiker Date: Thu Aug 17 23:01:13 2006 +0000 prepare for the release of smokeping-20060818_trunk commit dd01d2673a77aadd77742ec8428ef62d9480e6e8 Author: Tobi Oetiker Date: Wed Aug 16 23:01:11 2006 +0000 prepare for the release of smokeping-20060817_trunk commit b4e6f28d05d1427ee17553793049892a5b7e1a1b Author: Tobi Oetiker Date: Tue Aug 15 23:01:14 2006 +0000 prepare for the release of smokeping-20060816_trunk commit a861412cc85fd76c30cb0e0ce5ef0200487805a1 Author: Tobi Oetiker Date: Tue Aug 15 05:59:57 2006 +0000 allow multiple Mailserver add shorter timeout to smtp module commit fc280a35cc9b6cc96f26d13d4ab87e9a041cf154 Author: Tobi Oetiker Date: Mon Aug 14 23:00:53 2006 +0000 prepare for the release of smokeping-20060815_trunk commit 71681f39c4e5102b5a2c629ee7a16e9f8a20f8d0 Author: Tobi Oetiker Date: Sun Aug 13 23:01:19 2006 +0000 prepare for the release of smokeping-20060814_trunk commit 0d1c06ba9b183c02a9bca6987ac6f52951f136f6 Author: Tobi Oetiker Date: Sat Aug 12 23:00:52 2006 +0000 prepare for the release of smokeping-20060813_trunk commit 9d944716c0b1a3ba2a1057865f787e40bc0cef7f Author: Tobi Oetiker Date: Fri Aug 11 23:00:56 2006 +0000 prepare for the release of smokeping-20060812_trunk commit bb79f178b55d84776e72d123634513941e4cbf94 Author: Tobi Oetiker Date: Thu Aug 10 23:00:54 2006 +0000 prepare for the release of smokeping-20060811_trunk commit eea608d23ea60480a67dc5bad16821096c0d8d3d Author: Tobi Oetiker Date: Wed Aug 9 23:00:58 2006 +0000 prepare for the release of smokeping-20060810_trunk commit 5c74f8d92d50aecde1eb92e77eef7549ef3d3228 Author: Tobi Oetiker Date: Tue Aug 8 23:01:00 2006 +0000 prepare for the release of smokeping-20060809_trunk commit 8448d6f09bcb2b3712a27df0725daa19a1c15527 Author: Tobi Oetiker Date: Mon Aug 7 23:00:54 2006 +0000 prepare for the release of smokeping-20060808_trunk commit a9e0eabfde78048a7aebdf1cfa7c018aef480fff Author: Tobi Oetiker Date: Sun Aug 6 23:01:12 2006 +0000 prepare for the release of smokeping-20060807_trunk commit 3c1ff42d19b7f174908ec03eb189481e203b1d9d Author: Tobi Oetiker Date: Sat Aug 5 23:01:02 2006 +0000 prepare for the release of smokeping-20060806_trunk commit cd31717822c4ed6d4a78b173e74ee76bf504afe5 Author: Tobi Oetiker Date: Fri Aug 4 23:01:00 2006 +0000 prepare for the release of smokeping-20060805_trunk commit c8ef7c58a2e9b8dae032071d181ea910106ce037 Author: Tobi Oetiker Date: Thu Aug 3 23:00:54 2006 +0000 prepare for the release of smokeping-20060804_trunk commit e05c856ba16d9c731ecc196cadb408c1af54212a Author: Tobi Oetiker Date: Wed Aug 2 23:01:01 2006 +0000 prepare for the release of smokeping-20060803_trunk commit c39a2544b2fa4f74ea5e32168b270e48c0312b91 Author: Tobi Oetiker Date: Tue Aug 1 23:00:53 2006 +0000 prepare for the release of smokeping-20060802_trunk commit 2ae71f2430ad1ec64882911278078caf41c7ea50 Author: Tobi Oetiker Date: Mon Jul 31 23:00:52 2006 +0000 prepare for the release of smokeping-20060801_trunk commit b585d236b5c9e4fec03146e4ce5c3452507e438e Author: Tobi Oetiker Date: Sun Jul 30 23:01:04 2006 +0000 prepare for the release of smokeping-20060731_trunk commit eda43ee0d111938bd8effeb223a4bd1a81e23998 Author: Tobi Oetiker Date: Sat Jul 29 23:00:53 2006 +0000 prepare for the release of smokeping-20060730_trunk commit 4d88e72094fd76b30833299e114038db068863de Author: Tobi Oetiker Date: Fri Jul 28 23:00:55 2006 +0000 prepare for the release of smokeping-20060729_trunk commit e0ae4ef798ac097ff5703ac1bb3208ded8703ac9 Author: Tobi Oetiker Date: Thu Jul 27 23:00:56 2006 +0000 prepare for the release of smokeping-20060728_trunk commit a9e9cc5464f76f418838d8b1320adebebf9ec9f4 Author: Tobi Oetiker Date: Wed Jul 26 23:00:54 2006 +0000 prepare for the release of smokeping-20060727_trunk commit 750edaa98fb0100c7ed55c0fced21da7d3cc7dad Author: Tobi Oetiker Date: Tue Jul 25 23:00:56 2006 +0000 prepare for the release of smokeping-20060726_trunk commit c10f2699a9eb97e79e237357190c971886074fb3 Author: Tobi Oetiker Date: Mon Jul 24 23:00:56 2006 +0000 prepare for the release of smokeping-20060725_trunk commit 650455bf23f0ff0d4199d4e48c87d96a928b4344 Author: Tobi Oetiker Date: Sun Jul 23 23:01:19 2006 +0000 prepare for the release of smokeping-20060724_trunk commit a89ce7953c4bfb06046b87a517e4401e91c9a219 Author: Tobi Oetiker Date: Sat Jul 22 23:01:03 2006 +0000 prepare for the release of smokeping-20060723_trunk commit d84352847fb49979a9b78410ad9a1df9f2efd6be Author: Tobi Oetiker Date: Fri Jul 21 23:00:58 2006 +0000 prepare for the release of smokeping-20060722_trunk commit 3cb15a9faccb4e8fcaf9919f1805ae5e8927149b Author: Tobi Oetiker Date: Thu Jul 20 23:01:00 2006 +0000 prepare for the release of smokeping-20060721_trunk commit 4cb033293a392832e7748af39ed99b7c5e30eb9d Author: Tobi Oetiker Date: Wed Jul 19 23:00:56 2006 +0000 prepare for the release of smokeping-20060720_trunk commit 161f1b8f58933795b45d772b4b2cd5c0132a2060 Author: Tobi Oetiker Date: Tue Jul 18 23:00:57 2006 +0000 prepare for the release of smokeping-20060719_trunk commit ce8a46b5e9aa091d455ea0e25f5f478a3b6f3110 Author: Tobi Oetiker Date: Mon Jul 17 23:01:06 2006 +0000 prepare for the release of smokeping-20060718_trunk commit 2dc8c44f712a2f70c340dc490adc14b9e6e2058f Author: Tobi Oetiker Date: Sun Jul 16 23:01:00 2006 +0000 prepare for the release of smokeping-20060717_trunk commit 86175a3bdad15b04d2baa969bf6058e93faecabb Author: Tobi Oetiker Date: Sat Jul 15 23:01:09 2006 +0000 prepare for the release of smokeping-20060716_trunk commit db0fe70e88e9d0247e800b9a41e1c217fb028bc8 Author: Tobi Oetiker Date: Fri Jul 14 23:01:09 2006 +0000 prepare for the release of smokeping-20060715_trunk commit 7f719f169b7df45f8c47b6fa11bd0cdd60bc6865 Author: Tobi Oetiker Date: Fri Jul 14 09:06:31 2006 +0000 * added matchers CheckLatency and CheckLoss -- tobi, from Dylan Vanderhoof DylanV semaphore.com commit 1156e3f7256585535d875e6056651cb93f0abf94 Author: Tobi Oetiker Date: Fri Jul 14 09:00:28 2006 +0000 added tacacsplus probe -- Gary.Mikula nasd.com commit f23f0db53df28f650056bd4ae5f644aa998bee2c Author: Tobi Oetiker Date: Thu Jul 13 23:00:54 2006 +0000 prepare for the release of smokeping-20060714_trunk commit 0ec91b093f7fcc8a64e441ac8d883dc7fa503b7e Author: Tobi Oetiker Date: Wed Jul 12 23:00:57 2006 +0000 prepare for the release of smokeping-20060713_trunk commit 8e6a401ce24a3c479bc2f24fe0f594b44d8aba1f Author: Niko Tyni Date: Wed Jul 12 17:32:39 2006 +0000 * pass 'prevmatch' to alert matcher plugins. -- niko, from Dylan Vanderhoof (add to trunk as well) commit d1830b25c0f16ffe684b75ce0c5e4bd2b3f552bb Author: Niko Tyni Date: Wed Jul 12 16:42:00 2006 +0000 Fix morning emails in tSmoke.dist. commit c10f5b164ddf4e727c70f9eaf554f65ef5e2fb27 Author: Tobi Oetiker Date: Tue Jul 11 23:01:00 2006 +0000 prepare for the release of smokeping-20060712_trunk commit b290aa45f2b456046c79fccf68e3e85f04ada40e Author: Tobi Oetiker Date: Mon Jul 10 23:00:55 2006 +0000 prepare for the release of smokeping-20060711_trunk commit 5baf73d8adfbbe6c505edc9a6cae2043a57114f1 Author: Tobi Oetiker Date: Sun Jul 9 23:00:49 2006 +0000 prepare for the release of smokeping-20060710_trunk commit 44e773cfd2038deb1989fa63cd6f29dfb8ede0ad Author: Niko Tyni Date: Sun Jul 9 08:07:21 2006 +0000 Fix duplicate entry in CHANGES. commit 24aad364c78d190bdb371d0f19295cbecfc04ecd Author: Niko Tyni Date: Sun Jul 9 08:06:42 2006 +0000 Merge a change from the 2.0 tree. commit bc44b6eb6edf099dbd8f2ba40ce7ed9e03462add Author: Niko Tyni Date: Sun Jul 9 08:02:54 2006 +0000 AnotherDNS.pm: added option 'require_answers' for testing recursive DNS servers. commit 7db88eb01e1e02688e17ae79638d5a0ec618f746 Author: Tobi Oetiker Date: Sat Jul 8 23:00:52 2006 +0000 prepare for the release of smokeping-20060709_trunk commit 3e300db12870eefb86cfd04e18088efcb5fbf27b Author: Tobi Oetiker Date: Fri Jul 7 23:00:58 2006 +0000 prepare for the release of smokeping-20060708_trunk commit e3ed113b0cad55925ac1850a2b1e8dcd3ee5eb43 Author: Tobi Oetiker Date: Fri Jul 7 18:21:40 2006 +0000 fix loss_color description (it is not percents) and add line color non-pale commit 03be6ba819683a3345571f8e497a2a1bd45a1637 Author: Tobi Oetiker Date: Thu Jul 6 23:00:59 2006 +0000 prepare for the release of smokeping-20060707_trunk commit 20bc0b304390a9180a5cf381c1007cee6bf17a88 Author: Tobi Oetiker Date: Wed Jul 5 23:01:00 2006 +0000 prepare for the release of smokeping-20060706_trunk commit 41426fca0ac308bc015655fb7bfc1a880fcb1b64 Author: Tobi Oetiker Date: Tue Jul 4 23:01:00 2006 +0000 prepare for the release of smokeping-20060705_trunk commit d69240bd861edbf1a189943f86ca3f95fb5c32cb Author: Tobi Oetiker Date: Tue Jul 4 07:21:33 2006 +0000 prepare for the release of smokeping-20060704_trunk commit f4d656e15874284607d875bfa04fd096a2ebf356 Author: Tobi Oetiker Date: Tue Jul 4 07:19:52 2006 +0000 forgot to add when incoorperating the loss_background patch commit 4712a70ca420acce8186b428453bc3c63edf20a1 Author: Tobi Oetiker Date: Tue Jun 27 21:12:36 2006 +0000 new probe Telnet JunOSPing integrated commit 8c3025c21d652c8ab9bb5bf19b221e6dfdabc9ae Author: Tobi Oetiker Date: Tue Jun 27 21:08:46 2006 +0000 added background coloring commit 0c44eb0cc6b20730a7d29030a3b220d664722e2b Author: Tobi Oetiker Date: Mon Jun 26 23:00:56 2006 +0000 prepare for the release of smokeping-20060627_trunk commit 85792ae3d91ca94d0da926a536f2f58d22447a0c Author: Tobi Oetiker Date: Sun Jun 25 23:01:02 2006 +0000 prepare for the release of smokeping-20060626_trunk commit d3b58da692482ac45b5cb365af4fe99a4db93438 Author: Tobi Oetiker Date: Sat Jun 24 23:00:54 2006 +0000 prepare for the release of smokeping-20060625_trunk commit 313e5a392ecfb97f8fdab78ecef6aea7f9790c62 Author: Tobi Oetiker Date: Fri Jun 23 23:01:00 2006 +0000 prepare for the release of smokeping-20060624_trunk commit 446159316e2445b0b5596696a8b135529cc64099 Author: Tobi Oetiker Date: Thu Jun 22 23:00:55 2006 +0000 prepare for the release of smokeping-20060623_trunk commit a91c8844b7e3d570753345b453a12ab46ed42f96 Author: Tobi Oetiker Date: Wed Jun 21 23:00:55 2006 +0000 prepare for the release of smokeping-20060622_trunk commit 7533476fe2aa5d68009a9d63c117b6c192f351c3 Author: Tobi Oetiker Date: Tue Jun 20 23:00:58 2006 +0000 prepare for the release of smokeping-20060621_trunk commit b21de76409f7dd06a507b268fbd857edfd8a0d86 Author: Tobi Oetiker Date: Mon Jun 19 23:00:53 2006 +0000 prepare for the release of smokeping-20060620_trunk commit 3b5baa2cecbfa29e6f355300e6c4068d1ba1dbce Author: Tobi Oetiker Date: Sun Jun 18 23:00:49 2006 +0000 prepare for the release of smokeping-20060619_trunk commit c2d71b63191ed2029b57468dcaa5df824236b0dc Author: Tobi Oetiker Date: Sat Jun 17 23:00:58 2006 +0000 prepare for the release of smokeping-20060618_trunk commit 4fec7afde03c59022a8473b7d465f01ac822ff16 Author: Tobi Oetiker Date: Fri Jun 16 23:00:57 2006 +0000 prepare for the release of smokeping-20060617_trunk commit c6511eb9a138b20fffde614288d13851e3b8219b Author: Tobi Oetiker Date: Thu Jun 15 23:00:54 2006 +0000 prepare for the release of smokeping-20060616_trunk commit 8bc2e1bc392f4d47ddece6a967a2823691179f7f Author: Tobi Oetiker Date: Wed Jun 14 23:00:57 2006 +0000 prepare for the release of smokeping-20060615_trunk commit 3c2f4e5ab0b7318c6ea1e59b829b09533a4aaf25 Author: Tobi Oetiker Date: Tue Jun 13 23:01:02 2006 +0000 prepare for the release of smokeping-20060614_trunk commit ada7c0231d4727090ac38a8a75ae0b67e8901c33 Author: Tobi Oetiker Date: Mon Jun 12 23:00:54 2006 +0000 prepare for the release of smokeping-20060613_trunk commit ed32779e3e1c3e6c26b872d04c3ee38ba88863b5 Author: Tobi Oetiker Date: Sun Jun 11 23:00:51 2006 +0000 prepare for the release of smokeping-20060612_trunk commit ecb759c66137c299fde8448d250ab9ce7a530bae Author: Tobi Oetiker Date: Sat Jun 10 23:00:56 2006 +0000 prepare for the release of smokeping-20060611_trunk commit 154b4af0d6a2c7386dfe6c90441bf41588d75b39 Author: Tobi Oetiker Date: Fri Jun 9 23:01:01 2006 +0000 prepare for the release of smokeping-20060610_trunk commit 1a74a8b236db6c3a8f8996572ad70407bc52864f Author: Tobi Oetiker Date: Thu Jun 8 23:01:02 2006 +0000 prepare for the release of smokeping-20060609_trunk commit 2820736e7ed7adec3c1e34cf83f89b20e727a058 Author: Tobi Oetiker Date: Wed Jun 7 23:00:59 2006 +0000 prepare for the release of smokeping-20060608_trunk commit bf0e5b5088c2704a4fa9537696e496d4de8c97e3 Author: Tobi Oetiker Date: Tue Jun 6 23:01:01 2006 +0000 prepare for the release of smokeping-20060607_trunk commit 4ef7e21bf432ac403d7f9b063a28794595a6dced Author: Tobi Oetiker Date: Mon Jun 5 23:00:52 2006 +0000 prepare for the release of smokeping-20060606_trunk commit 69a6cfbe69cad46a79cae24118c987d85aa703b3 Author: Tobi Oetiker Date: Sun Jun 4 23:00:51 2006 +0000 prepare for the release of smokeping-20060605_trunk commit ed4246d5c391c6b21ab0ccc8c7bccb32e6939641 Author: Tobi Oetiker Date: Sat Jun 3 23:00:51 2006 +0000 prepare for the release of smokeping-20060604_trunk commit 3a8c46ba012c22b5d2e1d0b3117b40b64fd32813 Author: Tobi Oetiker Date: Fri Jun 2 23:00:49 2006 +0000 prepare for the release of smokeping-20060603_trunk commit 2fa7b05cffef73b954a9be329cf51d3d4de72209 Author: Tobi Oetiker Date: Thu Jun 1 23:00:51 2006 +0000 prepare for the release of smokeping-20060602_trunk commit 2ad7c535303ab45e5238507d2d7313ba1275c153 Author: Tobi Oetiker Date: Wed May 31 23:00:58 2006 +0000 prepare for the release of smokeping-20060601_trunk commit a54a90cdbac3c5e91d56a376d1ac375f4bb71f4c Author: Tobi Oetiker Date: Tue May 30 23:01:00 2006 +0000 prepare for the release of smokeping-20060531_trunk commit 69b06b6d2be1213fad332fc9703d21a9def4ad3a Author: Tobi Oetiker Date: Mon May 29 23:00:51 2006 +0000 prepare for the release of smokeping-20060530_trunk commit 6dc9756724675d893fdd7a5b5d360f92ed834295 Author: Tobi Oetiker Date: Sun May 28 23:00:50 2006 +0000 prepare for the release of smokeping-20060529_trunk commit 8ca5b2f635bde291f60b421e1a8f4fad2c0fbe74 Author: Tobi Oetiker Date: Sat May 27 23:00:58 2006 +0000 prepare for the release of smokeping-20060528_trunk commit d39c56dca8b14e5fb90695e62a3ba288e6094d6c Author: Tobi Oetiker Date: Fri May 26 23:00:54 2006 +0000 prepare for the release of smokeping-20060527_trunk commit ff15a9dfc43a89f23ed99e100b97c6280ca79a96 Author: Tobi Oetiker Date: Thu May 25 23:00:51 2006 +0000 prepare for the release of smokeping-20060526_trunk commit b00129a9eed4717d3b320cb728bead23e177e160 Author: Tobi Oetiker Date: Wed May 24 23:00:52 2006 +0000 prepare for the release of smokeping-20060525_trunk commit 22af5167d41c79e382754ae96e408feb135e4ef5 Author: Tobi Oetiker Date: Tue May 23 23:00:51 2006 +0000 prepare for the release of smokeping-20060524_trunk commit 361ba786435396499dae9d858f9bdf26fd385f2f Author: Tobi Oetiker Date: Mon May 22 23:00:54 2006 +0000 prepare for the release of smokeping-20060523_trunk commit 9b89c87e8139103df792cd55cf0cebae2211ea0d Author: Tobi Oetiker Date: Sun May 21 23:00:53 2006 +0000 prepare for the release of smokeping-20060522_trunk commit d1d4941d1821370757de586e0fc06bd36dc8595e Author: Tobi Oetiker Date: Sat May 20 23:00:52 2006 +0000 prepare for the release of smokeping-20060521_trunk commit f8f2d9bdaef64d25ab261004e1d5bd9acc8c2ba8 Author: Tobi Oetiker Date: Fri May 19 23:00:58 2006 +0000 prepare for the release of smokeping-20060520_trunk commit a0650b1631c9588c7fc796afe5536e662c090d4d Author: Tobi Oetiker Date: Thu May 18 23:00:56 2006 +0000 prepare for the release of smokeping-20060519_trunk commit d0b8cabf6e9030ee17b5eda9d4584967f0e25203 Author: Tobi Oetiker Date: Wed May 17 23:00:56 2006 +0000 prepare for the release of smokeping-20060518_trunk commit 236114c315a288a6a863f84becab449a325295e6 Author: Tobi Oetiker Date: Tue May 16 23:00:54 2006 +0000 prepare for the release of smokeping-20060517_trunk commit d314839ab2f912567b1953303b548a3d65612b15 Author: Tobi Oetiker Date: Mon May 15 23:00:51 2006 +0000 prepare for the release of smokeping-20060516_trunk commit c3f200246ff749093fedc0606867967af1568622 Author: Tobi Oetiker Date: Sun May 14 23:00:49 2006 +0000 prepare for the release of smokeping-20060515_trunk commit 5ed6e51c5681cfb899d672a5c86bf6cd2301ea6f Author: Tobi Oetiker Date: Sat May 13 23:00:51 2006 +0000 prepare for the release of smokeping-20060514_trunk commit aa47de5289ea7cd132f38c94c21b6b67647d35ab Author: Tobi Oetiker Date: Fri May 12 23:01:05 2006 +0000 prepare for the release of smokeping-20060513_trunk commit 87f40d8fdbe73a8d76b84871c6ed4a2fe25ded72 Author: Tobi Oetiker Date: Thu May 11 23:00:58 2006 +0000 prepare for the release of smokeping-20060512_trunk commit a4b04c9c2d6be88f61e1da5b8e17de02b09f1344 Author: Tobi Oetiker Date: Wed May 10 23:00:51 2006 +0000 prepare for the release of smokeping-20060511_trunk commit 2f862b1505ae982ecee7a33c0d19bebdf37013b2 Author: Tobi Oetiker Date: Tue May 9 23:01:01 2006 +0000 prepare for the release of smokeping-20060510_trunk commit b00f64b74155e0f4de20a2d0ec40827a04b5b534 Author: Tobi Oetiker Date: Mon May 8 23:00:53 2006 +0000 prepare for the release of smokeping-20060509_trunk commit 14e7c8600754d80b15ae12d7718271690be9e664 Author: Tobi Oetiker Date: Sun May 7 23:00:51 2006 +0000 prepare for the release of smokeping-20060508_trunk commit 908bc3dbac3dbefccaa13e14e197b58999e2d0a7 Author: Tobi Oetiker Date: Sat May 6 23:00:49 2006 +0000 prepare for the release of smokeping-20060507_trunk commit 2e599fc3eff72072eb4228a42b617ca84e5fc3de Author: Tobi Oetiker Date: Fri May 5 23:00:51 2006 +0000 prepare for the release of smokeping-20060506_trunk commit aa462852a935c9c1a258eb5c09d2f5c7b3f5c6e1 Author: Tobi Oetiker Date: Thu May 4 23:00:54 2006 +0000 prepare for the release of smokeping-20060505_trunk commit a8c8a3ef946d1d5303a4556e903941c18e473470 Author: Tobi Oetiker Date: Wed May 3 23:00:53 2006 +0000 prepare for the release of smokeping-20060504_trunk commit 66716035022e2f8158bf4fdbee340637cb563560 Author: Tobi Oetiker Date: Tue May 2 23:00:50 2006 +0000 prepare for the release of smokeping-20060503_trunk commit 0ba264ad26728b522dca8681df97369e42e81b92 Author: Tobi Oetiker Date: Mon May 1 23:00:50 2006 +0000 prepare for the release of smokeping-20060502_trunk commit a1c148476f32f43bfc0c064f3e05dd694230b9ab Author: Tobi Oetiker Date: Sun Apr 30 23:00:51 2006 +0000 prepare for the release of smokeping-20060501_trunk commit 3b6841978aff64e8f21aa424e2245d46c0132094 Author: Tobi Oetiker Date: Sat Apr 29 23:00:51 2006 +0000 prepare for the release of smokeping-20060430_trunk commit c9b778cc793a0aa617b378f289ccca27aa73204a Author: Tobi Oetiker Date: Fri Apr 28 23:00:50 2006 +0000 prepare for the release of smokeping-20060429_trunk commit aca2888dd0ba3669c4a564d91b58b1ff20ff929b Author: Tobi Oetiker Date: Thu Apr 27 23:00:56 2006 +0000 prepare for the release of smokeping-20060428_trunk commit 1b93efcb67eab9d086d737e21705956ff859f9b2 Author: Tobi Oetiker Date: Wed Apr 26 23:00:53 2006 +0000 prepare for the release of smokeping-20060427_trunk commit 979e18a01a43bc15dbd0e8234a2bf607ab08f541 Author: Tobi Oetiker Date: Tue Apr 25 23:00:54 2006 +0000 prepare for the release of smokeping-20060426_trunk commit 305c42df2a4ac4fa8a2b33a0a0683b028e626e98 Author: Tobi Oetiker Date: Mon Apr 24 23:00:53 2006 +0000 prepare for the release of smokeping-20060425_trunk commit a391548f32753e651cb44c297cb010eb9f8d0152 Author: Tobi Oetiker Date: Sun Apr 23 23:00:54 2006 +0000 prepare for the release of smokeping-20060424_trunk commit af42b4765bf1b04ccc024a94d6e3f473df3f2371 Author: Tobi Oetiker Date: Sat Apr 22 23:00:54 2006 +0000 prepare for the release of smokeping-20060423_trunk commit 60ab462d5400ec529c045f40f29bd4cb0d5859bd Author: Tobi Oetiker Date: Fri Apr 21 23:00:55 2006 +0000 prepare for the release of smokeping-20060422_trunk commit 4530ab950e1189b01132f7d2b08ae40d18da1a61 Author: Tobi Oetiker Date: Thu Apr 20 23:01:03 2006 +0000 prepare for the release of smokeping-20060421_trunk commit 971bd0e476bae219341624848d1bae68241a42e8 Author: Tobi Oetiker Date: Wed Apr 19 23:00:55 2006 +0000 prepare for the release of smokeping-20060420_trunk commit 46ee95fed2d9fd96185ba3e845b3b313ad5c05b5 Author: Tobi Oetiker Date: Tue Apr 18 23:00:57 2006 +0000 prepare for the release of smokeping-20060419_trunk commit 1d4293fd5da3b375fb309c30b8072571615813f0 Author: Tobi Oetiker Date: Mon Apr 17 23:01:06 2006 +0000 prepare for the release of smokeping-20060418_trunk commit a2b9b44105bf022c23f5fd8edcdc65fae6c4dcb3 Author: Tobi Oetiker Date: Sun Apr 16 23:00:50 2006 +0000 prepare for the release of smokeping-20060417_trunk commit f15f1a911d68fb398eff6e50f260d17cee2ae956 Author: Niko Tyni Date: Sun Apr 16 06:21:36 2006 +0000 Bring back 'fping -t'. commit d414b046426118fee953f74bde16a31b83fe9fa9 Author: Tobi Oetiker Date: Sat Apr 15 23:00:51 2006 +0000 prepare for the release of smokeping-20060416_trunk commit 321bd6f0be0f2e172b42224efd22fd3eb5111709 Author: Tobi Oetiker Date: Fri Apr 14 23:00:58 2006 +0000 prepare for the release of smokeping-20060415_trunk commit 8d772edffc35ca5adbcbb96a0e4153d0cb744898 Author: Tobi Oetiker Date: Fri Apr 14 08:59:01 2006 +0000 adjusted for new home on oss.oetiker.ch commit 1f583574e3b973536c588a8a7bc3c348cf10d2e1 Author: Tobi Oetiker Date: Thu Apr 13 23:00:57 2006 +0000 prepare for the release of smokeping-20060414_trunk commit 641df363ae015f50c1dbcfd7fee01115fe62f194 Author: Tobi Oetiker Date: Wed Apr 12 23:00:48 2006 +0000 prepare for the release of smokeping-20060413_trunk commit 772d22334d4c9335aa19fcc598920c8f7bd51c60 Author: Tobi Oetiker Date: Tue Apr 11 23:00:56 2006 +0000 prepare for the release of smokeping-20060412_trunk commit 01ce0b453fa4c229931db6926d6e655dc7d6f10c Author: Tobi Oetiker Date: Mon Apr 10 23:00:50 2006 +0000 prepare for the release of smokeping-20060411_trunk commit a287c2968d875521dc681d3730c0ec5d5a3c6474 Author: Tobi Oetiker Date: Sun Apr 9 23:00:50 2006 +0000 prepare for the release of smokeping-20060410_trunk commit c4f790f7df347a185bcc7c749ad7f69f2cabdd19 Author: Tobi Oetiker Date: Sat Apr 8 23:00:54 2006 +0000 prepare for the release of smokeping-20060409_trunk commit a9f6a569bf8f150b1f3ecacffbc5598e85f6f136 Author: Tobi Oetiker Date: Fri Apr 7 23:01:02 2006 +0000 prepare for the release of smokeping-20060408_trunk commit 8523054f6103ece800d8d26014f0a9a2723ece1b Author: Tobi Oetiker Date: Thu Apr 6 23:00:56 2006 +0000 prepare for the release of smokeping-20060407_trunk commit 68bb65f87593483a82ecaa8c636a54d851a58a18 Author: Tobi Oetiker Date: Wed Apr 5 23:00:56 2006 +0000 prepare for the release of smokeping-20060406_trunk commit 18ad7fe4fd3e2b30c246f830bfc27f9d6339523c Author: Tobi Oetiker Date: Tue Apr 4 23:00:59 2006 +0000 prepare for the release of smokeping-20060405_trunk commit 5b28dc9edb84d5486916199881707a5a796b32a6 Author: Tobi Oetiker Date: Mon Apr 3 23:00:53 2006 +0000 prepare for the release of smokeping-20060404_trunk commit 60ca4e5022ad0723ad931603ce9d7aeaae8df4a8 Author: Tobi Oetiker Date: Sun Apr 2 23:00:49 2006 +0000 prepare for the release of smokeping-20060403_trunk commit 75aa992d8cf249e5bf7606d41053216d39d10605 Author: Tobi Oetiker Date: Sat Apr 1 23:00:52 2006 +0000 prepare for the release of smokeping-20060402_trunk commit 599f7c7fb671c160e4886061b92324ae13b951de Author: Tobi Oetiker Date: Fri Mar 31 23:00:49 2006 +0000 prepare for the release of smokeping-20060401_trunk commit 122bc45208329c43618b4777f810e69bf2122a91 Author: Tobi Oetiker Date: Thu Mar 30 23:00:50 2006 +0000 prepare for the release of smokeping-20060331_trunk commit db4a14c92108d1a53ce77d8d866cede23980df27 Author: Tobi Oetiker Date: Wed Mar 29 23:00:52 2006 +0000 prepare for the release of smokeping-20060330_trunk commit 7b1759db61292ea7805502ecbd4e13986c46fb38 Author: Tobi Oetiker Date: Tue Mar 28 23:00:48 2006 +0000 prepare for the release of smokeping-20060329_trunk commit 7089b5c78e9194c097a488eb87b3e45b416d94bc Author: Tobi Oetiker Date: Mon Mar 27 23:00:51 2006 +0000 prepare for the release of smokeping-20060328_trunk commit 4f7b53be0f6b0ca441e680a4c204c6bb9ddb5b29 Author: Tobi Oetiker Date: Sun Mar 26 23:01:02 2006 +0000 prepare for the release of smokeping-20060327_trunk commit 52b28733e7944e8d271d9e83f2b6da15c2f4a97d Author: Tobi Oetiker Date: Sun Mar 26 00:00:55 2006 +0000 prepare for the release of smokeping-20060326_trunk commit dfede96a6777b23f8bfdab4de9bc18f63012cca5 Author: Tobi Oetiker Date: Sat Mar 25 00:00:56 2006 +0000 prepare for the release of smokeping-20060325_trunk commit caf2371553daafb3f463f48063266b7a0e9e9bcd Author: Tobi Oetiker Date: Fri Mar 24 16:55:30 2006 +0000 let the name of the dns server in DNS.pm be configurable -- ark commit dea4aa149f292a456eb1412fbdd83d2016e77aa7 Author: Tobi Oetiker Date: Fri Mar 24 00:00:56 2006 +0000 prepare for the release of smokeping-20060324_trunk commit 067711fa0dbf61e7fa165121d9735b1a4eb989e1 Author: Tobi Oetiker Date: Thu Mar 23 00:00:56 2006 +0000 prepare for the release of smokeping-20060323_trunk commit 1247ca957d00432d6aa3c4f2cbf9c509ea545c03 Author: Tobi Oetiker Date: Wed Mar 22 00:00:53 2006 +0000 prepare for the release of smokeping-20060322_trunk commit eb5b60612aec46ef7a321c223237d02c8439083b Author: Tobi Oetiker Date: Tue Mar 21 00:00:55 2006 +0000 prepare for the release of smokeping-20060321_trunk commit edf96cad95a22cb15deda328ed891c7ff1ae21a2 Author: Tobi Oetiker Date: Mon Mar 20 00:00:50 2006 +0000 prepare for the release of smokeping-20060320_trunk commit 21fc62e070f4b87a58bce29cee25c4dfdf687746 Author: Tobi Oetiker Date: Sun Mar 19 00:00:52 2006 +0000 prepare for the release of smokeping-20060319_trunk commit c99ad9c627f6df9f82438223f8966d87907d0650 Author: Tobi Oetiker Date: Sat Mar 18 00:00:52 2006 +0000 prepare for the release of smokeping-20060318_trunk commit 7364208763247000d58ca49355737e98316517f4 Author: Tobi Oetiker Date: Fri Mar 17 00:00:58 2006 +0000 prepare for the release of smokeping-20060317_trunk commit 28828494e3c14e84232a895104411d855bfd38b2 Author: Tobi Oetiker Date: Thu Mar 16 00:00:53 2006 +0000 prepare for the release of smokeping-20060316_trunk commit 5ba7e23f3f72293b7bc8c97fa6f071288b35437a Author: Tobi Oetiker Date: Wed Mar 15 00:00:57 2006 +0000 prepare for the release of smokeping-20060315_trunk commit 07269b146a214f17c6a4587db18cf5fefe6280cc Author: Tobi Oetiker Date: Tue Mar 14 00:00:50 2006 +0000 prepare for the release of smokeping-20060314_trunk commit 958c578f294a753fa290981e1bffd1224bbdb9bb Author: Tobi Oetiker Date: Mon Mar 13 00:00:52 2006 +0000 prepare for the release of smokeping-20060313_trunk commit 5e2b4100c9807be39f75a7af2f1f195330e05b0c Author: Tobi Oetiker Date: Sun Mar 12 00:00:49 2006 +0000 prepare for the release of smokeping-20060312_trunk commit 8320d440faa98b29c5bc197dd2ef4929bdd55275 Author: Tobi Oetiker Date: Sat Mar 11 00:00:50 2006 +0000 prepare for the release of smokeping-20060311_trunk commit 5ab1dafe1779e191f506c13b7a9f16d023a9721b Author: Tobi Oetiker Date: Fri Mar 10 00:00:51 2006 +0000 prepare for the release of smokeping-20060310_trunk commit 7d0a6d44483ca890405eec34b47dc8658d304b11 Author: Tobi Oetiker Date: Thu Mar 9 00:00:51 2006 +0000 prepare for the release of smokeping-20060309_trunk commit 59ecc933d413dadcc1393cea8b05c3d66c6399c0 Author: Tobi Oetiker Date: Wed Mar 8 00:00:54 2006 +0000 prepare for the release of smokeping-20060308_trunk commit 1cd0f0b0a673c49189a112d60d8e5258390b20d0 Author: Tobi Oetiker Date: Tue Mar 7 00:00:48 2006 +0000 prepare for the release of smokeping-20060307_trunk commit 57883cc6af995e35fa01491cb6ce5b5188a663ab Author: Tobi Oetiker Date: Mon Mar 6 00:00:49 2006 +0000 prepare for the release of smokeping-20060306_trunk commit 09500f0224d8717db157f6d21961a22dbef329a7 Author: Tobi Oetiker Date: Sun Mar 5 00:00:49 2006 +0000 prepare for the release of smokeping-20060305_trunk commit ea72fc0b5ded9d967d9f85a5574be692b89559a0 Author: Tobi Oetiker Date: Sat Mar 4 00:00:50 2006 +0000 prepare for the release of smokeping-20060304_trunk commit 22427a3b0d45483d3277c386ec95f9bf288a4fd5 Author: Tobi Oetiker Date: Fri Mar 3 00:00:50 2006 +0000 prepare for the release of smokeping-20060303_trunk commit 1d8ea2813596138d931f4dcc42ac5b3011a7a185 Author: Tobi Oetiker Date: Thu Mar 2 00:00:48 2006 +0000 prepare for the release of smokeping-20060302_trunk commit ced1a2d96fa017fb8161d48a6fc28a945e83c856 Author: Tobi Oetiker Date: Wed Mar 1 00:00:54 2006 +0000 prepare for the release of smokeping-20060301_trunk commit efd79d1d39d86c71c2ce6d324b543e159c2350bc Author: Tobi Oetiker Date: Tue Feb 28 00:00:52 2006 +0000 prepare for the release of smokeping-20060228_trunk commit 8af9909af7667d0d4b4af52edd8feec8000d1009 Author: Tobi Oetiker Date: Mon Feb 27 00:00:54 2006 +0000 prepare for the release of smokeping-20060227_trunk commit 127dddf876c89630fcd0f4322bbebd136057a78e Author: Tobi Oetiker Date: Sun Feb 26 00:00:58 2006 +0000 prepare for the release of smokeping-20060226_trunk commit 4f924e7e288b8b827a1f39f755a4739bce2f8ed0 Author: Tobi Oetiker Date: Sat Feb 25 00:01:04 2006 +0000 prepare for the release of smokeping-20060225_trunk commit 2ceec4653085b74246e9f2828ee76183e55d1750 Author: Tobi Oetiker Date: Fri Feb 24 00:00:55 2006 +0000 prepare for the release of smokeping-20060224_trunk commit 9d0ead6a745f6ca857ef9d318a0bb7d4b5ed51fa Author: Tobi Oetiker Date: Thu Feb 23 00:00:56 2006 +0000 prepare for the release of smokeping-20060223_trunk commit ce8d46be47469deda66754b6b261638875a6d63e Author: Tobi Oetiker Date: Wed Feb 22 00:00:54 2006 +0000 prepare for the release of smokeping-20060222_trunk commit 1c3d445889e35f89a1150d0585e8d5aa8ef26f18 Author: Tobi Oetiker Date: Tue Feb 21 00:00:53 2006 +0000 prepare for the release of smokeping-20060221_trunk commit 03550709db57595b831936a6414f8a9a3372c44e Author: Tobi Oetiker Date: Mon Feb 20 00:00:49 2006 +0000 prepare for the release of smokeping-20060220_trunk commit c70d17ccd08cbd5ceca437a3bf0b8e1826bf87b6 Author: Tobi Oetiker Date: Sun Feb 19 00:00:48 2006 +0000 prepare for the release of smokeping-20060219_trunk commit d46cf31ae2666708ddbf288fd085d1bb07e9bbc4 Author: Tobi Oetiker Date: Sat Feb 18 00:00:47 2006 +0000 prepare for the release of smokeping-20060218_trunk commit 0909f53edec7176a263a827715eb419fe2ce0efa Author: Tobi Oetiker Date: Fri Feb 17 00:00:58 2006 +0000 prepare for the release of smokeping-20060217_trunk commit 8a2e8696148262389ff39ead2dd114e54db44139 Author: Tobi Oetiker Date: Thu Feb 16 00:00:54 2006 +0000 prepare for the release of smokeping-20060216_trunk commit bd19f805a41846fdca4345810640662ba9c8567b Author: Tobi Oetiker Date: Wed Feb 15 00:00:54 2006 +0000 prepare for the release of smokeping-20060215_trunk commit 0d4b5ded0d67a027f3f3bd9e0fe20a4c3891cc8c Author: Tobi Oetiker Date: Tue Feb 14 00:00:49 2006 +0000 prepare for the release of smokeping-20060214_trunk commit 0dd43b8d31eb1748474c7cd91f2a30508b1100e8 Author: Tobi Oetiker Date: Mon Feb 13 00:00:48 2006 +0000 prepare for the release of smokeping-20060213_trunk commit 8e8c72864c24b4cfa9390c50a5e61a48d0e5be0b Author: Tobi Oetiker Date: Sun Feb 12 00:00:49 2006 +0000 prepare for the release of smokeping-20060212_trunk commit 998c468147b2ecff21d2d27da016d48149484659 Author: Tobi Oetiker Date: Sat Feb 11 00:00:48 2006 +0000 prepare for the release of smokeping-20060211_trunk commit 57d0f8aad1756ab4bf7a3350fe1eded46d514f1c Author: Tobi Oetiker Date: Fri Feb 10 00:00:52 2006 +0000 prepare for the release of smokeping-20060210_trunk commit 58dcd0ccbc914d4264367bf544e4e2cd5544e779 Author: Tobi Oetiker Date: Thu Feb 9 00:00:55 2006 +0000 prepare for the release of smokeping-20060209_trunk commit 6fa384bf039b941380e7765f0ff37c931825523c Author: Tobi Oetiker Date: Wed Feb 8 00:00:51 2006 +0000 prepare for the release of smokeping-20060208_trunk commit 456679eeca960ff7d5d642ebde524105d0486282 Author: Tobi Oetiker Date: Tue Feb 7 23:22:05 2006 +0000 added multihost alerts commit 6ff302bb024f84d41b8b11ac21047130f426d154 Author: Tobi Oetiker Date: Tue Feb 7 00:00:53 2006 +0000 prepare for the release of smokeping-20060207_trunk commit 79f2ea2d22c602f37dcad2ac325b8bee0935e8f7 Author: Tobi Oetiker Date: Mon Feb 6 00:01:07 2006 +0000 prepare for the release of smokeping-20060206_trunk commit 52b3634acaa71fa722ac6d6d46757f80d1545e4b Author: Tobi Oetiker Date: Sun Feb 5 00:00:49 2006 +0000 prepare for the release of smokeping-20060205_trunk commit 064d3e4382f6312f4fe1e9198342931f22f4ae55 Author: Tobi Oetiker Date: Sat Feb 4 00:00:49 2006 +0000 prepare for the release of smokeping-20060204_trunk commit 4f3bfa912f2db07511174c3e00cb5a08d119ff40 Author: Tobi Oetiker Date: Fri Feb 3 00:00:53 2006 +0000 prepare for the release of smokeping-20060203_trunk commit cfa4f1124afc197ab9e14ddb6cdd62fe3b9e4c7d Author: Tobi Oetiker Date: Thu Feb 2 00:00:52 2006 +0000 prepare for the release of smokeping-20060202_trunk commit 0a0d6309f769c2dc835170b483326c1a88a629f3 Author: Tobi Oetiker Date: Wed Feb 1 00:00:50 2006 +0000 prepare for the release of smokeping-20060201_trunk commit ebf647aebd49a30a50e5e46e6e2a463420fbb012 Author: Tobi Oetiker Date: Tue Jan 31 00:00:49 2006 +0000 prepare for the release of smokeping-20060131_trunk commit 0160ab418253e9d3d815251e226c602a1d90cd7f Author: Tobi Oetiker Date: Mon Jan 30 00:00:58 2006 +0000 prepare for the release of smokeping-20060130_trunk commit 54a23742e701e010d85c62c9565b78c315c665f1 Author: Tobi Oetiker Date: Sun Jan 29 00:00:56 2006 +0000 prepare for the release of smokeping-20060129_trunk commit b382ac386b54e4fabe087fedad380ecd23a6d12c Author: Tobi Oetiker Date: Sat Jan 28 00:00:48 2006 +0000 prepare for the release of smokeping-20060128_trunk commit fe0e0f001d671727fc891af3d7b5f861dfb49de2 Author: Tobi Oetiker Date: Fri Jan 27 00:00:49 2006 +0000 prepare for the release of smokeping-20060127_trunk commit 33e761c82de6a458c1260c2212b4e1b51c28c989 Author: Tobi Oetiker Date: Thu Jan 26 00:00:52 2006 +0000 prepare for the release of smokeping-20060126_trunk commit 0c86383ab59a89fb6f8af4895e02d9e72213edb8 Author: Tobi Oetiker Date: Wed Jan 25 00:00:52 2006 +0000 prepare for the release of smokeping-20060125_trunk commit 62e3577448c628db993746355c9e48162fbcf898 Author: Tobi Oetiker Date: Tue Jan 24 00:00:56 2006 +0000 prepare for the release of smokeping-20060124_trunk commit f8e5cb064dd35f2872ffcb90e623bb3fa55ce82c Author: Tobi Oetiker Date: Mon Jan 23 00:00:58 2006 +0000 prepare for the release of smokeping-20060123_trunk commit 2a52eba5e497c573aa34e83583427b42064be570 Author: Tobi Oetiker Date: Sun Jan 22 00:00:54 2006 +0000 prepare for the release of smokeping-20060122_trunk commit c97e35208b47b3e4239fa64320c577e1d96cc9e6 Author: Tobi Oetiker Date: Sat Jan 21 00:00:53 2006 +0000 prepare for the release of smokeping-20060121_trunk commit d2aa2784d769f97ed657f1f5a9e1ccbdd3ce242d Author: Tobi Oetiker Date: Fri Jan 20 00:00:53 2006 +0000 prepare for the release of smokeping-20060120_trunk commit cbe6eb611c92f5eafef03940ff8d4610490d7351 Author: Tobi Oetiker Date: Thu Jan 19 00:00:53 2006 +0000 prepare for the release of smokeping-20060119_trunk commit ff4556debdd900c0e0c12ea1f02f336832badb35 Author: Tobi Oetiker Date: Wed Jan 18 00:00:53 2006 +0000 prepare for the release of smokeping-20060118_trunk commit 2725616dc36e59b6524ada73e1f492c248aafc1f Author: Tobi Oetiker Date: Tue Jan 17 00:00:52 2006 +0000 prepare for the release of smokeping-20060117_trunk commit 16716a8b7d09afa31172e93399b4ffd66bb688c1 Author: Tobi Oetiker Date: Mon Jan 16 00:01:07 2006 +0000 prepare for the release of smokeping-20060116_trunk commit a948ae4ad598f2beb753040f6da849c08d45ee83 Author: Tobi Oetiker Date: Sun Jan 15 00:00:50 2006 +0000 prepare for the release of smokeping-20060115_trunk commit ed17a6b7b8dcf46de7aec37777aeb525af65c7ac Author: Tobi Oetiker Date: Sat Jan 14 00:00:47 2006 +0000 prepare for the release of smokeping-20060114_trunk commit c186d8f231b999aea5c64c4c38c9f04a2c79ee34 Author: Tobi Oetiker Date: Fri Jan 13 00:00:53 2006 +0000 prepare for the release of smokeping-20060113_trunk commit da9ca937189fbd8e610fa6d9b9df0718e55a886e Author: Tobi Oetiker Date: Thu Jan 12 00:00:57 2006 +0000 prepare for the release of smokeping-20060112_trunk commit 32a5c55063a7af8f655df33bad5cbf56b70a4cc5 Author: Tobi Oetiker Date: Wed Jan 11 00:00:59 2006 +0000 prepare for the release of smokeping-20060111_trunk commit 62290ff74c8c5f66f2a869d6753ce5ac945c9334 Author: Tobi Oetiker Date: Tue Jan 10 00:00:50 2006 +0000 prepare for the release of smokeping-20060110_trunk commit 2f5c41eb902dc2d6a16071a09e753f5d7a970f69 Author: Tobi Oetiker Date: Mon Jan 9 00:01:03 2006 +0000 prepare for the release of smokeping-20060109_trunk commit 589d0704143ee6003456f3e2f6750378913cfc5f Author: Tobi Oetiker Date: Sun Jan 8 00:00:47 2006 +0000 prepare for the release of smokeping-20060108_trunk commit 1c14828cfb69e39b4ec7ca47f7c12e492045736f Author: Tobi Oetiker Date: Sat Jan 7 00:00:58 2006 +0000 prepare for the release of smokeping-20060107_trunk commit 6772387bcd7b604ad28d12a49e5806a872ad3b79 Author: Tobi Oetiker Date: Fri Jan 6 00:01:05 2006 +0000 prepare for the release of smokeping-20060106_trunk commit b0435f544c7bc175a2a1741394357f2f44622a97 Author: Tobi Oetiker Date: Thu Jan 5 20:14:36 2006 +0000 portability for perl 5.8.7 commit fb6979fa7f47246b2b8fd022f448030b7e1b8702 Author: Tobi Oetiker Date: Thu Jan 5 00:00:59 2006 +0000 prepare for the release of smokeping-20060105_trunk commit 7d6262a81e61ad1c112a4318b2fc1c972940d0bc Author: Tobi Oetiker Date: Wed Jan 4 00:00:52 2006 +0000 prepare for the release of smokeping-20060104_trunk commit 7afdc7aade6f31623b3cebb113e8768e982fad31 Author: Tobi Oetiker Date: Tue Jan 3 00:00:52 2006 +0000 prepare for the release of smokeping-20060103_trunk commit 9333ae4fead9fd1e066e6c10c731fa30e9bb7161 Author: Tobi Oetiker Date: Mon Jan 2 00:01:01 2006 +0000 prepare for the release of smokeping-20060102_trunk commit a25527165845fd32dd1ac054d3962c83bad989cb Author: Tobi Oetiker Date: Sun Jan 1 00:00:54 2006 +0000 prepare for the release of smokeping-20060101_trunk commit 448ab9a128acc6005fa6cd8eaecb540ae40aea71 Author: Tobi Oetiker Date: Sat Dec 31 00:01:03 2005 +0000 prepare for the release of smokeping-20051231_trunk commit be82526c51ec0359c0d79606175536cd9ff94d8b Author: Tobi Oetiker Date: Fri Dec 30 00:00:50 2005 +0000 prepare for the release of smokeping-20051230_trunk commit ae6b1e03bf7baf9e2031b445d31d787c20da1823 Author: Tobi Oetiker Date: Thu Dec 29 00:00:50 2005 +0000 prepare for the release of smokeping-20051229_trunk commit 63a0daf10ee069e05189ab4c732982b91c7ac97a Author: Tobi Oetiker Date: Wed Dec 28 00:00:56 2005 +0000 prepare for the release of smokeping-20051228_trunk commit dd0e5f50b634785c017b365d7af1b6a7c3087b23 Author: Tobi Oetiker Date: Tue Dec 27 00:01:01 2005 +0000 prepare for the release of smokeping-20051227_trunk commit b3498e0092465209bd5b96ff0dd48ea8f19b6e3a Author: Tobi Oetiker Date: Mon Dec 26 00:00:57 2005 +0000 prepare for the release of smokeping-20051226_trunk commit 537c95d700080b23cc3dac5e1bf17eaa83a390f3 Author: Tobi Oetiker Date: Sun Dec 25 00:00:59 2005 +0000 prepare for the release of smokeping-20051225_trunk commit e47d849259ed6c43463a873073c14582618d84bb Author: Tobi Oetiker Date: Sat Dec 24 00:00:53 2005 +0000 prepare for the release of smokeping-20051224_trunk commit 5b3966df8b51691bd8fc69e768e9676bc38e9d3e Author: Tobi Oetiker Date: Fri Dec 23 00:00:50 2005 +0000 prepare for the release of smokeping-20051223_trunk commit 8f4f24ab6d397a46e228c21c5964aab07a67a7e7 Author: Tobi Oetiker Date: Thu Dec 22 00:01:07 2005 +0000 prepare for the release of smokeping-20051222_trunk commit a7def2ca84fad70758e24bbc3d83d330d37f2570 Author: Tobi Oetiker Date: Wed Dec 21 00:00:58 2005 +0000 prepare for the release of smokeping-20051221_trunk commit 22462833c1511c921822ba6f3eca4ea2d3cacf61 Author: Tobi Oetiker Date: Tue Dec 20 20:49:54 2005 +0000 synced up with 2.0 branch commit 1bb4dde5b7a92d8cbe996cda79cd0b098a8dfb6a Author: Tobi Oetiker Date: Tue Dec 20 00:01:15 2005 +0000 prepare for the release of smokeping-20051220_trunk commit 4b00783932733db3b58296742e3f7946e697dd64 Author: Tobi Oetiker Date: Mon Dec 19 00:01:05 2005 +0000 prepare for the release of smokeping-20051219_trunk commit b1aa79d75ffc85cafc945a8e7253f56a9e2b522a Author: Tobi Oetiker Date: Sun Dec 18 00:01:16 2005 +0000 prepare for the release of smokeping-20051218_trunk commit a564850ad79ef936f9acd8a60e763ce7bd91a0d0 Author: Tobi Oetiker Date: Sat Dec 17 00:00:57 2005 +0000 prepare for the release of smokeping-20051217_trunk commit 61429c9cb042e31f0b79a85f63083a10a202528e Author: Tobi Oetiker Date: Fri Dec 16 00:00:54 2005 +0000 prepare for the release of smokeping-20051216_trunk commit c3ebdbd645add45df0e6ae7d7759ede0e9b655f4 Author: Tobi Oetiker Date: Thu Dec 15 00:01:01 2005 +0000 prepare for the release of smokeping-20051215_trunk commit b6674d6f5485d425edfd88611389f909bd4b2332 Author: Tobi Oetiker Date: Wed Dec 14 00:00:54 2005 +0000 prepare for the release of smokeping-20051214_trunk commit 34a47cf6dd9f7e660182693e41d39d06c155d461 Author: Tobi Oetiker Date: Tue Dec 13 00:01:13 2005 +0000 prepare for the release of smokeping-20051213_trunk commit 2aeb1cfb160a72307b3c5dd6d122a533ff4f9b55 Author: Tobi Oetiker Date: Mon Dec 12 00:01:07 2005 +0000 prepare for the release of smokeping-20051212_trunk commit c1ac0cbb380212efff08eda78af5cbe5e18c5935 Author: Niko Tyni Date: Sun Dec 11 07:44:12 2005 +0000 * brought trunk/ up to date commit 4bb9e387247d11ba4c842c4f6490d0e210615d2b Author: Tobi Oetiker Date: Sun Dec 11 00:01:05 2005 +0000 prepare for the release of smokeping-20051211_trunk commit 7966425f1a919b1154fb4c29ce5ba3b2cfac2507 Author: Tobi Oetiker Date: Sat Dec 10 00:00:54 2005 +0000 prepare for the release of smokeping-20051210_trunk commit dee8b5e5124e9be822593638ee3af6abb0e32567 Author: Tobi Oetiker Date: Fri Dec 9 00:00:54 2005 +0000 prepare for the release of smokeping-20051209_trunk commit db20031e50e0fb6b6ed0f540997b3d7250f300c3 Author: Tobi Oetiker Date: Thu Dec 8 00:00:54 2005 +0000 prepare for the release of smokeping-20051208_trunk commit b1b3211571281154866ab83eb36f921930b23041 Author: Tobi Oetiker Date: Wed Dec 7 00:00:57 2005 +0000 prepare for the release of smokeping-20051207_trunk commit f2dde2dccf7521f1e1ef242e49a0de4de992d483 Author: Tobi Oetiker Date: Tue Dec 6 00:00:52 2005 +0000 prepare for the release of smokeping-20051206_trunk commit 4114bcf074676b01159284cfa6d14642c748a947 Author: Tobi Oetiker Date: Mon Dec 5 00:01:03 2005 +0000 prepare for the release of smokeping-20051205_trunk commit 60e55de4f17990c6917933e4be8c0e98699085dd Author: Tobi Oetiker Date: Sun Dec 4 00:00:53 2005 +0000 prepare for the release of smokeping-20051204_trunk commit 96ff6333350d80852209f984e6a08ce69be3ab74 Author: Tobi Oetiker Date: Sat Dec 3 00:00:55 2005 +0000 prepare for the release of smokeping-20051203_trunk commit c804efc1111ab2fc29f90d8ba0dcbfcd25f5b43d Author: Niko Tyni Date: Fri Dec 2 21:45:05 2005 +0000 * brought trunk/ up to date commit f628316ec477ef0173567ef0810f37817df117a2 Author: Tobi Oetiker Date: Fri Dec 2 00:00:55 2005 +0000 prepare for the release of smokeping-20051202_trunk commit 2ab647d1e15c52b9947626b17216320ee1dfeaa2 Author: Tobi Oetiker Date: Thu Dec 1 00:00:55 2005 +0000 prepare for the release of smokeping-20051201_trunk commit 94fa5e5e42c996131b8d4960f3fffb55794cf15d Author: Tobi Oetiker Date: Wed Nov 30 00:00:52 2005 +0000 prepare for the release of smokeping-20051130_trunk commit 3c4cd65c711a8a2f2f63b127be58625e0fb3c6f1 Author: Tobi Oetiker Date: Tue Nov 29 00:02:10 2005 +0000 prepare for the release of smokeping-20051129_trunk commit e64fb3c94eb46a3c802ce41209f1cdcece5dfb74 Author: Tobi Oetiker Date: Mon Nov 28 00:01:02 2005 +0000 prepare for the release of smokeping-20051128_trunk commit 846c9d27f04566611a57a30eb70dfd38a46b4d13 Author: Tobi Oetiker Date: Sun Nov 27 00:01:01 2005 +0000 prepare for the release of smokeping-20051127_trunk commit 0217762c01814425d80e73d24d89740304c5554d Author: Tobi Oetiker Date: Sat Nov 26 00:00:59 2005 +0000 prepare for the release of smokeping-20051126_trunk commit 938b38ff8c7d95e73234926c06569018b33a8362 Author: Tobi Oetiker Date: Fri Nov 25 00:01:07 2005 +0000 prepare for the release of smokeping-20051125_trunk commit b2b0ee599075672447ad0508fecf61fbe25f999e Author: Tobi Oetiker Date: Thu Nov 24 20:09:02 2005 +0000 fixed spelling for height commit 5c4787a7e82c29fede4eac87553e94df42e14eb6 Author: Tobi Oetiker Date: Thu Nov 24 00:00:57 2005 +0000 prepare for the release of smokeping-20051124_trunk commit 73e555ad9f43d97d3f82b813f1229a86ac27756a Author: Tobi Oetiker Date: Wed Nov 23 00:00:56 2005 +0000 prepare for the release of smokeping-20051123_trunk commit a200270873a3572fcf5071cfe8ea8fc8aad744bb Author: Tobi Oetiker Date: Tue Nov 22 00:01:02 2005 +0000 prepare for the release of smokeping-20051122_trunk commit 9b0e13fcc29fc233e55d64ec5426c9fe048e6b4b Author: Tobi Oetiker Date: Mon Nov 21 00:01:21 2005 +0000 prepare for the release of smokeping-20051121_trunk commit 6a0eee4edd4efc290053db9719f298c40c1aa37b Author: Tobi Oetiker Date: Sun Nov 20 00:00:53 2005 +0000 prepare for the release of smokeping-20051120_trunk commit 5c3a70d83c55785dd4f18c0fef3f3837bc779b8d Author: Tobi Oetiker Date: Sat Nov 19 00:00:53 2005 +0000 prepare for the release of smokeping-20051119_trunk commit 880202c220f29aabf072e899aab5f6b2a2e9e65e Author: Tobi Oetiker Date: Fri Nov 18 00:00:53 2005 +0000 prepare for the release of smokeping-20051118_trunk commit 72462747acbc8a52e04098093d6d84938d366069 Author: Tobi Oetiker Date: Thu Nov 17 00:01:02 2005 +0000 prepare for the release of smokeping-20051117_trunk commit d5ac26abe33b59bff4f3576b346943758944f5be Author: Tobi Oetiker Date: Wed Nov 16 00:00:55 2005 +0000 prepare for the release of smokeping-20051116_trunk commit da3520af54c9cf9a2b34f5667160c12349bc8169 Author: Tobi Oetiker Date: Tue Nov 15 00:01:08 2005 +0000 prepare for the release of smokeping-20051115_trunk commit f7520e9d2710026e7e154503fdba5e8a1751423a Author: Niko Tyni Date: Mon Nov 14 22:09:54 2005 +0000 * lib/Smokeping/probes/FPing.pm, doc/smokeping_upgrade.pod, CHANGES: + remove the FPing 'timeout' variable, since it never really did anything commit 334ec7968c236ad0bc7937b4ab87f5abd7c116a2 Author: Niko Tyni Date: Mon Nov 14 21:57:00 2005 +0000 * (trunk)/ lib/Smokeping.pm, CHANGES: + use the 'cgiurl' variable from the 'General' section for all CGI self-refering links commit fdf5205ed32123872ff09d475dfdd9190eaade9d Author: Tobi Oetiker Date: Mon Nov 14 00:01:05 2005 +0000 prepare for the release of smokeping-20051114_trunk commit 4042816c7974942bd5ac2e6f3c5dd5465297f504 Author: Tobi Oetiker Date: Sun Nov 13 00:01:09 2005 +0000 prepare for the release of smokeping-20051113_trunk commit 3e7bc9eb6f96569e3e9f80c6812d84d83418bb6a Author: Tobi Oetiker Date: Sat Nov 12 00:01:01 2005 +0000 prepare for the release of smokeping-20051112_trunk commit b8d8935bf52baea0170d74db6bdbf82d5dc21231 Author: Tobi Oetiker Date: Fri Nov 11 00:00:57 2005 +0000 prepare for the release of smokeping-20051111_trunk commit 20cbbde0a799cfd82fb3453187e8c15ab72dd181 Author: Tobi Oetiker Date: Thu Nov 10 00:00:58 2005 +0000 prepare for the release of smokeping-20051110_trunk commit 5fa129240541ea49fdd1c1e767c461ceaee5c9a2 Author: Tobi Oetiker Date: Wed Nov 9 00:00:56 2005 +0000 prepare for the release of smokeping-20051109_trunk commit 2295a13ccf466b166d8e7d15bea363a01753b8a4 Author: Tobi Oetiker Date: Tue Nov 8 00:00:52 2005 +0000 prepare for the release of smokeping-20051108_trunk commit 8554c768b586a3b15f14e7aa6b397f9c4efce4b4 Author: Tobi Oetiker Date: Mon Nov 7 00:01:04 2005 +0000 prepare for the release of smokeping-20051107_trunk commit 714f7e3d167b5dd3a20c508fc083ac8132e10bb5 Author: Niko Tyni Date: Sun Nov 6 09:52:59 2005 +0000 * trunk/ lib/Smokeping/probes/Curl.pm, CHANGES: + don't take '0' for 'true' with the 'ssl2' or 'insecure_ssl' options commit b12124181c5cd5f3373c754c2e1795fd2d02fac3 Author: Tobi Oetiker Date: Sun Nov 6 00:00:53 2005 +0000 prepare for the release of smokeping-20051106_trunk commit f5eab423141ac2f28f1886dff4581f222430ca08 Author: Tobi Oetiker Date: Sat Nov 5 00:00:52 2005 +0000 prepare for the release of smokeping-20051105_trunk commit a644389b1d268fa892f1c31ca2578fbdc47b9620 Author: Tobi Oetiker Date: Fri Nov 4 00:00:59 2005 +0000 prepare for the release of smokeping-20051104_trunk commit 8ab320e78f3e87258976262d8b8df26d11384e5b Author: Tobi Oetiker Date: Thu Nov 3 00:00:56 2005 +0000 prepare for the release of smokeping-20051103_trunk commit 04aa92d0a09308a99631bd73f69838a43065d02b Author: Tobi Oetiker Date: Wed Nov 2 00:00:58 2005 +0000 prepare for the release of smokeping-20051102_trunk commit c933a6039693020169584f878a3cfade99c58e92 Author: Tobi Oetiker Date: Tue Nov 1 00:00:53 2005 +0000 prepare for the release of smokeping-20051101_trunk commit 485aa3052dc30b4fd18f29a04a63849937e65474 Author: Tobi Oetiker Date: Mon Oct 31 00:01:03 2005 +0000 prepare for the release of smokeping-20051031_trunk commit 6a4c5617d253d488000e511c028afc4cc46aa7e2 Author: Tobi Oetiker Date: Sat Oct 29 23:00:54 2005 +0000 prepare for the release of smokeping-20051030_trunk commit 63bfbe565cd684d88eed9a0993b035ce6addae70 Author: Tobi Oetiker Date: Fri Oct 28 23:00:59 2005 +0000 prepare for the release of smokeping-20051029_trunk commit 86525919fb7ff3e1cd8c1f3ab6bfb5f8c095468e Author: Niko Tyni Date: Fri Oct 28 11:19:29 2005 +0000 * (trunk,2.0)/ lib/Smokeping/probes/LDAP.pm, CHANGES: + add the 'scope' Net::LDAP search option to the LDAP probe commit 5f5bd15d7cbd95b1ba4507dbe79c32628b3a6a80 Author: Tobi Oetiker Date: Thu Oct 27 23:00:52 2005 +0000 prepare for the release of smokeping-20051028_trunk commit 65574bbd22f7cbf384a41a940f8edccb21a09db6 Author: Tobi Oetiker Date: Wed Oct 26 23:00:51 2005 +0000 prepare for the release of smokeping-20051027_trunk commit 3dd1d1e939a173e50f5ff6d54a515e10a2c46cd4 Author: Tobi Oetiker Date: Tue Oct 25 23:00:56 2005 +0000 prepare for the release of smokeping-20051026_trunk commit 833e7bdfa9e680f4ad6ae5b7e9d96c4f14394ca1 Author: Tobi Oetiker Date: Mon Oct 24 23:00:58 2005 +0000 prepare for the release of smokeping-20051025_trunk commit b5e49395509d49aa1cc28c17912bed4a498a102d Author: Tobi Oetiker Date: Sun Oct 23 23:01:11 2005 +0000 prepare for the release of smokeping-20051024_trunk commit c9e23f7a3da48ffa3a248254eb4107034a70d6ac Author: Tobi Oetiker Date: Sat Oct 22 23:00:58 2005 +0000 prepare for the release of smokeping-20051023_trunk commit 593fa608368eea633c226c41218bd8bbd90ef3d8 Author: Tobi Oetiker Date: Fri Oct 21 23:01:01 2005 +0000 prepare for the release of smokeping-20051022_trunk commit ac81dca814aaca83729f1f22a7bf738b1c17c9ac Author: Tobi Oetiker Date: Thu Oct 20 23:01:06 2005 +0000 prepare for the release of smokeping-20051021_trunk commit a53951bf3c81883e7163e2c108bd8beb511a7565 Author: Tobi Oetiker Date: Wed Oct 19 23:00:59 2005 +0000 prepare for the release of smokeping-20051020_trunk commit d230c06cb6e8462c2b7b406d5f4f11880900a866 Author: Niko Tyni Date: Wed Oct 19 11:13:11 2005 +0000 * (trunk,2.0)/ lib/Smokeping/probes/Curl.pm, CHANGES: + make the Curl probe compatible with Perl 5.6 commit 12e7a448c63c79b0e01e2bc6810c5a23669ca741 Author: Tobi Oetiker Date: Tue Oct 18 23:01:06 2005 +0000 prepare for the release of smokeping-20051019_trunk commit aca01304a6c2638c9667711967b9ee1aa9bd09d9 Author: Niko Tyni Date: Tue Oct 18 05:22:40 2005 +0000 * (trunk,2.0)/ lib/Smokeping.pm, CHANGES: + get rid of 'Use of uninitialized value' messages when using the Avgratio matcher commit 7c66130c076338076b19f9f9968851170ef5c29b Author: Tobi Oetiker Date: Mon Oct 17 23:01:04 2005 +0000 prepare for the release of smokeping-20051018_trunk commit a86acb450ba469e382effbbe8cf7fec53f1636de Author: Tobi Oetiker Date: Sun Oct 16 23:01:02 2005 +0000 prepare for the release of smokeping-20051017_trunk commit 615627595553e8522a6c0e709ca278283dc7803a Author: Tobi Oetiker Date: Sat Oct 15 23:00:55 2005 +0000 prepare for the release of smokeping-20051016_trunk commit 424920c6dfbc7cc73654b5226086ecdada945fe7 Author: Tobi Oetiker Date: Fri Oct 14 23:00:49 2005 +0000 prepare for the release of smokeping-20051015_trunk commit d21515540d74694cb09148e164e1bee1ecee6d55 Author: Niko Tyni Date: Fri Oct 14 12:50:50 2005 +0000 * (trunk,2.0)/ lib/Smokeping.pm: + cosmetic fix from "ChunjingHan" commit 7f89ec986512196ded2ce2aaa35227a556a31fc5 Author: Niko Tyni Date: Fri Oct 14 12:49:18 2005 +0000 * (trunk,2.0)/ lib/Smokeping.pm, CHANGES: + include the smallest ping value in the graphs too commit 2f5b3b13f36137299dbb240d42db261f07772739 Author: Tobi Oetiker Date: Thu Oct 13 23:00:54 2005 +0000 prepare for the release of smokeping-20051014_trunk commit 36d4802453ee4253dd60e80926ea8404cdf7db53 Author: Tobi Oetiker Date: Wed Oct 12 23:00:52 2005 +0000 prepare for the release of smokeping-20051013_trunk commit 75fb5a5a679939e8d5eee2a7d42d3dc1512f6a43 Author: Tobi Oetiker Date: Tue Oct 11 23:01:00 2005 +0000 prepare for the release of smokeping-20051012_trunk commit ee7fc272795fe8114ffe316d14c11a491942e4e8 Author: Niko Tyni Date: Tue Oct 11 19:20:11 2005 +0000 * (trunk,2.0)/ CHANGES: + typo fix commit bb33fa999a13290f612e9af05b7ce113c22d1140 Author: Niko Tyni Date: Tue Oct 11 19:19:23 2005 +0000 * (trunk)/ lib/Smokeping.pm, CHANGES: + avoid creating new RRD files as the user running 'smokeping --reload' (merged from 2.0) commit 9c0ca72bea9a83cdefa5d91461160dc9867bd2e9 Author: Tobi Oetiker Date: Mon Oct 10 23:01:05 2005 +0000 prepare for the release of smokeping-20051011_trunk commit 2d62442fb7559a4c79d2b5b30907a090a2c97a20 Author: Tobi Oetiker Date: Sun Oct 9 23:01:01 2005 +0000 prepare for the release of smokeping-20051010_trunk commit 04d9b3ac960efaf94aff4846b3ff6dde3e043950 Author: Tobi Oetiker Date: Sat Oct 8 23:00:52 2005 +0000 prepare for the release of smokeping-20051009_trunk commit e74b942d712e906a001762a80d02be41522a237b Author: Tobi Oetiker Date: Fri Oct 7 23:00:53 2005 +0000 prepare for the release of smokeping-20051008_trunk commit cd8d15446e258e68f143795d318b79c562e7de37 Author: Niko Tyni Date: Fri Oct 7 10:57:27 2005 +0000 * (trunk,2.0)/ lib/Smokeping.pm, lib/Smokeping/RRDtools.pm, CHANGES + only warn if RRA parameters other than CF are different config file and an RRD commit 3fd3ab47081ef2df27c25203ed978e46156a204f Author: Tobi Oetiker Date: Thu Oct 6 23:00:51 2005 +0000 prepare for the release of smokeping-20051007_trunk commit 23c4635bd1567d03215020dfc66f4e21c28bbd1d Author: Tobi Oetiker Date: Wed Oct 5 23:01:08 2005 +0000 prepare for the release of smokeping-20051006_trunk commit afa76250e14ea5cadb7cda3dd62ccb2492951741 Author: Tobi Oetiker Date: Tue Oct 4 23:01:04 2005 +0000 prepare for the release of smokeping-20051005_trunk commit 4caa4ed99402778a0bf455a5ec5056ade6e52bbb Author: Tobi Oetiker Date: Mon Oct 3 23:00:56 2005 +0000 prepare for the release of smokeping-20051004_trunk commit fe0fef990bd0c11934ce48da407b51906a2c862e Author: Niko Tyni Date: Mon Oct 3 11:45:35 2005 +0000 * (trunk/) lib/Smokeping.pm: + fixed a typo commit 76884f2dae8556d52be6c97e66a3171a94ef8420 Author: Niko Tyni Date: Mon Oct 3 11:20:46 2005 +0000 * (trunk/) doc/smokeping_install.pod, lib/Smokeping.pm, CHANGES: + make it work (hopefully) with even older versions of CGI::Carp if 'changecgiprogramname' is set to 'no' in the General section commit 244a5fca9c21faffe98cae72f64e0b9ed69d7e0b Author: Tobi Oetiker Date: Sun Oct 2 23:01:06 2005 +0000 prepare for the release of smokeping-20051003_trunk commit 9d8a68509109b63869e2486a4c982357bfeceef3 Author: Tobi Oetiker Date: Sat Oct 1 23:01:03 2005 +0000 prepare for the release of smokeping-20051002_trunk commit 89c0857bd0a1854d469bc29f68e5920259822e52 Author: Tobi Oetiker Date: Fri Sep 30 23:01:00 2005 +0000 prepare for the release of smokeping-20051001_trunk commit 68067aea7fc50691ccc48dbea061253d6451cfd6 Author: Tobi Oetiker Date: Thu Sep 29 23:01:06 2005 +0000 prepare for the release of smokeping-20050930_trunk commit 01d152d8c8a752c68407cec20c81d339e565f498 Author: Tobi Oetiker Date: Wed Sep 28 23:01:00 2005 +0000 prepare for the release of smokeping-20050929_trunk commit 72c6bc1c53f52e66e1b5e8d70b00ff2476b1b220 Author: Niko Tyni Date: Wed Sep 28 11:11:17 2005 +0000 * (trunk)/ doc/smokeping_install.pod, doc/smokeping_upgrade.pod, lib/Smokeping.pm, CHANGES: + make having an older version of CGI::Carp a non-fatal error and recommend a newer one in the docs commit ec993081f760b7af33e60c14717ea9f557b1881f Author: Tobi Oetiker Date: Tue Sep 27 23:00:55 2005 +0000 prepare for the release of smokeping-20050928_trunk commit 40cb0357e0446fa3d0e34f17d006cdfd232681dd Author: Tobi Oetiker Date: Mon Sep 26 23:01:02 2005 +0000 prepare for the release of smokeping-20050927_trunk commit 5a809af06052ab4475f90c7972cd5fa5930914e0 Author: Tobi Oetiker Date: Mon Sep 26 20:07:15 2005 +0000 prepare for the release of smokeping-20050926_trunk commit 1d1ad79d657c4706933332cc17af5f15df0353a0 Author: Niko Tyni Date: Mon Sep 26 19:18:43 2005 +0000 * (trunk,2.0)/ lib/Smokeping/probes/FPing.pm, CHANGES: + fix fping output parsing regexp so it doesn't report 100% loss when the first ping is lost commit bf49085b6ef259192f6b012ad1d83e5c4cb7edd0 Author: Niko Tyni Date: Mon Sep 26 18:42:02 2005 +0000 * (trunk/) Makefile: + move the 'svn commit' command to its own target 'commit' commit 87c25cbf644b899547ace009c7bec7b6922cc5cd Author: Niko Tyni Date: Sun Sep 25 12:46:51 2005 +0000 * (trunk,2.0)/ lib/Smokeping/probes/TelnetIOSPing.pm: + change the Net::Telnet->new() call so it compiles without Net::Telnet loaded commit 12b1e1921c3da6e7c7e178682fb13097196a157b Author: Niko Tyni Date: Sun Sep 25 12:30:33 2005 +0000 * (trunk,2.0)/ Radius.pm: + explicitly tag the ACCESS_* calls as subroutines (&) so they work while building the documentation commit 77a6167109b90747b8e3f5fe766cb7979ecea640 Author: Niko Tyni Date: Sun Sep 25 12:16:47 2005 +0000 * (trunk,2.0)/ lib/Smokeping.pm, CHANGES: + no need to have all the external modules (Net::DNS, Authen::Radius etc.) installed just to build the documentation. commit 684cb417be1d156c5f48460c73f9d32b851c576b Author: Niko Tyni Date: Sun Sep 25 10:41:43 2005 +0000 * (trunk/) Makefile: + merged 2.0 changes from the two previous revisions commit fd10867b929964e1ea7d52f58802d17ba7a7f5bb Author: Niko Tyni Date: Sun Sep 25 10:26:13 2005 +0000 * (trunk,2.0)/ COPYRIGHT: + updated FSF postal address commit 52a1a8978ca8be8d39d522960f46d94432bbde9d Author: Tobi Oetiker Date: Sat Sep 24 23:01:05 2005 +0000 prepare for the release of smokeping-20050925_trunk commit 79cb6fdc7391eb5d37a095a58cdfc2dfdf761b48 Author: Tobi Oetiker Date: Fri Sep 23 23:01:09 2005 +0000 prepare for the release of smokeping-20050924_trunk commit e7d508f06248c1d7ca981beabcbfb0308219d0ea Author: Tobi Oetiker Date: Thu Sep 22 23:01:00 2005 +0000 prepare for the release of smokeping-20050923_trunk commit f7ec5a8d8089bf2ab5edcd33a155655783a050ae Author: Tobi Oetiker Date: Wed Sep 21 23:00:58 2005 +0000 prepare for the release of smokeping-20050922_trunk commit e878c50a1ec861e61254969dec69952b966a8b3b Author: Niko Tyni Date: Wed Sep 21 16:30:48 2005 +0000 * (trunk)/ TODO: + Targets/alertee: syntax to remove an address from the Alerts/to list commit 89a81249a147e6a98bbb60b77e88719344e16963 Author: Tobi Oetiker Date: Tue Sep 20 23:01:12 2005 +0000 prepare for the release of smokeping-20050921_trunk commit ce3590638105b69b537589f14cd3109f93315293 Author: Tobi Oetiker Date: Mon Sep 19 23:00:59 2005 +0000 prepare for the release of smokeping-20050920_trunk commit c616eb281b2211395a5cf03cc31d7d803227eb89 Author: Niko Tyni Date: Mon Sep 19 12:48:06 2005 +0000 * (trunk,2.0)/ doc/smokeping_upgrade.pod: + fixed version numbers commit d0c878bb2ea868bb95fbc7117465efbe6fe72d70 Author: Tobi Oetiker Date: Sun Sep 18 23:01:05 2005 +0000 prepare for the release of smokeping-20050919_trunk commit 83700c2a45a1c8e6f22954e9cc9669ca60f08206 Author: Tobi Oetiker Date: Sun Sep 18 19:08:33 2005 +0000 added halfway ping idea commit 20e34cad05efc1ec279b912a6bd61a77b3288975 Author: Tobi Oetiker Date: Sat Sep 17 23:00:52 2005 +0000 prepare for the release of smokeping-20050918_trunk commit 5186621fd92524792c03406d61d0cecf74e4dbbc Author: Tobi Oetiker Date: Fri Sep 16 23:00:51 2005 +0000 prepare for the release of smokeping-20050917_trunk commit 88bbf618e858f433fab37dc7578ab48eded70d00 Author: Tobi Oetiker Date: Thu Sep 15 23:01:04 2005 +0000 prepare for the release of smokeping-20050916_trunk commit 1b20b84b83594cd8178c88b7b6227c59d27a4171 Author: Tobi Oetiker Date: Wed Sep 14 23:00:52 2005 +0000 prepare for the release of smokeping-20050915_trunk commit d12d5e62a94e78c13abf29dbe8c099f662e6ba23 Author: Niko Tyni Date: Wed Sep 14 19:45:37 2005 +0000 + (trunk)/ CHANGES: + reword the reload stuff commit f0021857e52510645acf59997de6b5ee952186c3 Author: Niko Tyni Date: Wed Sep 14 19:44:00 2005 +0000 * (trunk)/ lib/Smokeping.pm, bin/smokeping.dist, CHANGES, TODO: + reload the config file on HUP signal and bail out if it's broken. After reloading, restart gracefully so that no measurement is interrupted. The signal can also be triggered by 'smokeping --reload'. commit d788fb4fa54adfb8cc2d8d0344bdb9a7af2d642d Author: Niko Tyni Date: Wed Sep 14 17:01:14 2005 +0000 * (trunk,2.0)/ doc/smokeping_extend.pod, lib/Smokeping.pm: + small documentation fixes commit 48c103c0ee1480b1fc98abad693d8d1469e9ae85 Author: Tobi Oetiker Date: Tue Sep 13 23:00:58 2005 +0000 prepare for the release of smokeping-20050914_trunk commit 97b64b61cd4b395b612620e721b55f9cc61bd610 Author: Niko Tyni Date: Tue Sep 13 11:17:39 2005 +0000 * lib/Smokeping.pm (trunk,2.0), CHANGE (trunk,2.0): + made some alert docs in smokeping_config visible commit 954c1303bf9aa057100cd61f89e4797f6cf8d7c6 Author: Niko Tyni Date: Tue Sep 13 11:09:43 2005 +0000 * lib/Smokeping.pm (trunk): + another edgetrigger fix commit 480b4f632984a880237acd0c92fbc97ad5578ad7 Author: Niko Tyni Date: Tue Sep 13 10:59:11 2005 +0000 * lib/Smokeping.pm (trunk): + edgetrigger fix commit a1d59c4e0289ad21308ef6965bb229ad04dde4c7 Author: Tobi Oetiker Date: Mon Sep 12 23:01:12 2005 +0000 prepare for the release of smokeping-20050913_trunk commit 7fc2d592a65b39b9e4a8b9fc44f6324e291fba1e Author: Niko Tyni Date: Mon Sep 12 14:09:29 2005 +0000 * lib/Smokeping.pm (trunk), doc/smokeping_upgrade.pod (trunk), CHANGES (trunk), TODO (trunk): + optionally only send alerts when the state changes ('edgetrigger'). (untested yet) commit f84dd88683a50d232722ca9f622a50a86b2531a9 Author: Tobi Oetiker Date: Sun Sep 11 23:01:08 2005 +0000 prepare for the release of smokeping-20050912_trunk commit 617e8a3551de97eef26b709682b0b0511af5c282 Author: Tobi Oetiker Date: Sat Sep 10 23:00:54 2005 +0000 prepare for the release of smokeping-20050911_trunk commit 13b3fdf76532364cb8a66a61042432e38a1363d0 Author: Tobi Oetiker Date: Fri Sep 9 23:00:52 2005 +0000 prepare for the release of smokeping-20050910_trunk commit db18af300e1ee4598243eccb9b36d745cd95becb Author: Niko Tyni Date: Fri Sep 9 20:21:44 2005 +0000 * README (2.0) + tiny fixes * README (trunk): + merged 2.0 changes commit e818279a5cd867bd9d3dc6d7dd25ed64245c6d3a Author: Niko Tyni Date: Fri Sep 9 18:50:36 2005 +0000 * lib/Smokeping.pm (trunk), CHANGES (trunk): + try to trigger an alert with the minimum number of values needed for it rather than require a stack with the maximum number of possible values. See http://lists.ee.ethz.ch/smokeping-users/msg01654.html for the problem. commit 198ad5785a314d588f8974ee4ba2a4e8a3fe84c6 Author: Niko Tyni Date: Fri Sep 9 05:04:04 2005 +0000 * {trunk,2.0}/htdocs/smokeping.cgi.dist + fixed a glitch in documentation commit bba6237f781dd30247fb7969ec7afe88b2f1be97 Author: Tobi Oetiker Date: Thu Sep 8 23:01:08 2005 +0000 prepare for the release of smokeping-20050909_trunk commit 6a3b779d7c9b8478f29acd58e1490a0efe669989 Author: Tobi Oetiker Date: Thu Sep 8 14:16:50 2005 +0000 added TOP10 wish commit c46c5fc16f5393a89806cd6a8abf30aa38360325 Author: Tobi Oetiker Date: Wed Sep 7 23:01:05 2005 +0000 prepare for the release of smokeping-20050908_trunk commit e158d53556f9eab5c89a04b7654b4df0bc2aa5d0 Author: Niko Tyni Date: Wed Sep 7 18:45:42 2005 +0000 * trunk/TODO: + make 'active alerts' (whatever that means, have to think this through) visible (eg. different colour) in the CGI menu commit 67728381e577ead951fc6a4d22e7f316af4da9cd Author: Tobi Oetiker Date: Tue Sep 6 23:00:53 2005 +0000 prepare for the release of smokeping-20050907_trunk commit b35ffd3e11bb092273d1831708632e62216d2b56 Author: Niko Tyni Date: Tue Sep 6 17:24:10 2005 +0000 * {2.0,trunk}/CHANGES: + document r169 and r170 (logo autogeneration) commit 46af3fd04bfb97a53ffb1a67b74eeb8ba2d2ee74 Author: Niko Tyni Date: Tue Sep 6 17:16:44 2005 +0000 * trunk:lib/Smokeping.pm + regenerate the logo images if Smokeping.pm is newer than the old ones commit dec26a16f5abcc9db5770b35d12c9b969b5c84d7 Author: Niko Tyni Date: Tue Sep 6 15:14:14 2005 +0000 * trunk:lib/Smokeping.pm + merged new logos from 2.0:lib/Smokeping.pm r144:r145 into trunk commit c2bf9c3c752ed3ae795fe7d72607e5c1732de843 Author: Tobi Oetiker Date: Mon Sep 5 23:00:49 2005 +0000 prepare for the release of smokeping-20050906_trunk commit 9abc22db7afb02eaddaa546c3a72475ff0bae0da Author: Niko Tyni Date: Mon Sep 5 17:10:12 2005 +0000 * {trunk,2.0}/doc/smokeping_upgrade.pod: + add a missing =back commit b145432af48908a9b61587c5e1d03d5e12cc712e Author: Tobi Oetiker Date: Mon Sep 5 06:09:05 2005 +0000 prepare for the release of smokeping-20050905_trunk commit 48faec3c1f481a0120aa5363c08c531279f23941 Author: Tobi Oetiker Date: Mon Sep 5 06:07:45 2005 +0000 merge with 2.0.1 changes commit f5602215b928f8dd0cc8dee28b4f7bb87307254b Author: Niko Tyni Date: Sun Sep 4 16:46:18 2005 +0000 Trunk: removed doc/.cvsignore commit 52de638f8e7e13dd62a4e7906387be72969a4168 Merge: 0950447 0fb4bc7 Author: Niko Tyni Date: Sun Sep 4 16:23:12 2005 +0000 Copied branches/2.0 to trunk/software commit 0fb4bc74b24ea96e80d4e27428b8c2451fbf0eb5 Author: Niko Tyni Date: Sun Sep 4 11:40:42 2005 +0000 * lib/Smokeping.pm, CHANGES: + don't create directories in "datadir" when running as a CGI commit 3946df708ae20686c8453eb55be934103daf2f7e Author: Niko Tyni Date: Sun Sep 4 11:34:08 2005 +0000 * lib/Smokeping.pm, lib/Smokeping/probes/base.pm, doc/smokeping_upgrade.pod, TODO, CHANGES: + the DYNAMIC-related files (.adr and .snmp) can now be located outside "datadir" by specifying the new configuration variable "dyndir" commit 733f5ee3d4aad0c1a21d796d5a36baa82389e199 Author: Niko Tyni Date: Sun Sep 4 09:20:48 2005 +0000 * 2.0/lib/Smokeping.pm, 2.0/TODO, 2.0/CHANGES: + return '404 not found' when DYNAMIC updates fail commit 08a913068ea426a7bd7c520ef140f3a2f50b8939 Author: Niko Tyni Date: Sun Sep 4 07:40:37 2005 +0000 * TODO: + CGI::Carp is already implemented commit b24bc862beab1ac7bc8467d83321e56569e4138f Author: Tobi Oetiker Date: Thu Sep 1 10:29:44 2005 +0000 fixed spelling commit 04e1ef4cd80ad08455452d56aa4b953ed3a53057 Author: Niko Tyni Date: Tue Aug 30 12:38:35 2005 +0000 * 2.0/lib/Smokeping.pm: + make the address of the remote client appear in the web server's error log commit fcaa98c7edf28d8d16ff3f970460d2a0bcbd409d Author: Niko Tyni Date: Mon Aug 29 12:04:26 2005 +0000 * 2.0/lib/Smokeping.pm: + use CGI::Carp and warn() for do_cgilog() to get timestamps there as well commit b845e8f36b17287858130cac979914b3851189d3 Author: Niko Tyni Date: Thu Aug 25 11:36:30 2005 +0000 * 2.0/Makefile: + made the 'rename-man' target idempotent commit 097c0c8590821246ac6630e7f2d72c0db62ea69d Author: Niko Tyni Date: Tue Aug 23 19:13:31 2005 +0000 * 2.0/TODO: + CGI: return something else than 200 OK in error situations + config: make .adr dir configurable commit 69064fb816bd54a08ffd92760f125a5d83793250 Author: Niko Tyni Date: Tue Aug 23 12:43:37 2005 +0000 * 2.0/lib/Smokeping.pm, 2.0/CHANGES: + make errors in DYNAMIC updates appear in the web server error log * 2.0/TODO: + replace the __WARN__ and __DIE__ handlers with CGI::Carp? commit 2f01fa7db139ec0141bf5e7f8d8e2223069d3c68 Author: Niko Tyni Date: Thu Aug 18 20:20:00 2005 +0000 * branches/2.0/doc/smokeping_upgrade.pod: + document the tuning of RRD DS parameters commit a23d80aaccf4392e8e703eea13440d3c19ca7c55 Author: Niko Tyni Date: Thu Aug 18 18:44:26 2005 +0000 * 2.0/lib/Config/Grammar.pm: + update to official version 1.02 commit cfe62bb62be56069c1507c18e2ab842fe2ef06a9 Author: Niko Tyni Date: Thu Aug 18 18:38:44 2005 +0000 * TODO: + configurable RRD parameters per target? commit 237c2131e3f216eccd4b472e456d16f4dbe20456 Author: Niko Tyni Date: Fri Aug 5 20:43:55 2005 +0000 * remove a quotemeta() call in Config::Grammar to allow metacharacters at the right side of '@define' -- niko, reported by Warrick FitzGerald commit caea6ae36aaacadab7029f172821899d237108f4 Author: Tobi Oetiker Date: Fri Jul 29 08:14:17 2005 +0000 set LC_NUMERIC to C to help people that would otherwhise get , as decimal separator commit 7c05e52c7486b782ea8fe83f61eda56f05fd2613 Author: Niko Tyni Date: Wed Jul 27 11:45:20 2005 +0000 * 2.0/lib/Smokeping/probes/CiscoRTTMonEchoICMP.pm, 2.0/CHANGES: + bugfix for CiscoRTTMonEchoICMP packetsize variable -- niko, from Sam Stickland commit 3ca78feffa42b2863dcc23c2143d96bead1e107f Author: Tobi Oetiker Date: Mon Jul 4 05:58:11 2005 +0000 the old pngs in __navcache did not get removed properly ... commit 6c3d9be08286f6bf6b21bfb7e4f8ee77900025df Author: Tobi Oetiker Date: Sun Jul 3 22:22:05 2005 +0000 backslash after LinuUp commit f3a0711e88ccf8e43773dc41518b3dbbc2b87a32 Author: Tobi Oetiker Date: Sun Jul 3 22:17:00 2005 +0000 tune datasources commit 66c8d49cbe278316114a6eef8ccb509c9e67d0ba Author: Tobi Oetiker Date: Sun Jul 3 22:15:20 2005 +0000 tune the rrd files for min/max/heartbeat commit b5a21fd2221f92bf7db544bc265a76d41912a633 Author: Tobi Oetiker Date: Thu Jun 2 13:55:58 2005 +0000 updated release tags so that they should protect against duplicate execution commit 395461bfc00f6b3c98540c870fd24959d2c1466f Author: Niko Tyni Date: Thu Jun 2 10:58:17 2005 +0000 * 2.0/Makefile: + new target 'increment-CHANGES-version intended for automatically updating CHANGES when releasing a new version. commit 54b0cfd69a5ea9dd38b27bb1b6880b97bf9bc27d Author: Niko Tyni Date: Wed Jun 1 11:29:44 2005 +0000 * 2.0/doc/smokeping_upgrade.pod: + mention tSmoke inclusion * 2.0/bin/tSmoke.dist, 2.0/Makefile: + make tSmoke require the current Smokeping.pm version + add tSmoke to the 'patch' Makefile target to keep it up to date * 2.0/etc/config.dist: + add the 'tmail' variable * 2.0/CHANGES: + mention Dan as the original tSmoke author commit 9791370bdbea2be98b9f715a4cea7bbfc5ec9880 Author: Tobi Oetiker Date: Tue May 31 20:14:23 2005 +0000 prepare for the release of smokeping-2.0rc5 commit dbad531025c7f6ffe665c1514af416658fc6d3f4 Author: Niko Tyni Date: Tue May 31 19:50:03 2005 +0000 * 2.0/CHANGES: + Officially include the tSmoke script from the contrib download directory. commit a596fb2a0d96b7300048c27591cb3502c2b41950 Author: Niko Tyni Date: Tue May 31 19:27:33 2005 +0000 * 2.0/bin/tSmoke.dist: + Remove the PROBE_CONF reference; this version of tSmoke is now for 2.x only. commit 8a4ec2a4345c457fca47a1a7e2b4f40d2cf6fea5 Author: Niko Tyni Date: Tue May 31 19:18:17 2005 +0000 Delete trailing DOS newlines from tSmoke files. commit 02b65c3987f68a239c92376cbf24bc066a04d38d Author: Niko Tyni Date: Thu May 26 19:24:08 2005 +0000 * tSmoke stuff; no testing done yet + 2.0/lib/Smokeping.pm: include config file support + 2.0/tSmoke.v4.README: integrate into tSmoke script + 2.0/bin/tSmoke.dist: * renamed from tSmoke.pl to tSmoke * installation instructions updated + 2.0/etc/tmail.dist: * renamed from 2.0/etc/tmail + 2.0/Makefile: * doc file generation commit 3d1b4178cd7c5d7d10aca5c48bad8995afc31a58 Author: Niko Tyni Date: Thu May 26 18:45:05 2005 +0000 * Officially include tSmoke.pl from the Smokeping contrib directory + add pristine v4 files; they still need modification commit 205fff014be2afad6cb4430a2fceabea8111c885 Author: Niko Tyni Date: Mon May 23 18:02:01 2005 +0000 * Perl 5.8.0 compatibility fix ("missing max for DS uptime") commit b83cf0d34b87d51fbdcf60d522b9c87ca4b4ccd2 Author: Niko Tyni Date: Sun May 22 11:15:46 2005 +0000 * 2.0/TODO: + wishlist and other entries commit bf7247e98dfc9891a5adaaf60cbe392b25cb66ae Author: Niko Tyni Date: Wed May 18 11:19:09 2005 +0000 * branches/2.0/lib/Smokeping/RRDtools.pm, branches/2.0/CHANGES: + RRDtool 1.2.x compatibility fix ("unknown RRD version: 0003" on restart) -- niko, reported by Sam Stickland commit 6b119de859a72910df1b1bf83ab4e978af019694 Author: Niko Tyni Date: Tue May 17 13:28:01 2005 +0000 * CHANGES: + mention 2.0rcX releases commit 83ab1432a8f085b2139cab8a61227b80e5b319b4 Author: Tobi Oetiker Date: Wed May 11 19:58:21 2005 +0000 prepare for the release of smokeping-2.0rc4 commit ef0a8b6b72eff929a9f6a414e16db33ec3fac07d Author: Tobi Oetiker Date: Wed May 11 19:48:55 2005 +0000 fix zooming commit 2e6ce403d18425cf4f32dd5fc2cbb6e94eae39ae Author: Niko Tyni Date: Wed May 11 10:32:46 2005 +0000 * branches/2.0/CHANGES: + include Marc Spitzer's first name too :) commit 292c6fc1ffce6460bd8fa97d31b912da3a90673b Author: Niko Tyni Date: Tue May 10 18:10:14 2005 +0000 * branches/2.0/doc/smokeping_upgrade.pod; branches/2.0/CHANGES: + changelog updates commit bd0e56f10d34b874a6d115391c4046199e5b330e Author: Niko Tyni Date: Tue May 10 17:48:16 2005 +0000 * branches/2.0/lib/Smokeping/probes/Curl.pm: + added the 'insecure_ssl' (-k) option from Marc Spitzer commit cc63560d93815cac731fefe82f24aee01aba7676 Author: Niko Tyni Date: Tue May 10 11:45:52 2005 +0000 * 2.0/lib/Smokeping.pm: + make 'smokeping -static' work again + document '@include' and its friends in smokeping_config in addition to Config::Grammar commit 4036ad2a9afa4417c670fc52eaf67da37b0f8e45 Author: Tobi Oetiker Date: Mon May 9 18:38:03 2005 +0000 Double check the answer from the dns server and optionally enforce a NOERROR response code -- Christoph.Heine in HaDiKo.DE commit e5123e033bdae8ceaf9ba847b929ec56d9dfa1e8 Author: Tobi Oetiker Date: Fri Apr 15 15:25:38 2005 +0000 make navigator feature more robust for situations where invalid timeranges are provided. commit 1f333688daf8f6dcf6f5a9c0be857dbcf0675dc3 Author: Tobi Oetiker Date: Fri Apr 15 15:03:01 2005 +0000 make unlink in navcache work commit 21df925982b162f18479c9ab8312e3573dcd7f24 Author: Tobi Oetiker Date: Wed Apr 13 19:31:27 2005 +0000 * added labeling fixes for rrdtool 1.2 compatibility * added navigator mode where it is possible to alter the timerange shown in a graph. This feature is sponsored by BeverlyCorp. * fix fix for matcher cache skipping commit d9b0e622f870cc151ffe814abde6f62a47cdba58 Author: Tobi Oetiker Date: Wed Apr 13 11:35:52 2005 +0000 * updated version numbers in branche * propperly deal with branches in the target tree that have no probe propperty set. commit c1676927af530e87f849df945deaa65182db5835 Author: Tobi Oetiker Date: Fri Mar 11 20:08:19 2005 +0000 removed extra space commit 021947ad8e963d89bdb00bd9de24dc962a3472bf Author: Niko Tyni Date: Thu Mar 10 11:00:44 2005 +0000 * 2.0/lib/Smokeping/probes/Curl.pm, 2.0/doc/smokeping_upgrade.pod, 2.0/CHANGES: + new variables: extraargs and extrare commit 4d50cc7a6c80ea58ba492a875abcd250d44b1255 Author: Niko Tyni Date: Wed Mar 9 17:33:33 2005 +0000 * 2.0/lib/Config/Grammar.pm: + change the last few ParseConfig references to Config::Grammar commit 1eda41862b7279427ab2da51b8dd12767118bfa4 Author: Niko Tyni Date: Wed Mar 9 17:17:06 2005 +0000 * change all ISG::ParseConfig references to its new name, Config::Grammar commit 8acdb5d58ba10ecc1dc1d57be7fdc151515c82e0 Author: Niko Tyni Date: Tue Mar 8 20:13:55 2005 +0000 * branches/2.0/lib/ISG/ParseConfig.pm: + remove S<> tags from AUTHORS section as pod2html messes them up + explicitly set VERSION to 2.0 commit 6e6508791dd10e9e2b5869187973b551dabc6fc9 Author: Niko Tyni Date: Tue Mar 8 19:57:08 2005 +0000 * branches/2.0/lib/Smokeping/RRDtools.pm: + add AUTHOR section to the POD documentation. commit 6ffe2a9773e56a77bd1f3a07301154f0eeb10db3 Author: Niko Tyni Date: Sun Mar 6 17:41:33 2005 +0000 * trunk/website/bin/nestfix.pl: + renamed to branches/2.0/util/fix-pod2html.pl * branches/2.0/Makefile: + fix pod2html output with util/fix-pod2html.pl * branches/2.0/util/fix-pod2html.pl: + v1.4: insert the "N" letter into too. * trunk/website/bin/pod2wml.sh: + use fix-pod2html.pl from branches/2.0 commit 455ab143f72d62c07c9cef46ad3a726e2dcde065 Author: Niko Tyni Date: Sun Mar 6 17:16:04 2005 +0000 * lib/Smokeping/probes/base.pm: + probe documents had a 'SEE_ALSO' section; fixed to read "SEE ALSO". commit a4c71fe71c8f40a3534490a010cde424063003ef Author: Tobi Oetiker Date: Sun Feb 27 23:03:00 2005 +0000 rc2 commit f65e5b94977a51279c81e781720334d46b5c4e78 Author: Niko Tyni Date: Sun Feb 27 07:51:28 2005 +0000 Update to David's newest version (only HISTORY changes). commit df42119cf36c6a0cf4fe731722bdb8a986d6189b Author: Niko Tyni Date: Sat Feb 26 18:09:15 2005 +0000 Changed my e-mail address to the @iki.fi one. commit 30f15c0632513caff0c322c4cf1a8a1e10d9865c Author: Niko Tyni Date: Sat Feb 26 18:00:27 2005 +0000 SYNOPSYS is really spelled SYNOPSIS. Shame on me. commit 90caa79fbf5c6be6d42e2768d7a5868ac851895d Author: Tobi Oetiker Date: Wed Feb 23 06:36:45 2005 +0000 exclude .svn directories commit 3dbf456570a2fc2ab25e246a8f656ab709c79586 Author: Tobi Oetiker Date: Tue Feb 22 22:27:31 2005 +0000 synced Makefile Changes commit 77deee0905e61502052b0e873cef7b0bee03aaef Author: Tobi Oetiker Date: Tue Feb 22 21:50:28 2005 +0000 branched for 2.0 pulling 2.0rc1 into tags right away commit 09504475c41653b151b02605ea1ea7b53f86e222 Author: Niko Tyni Date: Tue Feb 22 20:18:14 2005 +0000 * don't create any RRD files if running as a CGI -- niko commit a8f89dab926914ba921b09adc6eaf2e92f9e0512 Author: Niko Tyni Date: Tue Feb 22 11:36:49 2005 +0000 ISG::ParseConfig bugfixes. commit d0f8c7c435da69415c4a391c80f1b39706c2d86d Author: Niko Tyni Date: Mon Feb 21 18:25:28 2005 +0000 CHANGES entries are now more consistent. commit baf9588e379b308d3e1f6869fde39e19d041c24d Author: Niko Tyni Date: Mon Feb 21 18:04:11 2005 +0000 * Curl timeouts work better now -- niko * Curl User-Agent string doesn't need quotes anymore -- niko commit 2d8297b72b98005b7220c1ab47e9eeeb68711ac6 Author: Niko Tyni Date: Sun Feb 20 21:40:58 2005 +0000 * check at startup that existing RRD files conform to the config specifications -- niko - new Smokeping::RRDtools module - note in CHANGES and smokeping_upgrade commit 41b34e09a8692d9253d39d893ad09fdbfec0353c Author: Niko Tyni Date: Sat Feb 19 12:00:04 2005 +0000 Doc updates: * mention the minimum # of pings in CHANGES and smokeping_upgrade * add a note about possibly lowering the pings variable in the HTTP probes commit 2206afb0d6aaf857ecf739ae0b639bf215106294 Author: Niko Tyni Date: Fri Feb 18 20:55:29 2005 +0000 * complain if pings < 3 * show the smoke for pings == 3 too, not only if >3 commit f6d4093e0dc827fbc853ed21ad3cb0ab1f898704 Author: Niko Tyni Date: Fri Feb 18 13:04:12 2005 +0000 * graph fixes for small numbers of pings -- Chris Wilson * fix the LDAP probe killing the CGI with perl <5.6 -- Peter Farmer * make the LDAP probe work withouth IO::Socket::SSL -- niko * make Curl description shorter -- Chris Wilson * use CGI::Carp for CGI error handling - remove the now unnecessary kludge from AnotherDNS * don't call exit() in the daemon __DIE__ handler * raise Curl and EchoPingHttp{,s} default timeouts * add a section on timeouts to smokeping_upgrade * add IO::Socket::SSL to smokeping_install commit 634fe0bf599454c203fd64e9f634e8a3d3abf1c5 Author: Niko Tyni Date: Thu Feb 17 13:20:41 2005 +0000 Tiny bugfixes. commit 09df26f453b88aafaddf53c08c740d32e1342336 Author: Niko Tyni Date: Wed Feb 16 20:18:48 2005 +0000 * announce smokeping version at startup * add matcher list to smokeping_config * make matcher names start with a capital letter * make probe names start with a capital letter * small doc updates * one more pod2html makefile fix commit 94f0e104fd177a53bc73ab83838522785e785623 Author: Niko Tyni Date: Tue Feb 15 20:22:29 2005 +0000 Documentation glitches. commit 8edf3d57eea6c5895701c2a14376a93a11d068de Author: Niko Tyni Date: Tue Feb 15 20:00:10 2005 +0000 One more shot at pod2html... commit c8c27595a1bc378aa28ffc6868e7e8e65e06a814 Author: Niko Tyni Date: Tue Feb 15 17:50:51 2005 +0000 Further pod2html fixes - links are now properly relative. commit cc7bc1ad2526737978ccbbca541f90f5e8a1c82b Author: Niko Tyni Date: Tue Feb 15 16:44:17 2005 +0000 Fix typo in FPing.pm commit 085f51e6af606a8ab27b64e49f56c1908a9cb7a8 Author: Niko Tyni Date: Tue Feb 15 12:22:29 2005 +0000 * CHANGES updated * FPing : added 'hostinterval' (-p), renamed 'mindelay' -> 'mininterval' (-i) * Smokeping.pm: include links to the probe manpages from smokeping_config commit 4e4427e69c5a4aa2b688f14f117ba342a7f7b0fc Author: Niko Tyni Date: Tue Feb 15 11:38:06 2005 +0000 The ISG::ParseConfig patch: * _dyndoc * _varlist * _sub for sections commit feee384f64b9d1e747b5e966bf6298c354ea8ae8 Author: Niko Tyni Date: Tue Feb 15 11:35:12 2005 +0000 Docs: more L<> links. Makefile: really filter out smokeping_config.pod. commit 4051f04d0275f51929aa4a08b34dbf3c70788e8c Author: Niko Tyni Date: Tue Feb 15 10:53:04 2005 +0000 Makefile: * add the 'symlinks' and 'remove-symlinks' targets as a desperate measure to get L work. Bah. commit 02ea9b1fa581f890c9401fe23b75852541578d59 Author: Niko Tyni Date: Mon Feb 14 22:26:25 2005 +0000 * smokeping.cgi documentation resurrected * L<> links in POD documents * mess with pod2html in Makefile to get L<> links work * add smokeping_upgrade and smokeping_examples to the README * change software requirements in smokeping_install commit 3ca0d465ea56d4cdcea3271bff803e878a118f90 Author: Niko Tyni Date: Mon Feb 14 19:44:10 2005 +0000 * move probes and matchers documentation to doc/Smokeping * include Smokeping::Examples documentation * add ../bin to pod2html search path commit 79b181df37260a9305762f30144d8ab084ef40db Author: Niko Tyni Date: Mon Feb 14 17:10:46 2005 +0000 Makefile: * move manpages to (hopefully) right sections * new target rename-man adds the the full path to perl module manpage filenames * add pod2html temporary files to the IGNORE list commit e50291a517b1e672641e6d2e2aa251ae32327825 Author: Niko Tyni Date: Sun Feb 13 21:15:20 2005 +0000 Delete old examples in the killdoc target. commit 6d76521656e91daa160bc8019828f1b68d7aa5dc Author: Niko Tyni Date: Sun Feb 13 19:23:04 2005 +0000 Moved probes, matchers and ciscoRttMonMIB modules to lib/Smokeping. commit 6dba1afbe4b475a7d34f5ef867b7b37291cd1484 Author: Niko Tyni Date: Sun Feb 13 18:28:54 2005 +0000 Strip .pm from doc file names. commit 75584db4815e1f3c1c34d2ec51e2ace8534e97bf Author: Niko Tyni Date: Sun Feb 13 18:03:08 2005 +0000 Fix the spaces at the start of *** Probes *** and *** Targets *** lines: the POD file should have a space, the example files shouldn't. commit 8a268f47f7987eb3110eee1c114e4dbf2e708c1b Author: Niko Tyni Date: Sun Feb 13 17:55:37 2005 +0000 Build fixes: * add (empty) doc/{matchers,probes} directories * Makefile: rule for building smokeping.html commit fb018875344d19e44f0139629bee319b7184bd5c Author: Niko Tyni Date: Sat Feb 12 19:32:02 2005 +0000 Minor documentation updates. commit 62241bbdbab4ba6d9cb35bb5f70de6a86108087e Author: Niko Tyni Date: Sat Feb 12 18:26:23 2005 +0000 Add missing ProbeDesc() for FPing6. commit 3247e9cd78e6bfbea9e3e18805ea6c930b04aee5 Author: Tobi Oetiker Date: Sat Feb 12 09:58:20 2005 +0000 be more careful after seting up Net::SMTP and Net::SNPP only use the handle if we got one ... commit 3d62610c70896af4fef67480965898533a68e839 Author: Tobi Oetiker Date: Fri Feb 11 21:00:51 2005 +0000 added defaults and versioning up the 1.99001 commit f0b5385c63bd886c2bb58f0922cce564504ec12f Author: Tobi Oetiker Date: Fri Feb 11 21:00:15 2005 +0000 handle incomplete documentation propperly by entering notes about the missing bits into the generated documentation. commit b9ddd9310ea896a5e644f784013a386d9e7212a9 Author: Tobi Oetiker Date: Fri Feb 11 20:48:36 2005 +0000 niko has revamped smokeping to parse configuration much more strictly. It is all documented in software/doc/smokeping_upgrade.pod commit 3623e33d0ae10eaeca653e00a3796495dbc0f713 Author: Tobi Oetiker Date: Fri Feb 11 20:22:38 2005 +0000 initial import smokeping-2.7.3/CONTRIBUTORS000066400000000000000000000004611342220157600154020ustar00rootroot00000000000000Contributors ============ * Tobias Oetiker => Main Author * Niko Tyni => Many Patches * Simon Leinen => SNMP_Session.pm * David Schweikert => Config::Grammar * Jack Cummings => Proper graphs with pings > 10s. smokeping-2.7.3/COPYRIGHT000066400000000000000000000016611342220157600150200ustar00rootroot00000000000000 SmokePing - a ICMP latency logging and graphing system. It consists of a daemon process which organizes the latency measurements and a CGI which presents the graphs. Copyright (c) 2001 Tobias Oetiker All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. smokeping-2.7.3/LICENSE000066400000000000000000000430701342220157600145320ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. smokeping-2.7.3/Makefile.am000066400000000000000000000023331342220157600155560ustar00rootroot00000000000000# Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. AUTOMAKE_OPTIONS = foreign SUBDIRS = thirdparty doc etc htdocs lib bin EXTRA_DIST = COPYRIGHT CHANGES CONTRIBUTORS LICENSE PERL_MODULES THIRDPARTY_DIR := $(shell pwd)/thirdparty dist-hook: $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s*=\s*".*?"/\$$VERSION = "$$v"/' $(distdir)/lib/Smokeping.pm install-exec-hook: [ ! -d $(THIRDPARTY_DIR)/lib/perl5 ] || $(CP) -fr $(THIRDPARTY_DIR)/lib/perl5/* $(DESTDIR)$(libdir) smokeping-2.7.3/Makefile.in000066400000000000000000000616451342220157600156020ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/conftools/install-sh \ $(top_srcdir)/conftools/missing README TODO conftools/compile \ conftools/config.guess conftools/config.sub \ conftools/install-sh conftools/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign SUBDIRS = thirdparty doc etc htdocs lib bin EXTRA_DIST = COPYRIGHT CHANGES CONTRIBUTORS LICENSE PERL_MODULES THIRDPARTY_DIR := $(shell pwd)/thirdparty all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-exec-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile dist-hook: $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s*=\s*".*?"/\$$VERSION = "$$v"/' $(distdir)/lib/Smokeping.pm install-exec-hook: [ ! -d $(THIRDPARTY_DIR)/lib/perl5 ] || $(CP) -fr $(THIRDPARTY_DIR)/lib/perl5/* $(DESTDIR)$(libdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/PERL_MODULES000066400000000000000000000002501342220157600153730ustar00rootroot00000000000000FCGI CGI CGI::Fast Config::Grammar Socket6 IO::Socket::SSL Digest::HMAC_MD5 Net::Telnet Net::OpenSSH Net::SNMP Net::LDAP Net::DNS IO::Pty LWP Authen::Radius Path::Tiny smokeping-2.7.3/README000066400000000000000000000022401342220157600143770ustar00rootroot00000000000000 ____ _ ____ _ / ___| _ __ ___ ___ | | _____| _ \(_)_ __ __ _ \___ \| '_ ` _ \ / _ \| |/ / _ \ |_) | | '_ \ / _` | ___) | | | | | | (_) | < __/ __/| | | | | (_| | |____/|_| |_| |_|\___/|_|\_\___|_| |_|_| |_|\__, | |___/ Authors: Tobias Oetiker Niko Tyni SmokePing is a latency logging and graphing and alerting system. It consists of a daemon process which organizes the latency measurements and a CGI which presents the graphs. SmokePing is ... ================ * extensible through plug-in modules * easy to customize through a webtemplate and an extensive configuration file. * written in perl and should readily port to any unix system * an RRDtool frontend * able to deal with DYNAMIC IP addresses as used with Cable and ADSL internet. Do you like it ============== If you like SmokePing, and want to show your appreciation for the work I am doing (SmokePing like MRTG and RRDtool have been written entirely in my spare time) please feel free to use: http://tobi.oetiker.ch/wish cheers tobi smokeping-2.7.3/TODO000066400000000000000000000035661342220157600142230ustar00rootroot00000000000000* ALERTS based on input from multiple targets Wouter Prins * ASSIGN BLAME - HALFWAY PING - A method for pinging the host in the middle between here and host B (use traceroute for figuring out which one it should be) This graph combined with the graph for here-B could show in which half of the link the problem lies ... Russell Stuart * TOP10 - show a list of the top 10 (most whatever graphs) gmourani * privalodc.com < they are willing to pay for this feature - tobi > * UPTIME - define update via snmp pointer per device - possibility to call an external script -> generic uptime plugin? * ATTENTION allow to define a thereshold rule by looking at two average medians and take action when threshold triped * ALIASES allow to have atarget which points to a different target only targets with host are considered * ALERTS make 'active alerts' (whatever that means, have to think this through) visible (eg. different colour) in the CGI menu - suggested by Cornel Badea Targets/alertee: syntax to remove an address from the Alerts/to list (maybe 'alertee = -user@somewhere'? This breaks real addresses starting with '-'...require quoting for those?) - from James Bouressa, * REMOTE EXECUTION generic remote probe - a possibility for basefork-derived probes to reuse the same SSH connection with shell for() loops for all the pings to a given target * GENERIC EXEC PROBE - almost every probe has a different way of calling system(), exec() or similar. This should be in an inheritable module. - the module should also support extra commandline arguments * RRD configurable RRD parameters per target? - suggested by Leos Bitto, smokeping-2.7.3/aclocal.m4000066400000000000000000000736711342220157600153770ustar00rootroot00000000000000# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR smokeping-2.7.3/bin/000077500000000000000000000000001342220157600142715ustar00rootroot00000000000000smokeping-2.7.3/bin/Makefile.am000066400000000000000000000023051342220157600163250ustar00rootroot00000000000000# Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke install-exec-hook: test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*}{#!$(PERL)}; s{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS) cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS) cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS) # EOF smokeping-2.7.3/bin/Makefile.in000066400000000000000000000360401342220157600163410ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(dist_bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_bin_SCRIPTS = smokeinfo smokeping smokeping_cgi tSmoke all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-dist_binSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_binSCRIPTS .MAKE: install-am install-exec-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_binSCRIPTS install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \ uninstall uninstall-am uninstall-dist_binSCRIPTS .PRECIOUS: Makefile install-exec-hook: test "$(PERL5LIB)" = "" || cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*}{#!$(PERL)}; s{.*# PERL5LIB}{use lib (split /:/, q{$(PERL5LIB)}); # PERL5LIB}' $(dist_bin_SCRIPTS) cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# LIBDIR}{use lib qw($(libdir)); # LIBDIR}' $(dist_bin_SCRIPTS) cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' $(dist_bin_SCRIPTS) # EOF # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/bin/smokeinfo000077500000000000000000000074631342220157600162230ustar00rootroot00000000000000#!/usr/bin/perl use strict; use warnings; use lib (split /:/, q{}); # PERL5LIB use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR use Smokeping::Info; use Getopt::Long 2.25 qw(:config no_ignore_case); use Pod::Usage 1.14; '$Revision: 3879 $ ' =~ /Revision: (\S*)/; my $Revision = $1; sub main() { # parse options my %opt = (mode=>'plain',separator=>';',format=>'%le',start=>'end-24h',end=>'now'); GetOptions(\%opt, 'help|h', 'man', 'version', 'noaction|no-action|n','no-head', 'start=s','end=s','filter=s','mode=s','separator=s','format=s') or exit(1); if($opt{help}) { pod2usage(1) } if($opt{man}) { pod2usage(-exitstatus => 0, -verbose => 2) } if($opt{version}) { print "smokeinfo $Revision\n"; exit(0) } if($opt{noaction}) { die "ERROR: don't know how to \"no-action\".\n" } my $config = shift @ARGV; my $si = Smokeping::Info->new($config); my $nodes = $si->fetch_nodes(pattern=>$opt{filter},mode=>$opt{mode}); my @rows = qw(med_avg med_min med_max med_now loss_avg loss_max loss_now); print '# ',join $opt{separator}, 'node_path',@rows if not $opt{'no-head'}; print "\n"; for my $node (@$nodes) { my $data = $si->stat_node($node,$opt{start},$opt{end}); print join $opt{separator},$node->{path},map {defined $data->{$_} ? sprintf($opt{format},$data->{$_}) : '?'} @rows; print "\n"; } } main; __END__ =head1 NAME smokeinfo - poll smokeping site for numeric information =head1 SYNOPSIS B path/to/config.cfg [I] --start x rrd graph start time. (default now-24h) --end y rrd graph end time. (default now) --filter pattern search pattern for node selection --mode plain (default) how to use the pattern - plain - recursive - regexp --separator ; (default) --format %le (default) --no-head do not print a header --man show man-page and exit -h, --help display this help and exit --version output version information and exit =head1 DESCRIPTION SmokeInfo is a simple frontend to the L module. It provides access to numeric data stored in the rrd files. Note that --start and --end are passed directly to rrd graph. This means they work on the same syntax. =head2 Examples Get all data all nodes smokeinfo etc/config Only show nodes directly under /Customers smokeinfo --filter=/Customers/ etc/config Show all nodes under /Customers smokeinfo --mode=recursive --filter=/Customers/ etc/config Show all nodes with '_wlan_' in the name smokeinfo --mode=regexp --filter=_wlan_ etc/config =head1 COPYRIGHT Copyright (c) 2009 by OETIKER+PARTNER AG. All rights reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Stobi@oetiker.chE> =head1 HISTORY 2009-01-05 to Initial Version =cut # Emacs Configuration # # Local Variables: # mode: cperl # eval: (cperl-set-style "PerlStyle") # mode: flyspell # mode: flyspell-prog # End: # # vi: sw=4 et smokeping-2.7.3/bin/smokeping000077500000000000000000000122671342220157600162230ustar00rootroot00000000000000#!/usr/bin/perl # -*-perl-*- use strict; use warnings; use lib (split /:/, q{}); # PERL5LIB use FindBin; use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR use Smokeping; Smokeping::main("$FindBin::RealBin/../etc/config"); =head1 NAME smokeping - Commandline tool for SmokePing =head1 SYNOPSIS B [ B<--email> | B<--makepod> | B<--version> | B<--restart> ] Options: --man[=x] Show the manpage for the program (or for probe x, if specified) --help Help :-) --email Send SmokePing Agents to all Targets marked DYNAMIC --config=x Use a config file different from the default --check Just check the config file syntax, don't start the daemon --makepod[=x] Create POD documentation on Config file (or for probe x, if specified) --version Show SmokePing Version --debug Run Only once and do not Fork --debug-daemon Start the daemon with debugging enabled --restart Restart SmokePing --reload Reload configuration in the running process without interrupting any probes --nodaemon Do no daemonize the process (no fork) --filter=x Only measure entries which pass the filter x --logfile=x Append warnings to logfile x. --static[=x] Generates a static website in directory x. If x is left out, pagedir from the config is used. --nosleep For debugging you may want to run SmokePing without sleep interval --gen-examples Generate the smokeping_examples document and example config files (to be used while building inside the smokeping distribution) With --check : check the syntax of the generated examples. --master-url=s Run smokeping in slave mode. Attach to master for config. --slave-name=s By default the slave will use whatever it thinks its name is, when talking to its master. In some cases you may probably want to override this. --shared-secret=s File containing the shared secret for talking to the server. --cache-dir=s Directory for temporary data storage when running in slave mode. --pid-dir=s Directory for the PID file when running in slave mode. (optional, defaults to --cache-dir) =head1 DESCRIPTION The B tool is the commandline part of the SmokePing system. Its main function is to run as a daemon and send Pings to all the Targets you have specified in the Config file. When you call B without arguments it will start as a daemon and do its work. If called with an argument, then further functions can be activated, as seen in the Synopsis above. The B<--email> function is explained in the documentation on the config file. The B<--filter> option allows you to run the daemon on a big config file, but have the config file filtered and only measure the entries that pass the filter. This is useful for remote measurement. Run Smokeping with two exclusive filters in two locations and rsync the rrds back to the webserver host where you run the cgi. Filters act on the section names in the config file. Multiple section names are concatenated with B like path names: *** targets *** + A .... + B ... ++ C This gives /A and /B, /B/C If I want to monitor /A my filter would look like this: --filter=/A Filters follow regular expression syntax. The are always anchored at the tip of the string. by adding a B to the front of the filter string you negate it. Matching entries will be excluded from monitoring. Multiple B<--filter> arguments can be used to assemble complex filters: --filter=/A --filter=/B would include all the targets --filter=/A --filter=/B --filter=!/B/C would include all but /B/C. The B<--makepod> does get used internally to produce the L. Please refer to L for detailed setup instructions. =head1 SETUP When installing SmokePing, this file has to be adjusted to fit your local system. Three paths have to be entered. One pointing to your B installation use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl); One pointing to the place where you have installed the SmokePing libraries use lib qw(/home/oetiker/public_html/smokeping/lib); The third path is the argument to the Smokeping::main command. It points to the SmokePing configuration file. use Smokeping; Smokeping::main("/home/oetiker/.smokeping/config"); =head1 COPYRIGHT Copyright (c) 2002 by Tobias Oetiker. All right reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Tobias Oetiker Etobi@oetiker.chE =cut smokeping-2.7.3/bin/smokeping_cgi000077500000000000000000000051171342220157600170410ustar00rootroot00000000000000#!/usr/bin/perl # -*-perl-*- use strict; use warnings; use lib (split /:/, q{}); # PERL5LIB use FindBin; use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR # don't bother with zombies $SIG{CHLD} = 'IGNORE'; use CGI::Carp qw(fatalsToBrowser); use Smokeping; use CGI::Fast; my $cfg = (shift @ARGV) || "$FindBin::Bin/../etc/config"; while (my $q = new CGI::Fast) { Smokeping::cgi($cfg,$q); } =head1 NAME smokeping_cgi - SmokePing webfrontend =head1 OVERVIEW This script acts as a 'website' for your SmokePing monitoring operation. It presents the targets you are looking at in a tree structure and draws graphs as they are required by people looking at the pages. =head1 DESCRIPTION To get B going, you need a webserver which allows you to run CGI or better FastCGI scripts. The system must be setup so that the cgi process is allowed to write to the image caching area as defined in the config file. This script runs fine as a normal CGI, B it will appear to be very slow, because it does a lot of things when starting up. So if the script has to be started a fresh on every click, this is both slow and a tough thing for your webserver. I therefore strongly recommend using FastCGI. Please refer to the installation document for detailed setup instructions. =head1 SETUP There is a sample F directory in your smokeping installation root. Copy its content to the place where your webserver expects its files. The fcgi script shows the preferred method for runnig smokeping. You can also run smokeping as a cgi. But make sure to still use the wrapper as exposing ARGV to the webserver represents a security vulnerability you may rather not want to deal with. Adjust the paths in the script and you should be ready to go. =head1 COPYRIGHT Copyright (c) 2011 by Tobias Oetiker. All right reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Tobias Oetiker Etobi@oetiker.chE =cut smokeping-2.7.3/bin/tSmoke000077500000000000000000000477371342220157600155030ustar00rootroot00000000000000#!/usr/bin/perl # #----------------------------------------------- # tSmoke.pl # Dan McGinn-Combs, Sep 2003 # tSmoke.v 0.4 2004/03 McGinn-Combs #----------------------------------------------- # # Modified for Smokeping official distribution since 20050526 # Original README follows # # tSmoke.v04.README # - added downtime report (--downtime) # - a few tweaks to the calculations to ensure it's consistent # # tSmoke.v03.README # - Initial Release # - The script, started through cron, will cull through a config file and # determine which hosts are down at a point in time (Morning report) and # send out an smtp message to a mobile phone (for example). # # - It will also cull through the same config file and, using an included html # file (small change to General section of the config file), send an html # message which shows the availability over the past day, week, month # and quarter. # # - It can also show detail data depending on the setting of # command line option "detail". # # tSmoke.v02.README # - Local testing version #----------------------------------------------- # # 1) This program is run via CRON or the command line # 2) It extracts RRD information from a smokeping config file # 3) It pulls data from RRD files to determine if anything is offline, that is returning 0 PINGs # 4) tSmoke reports status via an SMTP alert # 5) tSmoke also generates an SMTP mail showing historical view of availability # # Many thanks to the following people for their help and guidance: # Jim Horwath of Agere Systems Inc. for his examples and pointers to Spreadsheet::WriteExcel # Frank Harper the author of SLAMon, a tool for tracking Service Level Agreements # Tobias Oetiker, or course, the author of Smokeping, RRDTool and MRTG # use strict; use warnings; # We need to use # -- Smokeping libraries # -- RRDTool # -- Getopt::Long # # Point the lib variables to your implementation use lib (split /:/, q{}); # PERL5LIB use FindBin;use lib "$FindBin::RealBin/../lib";use lib "$FindBin::RealBin/../thirdparty/lib/perl5"; # LIBDIR use Smokeping; use Net::SMTP; use Getopt::Long; use Pod::Usage; use RRDs; # Point to your Smokeping config file my $cfgfile = "etc/config.dist"; # global variables my $cfg; #this is designed to work on IPv4 only my $havegetaddrinfo = 0; # we want opts everywhere my %opt; #Hashes for the data my (%Daily,%Weekly,%Monthly,%Quarterly); # the entries my (%DailyC,%WeeklyC,%MonthlyC,%QuarterlyC); # a count of the entries ###################### ### Moving Average ### ###################### # Just a reminder of how to do a moving average if you ever want to # PREV,UN,,UN,1,,IF,PREV,IF,,UN,1,,IF,-,,*,A,UN,1,A,IF,+ # Change Log: # DMC - Added Quarterly Status # DMC - Added HTML mail reporting and consolidated functions # DMC = Added an external HTML mail template, tMail my $RCS_VERSION = '$id: tSmoke.v 0.4 2004/03 McGinn-Combs'; sub test_mail($) { my $cfg = shift; my $mail = <<"EOF"; Subject: tSmoke test To: $cfg->{Alerts}{to} This is a test mail with 'tSmoke --testmail'. EOF print "Sending a test mail to $cfg->{Alerts}{to} from $cfg->{Alerts}{from}..."; Smokeping::sendmail($cfg->{Alerts}{from}, $cfg->{Alerts}{to}, $mail); print "done.\n"; }; sub morning_update($) { # Send out a morning summary of devices that are down my $cfg = shift; my $Body = ""; my $TmpBody = ""; my $To = ""; if ( $opt{to} ) { $To = $opt{to}; } else { $To = $cfg->{Alerts}{to}; } # Get a list of the existing RRD Files my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","") ); my $Count = $#rrds + 1; my $Down = 0; foreach my $target (@rrds) { my $Loss = 0; my ($start,$step,$names,$data) = RRDs::fetch "$target","AVERAGE","--start","-300"; my $ERR=RRDs::error; die "ERROR while reading $_: $ERR\n" if $ERR; foreach my $line (@$data) { $Loss += ( defined($$line[3]) ? $$line[3] : 0 ); } $Down += 1 if $Loss == 0; $target =~ s/^([a-zA-Z0-9]*\/)*//; $target =~ s/.rrd//; $target =~ s/\~(.*)/ from $1/ if $target =~ m/\~/; $TmpBody .= "$target\n" if $Loss == 0; } $Body = <{Alerts}{from},$To,$Body); } sub weekly_update($) { # Send out a formatted HTML Table of the # Previous Day, Week, Month and Quarter Availability # Get a list of the existing RRD Files my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","") ); my $To = ""; if ( $opt{to} ) { $To = $opt{to}; } else { $To = $cfg->{Alerts}{to}; } my $Body =''; # Calculations Based on the following: # RRDs::graph "fake.png", # '--start','-86400', # '-end','-300', # "DEF:loss=${rrd}:loss:AVERAGE", # "CDEF:avail=loss,0,100,IF", or more precisely "CDEF:avail=loss,2,GE,0,100,IF" # and adding in the check for unknown for systems just coming on line # "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF" # Arbitrarily a loss of 10% of Pings means the system was down my $pings = $cfg->{Database}{pings} * .1; foreach my $target (@rrds) { # Get an average Availability for each RRD file my $ERR; my ($DAverage,$Dxsize,$Dysize) = RRDs::graph "fake.png", "--start","-86400", "--end","-600", "--step","1008", "DEF:loss=$target:loss:AVERAGE", "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF", "PRINT:avail:AVERAGE:%.2lf"; $ERR=RRDs::error; die "ERROR while reading $_: $ERR\n" if $ERR; my ($WAverage,$Wxsize,$Wysize) = RRDs::graph "fake.png", "--start","-604800", "--end","-600", "--step","4320", "DEF:loss=$target:loss:AVERAGE", "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF", "PRINT:avail:AVERAGE:%.2lf"; $ERR=RRDs::error; die "ERROR while reading $_: $ERR\n" if $ERR; my ($MAverage,$Mxsize,$Mysize) = RRDs::graph "fake.png", "--start","-2592000", "--end","-600", "--step","4320", "DEF:loss=$target:loss:AVERAGE", "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF", "PRINT:avail:AVERAGE:%.2lf"; $ERR=RRDs::error; die "ERROR while reading $_: $ERR\n" if $ERR; my ($QAverage,$Qxsize,$Qysize) = RRDs::graph "fake.png", "--start","-7776000", "--end","-600", "--step","4320", "DEF:loss=$target:loss:AVERAGE", "CDEF:avail=loss,UN,0,loss,IF,$pings,GE,0,100,IF", "PRINT:avail:AVERAGE:%.2lf"; $ERR=RRDs::error; die "ERROR while reading $_: $ERR\n" if $ERR; $target =~ s/$cfg->{General}{datadir}\///; $target =~ s/.rrd//; my @Path; push @Path,split/\//,$target; update_stats ( \@Path, @$DAverage[0], @$WAverage[0], @$MAverage[0], @$QAverage[0]); } # Prepare the e-mail message $Body = <{General}{tmail} or die "ERROR: can't read $cfg->{General}{tmail}\n"; while (){ my $Summary = Summary_Sheet(); s/<##SUMMARY##>/$Summary/ig; my $Daily = DetailSheet(86400); s/<##DAYDETAIL##>/$Daily/ig; my $Weekly = DetailSheet(604800); s/<##WEEKDETAIL##>/$Weekly/ig; my $Monthly = DetailSheet(2592000); s/<##MONTHDETAIL##>/$Monthly/ig; my $Quarterly = DetailSheet(7776000); s/<##QUARTERDETAIL##>/$Quarterly/ig; $Body .= $_; } close tSMOKE; Smokeping::sendmail($cfg->{Alerts}{from}, $To, $Body); } sub update_stats($$$$$); sub update_stats($$$$$) { # Update the uptime percentages in the Hash Arrays my $Path = shift; my $DAverage = shift; my $WAverage = shift; my $MAverage = shift; my $QAverage = shift; #Enter everything once as it exists #Trim off the rightmost component (hostname) and reenter the code #If there is only one component, this is the final level #This is an average of averages my $Ticket = join ( ".",@$Path); $Daily { $Ticket } += $DAverage; $Weekly { $Ticket } += $WAverage; $Monthly { $Ticket } += $MAverage; $Quarterly {$Ticket } += $QAverage; $DailyC { $Ticket }++; $WeeklyC { $Ticket }++; $MonthlyC { $Ticket }++; $QuarterlyC { $Ticket }++; my $Length = @$Path; @$Path = @$Path [ 0 .. $Length - 2 ]; update_stats(\@$Path,$DAverage,$WAverage,$MAverage,$QAverage) if $Length > 1; } sub Summary_Sheet() { my $Body = ''; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; foreach (sort { $a cmp $b } keys %Monthly) { next if ( $_ =~ /\./ ); # this is a major section heading $Body .= "\n"; $Body .= ""; $Body .= "" if $Quarterly{$_}/$QuarterlyC{$_} >= 99 ; $Body .= "" if $Quarterly{$_}/$QuarterlyC{$_} > 95 and $Quarterly{$_}/$QuarterlyC{$_} < 99 ; $Body .= "" if $Quarterly{$_}/$QuarterlyC{$_} > 90 and $Quarterly{$_}/$QuarterlyC{$_} < 95 ; $Body .= "" if $Quarterly{$_}/$QuarterlyC{$_} < 90 ; $Body .= "" if $Monthly{$_}/$MonthlyC{$_} >= 99 ; $Body .= "" if $Monthly{$_}/$MonthlyC{$_} > 95 and $Monthly{$_}/$MonthlyC{$_} < 99 ; $Body .= "" if $Monthly{$_}/$MonthlyC{$_} > 90 and $Monthly{$_}/$MonthlyC{$_} < 95 ; $Body .= "" if $Monthly{$_}/$MonthlyC{$_} < 90 ; $Body .= "" if $Weekly{$_}/$WeeklyC{$_} >= 99; $Body .= "" if $Weekly{$_}/$WeeklyC{$_} > 95 and $Weekly{$_}/$WeeklyC{$_} < 99 ; $Body .= "" if $Weekly{$_}/$WeeklyC{$_} > 90 and $Weekly{$_}/$WeeklyC{$_} < 95 ; $Body .= "" if $Weekly{$_}/$WeeklyC{$_} < 90 ; $Body .= "" if $Daily{$_}/$DailyC{$_} >= 99; $Body .= "" if $Daily{$_}/$DailyC{$_} > 95 and $Daily{$_}/$DailyC{$_} < 99 ; $Body .= "" if $Daily{$_}/$DailyC{$_} > 90 and $Daily{$_}/$DailyC{$_} < 95 ; $Body .= "" if $Daily{$_}/$DailyC{$_} < 90 ; $Body .= "\n"; } $Body .= "
IT Network Systems Availability Summary
Compiled: ". scalar(localtime) . "
Service Past Quarter Past Month Past Week Past Day
$_" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%" . sprintf('%.2f',$Quarterly{$_}/$QuarterlyC{$_}) . "%" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%" . sprintf('%.2f',$Monthly{$_}/$MonthlyC{$_}) . "%" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%" . sprintf('%.2f',$Weekly{$_}/$WeeklyC{$_}) . "%" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%" . sprintf('%.2f',$Daily{$_}/$DailyC{$_}) . "%
"; $Body .= "

\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "
Legend:
if uptime > 99% then GREEN
if uptime > 95% but < 99% then BLUE
if uptime > 90% but < 95% then YELLOW
if uptime < 90% then RED
\n"; return $Body; } sub NumDots($) { # Count the number of dots in a string # There's probably a better way to do this my $DNA = shift; my $a = 0; while($DNA =~ /\./ig){$a++} return $a } sub DetailSheet($) { # Populate the table with details depending on the value of %opts{detail} my $Seconds = shift; my $Body = ''; return '' unless $opt{detail}; # Monthly/Weekly/Daily $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; my %CornBeef; my %CornBeefC; CASE: { %CornBeef = %Daily, %CornBeefC = %DailyC, print "Doing Daily\n", last CASE if $Seconds == 86400; %CornBeef = %Weekly, %CornBeefC = %WeeklyC, print "Doing Weekly\n", last CASE if $Seconds == 604800; %CornBeef = %Monthly, %CornBeefC = %MonthlyC, print "Doing Monthly\n", last CASE if $Seconds == 2592000; %CornBeef = %Quarterly, %CornBeefC = %QuarterlyC, print "Doing Quarterly\n", last CASE if $Seconds == 7776000; } # end of CASE block foreach (sort { $a cmp $b } keys %CornBeef ) { next if NumDots ($_) > $opt{detail}; if ( $_ =~ /\./ ) { #this is a sub section $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; } else { # this is a non-sub section $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= ""; } } $Body .= "
IT Network Systems Availability Previous " . $Seconds/86400 . " Day(s)
Compiled: ". scalar(localtime) . "
Service Seconds Percent
$_" . sprintf('%.0f',(100 - $CornBeef{$_} / $CornBeefC{$_}) * ($Seconds/100)) . "" . sprintf('%.2f',$CornBeef{$_} / $CornBeefC{$_}) . "%
" . $_ . "" . sprintf('%.0f',(100 - $CornBeef{$_} / $CornBeefC{$_}) * ($Seconds/100)) . "" . sprintf('%.2f',$CornBeef{$_} / $CornBeefC{$_}) . "%
\n"; return $Body; } sub list_rrds($$$$$); sub list_rrds($$$$$) { # List the RRD's used by this configuration my $tree = shift; my $path = shift; my $print = shift; my $slaves = shift; my $nomasterpoll = shift; my $prline = ''; if ( $opt{slaves} ) { $slaves = $tree->{slaves} if exists( $tree->{slaves} ); } else { $slaves = ''; } $nomasterpoll = $tree->{nomasterpoll} if exists ( $tree->{nomasterpoll} ); foreach my $rrds (keys %{$tree}) { if (ref $tree->{$rrds} eq 'HASH'){ $prline .= list_rrds( $tree->{$rrds}, $path."/$rrds", $print, $slaves, $nomasterpoll ); } if ($rrds eq 'host' and $tree->{$rrds} !~ m|/| ) { if ( exists( $opt{slaves} ) && $slaves ) { foreach( split( /\s+/, $slaves ) ) { my $tslave = $_; $prline .= "$cfg->{General}{datadir}$path~$tslave".".rrd\n" if $opt{slaves} eq '' || grep( $tslave, split( ',', $opt{slaves} ) ); } $prline .= "$cfg->{General}{datadir}$path".".rrd\n" unless $nomasterpoll; } else { $prline .= "$cfg->{General}{datadir}$path".".rrd\n"; } } } return $prline; } sub load_cfg ($) { my $cfgfile = shift; # my $parser = get_parser; my $parser = Smokeping::get_parser; $cfg = Smokeping::get_config $parser, $cfgfile; } ########################################################################### # The Main Program ########################################################################### sub main($); main($cfgfile); sub main ($) { umask 022; my $cfgfile = shift; my $sendto; GetOptions(\%opt, 'quiet','version','testmail','listrrds','to=s','detail=n','morning','weekly','help','man','slaves:s') or pod2usage(2); if($opt{version}) { print "$RCS_VERSION\n"; exit(0) }; if($opt{help}) { pod2usage(-verbose => 1); exit 0 }; if($opt{man}) { pod2usage(-verbose => 2); exit 0 }; load_cfg $cfgfile; print "tSmoke for network managed by $cfg->{General}{owner}\nat $cfg->{General}{contact}\n(c) 2003 Dan McGinn-Combs\n" unless $opt{quiet}; if($opt{testmail}) { test_mail($cfg) }; if($opt{listrrds}) { print "List of Round Robin Databases used by this implementation\n"; my @rrds = split ( /\n/,list_rrds($cfg->{Targets},"","","","") ); foreach (@rrds) { print "RRD: $_\n"; }; } if($opt{morning}) { morning_update($cfg) }; if($opt{weekly}) { weekly_update($cfg) }; exit 0; } =head1 NAME tSmoke - Commandline tool for sending SmokePing information =head1 SYNOPSIS B [ B<--testmail> | B<--morning> | B<--weekly> | B<--version> | B<--help> | B<--man> | B<--slaves> ] Options: --man Show the manpage --help Help :-) --version Show SmokePing Version --testmail Send a test message --listrrds List the RRDs used by this Smokeping --morning Send a morning synopsis --weekly Send a weekly status report --to E-mail address to send message (i.e. '--to=xyz@company.com.invalid' --detail How much detail to send in weekly report (i.e. '--detail=1') --quiet Do not print welcome --slaves Enable slave support assumes all slaves unless csv list of slaves is added (i.e. '--slaves' or '--slaves=slave1[,slave2...]') =head1 DESCRIPTION The B tool is a commandline tool which interfaces with the SmokePing system. Its main function is to send a message indicating the current status of the systems being monitored by Smokeping or an HTML mail file containing the status over the past day, past week and past month including an overview. Typical crontab used to invoke this are # Quick morning alert to see what's down 0 6 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mobilephone@att.net.invalid --morning # Weekly report on the percent availability of network systems with no detail 0 8 * * * /usr/local/smokeping/bin/tSmoke.pl --q --to=mailbox@company.com.invalid --weekly --detail=0 =head1 SETUP When installing tSmoke, some variables must be adjusted to fit your local system. We need to use the following B: =over =item Smokeping =item RRDTool Perl bindings =item Getopt::Long =back Set up your libraries: use lib "/usr/local/smokeping/lib"; use lib "/usr/local/rrdtool-1.0.39/lib/perl"; Point to your Smokeping B file my $cfgfile = "/usr/local/smokeping/etc/config"; Modify the Smokeping config file to include a path for tmail in the General section: tmail = /usr/local/smokeping/etc/tmail =head1 COPYRIGHT Copyright (c) 2003 by Dan McGinn-Combs. All right reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Dan McGinn-Combs Ed.mcginn-combs@mindspring.comE Modified for Smokeping official distribution by Niko Tyni Entyni@iki.fiE =cut smokeping-2.7.3/configure000077500000000000000000004031701342220157600154350ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for smokeping 2.7.3. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and tobi@oetiker.ch $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='smokeping' PACKAGE_TARNAME='smokeping' PACKAGE_VERSION='2.7.3' PACKAGE_STRING='smokeping 2.7.3' PACKAGE_BUGREPORT='tobi@oetiker.ch' PACKAGE_URL='' ac_default_prefix=/opt/$PACKAGE_NAME-$PACKAGE_VERSION ac_subst_vars='LTLIBOBJS LIBOBJS PERL5LIB HTDOCSDIR enable_pkgonly GMAKE NROFF SENDMAIL FIND MKDIR RMDIR RM CP LN ECHO GREP SED URL_CAT WGET CURL PERL MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_pkgonly with_htdocs_dir ' ac_precious_vars='build_alias host_alias target_alias PERL GMAKE PERL5LIB' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures smokeping 2.7.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/smokeping] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of smokeping 2.7.3:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-pkgonly Skip all checking Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-htdocs-dir=DIR Where to install htdocs [PREFIX/htdocs] Some influential environment variables: PERL Path to local perl binary GMAKE Path to local GNU Make binary PERL5LIB Colon separated list of perl library directories Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF smokeping configure 2.7.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by smokeping $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in conftools "$srcdir"/conftools; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in conftools \"$srcdir\"/conftools" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # need this to allow long path names am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='smokeping' VERSION='2.7.3' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' # The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_ustar-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "curl", so it can be a program name with args. set dummy curl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CURL+:} false; then : $as_echo_n "(cached) " >&6 else case $CURL in [\\/]* | ?:[\\/]*) ac_cv_path_CURL="$CURL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no" ;; esac fi CURL=$ac_cv_path_CURL if test -n "$CURL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5 $as_echo "$CURL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "wget", so it can be a program name with args. set dummy wget; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_WGET+:} false; then : $as_echo_n "(cached) " >&6 else case $WGET in [\\/]* | ?:[\\/]*) ac_cv_path_WGET="$WGET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_WGET" && ac_cv_path_WGET="no" ;; esac fi WGET=$ac_cv_path_WGET if test -n "$WGET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WGET" >&5 $as_echo "$WGET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi URL_CAT="neither curl nor wget found" if test -x "$CURL"; then URL_CAT="$CURL --location --insecure" else if test -x "$WGET"; then URL_CAT="$WGET -O -" fi fi ac_perl_version="5.10.1" if test "x$PERL" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl version greater than or equal to $ac_perl_version" >&5 $as_echo_n "checking for perl version greater than or equal to $ac_perl_version... " >&6; } $PERL -e "use $ac_perl_version;" >/dev/null 2>&1 if test $? -ne 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; as_fn_error $? "at least version 5.10.1 is required to run mojolicious" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; }; fi else as_fn_error $? "could not find perl" "$LINENO" 5 fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else case $SED in [\\/]* | ?:[\\/]*) ac_cv_path_SED="$SED" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SED" && ac_cv_path_SED="no" ;; esac fi SED=$ac_cv_path_SED if test -n "$SED"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else case $GREP in [\\/]* | ?:[\\/]*) ac_cv_path_GREP="$GREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="no" ;; esac fi GREP=$ac_cv_path_GREP if test -n "$GREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5 $as_echo "$GREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "echo", so it can be a program name with args. set dummy echo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ECHO+:} false; then : $as_echo_n "(cached) " >&6 else case $ECHO in [\\/]* | ?:[\\/]*) ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_ECHO" && ac_cv_path_ECHO="no" ;; esac fi ECHO=$ac_cv_path_ECHO if test -n "$ECHO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5 $as_echo "$ECHO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LN+:} false; then : $as_echo_n "(cached) " >&6 else case $LN in [\\/]* | ?:[\\/]*) ac_cv_path_LN="$LN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_LN" && ac_cv_path_LN="no" ;; esac fi LN=$ac_cv_path_LN if test -n "$LN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5 $as_echo "$LN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CP+:} false; then : $as_echo_n "(cached) " >&6 else case $CP in [\\/]* | ?:[\\/]*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CP" && ac_cv_path_CP="no" ;; esac fi CP=$ac_cv_path_CP if test -n "$CP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 $as_echo "$CP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RM+:} false; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="no" ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "rmdir", so it can be a program name with args. set dummy rmdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RMDIR+:} false; then : $as_echo_n "(cached) " >&6 else case $RMDIR in [\\/]* | ?:[\\/]*) ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RMDIR" && ac_cv_path_RMDIR="no" ;; esac fi RMDIR=$ac_cv_path_RMDIR if test -n "$RMDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5 $as_echo "$RMDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKDIR+:} false; then : $as_echo_n "(cached) " >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="no" ;; esac fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 $as_echo "$MKDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FIND+:} false; then : $as_echo_n "(cached) " >&6 else case $FIND in [\\/]* | ?:[\\/]*) ac_cv_path_FIND="$FIND" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="no" ;; esac fi FIND=$ac_cv_path_FIND if test -n "$FIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 $as_echo "$FIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SENDMAIL+:} false; then : $as_echo_n "(cached) " >&6 else case $SENDMAIL in [\\/]* | ?:[\\/]*) ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/lib do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/path/to/sendmail" ;; esac fi SENDMAIL=$ac_cv_path_SENDMAIL if test -n "$SENDMAIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SENDMAIL" >&5 $as_echo "$SENDMAIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in gnroff nroff do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NROFF+:} false; then : $as_echo_n "(cached) " >&6 else case $NROFF in [\\/]* | ?:[\\/]*) ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NROFF=$ac_cv_path_NROFF if test -n "$NROFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 $as_echo "$NROFF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$NROFF" && break done for ac_prog in gnumake gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMAKE+:} false; then : $as_echo_n "(cached) " >&6 else case $GMAKE in [\\/]* | ?:[\\/]*) ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMAKE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GMAKE=$ac_cv_path_GMAKE if test -n "$GMAKE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 $as_echo "$GMAKE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GMAKE" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for gnu make availablility" >&5 $as_echo_n "checking checking for gnu make availablility... " >&6; } if ( $GMAKE --version 2> /dev/null | $GREP GNU > /dev/null 2>&1 ); then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE is GNU make" >&5 $as_echo "$GMAKE is GNU make" >&6; } else as_fn_error $? "GNU make not found. Try setting the GMAKE environment variable." "$LINENO" 5 fi # Check whether --enable-pkgonly was given. if test "${enable_pkgonly+set}" = set; then : enableval=$enable_pkgonly; fi # $prefix stores the value of the --prefix command line option, or # NONE if the option wasn't set. In the case that it wasn't set, make # it be the default, so that we can use it to expand directories now. actual_prefix=$prefix if test x$actual_prefix = xNONE; then actual_prefix=$ac_default_prefix fi HTDOCSDIR=${actual_prefix}/htdocs # Check whether --with-htdocs-dir was given. if test "${with_htdocs_dir+set}" = set; then : withval=$with_htdocs_dir; HTDOCSDIR=$withval fi # Check the necessary Perl modules mod_ok=1 if test "$enable_pkgonly" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for RRDs perl module" >&5 $as_echo_n "checking checking for RRDs perl module... " >&6; } if ${PERL} -e 'use RRDs' 2>/dev/null ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 $as_echo "Ok" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Failed" >&5 $as_echo "Failed" >&6; } mod_ok=0 fi fi if test x$mod_ok = x0; then cat <confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by smokeping $as_me 2.7.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ smokeping config.status 2.7.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "htdocs/Makefile") CONFIG_FILES="$CONFIG_FILES htdocs/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "thirdparty/Makefile") CONFIG_FILES="$CONFIG_FILES thirdparty/Makefile" ;; "etc/config.dist") CONFIG_FILES="$CONFIG_FILES etc/config.dist" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi cat </dev/null 2>&1 if test $? -ne 0; then AC_MSG_RESULT(no); AC_MSG_ERROR(at least version 5.10.1 is required to run mojolicious) else AC_MSG_RESULT(ok); fi else AC_MSG_ERROR(could not find perl) fi AC_PATH_PROG(SED, sed, no) AC_PATH_PROG(GREP, grep, no) AC_PATH_PROG(ECHO, echo, no) AC_PATH_PROG(LN, ln, no) AC_PATH_PROG(CP, cp, no) AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(RMDIR, rmdir, no) AC_PATH_PROG(MKDIR, mkdir, no) AC_PATH_PROG(FIND, find, no) AC_PATH_PROG(SENDMAIL, sendmail, /path/to/sendmail, [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/lib]) AC_PATH_PROGS(NROFF, [gnroff nroff]) AC_ARG_VAR(GMAKE, [Path to local GNU Make binary]) AC_PATH_PROGS(GMAKE, [gnumake gmake make]) AC_MSG_CHECKING([checking for gnu make availablility]) if ( $GMAKE --version 2> /dev/null | $GREP GNU > /dev/null 2>&1 ); then AC_MSG_RESULT([$GMAKE is GNU make]) else AC_MSG_ERROR([GNU make not found. Try setting the GMAKE environment variable.]) fi AC_ARG_ENABLE(pkgonly, [AC_HELP_STRING([--enable-pkgonly], [Skip all checking])]) AC_SUBST(enable_pkgonly) # $prefix stores the value of the --prefix command line option, or # NONE if the option wasn't set. In the case that it wasn't set, make # it be the default, so that we can use it to expand directories now. actual_prefix=$prefix if test x$actual_prefix = xNONE; then actual_prefix=$ac_default_prefix fi HTDOCSDIR=${actual_prefix}/htdocs AC_ARG_WITH(htdocs-dir,AC_HELP_STRING([--with-htdocs-dir=DIR],[Where to install htdocs [PREFIX/htdocs]]), [HTDOCSDIR=$withval]) AC_SUBST(HTDOCSDIR) AC_ARG_VAR(PERL5LIB, [Colon separated list of perl library directories]) AC_SUBST(PERL5LIB) # Check the necessary Perl modules mod_ok=1 if test "$enable_pkgonly" != yes; then AC_MSG_CHECKING([checking for RRDs perl module]) if ${PERL} -e 'use RRDs' 2>/dev/null ; then AC_MSG_RESULT([Ok]) else AC_MSG_RESULT([Failed]) mod_ok=0 fi fi if test x$mod_ok = x0; then cat <. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: smokeping-2.7.3/conftools/config.guess000077500000000000000000001303611342220157600200530ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: smokeping-2.7.3/conftools/config.sub000077500000000000000000001053541342220157600175220ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-08-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: smokeping-2.7.3/conftools/install-sh000077500000000000000000000354631342220157600175460ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: smokeping-2.7.3/conftools/missing000077500000000000000000000153301342220157600171300ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: smokeping-2.7.3/doc/000077500000000000000000000000001342220157600142665ustar00rootroot00000000000000smokeping-2.7.3/doc/Makefile.am000066400000000000000000000073361342220157600163330ustar00rootroot00000000000000# Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. AUTOMAKE_OPTIONS = foreign # section 7 DOCS = smokeping_extend.pod smokeping_install.pod smokeping_master_slave.pod smokeping_upgrade.pod # section 5 DOCSCONFIG = smokeping_config.pod smokeping_examples.pod #PM := ../lib/Smokeping.pm ../lib/Smokeping/Examples.pm ../lib/Smokeping/RRDtools.pm EXTRA_DIST = $(DOCS) smokeping_install.txt PODPROBE := $(wildcard ../lib/Smokeping/probes/*.pm) PODMATCH := $(wildcard ../lib/Smokeping/matchers/*.pm) PODSORT := $(wildcard ../lib/Smokeping/sorters/*.pm) DOCSBASE = $(subst .pod,,$(DOCS)) MODBASE = $(subst .pm,,$(subst ../lib/Smokeping/probes/,Smokeping_probes_,$(PODPROBE))) \ $(subst .pm,,$(subst ../lib/Smokeping/matchers/,Smokeping_matchers_,$(PODMATCH))) \ $(subst .pm,,$(subst ../lib/Smokeping/sorters/,Smokeping_sorters_,$(PODSORT))) PROGBASE = smokeping smokeping_cgi tSmoke DOCSCONFIGBASE = smokeping_config smokeping_examples MAN3 = $(addsuffix .3,$(MODBASE)) MAN5 = $(addsuffix .5,$(DOCSCONFIGBASE)) MAN7 = $(addsuffix .7,$(DOCSBASE)) MAN1 = $(addsuffix .1,$(PROGBASE)) POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< # we go to this trouble to ensure that MAKEPOD only uses modules in the installation directory MAKEPOD= PERL5LIB=$(PERL5LIB) $(PERL) -I../thirdparty/lib/perl5 -I../lib -mSmokeping -e 'Smokeping::main()' -- --makepod GENEX= PERL5LIB=$(PERL5LIB) $(PERL) -I../thirdparty/lib/perl5 -I../lib -mSmokeping -e 'Smokeping::main()' -- --gen-examples %.7: %.pod $(AM_V_GEN)$(POD2MAN) --section 7 > $@ %.5: %.pod $(AM_V_GEN)$(POD2MAN) --section 5 > $@ Smokeping.3: ../lib/Smokeping.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_Examples.3: ../lib/Smokeping/Examples.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_RRDtools.3: ../lib/Smokeping/RRDtools.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_probes_%.pod: ../lib/Smokeping/probes/%.pm $(AM_V_GEN)$(MAKEPOD) Smokeping::probes::$* > $@ Smokeping_probes_%.3: Smokeping_probes_%.pod $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_matchers_%.3: ../lib/Smokeping/matchers/%.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_sorters_%.3: ../lib/Smokeping/sorters/%.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ smokeping.1: ../bin/smokeping $(AM_V_GEN)$(POD2MAN) --section 1 > $@ smokeping_cgi.1: ../bin/smokeping_cgi $(AM_V_GEN)$(POD2MAN) --section 1 > $@ tSmoke.1: ../bin/tSmoke $(AM_V_GEN)$(POD2MAN) --section 1 > $@ smokeping_config.pod: ../lib/Smokeping.pm $(AM_V_GEN)$(MAKEPOD) > $@ smokeping_examples.pod: ../lib/Smokeping/Examples.pm ../etc/config.dist $(AM_V_GEN)$(MKDIR) -p examples $(AM_V_GEN)$(GENEX) .1.txt .3.txt .5.txt .7.txt: $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@ CLEANFILES = *.[1357] smokeping_examples.pod smokeping_config.pod examples/* iman1dir = $(mandir)/man1 iman1_DATA = $(MAN1) iman3dir = $(mandir)/man3 iman3_DATA = $(MAN3) iman5dir = $(mandir)/man5 iman5_DATA = $(MAN5) iman7dir = $(mandir)/man7 iman7_DATA = $(MAN7) EXAMPLES := $(wildcard examples/config.*) etcdir = $(sysconfdir)/examples etc_DATA = $(EXAMPLES) smokeping-2.7.3/doc/Makefile.in000066400000000000000000000504701342220157600163410ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(etcdir)" "$(DESTDIR)$(iman1dir)" \ "$(DESTDIR)$(iman3dir)" "$(DESTDIR)$(iman5dir)" \ "$(DESTDIR)$(iman7dir)" DATA = $(etc_DATA) $(iman1_DATA) $(iman3_DATA) $(iman5_DATA) \ $(iman7_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign # section 7 DOCS = smokeping_extend.pod smokeping_install.pod smokeping_master_slave.pod smokeping_upgrade.pod # section 5 DOCSCONFIG = smokeping_config.pod smokeping_examples.pod #PM := ../lib/Smokeping.pm ../lib/Smokeping/Examples.pm ../lib/Smokeping/RRDtools.pm EXTRA_DIST = $(DOCS) smokeping_install.txt PODPROBE := $(wildcard ../lib/Smokeping/probes/*.pm) PODMATCH := $(wildcard ../lib/Smokeping/matchers/*.pm) PODSORT := $(wildcard ../lib/Smokeping/sorters/*.pm) DOCSBASE = $(subst .pod,,$(DOCS)) MODBASE = $(subst .pm,,$(subst ../lib/Smokeping/probes/,Smokeping_probes_,$(PODPROBE))) \ $(subst .pm,,$(subst ../lib/Smokeping/matchers/,Smokeping_matchers_,$(PODMATCH))) \ $(subst .pm,,$(subst ../lib/Smokeping/sorters/,Smokeping_sorters_,$(PODSORT))) PROGBASE = smokeping smokeping_cgi tSmoke DOCSCONFIGBASE = smokeping_config smokeping_examples MAN3 = $(addsuffix .3,$(MODBASE)) MAN5 = $(addsuffix .5,$(DOCSCONFIGBASE)) MAN7 = $(addsuffix .7,$(DOCSBASE)) MAN1 = $(addsuffix .1,$(PROGBASE)) POD2MAN = pod2man --release=$(VERSION) --center=SmokePing $< # we go to this trouble to ensure that MAKEPOD only uses modules in the installation directory MAKEPOD = PERL5LIB=$(PERL5LIB) $(PERL) -I../thirdparty/lib/perl5 -I../lib -mSmokeping -e 'Smokeping::main()' -- --makepod GENEX = PERL5LIB=$(PERL5LIB) $(PERL) -I../thirdparty/lib/perl5 -I../lib -mSmokeping -e 'Smokeping::main()' -- --gen-examples CLEANFILES = *.[1357] smokeping_examples.pod smokeping_config.pod examples/* iman1dir = $(mandir)/man1 iman1_DATA = $(MAN1) iman3dir = $(mandir)/man3 iman3_DATA = $(MAN3) iman5dir = $(mandir)/man5 iman5_DATA = $(MAN5) iman7dir = $(mandir)/man7 iman7_DATA = $(MAN7) EXAMPLES := $(wildcard examples/config.*) etcdir = $(sysconfdir)/examples etc_DATA = $(EXAMPLES) all: all-am .SUFFIXES: .SUFFIXES: .1 .3 .5 .7 .txt $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-etcDATA: $(etc_DATA) @$(NORMAL_INSTALL) @list='$(etc_DATA)'; test -n "$(etcdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(etcdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(etcdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(etcdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(etcdir)" || exit $$?; \ done uninstall-etcDATA: @$(NORMAL_UNINSTALL) @list='$(etc_DATA)'; test -n "$(etcdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(etcdir)'; $(am__uninstall_files_from_dir) install-iman1DATA: $(iman1_DATA) @$(NORMAL_INSTALL) @list='$(iman1_DATA)'; test -n "$(iman1dir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iman1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iman1dir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iman1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(iman1dir)" || exit $$?; \ done uninstall-iman1DATA: @$(NORMAL_UNINSTALL) @list='$(iman1_DATA)'; test -n "$(iman1dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iman1dir)'; $(am__uninstall_files_from_dir) install-iman3DATA: $(iman3_DATA) @$(NORMAL_INSTALL) @list='$(iman3_DATA)'; test -n "$(iman3dir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iman3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iman3dir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iman3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(iman3dir)" || exit $$?; \ done uninstall-iman3DATA: @$(NORMAL_UNINSTALL) @list='$(iman3_DATA)'; test -n "$(iman3dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iman3dir)'; $(am__uninstall_files_from_dir) install-iman5DATA: $(iman5_DATA) @$(NORMAL_INSTALL) @list='$(iman5_DATA)'; test -n "$(iman5dir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iman5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iman5dir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iman5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(iman5dir)" || exit $$?; \ done uninstall-iman5DATA: @$(NORMAL_UNINSTALL) @list='$(iman5_DATA)'; test -n "$(iman5dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iman5dir)'; $(am__uninstall_files_from_dir) install-iman7DATA: $(iman7_DATA) @$(NORMAL_INSTALL) @list='$(iman7_DATA)'; test -n "$(iman7dir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(iman7dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(iman7dir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(iman7dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(iman7dir)" || exit $$?; \ done uninstall-iman7DATA: @$(NORMAL_UNINSTALL) @list='$(iman7_DATA)'; test -n "$(iman7dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(iman7dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(etcdir)" "$(DESTDIR)$(iman1dir)" "$(DESTDIR)$(iman3dir)" "$(DESTDIR)$(iman5dir)" "$(DESTDIR)$(iman7dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-etcDATA install-iman1DATA install-iman3DATA \ install-iman5DATA install-iman7DATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-etcDATA uninstall-iman1DATA \ uninstall-iman3DATA uninstall-iman5DATA uninstall-iman7DATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-etcDATA \ install-exec install-exec-am install-html install-html-am \ install-iman1DATA install-iman3DATA install-iman5DATA \ install-iman7DATA install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-etcDATA uninstall-iman1DATA \ uninstall-iman3DATA uninstall-iman5DATA uninstall-iman7DATA .PRECIOUS: Makefile %.7: %.pod $(AM_V_GEN)$(POD2MAN) --section 7 > $@ %.5: %.pod $(AM_V_GEN)$(POD2MAN) --section 5 > $@ Smokeping.3: ../lib/Smokeping.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_Examples.3: ../lib/Smokeping/Examples.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_RRDtools.3: ../lib/Smokeping/RRDtools.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_probes_%.pod: ../lib/Smokeping/probes/%.pm $(AM_V_GEN)$(MAKEPOD) Smokeping::probes::$* > $@ Smokeping_probes_%.3: Smokeping_probes_%.pod $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_matchers_%.3: ../lib/Smokeping/matchers/%.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ Smokeping_sorters_%.3: ../lib/Smokeping/sorters/%.pm $(AM_V_GEN)$(POD2MAN) --section 3 > $@ smokeping.1: ../bin/smokeping $(AM_V_GEN)$(POD2MAN) --section 1 > $@ smokeping_cgi.1: ../bin/smokeping_cgi $(AM_V_GEN)$(POD2MAN) --section 1 > $@ tSmoke.1: ../bin/tSmoke $(AM_V_GEN)$(POD2MAN) --section 1 > $@ smokeping_config.pod: ../lib/Smokeping.pm $(AM_V_GEN)$(MAKEPOD) > $@ smokeping_examples.pod: ../lib/Smokeping/Examples.pm ../etc/config.dist $(AM_V_GEN)$(MKDIR) -p examples $(AM_V_GEN)$(GENEX) .1.txt .3.txt .5.txt .7.txt: $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/doc/smokeping_extend.pod000066400000000000000000000227751342220157600203520ustar00rootroot00000000000000=head1 NAME smokeping_extend - Notes on extending Smokeping =head1 OVERVIEW This document is intended to guide prospective authors in writing new Smokeping probes. It mostly describes the interface between Smokeping and its probe modules. If it seems too complicated to understand, look at the existing modules for examples. Comments and proposed changes or additions are welcome. Please send them to the smokeping-users mailing list. Patches against the POD source of this document are most appreciated. =head1 CHOOSING A BASE CLASS The first thing you should decide is which base class you should use for your probe. For most (if not all) uses it's a choice between L and L. The former is intended for probes that can measure their targets all in one go, while the latter is for probing them one at a time, possibly in several concurrent subprocesses. At the moment, the only probes that use C are the FPing derivatives. All the others use C, and chances are you should too. This document will thus concentrate on the latter case. =head1 SKELETON FILE The L module is a non-functional probe that is intended to make a good basis for a new probe module. Copy the file, C, to a new name and just fill out the blanks :) Note that the names of real probe modules must start with a capital letter. =head1 PROBE DOCUMENTATION The probe documentation is generated from the source code with the L arguments C<--man> or C<--makepod>. The embedded POD documentation should point to this real documentation, so that curious users of the C command see what's going on. All the current probes do this. You should provide the method C that returns a reference to a hash with keys corresponding to the section names you want in the manpage. The supported section names are C, C, C, C, C, C, and C. If you don't need a particular section, just leave it out. The special sections C and C are automatically generated from the description of your variables. See below. Note that if you use 'here documents' ('<<') that have POD markup inside, you should escape the markup so that it doesn't show up in the embedded POD documentation. Most probes do it like this: my $e = "="; my $doc = < method that returns a short description of what it does. This will be used in the graphs produced by the web frontend. =head1 VARIABLES All Smokeping probes must define their variables by implementing a C method for probe-specific variables and a C method for target-specific variables. If you don't know the difference between these yet, see L. (The probes that are derived from C don't support target-specific variables, so they only use the C method.) The base classes offer these methods too to provide the variables that are common to all the probes (eg. the probe-specific C variable and the target-specific C variable. If you don't want to add anything to the base class variables (perhaps because all your variables are of a target-specific nature, so you don't need new probe-specific variables at all), you can leave the corresponding method out and it will be inherited from the base class. When you do supply your own C or C method, you should combine your variables with those coming from the superclass. There is a convenience method called C<_makevars> that does this, and the common idiom is sub probevars { my $class = shift; return $class->_makevars($class->SUPER::probevars, { # your variables go here } } The variables are declared in a syntax that comes from the module used for parsing the configuration file, C. Each variable should be a hash that uses the "special variable keys" documented in L. See C and the other probes for examples. For reference, here are the keys the hash should have. Much of this is taken straight from the C manual. =over =item Keys you B provide =over =item _doc Description of the variable. =item _example An example value. This will be used in the SYNOPSIS section in the probe manual. =back =item Optional keys =over =item _default A default value that will be assigned to the variable if none is specified or inherited. =item _re Regular expression upon which the value will be checked. =item _re_error String containing the returned error in case the regular expression doesn't match (if not specified, a generic 'syntax error' message will be returned). =item _sub A function pointer. It is called for every value, with the value passed as its first argument. If the function returns a defined value it is assumed that the test was not successful and an error is generated with the returned string as content. =back =back The C and C methods should return hash references that contain the variable names as keys and the hashes described above as values. In addition the C special section key C<_mandatory> is supported and should contain a reference to a list of mandatory variables. The C<_makevars> method is aware of this special key and merges the mandatory lists in its arguments. Note that no other C special section keys are supported. =head1 INITIALIZATION If you must do something at probe initialization time, like check that the external program you're going to use behaves as you expect, you should do it in the C method. You should probably also take care that you don't run the tests needlessly while in CGI mode. The usual way to do this is to test for $ENV{SERVER_SOFTWARE}. See the C module for an example. =head1 PINGING All the real action happens in the C method (or, for C-derived probes, in the C method.) The arguments for C are C<$self>, the module instance (since this is a method) and C<$target>, the target to be probed. You can access the probe-specific variables here via the C<$self-E{properties}> hash and the target-specific ones via the C<$target-E{vars}> hash. You get the number of pings needed for the target via the C method: Cpings($target)>. You should return a sorted array of the latency times measured. If a ping fails, don't put anything in the array. That's it, you're done! =head1 EXAMPLE CONFIGURATIONS If you would like to provide a documented example configuration for your probe (in addition to the automatically generated SYNOPSIS section in the probe manual), you can do so by adding it to the L module. Look for the 'examples' subroutine and add your example there. Future versions of Smokeping might provide a way to embed examples in the probe modules too. The author's motivation for implementing this would be greatly increased by even a single demand for it, so please speak up if you think you'd use it. =head1 TIMEOUT HANDLING If you deal with timeouts (for example because your program offers a parameter for specifying the timeout for the pings), you should know a few things. First, there's timeout logic in C that kills the probe when the timeout is reached. By default the timeout is (# of pings * 5 seconds) + 1 second. If you expect that your pings can take longer, you should modify the default value of the probe-specific variable C. This would be done like this: sub probevars { my $class = shift; my $h = $class->SUPER::probevars; $h->{timeout}{_default} = 10; # override the superclass default return $class->_makevars($h, { # your variables go here } } If you want to provide a target-specific C setting, you should delete the probe-specific variable and be sure to provide a default for your target-specific one. See eg. C for an example of how this is done. Providing a target-specific C will make the timeout in C be (# of pings * the maximum timeout of all targets) + 1 second. The 1 second is added so that the own timeout logic of the probe has time to kick in even in the worst case (ie. all pings are lost) before C starts killing the processes. =head1 COPYRIGHT Copyright 2005 by Niko Tyni. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Niko Tyni =head1 BUGS This document makes writing new probes look much harder than it really is. =head1 SEE ALSO The other Smokeping documents, especially L. smokeping-2.7.3/doc/smokeping_install.pod000066400000000000000000000121571342220157600205220ustar00rootroot00000000000000=head1 NAME smokeping_install - How to install SmokePing =head1 OVERVIEW This document explains how to setup SmokePing at your site. =head1 DESCRIPTION =head2 Prerequisites SmokePing does not stand alone. It relies on various other tools and services being present. Apart from a Unix OS and a working Perl installation you need the following components: =over =item RRDtool 1.2.x or later Smokeping uses RRDtool for logging and graphing. If your linux distro provides an rrdtool package with perl support, use this. If you want to get the latest and greatest version, compile your own: L Ubuntu: sudo apt install rrdtool librrds-perl RedHat: sudo yum install rrdtool perl-rrdtool =item FPing (optional) Go to L to grab a copy. Note that fping must be installed setuid root. It seems that older versions of fping report round trip times in 0.1 milliseconds instead of 1 milliseconds as advertised ... SmokePing tries to figure this out. It tells you when it starts ... let me know if it gets it wrong. =item EchoPing (Optional) L You need this to run the EchoPing probes =item Curl (Optional) L You need this for the Curl probe. =item dig (Optional) L You need this for the DNS probe. =item SSH (Optional) L You need this for the SSH probe. =item Webserver L Well I won't get much into this. The important thing is, to have a webserver which allows you to run CGI and preferably FastCGI scripts. If you are using Apache I strongly recommend using the F system for running CGI scripts as a particular user. See L and L for more information on this. =item Perl 5.10.1 or later. If you still have an older version, maybe have a look at perlbrew. Ubuntu: sudo apt install perl RedHat: sudo yum install perl-core =back =head2 Installation Once the tools listed above are in place, you can start setting up SmokePing itself. Unpack the tar archive and run the included configure script: ./configure --prefix=/opt/smokeping Configure will verify that all the required perl modules are available. If some are missing it will tell you to run the module build script. Just follow the instructions on screen and then run configure again. Once it completes, you can run make install to finish your setup. =head2 Configuration Use the F file as a template to create your own smokeping configuration file. See L for details. =over =item Installing the webinterface Copy the content of the F directory to the place where your webserver expects its data. Maybe to F. Edit the F script to point to your smokeping_cgi script. If you have no FastCGI support in your webserver, you may want to use the F script. =item F Edit the html template to your likings. Please do not remove the link to the SmokePing counter and my name from the template. The content of the template will be renderd by smokeping.cgi. This means that all embedded links must be relative to smokeping.cgi. If you are using HTTP authentication, then the template variable C will be populated from the C<$ENV{REMOTE_USER}> environment variable. =item F If you are going to use the B IP support, customize the contents of this file. =back =head2 Starting the Smokeping Daemon With all the scaffolding in place, you can now launch the smokeping daemon and have it gather data for you. First you may want to run it in debug mode to see what it is doing ./bin/smokeping --config=/opt/smokeping/etc/config --debug once all is well, start it up as a daemon. I would recomend you enable the logfile option so that you can see if it runs into trouble. ./bin/smokeping --config=/opt/smokeping/etc/config --logfile=smoke.log Once the system works, you may want to put a SmokePing startup script into your F tree. Check out L for further information. You can now open the smokeping.cgi webpage to look at your data. See the L documentation on how to setup the smokeping web interface. =head1 COPYRIGHT Copyright (c) 2001, 2011 by Tobias Oetiker. All right reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Tobias Oetiker Etobi@oetiker.chE =cut smokeping-2.7.3/doc/smokeping_install.txt000066400000000000000000000146341342220157600205610ustar00rootroot00000000000000SMOKEPING_INSTALL(7) SmokePing SMOKEPING_INSTALL(7) NNAAMMEE smokeping_install - How to install SmokePing OOVVEERRVVIIEEWW This document explains how to setup SmokePing at your site. DDEESSCCRRIIPPTTIIOONN PPrreerreeqquuiissiitteess SmokePing does not stand alone. It relies on various other tools and services being present. Apart from a Unix OS and a working Perl installation you need the following components: RRDtool 1.2.x or later Smokeping uses RRDtool for logging and graphing. If your linux distro provides an rrdtool package with perl support, use this. If you want to get the latest and greatest version, compile your own: Ubuntu: sudo apt install rrdtool librrds-perl RedHat: sudo yum install rrdtool perl-rrdtool FPing (optional) Go to to grab a copy. Note that fping must be installed setuid root. It seems that older versions of fping report round trip times in 0.1 milliseconds instead of 1 milliseconds as advertised ... SmokePing tries to figure this out. It tells you when it starts ... let me know if it gets it wrong. EchoPing (Optional) You need this to run the EchoPing probes Curl (Optional) You need this for the Curl probe. dig (Optional) You need this for the DNS probe. SSH (Optional) You need this for the SSH probe. Webserver Well I won't get much into this. The important thing is, to have a webserver which allows you to run CGI and preferably FastCGI scripts. If you are using Apache I strongly recommend using the _s_u_e_x_e_c system for running CGI scripts as a particular user. See and for more information on this. Perl 5.10.1 or later. If you still have an older version, maybe have a look at perlbrew. Ubuntu: sudo apt install perl RedHat: sudo yum install perl-core IInnssttaallllaattiioonn Once the tools listed above are in place, you can start setting up SmokePing itself. Unpack the tar archive and run the included configure script: ./configure --prefix=/opt/smokeping Configure will verify that all the required perl modules are available. If some are missing it will tell you to run the module build script. Just follow the instructions on screen and then run configure again. Once it completes, you can run make install to finish your setup. CCoonnffiigguurraattiioonn Use the _e_t_c_/_c_o_n_f_i_g_._d_i_s_t file as a template to create your own smokeping configuration file. See smokeping_config for details. Installing the webinterface Copy the content of the _P_R_E_F_I_X_/_h_t_d_o_c_s directory to the place where your webserver expects its data. Maybe to _/_v_a_r_/_w_w_w_/_s_m_o_k_e_p_i_n_g. Edit the _s_m_o_k_e_p_i_n_g_._f_c_g_i script to point to your smokeping_cgi script. If you have no FastCGI support in your webserver, you may want to use the _s_m_o_k_e_p_i_n_g_._c_g_i script. _e_t_c_/_b_a_s_e_p_a_g_e_._h_t_m_l Edit the html template to your likings. Please do not remove the link to the SmokePing counter and my name from the template. The content of the template will be renderd by smokeping.cgi. This means that all embedded links must be relative to smokeping.cgi. If you are using HTTP authentication, then the template variable "authuser" will be populated from the $ENV{REMOTE_USER} environment variable. _e_t_c_/_s_m_o_k_e_m_a_i_l If you are going to use the DDYYNNAAMMIICC IP support, customize the contents of this file. SSttaarrttiinngg tthhee SSmmookkeeppiinngg DDaaeemmoonn With all the scaffolding in place, you can now launch the smokeping daemon and have it gather data for you. First you may want to run it in debug mode to see what it is doing ./bin/smokeping --config=/opt/smokeping/etc/config --debug once all is well, start it up as a daemon. I would recomend you enable the logfile option so that you can see if it runs into trouble. ./bin/smokeping --config=/opt/smokeping/etc/config --logfile=smoke.log Once the system works, you may want to put a SmokePing startup script into your _/_e_t_c_/_i_n_i_t_._d tree. Check out smokeping for further information. You can now open the smokeping.cgi webpage to look at your data. See the smokeping_cgi documentation on how to setup the smokeping web interface. CCOOPPYYRRIIGGHHTT Copyright (c) 2001, 2011 by Tobias Oetiker. All right reserved. LLIICCEENNSSEE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AAUUTTHHOORR Tobias Oetiker 2.8.0 2018-01-30 SMOKEPING_INSTALL(7) smokeping-2.7.3/doc/smokeping_master_slave.pod000066400000000000000000000136501342220157600215400ustar00rootroot00000000000000=head1 NAME smokeping_master_slave - How to run multiple distributed instances of SmokePing =head1 OVERVIEW Normally smokeping probes run their tests from the host where smokeping runs to some target host and monitor the latency of the connection between the two. The Master/Slave concept enables all smokeping probes to run remotely. The use case for this is to measure the overall connectivity in a network. If you are interested in checking that your central DNS server or your file server works for everyone, you could setup several smokeping instances checking up on on the two servers from multiple locations within your network. With the Master/Slave smokeping configuration this process becomes much simpler, as one smokeping master server can control multiple slaves. All monitoring data is stored and presented on the server, but collected by the slaves. The slaves will also get their configuration information from the master, so that you just have to maintain the master server configuration file and the rest is taken care of automatically. =head1 DESCRIPTION =head2 Architecture The slaves communicate with the master smokeping server via the normal smokeping web interface. On initial startup each slave connects to the master server and asks for its assignments. When the slave has done a round of probing it connects to the master again to deliver the results. If the assignment for a slave changes, the master will tell the slave after the slave has delivered its results. The master and the slaves sign their messages by supplying an HMAC-MD5 code (RFC 2104) of the message and a shared secret. Optionally the whole communication can run over ssl. [slave 1] [slave 2] [slave 3] | | | +-------+ | +--------+ | | | v v v +---------------+ | master | +---------------+ The slave is a normal smokeping instance setup where the configuration comes from the master instead of a local configuration file. The slave tries to contact the master server after every round of probing, supplying its results. If the master server can not be reached, the results will be sent to the server together with the next round of results. Results will be stored in a file in Perl storable form so that they survive a restart of the smokeping instance. =head2 Master Configuration To configure a master/slave setup, add a slaves section to your smokeping configuration file. Each slave has a section in the slaves part of the master configuration file. The section name must match the hostname of the slave. If some configuration parameter must be set to a special value for the slave, use an override section to configure this. The slave names must be the names the hosts think they have, not their outside hostnames or ip addresses or anything like that. When the slave calls the master to get its config or report its measurements it will tell the master its 'hostname'. This together with the shared secret is used to authenticate and identify who is who. *** Slaves *** secrets=/etc/smokeping/slavesecrets.conf +slave1 display_name=erul22 location=India color=ff0000 ++override Probes.FPing.binary = /usr/bin/fping ... Then in the targets section you can define slaves at every level. Again the settings get inherited by lower order targets and can be overwritten anywhere in the tree. A slave will then get the appropriate configuration assigned by the server. *** Targets *** slaves = slave1 slave2 ... +dest1 slaves = ... +dest2 slaves = slave1 ... +dest3 ... The data from the slaves will be stored in F. So the example above would create the following files: dest1.rrd dest2.rrd dest2~slave1.rrd dest3.rrd dest3~slave1.rrd dest3~slave2.rrd The F file contains a colon separated list of hostnames and secrets. host1:secret1 host2:secret2 =head2 Slave Configuration A smokeping slave setup has no configuration file. It just needs to know that it runs in slave-mode and its secret. The secret is stored in a file for optimal protection. By default the persistent data cache will be located in F. ./smokeping --master-url=http://smokeping/smokeping.cgi \ --cache-dir=/var/smokeping/ \ --shared-secret=/var/smokeping/secret.txt The F file contains a single word, the secret of this slave. It is NOT the same as the F file the master uses. =head1 SECURITY CONSIDERATIONS The master effectively has full access to slave hosts as the user running the slave smokeping instance. The configuration is transferred as Perl code that is evaluated on the slave. While this is done inside a restricted C compartment, there are various ways that a malicious master could embed arbitrary commands in the configuration and get them to run when the slave probes its targets. The strength of the shared secret is thus of paramount importance. Brute forcing the secret would enable a man-in-the-middle to inject a malicious new configuration and compromise the slave. =head1 COPYRIGHT Copyright (c) 2007 by Tobias Oetiker, OETIKER+PARTNER AG. All right reserved. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Tobias Oetiker Etobi@oetiker.chE =cut smokeping-2.7.3/doc/smokeping_upgrade.pod000066400000000000000000000345631342220157600205100ustar00rootroot00000000000000=head1 NAME smokeping_upgrade - Notes on upgrading Smokeping =head1 OVERVIEW This document tries to list incompatible or otherwise user-visible changes in Smokeping versions, with instructions on how to fix any possible problems. It also sporadically mentions new features and the like. The document currently starts with changes from 1.34 to 1.37. If you run into problems with upgrading from earlier versions, please send a description of the problems, preferably with notes on how to fix them, to the C mailing list, so they can be added to this document. The same applies to any problems you find with current versions that are not documented here, of course. Patch submissions against the POD source of this file are most appreciated. If a version is not listed, there are no known problems in upgrading to it from the previous release. An official list of changes with each release can be found in the CHANGES file in the Smokeping distribution. This document tries to complement that with upgrading instructions etc. =head1 2.4.2 to 2.4.3 To fix zooming for FF3.5 I prototype and scriptaculous have been updated. To complete the fix you have to update your basepage.html too and include effects in the scriptaculous load line cropper/lib/scriptaculous.js?load=builder,effects,dragdrop =head1 2.3.6 to 2.4.0 The new SmokeTrace tool was added to SmokePing. For setup instructions read the L manual page. =head1 2.3.3 to 2.3.4 The communication protocol between master and slave has been made more secure. This requires that BOTH master and slave are upgraded to continue working. =head1 2.2.x to 2.3.x 2.3.0 is mainly about new features. Check out the reference documentation on F and the target properties F, F and F. The only thing you have to take a look at, is the file F which got some new css properties. Without them the results of the new filter function will look quite bad. =head1 2.1.x to 2.2.0 =head2 LWP Dependency The new master/slave functionality needs the LWP::UserAgent module from CPAN. Currently the dependency is not optional; you'll need the module even if you are only running one Smokeping instance. =head1 2.0.9 to 2.1.0 =head2 Echoping 6 support This is the first Smokeping version that fully supports echoping 6. Earlier versions of the EchoPingHttp probes don't work with echoping 6 because of a command line incompatibility. (Echoping 5 is still supported, of course.) This version also introduces three new probes using the new echoping plugin interface introduced in version 6: =over =item * L =item * L =item * L =back See the L document for simple examples of using these probes. =head2 New method in base.pm (if you write your own probes) The F module defines the method ProbeUnit. Override this if your Probe does not return 'Seconds'. See the F for inspiration. =head1 2.0.8 to 2.0.9 =head2 L The 'timeout' variable removed in 2.0.5 has been brought back. It is used to give the C command the C<-t> parameter, which apparently affects the timeout of the last ping in the counting (C<-C>) mode used by Smokeping. =head1 2.0.5 to 2.0.6 =head2 CGI self-referring links (again) The way Smokeping creates the self-referring links was changed once more. See the section under '2.0.4 to 2.0.5' for a description of the previous change. The behaviour is now customizable via the C variable in the C section of the configuration file. The default is now C, creating links like S<
>. I hope this works for everybody, but if it doesn't, see L for the alternatives. =head1 2.0.4 to 2.0.5 =head2 L The 'timeout' variable has been removed. It was used to give the C command the C<-t> parameter, but as this parameter is only effective in C's I mode, while Smokeping uses the I mode (C<-c>), it never actually did anything. =head2 CGI self-referring links The way Smokeping creates the self-referring links was changed. The old behaviour used the script name but not the host part, resulting in links like S<>. The new behaviour uses the C variable: the links are always absolute like S<>. =head1 2.0.1 to 2.0.2 =head2 Edge-triggered alerts The alert notifications can now optionally be sent only when the state of the alert changes. This means that only the first match of the alert generates a notification, subsequent matches don't. When the alert is cleared, ie. there's no match anymore, another notification is sent. This behaviour is enabled by the C variable in the C section. The old behaviour (which sends a notification on each match) is the default. =head1 1.40 to 2.0 The biggest change with the 2.0 release is that the configuration file is now parsed much more strictly. This should result in (hopefully understandable) error messages making the configuration less of the trial-and-error variety than it used to be. It also automates the generation of the configuration documentation from the source code, so the docs are now more accurate. A smaller change worth mentioning is the inclusion of the tSmoke script (contributed by Dan McGinn-Combs) for sending summary emails on daily and weekly system status. Note that it needs the new 'tmail' variable to be defined in the config file. =head2 CONFIGURATION The configuration syntax has stayed mostly the same, except for the issues below. =over =item PROBE_CONF The PROBE_CONF subsections have been deprecated. All the target-specific variables are now configured in the same section as the target is. Just deleting the ++ PROBE_CONF lines should fix this (for any number of '+', obviously.) The existence of a PROBE_CONF section makes smokeping exit with an error message at parse time. Note for distributors: these lines could easily be removed automatically during upgrade. =item Variable order The C variable must now be set before any variables that depend on the selected probe. This is because setting C modifies the grammar of the rest of the section dynamically at parse time. Additionally, C must now precede C, for reasons that have to do with the current implementation of mandatory variable checking. Both of these errors are recognized at parse time and produce error messages accordingly. Note for distributors: the C command now has a new '--check' option that can be used to verify the syntax of the configuration file. It might be a good idea to do this on upgrade and give the user an explanatory note if the verification fails. =item Target-specific variables in the Probes section This is not an incompatible change, but it is mentioned here nevertheless. Target-specific variables can now be specified in the Probes section as well, and the values given become defaults for all the targets. =item Timeouts The C variable in the Probes section is now the maximum time expected for B ping to take. Previously it was the maximum time allowed for all the pings to one target. This is an incompatible change, but the code now works in the way it was documented to work even in 1.38. Those probes offering a target-specific C variable will get a default for it from the Probes section, as noted in the previous item. This should ensure that probes that enforce the ping timeout themselves (most do) will not get killed due to timeout before they have a chance to do it. =item Matchers The matcher modules have been renamed to start with a capital letter, to differentiate the actual modules from the base classes. You have to capitalize the matcher name in the pattern definition accordingly. =item Minimum number of pings The C variable now has an enforced minimum value of 3, as the whole design of Smokeping is based on the idea of sending several probes and measuring and visualizing the variation between them. =item RRD parameter checking Smokeping now checks at startup that the parameters of any existing RRD files match those specified in the configuration file. If there is a discrepancy, it will try to fix the situation and refuse to start if it can't. This situation is most likely to happen if you have modified the C variable in your configuration file. You'll then have to delete the old RRD file or somehow convert it to use the new parameters. The C command might be helpful here. =item Configurable location for DYNAMIC-related files There is now a new configuration variable, C, that can be used to specify the location of the DYNAMIC-related files (.adr and .snmp). These files used to be kept under C along with the RRD files, but since they need to be writable by the web server, it may be useful to separate these. If C is not specified, Smokeping will use the C value as the default. This should ensure that no existing setups will break. =back In addition to this, some probes have had minor incompatible changes to their configuration. =over =item L The C variable is now mandatory. This is a side effect from a bigger change: the probe is now derived from the FPing probe and supports all the variables FPing does. =item L This probe is also now derived from FPing and supports all the variables FPing does. =item L The URL that will be used is now specified with the variable C instead of C. The new variable can (and usually should) include a placeholder for the C variable of each target as C<%host%>, eg. C. The new variable is mandatory. The change was made to fix the confusing situation where the C variable was required for each actual target, but it didn't actually have any effect (as the server to be probed came from the C variable.) Timeouts are now recognized properly by looking at the curl exit code. The default timeout of this probe has been raised to 10 seconds. The command line is now executed without an intervening /bin/sh, and so quotes are not needed anymore around the User-Agent string (the C parameter). Smokeping will complain if it notices quotes around the string. Any extra arguments for C can now be specified in the C variable. =item L The default timeout of this probe has been raised to 10 seconds. =item L The default timeout of this probe has been raised to 10 seconds. =item L The C variable is now mandatory, as the old default "/" didn't make sense because it's relative rather than absolute. =item L The C variable is now mandatory, as Net::LDAP bails out without it. The C variable was changed to C and its semantics were changed accordingly (it's now the minimum time between two queries rather than the time slept between the end of one and the start of the another.) =item L The C variable was changed to C and its semantics were changed accordingly. See the LDAP explanation above. =item L The C variable was changed to C and its semantics were changed accordingly. See the LDAP explanation above. Additionally, the time is now specified in seconds rather than microseconds. =item L The C variable was changed to C and its semantics were changed accordingly. See the LDAP explanation above. Additionally, the time is now specified in seconds rather than microseconds. =item L The name of this probe was changed: it now starts with a capital letter like all the others do. The C variable was removed. The target should now be specified in the C variable, like it is with all the other probes. =back =head2 CGI::Carp module version The recommended version for CGI::Carp is now at least 1.24, included in CGI.pm-2.82 and the Perl standard distribution starting from 5.8.1. See L. =head1 1.38 to 1.40 =over =item The new navigation feature The big visible difference between 1.38 and 1.40 is the new browser navigation feature: when clicking on the graphs in detail view you can select different time ranges for the graph. The creation of this feature has been sponsored by BeverlyCorp.com. =back =head1 1.34 to 1.37 =over =item The L probe The configuration of this probe was moved from the Targets section to the Probes section, as all the variables are really probe-specific. The moved variables were C, C and C. =item Logging changes The C daemon now warns at startup if syslog support is not turned on in the config file. This is because many diagnostic messages will otherwise get lost. =item Concurrent probes Each probe now runs in its own process, instead of them all running sequentially in one process. This makes it possible to specify different step lengths for different probes. You can get the old behaviour back by setting 'concurrentprobes = no'. =back =head1 COPYRIGHT Copyright 2005 by Niko Tyni. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. =head1 AUTHOR Niko Tyni =head1 SEE ALSO The other Smokeping documents, especially L. smokeping-2.7.3/etc/000077500000000000000000000000001342220157600142745ustar00rootroot00000000000000smokeping-2.7.3/etc/Makefile.am000066400000000000000000000015621342220157600163340ustar00rootroot00000000000000# Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. EXTRA_DIST = basepage.html.dist config.dist smokemail.dist smokeping_secrets.dist tmail.dist etcdir = $(sysconfdir) etc_DATA = $(EXTRA_DIST) smokeping-2.7.3/etc/Makefile.in000066400000000000000000000340061342220157600163440ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = etc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = config.dist CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(etcdir)" DATA = $(etc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.dist.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = basepage.html.dist config.dist smokemail.dist smokeping_secrets.dist tmail.dist etcdir = $(sysconfdir) etc_DATA = $(EXTRA_DIST) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps etc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.dist: $(top_builddir)/config.status $(srcdir)/config.dist.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-etcDATA: $(etc_DATA) @$(NORMAL_INSTALL) @list='$(etc_DATA)'; test -n "$(etcdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(etcdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(etcdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(etcdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(etcdir)" || exit $$?; \ done uninstall-etcDATA: @$(NORMAL_UNINSTALL) @list='$(etc_DATA)'; test -n "$(etcdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(etcdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(etcdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-etcDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-etcDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-etcDATA \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-etcDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/etc/basepage.html.dist000066400000000000000000000031331342220157600176730ustar00rootroot00000000000000 SmokePing Latency Page for <##title##>

<##title##>

<##remark##>

<##overview##>
<##body##>

smokeping-2.7.3/etc/config.dist000066400000000000000000000052741342220157600164360ustar00rootroot00000000000000*** General *** owner = Peter Random contact = some@address.nowhere mailhost = my.mail.host sendmail = /usr/sbin/sendmail # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed ... this is not # good for images. imgcache = /tmp/smokeping-20612-build/cache imgurl = cache datadir = /tmp/smokeping-20612-build/data piddir = /tmp/smokeping-20612-build/var cgiurl = http://some.url/smokeping.cgi smokemail = /tmp/smokeping-20612-build/etc/smokemail.dist tmail = /tmp/smokeping-20612-build/etc/tmail.dist # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process # disable this to revert to the old behaviour # concurrentprobes = no *** Alerts *** to = alertee@address.somewhere from = smokealert@company.xy +someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row *** Database *** step = 300 pings = 20 # consfn mrhb steps total AVERAGE 0.5 1 1008 AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320 AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720 *** Presentation *** template = /tmp/smokeping-20612-build/etc/basepage.html.dist htmltitle = yes graphborders = no + charts menu = Charts title = The most interesting destinations ++ stddev sorter = StdDev(entries=>4) title = Top Standard Deviation menu = Std Deviation format = Standard Deviation %f ++ max sorter = Max(entries=>5) title = Top Max Roundtrip Time menu = by Max format = Max Roundtrip Time %f seconds ++ loss sorter = Loss(entries=>5) title = Top Packet Loss menu = Loss format = Packets Lost %f ++ median sorter = Median(entries=>5) title = Top Median Roundtrip Time menu = by Median format = Median RTT %f seconds + overview width = 600 height = 50 range = 10h + detail width = 600 height = 200 unison_tolerance = 2 "Last 3 Hours" 3h "Last 30 Hours" 30h "Last 10 Days" 10d "Last 400 Days" 400d #+ hierarchies #++ owner #title = Host Owner #++ location #title = Location *** Probes *** + FPing binary = /usr/sbin/fping *** Slaves *** secrets=/tmp/smokeping-20612-build/etc/smokeping_secrets.dist +boomer display_name=boomer color=0000ff +slave2 display_name=another color=00ff00 *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website of xxx Company. \ Here you will learn all about the latency of our network. + Test menu= Targets #parents = owner:/Test/James location:/ ++ James menu = James title =James alerts = someloss slaves = boomer slave2 host = james.address ++ MultiHost menu = Multihost title = James and James as seen from Boomer host = /Test/James /Test/James~boomer smokeping-2.7.3/etc/config.dist.in000066400000000000000000000050661342220157600170420ustar00rootroot00000000000000*** General *** owner = Peter Random contact = some@address.nowhere mailhost = my.mail.host sendmail = @SENDMAIL@ # NOTE: do not put the Image Cache below cgi-bin # since all files under cgi-bin will be executed ... this is not # good for images. imgcache = @prefix@/cache imgurl = cache datadir = @prefix@/data piddir = @prefix@/var cgiurl = http://some.url/smokeping.cgi smokemail = @prefix@/etc/smokemail.dist tmail = @prefix@/etc/tmail.dist # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process # disable this to revert to the old behaviour # concurrentprobes = no *** Alerts *** to = alertee@address.somewhere from = smokealert@company.xy +someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row *** Database *** step = 300 pings = 20 # consfn mrhb steps total AVERAGE 0.5 1 1008 AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320 AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720 *** Presentation *** template = @prefix@/etc/basepage.html.dist htmltitle = yes graphborders = no + charts menu = Charts title = The most interesting destinations ++ stddev sorter = StdDev(entries=>4) title = Top Standard Deviation menu = Std Deviation format = Standard Deviation %f ++ max sorter = Max(entries=>5) title = Top Max Roundtrip Time menu = by Max format = Max Roundtrip Time %f seconds ++ loss sorter = Loss(entries=>5) title = Top Packet Loss menu = Loss format = Packets Lost %f ++ median sorter = Median(entries=>5) title = Top Median Roundtrip Time menu = by Median format = Median RTT %f seconds + overview width = 600 height = 50 range = 10h + detail width = 600 height = 200 unison_tolerance = 2 "Last 3 Hours" 3h "Last 30 Hours" 30h "Last 10 Days" 10d "Last 400 Days" 400d #+ hierarchies #++ owner #title = Host Owner #++ location #title = Location *** Probes *** + FPing binary = /usr/sbin/fping *** Slaves *** secrets=@prefix@/etc/smokeping_secrets.dist +boomer display_name=boomer color=0000ff +slave2 display_name=another color=00ff00 *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website of xxx Company. \ Here you will learn all about the latency of our network. + Test menu= Targets #parents = owner:/Test/James location:/ ++ James menu = James title =James alerts = someloss slaves = boomer slave2 host = james.address ++ MultiHost menu = Multihost title = James and James as seen from Boomer host = /Test/James /Test/James~boomer smokeping-2.7.3/etc/smokemail.dist000066400000000000000000000030341342220157600171420ustar00rootroot00000000000000From: <##FROM##> To: <##TO##> Subject: SmokePing Agent Hi, Please execute the attached Perl Script on your computer. It will register your IP with SmokePing. You have to rerun this script at least everytime your IP changes. You can run the script as often as you want. The script is written in Perl. If you don't have Perl available on your system, you must have a Windows Box. You can easily fix this problem by downloading ActivePerl from www.activestate.com As soon as you have run the SmokePing Agent, the SmokePing server will start monitoring your host. Check out: <##URL##>?target=<##PATH##> Cheers <##OWNER##> ------------8<------------------------ #!/usr/bin/perl -w my $url = '<##URL##>'; my $path = '<##PATH##>'; my $secret = '<##SECRET##>'; use strict; use IO::Socket; my $post="target=${path}&secret=${secret}"; my $clen=length $post; $url =~ m|http://([^/]+)(/.+)|; my $host = $1; my $script = $2; my $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $host, PeerPort => "http(80)", ); exit 0 unless $remote; $remote->autoflush(1); print $remote <<"REQUEST"; POST $script HTTP/1.0\r User-Agent: smokeping-agent/1.0\r Host: ${host}:80\r Pragma: no-cache\r Content-Length: ${clen}\r Content-Type: application/x-www-form-urlencoded\r \r ${post}\r REQUEST my $head = 1; while (<$remote>) { /^\s*$/ && do {$head=0;next}; print unless $head; } close $remote; exit; ------------8<------------------------ smokeping-2.7.3/etc/smokeping_secrets.dist000066400000000000000000000000731342220157600207050ustar00rootroot00000000000000host1:mysercert host2:yoursercert boomer:lkasdf93uhhfdfddf smokeping-2.7.3/etc/tmail.dist000066400000000000000000000073471342220157600163020ustar00rootroot00000000000000MIME-Version: 1.0 Content-Type: text/html IT System Availability Report
Put your logo hereXXXX IT System Availability


<##SUMMARY##>

Quarterly Detail Monthly Detail Weekly Detail Daily Detail

<##DAYDETAIL##>

<##WEEKDETAIL##>

<##MONTHDETAIL##>

<##QUARTERDETAIL##>
smokeping-2.7.3/htdocs/000077500000000000000000000000001342220157600150055ustar00rootroot00000000000000smokeping-2.7.3/htdocs/Makefile.am000066400000000000000000000032461342220157600170460ustar00rootroot00000000000000# Copyright (C) 2010 Stanislav Sinyagin # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. JS = js/smokeping.js \ js/prototype.js \ js/cropper/cropper.js \ js/cropper/licence.txt \ js/cropper/marqueeVert.gif \ js/cropper/cropper.uncompressed.js \ js/cropper/cropper.css \ js/cropper/marqueeHoriz.gif \ js/scriptaculous/controls.js \ js/scriptaculous/slider.js \ js/scriptaculous/sound.js \ js/scriptaculous/effects.js \ js/scriptaculous/unittest.js \ js/scriptaculous/builder.js \ js/scriptaculous/scriptaculous.js \ js/scriptaculous/dragdrop.js \ css/smokeping-print.css \ css/smokeping-screen.css EXTRA_DIST = $(JS) jsdir = $(HTDOCSDIR) nobase_js_DATA = $(JS) install-data-local: $(MKDIR) -p $(DESTDIR)$(HTDOCSDIR) $(ECHO) "#!/bin/sh" > $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist $(ECHO) "exec $(bindir)/smokeping_cgi $(sysconfdir)/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist chmod +x $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist smokeping-2.7.3/htdocs/Makefile.in000066400000000000000000000357361342220157600170700ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2010 Stanislav Sinyagin # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = htdocs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(jsdir)" DATA = $(nobase_js_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ JS = js/smokeping.js \ js/prototype.js \ js/cropper/cropper.js \ js/cropper/licence.txt \ js/cropper/marqueeVert.gif \ js/cropper/cropper.uncompressed.js \ js/cropper/cropper.css \ js/cropper/marqueeHoriz.gif \ js/scriptaculous/controls.js \ js/scriptaculous/slider.js \ js/scriptaculous/sound.js \ js/scriptaculous/effects.js \ js/scriptaculous/unittest.js \ js/scriptaculous/builder.js \ js/scriptaculous/scriptaculous.js \ js/scriptaculous/dragdrop.js \ css/smokeping-print.css \ css/smokeping-screen.css EXTRA_DIST = $(JS) jsdir = $(HTDOCSDIR) nobase_js_DATA = $(JS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps htdocs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps htdocs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nobase_jsDATA: $(nobase_js_DATA) @$(NORMAL_INSTALL) @list='$(nobase_js_DATA)'; test -n "$(jsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(jsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(jsdir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(jsdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(jsdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(jsdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(jsdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_jsDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_js_DATA)'; test -n "$(jsdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(jsdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(jsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-nobase_jsDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_jsDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-nobase_jsDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nobase_jsDATA .PRECIOUS: Makefile install-data-local: $(MKDIR) -p $(DESTDIR)$(HTDOCSDIR) $(ECHO) "#!/bin/sh" > $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist $(ECHO) "exec $(bindir)/smokeping_cgi $(sysconfdir)/config" >> $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist chmod +x $(DESTDIR)$(HTDOCSDIR)/smokeping.fcgi.dist # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/htdocs/css/000077500000000000000000000000001342220157600155755ustar00rootroot00000000000000smokeping-2.7.3/htdocs/css/smokeping-print.css000066400000000000000000000003341342220157600214350ustar00rootroot00000000000000body, html { font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 12px; } img { border: 0; } .sidebar, .navbar { display: none; } .panel { page-break-inside: avoid; } .panel h2 { font-size: 12px; } smokeping-2.7.3/htdocs/css/smokeping-screen.css000066400000000000000000000107641342220157600215700ustar00rootroot00000000000000body { background: #eee; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 12px; margin: 0; display: inline-block; width: 100%; } h1 { font-size: 32px; line-height:32px; font-weight: 400; margin: 10px 5px; } h2 { font-size: 16px; line-height:16px; font-weight: 400; margin: 5px; } small { font-size: 10px; } hr { display: none; } img { border: 0; } .sidebar { background: #4c4c4c; position: fixed; top: 0; left: 0; width: 250px; height: 100%; color: #ccc; } .sidebar-header { border-bottom: 1px solid #373737; height: 50px; position: relative; padding: 10px; box-sizing: border-box; } .sidebar-header .logo { margin: 0; display: inline-block; padding: 0 5px; } .sidebar-menu { overflow-x: hidden; overflow-y: auto; position: absolute; top: 51px; bottom: 0px; width: 249px; } .sidebar .filter-label, .sidebar .hierarchy-label { display: none; } .sidebar .filter-text, .sidebar .hierarchy-popup { margin: 10px; } .sidebar .hierarchy-popup select { width: 100%; } .sidebar .filter-text input { width: 100%; box-sizing: border-box; border: 0; padding: 5px; border-radius: 3px; background-color: #232323; color: #ccc; } .sidebar ul.menu { margin: 0; padding: 0; list-style: none; display: block; padding-bottom: 10px; } .sidebar ul.menu li { margin: 2px 10px; border: 1px solid transparent; position: relative; } .sidebar ul.menu li.menuopen, .sidebar ul.menu li:hover, .sidebar ul.menu li.menuactive { border: 1px solid #4a4a4a; background: #232323; color: #fff; } .sidebar ul.menu li a { color: #ccc; line-height: 2.0em; display: block; padding-left: 5px; text-decoration: none; } .sidebar ul.menu li a.menulinkactive { color: #67c2ef; } .sidebar ul.menu li ul { background: #343434; padding: 5px; } .navbar { height: 50px; border-bottom: 1px solid #afafaf; background: linear-gradient(#f8f8f8,#eee); box-sizing: border-box; position: fixed; top: 0; right: 0; left: 250px; box-shadow: 0 3px 1px -1px rgba(0,0,0,0.05); text-shadow: 0 1px 1px rgba(255,255,255,0.9); } .navbar .navbar-menu { border-right: 1px solid #afafaf; height: 50px; display: inline-block; } .navbar .navbar-user { border-left: 1px solid #afafaf; height: 50px; display: inline-block; right: 0; position: absolute; padding: 0 10px; line-height: 50px; font-size: 14px; font-weight: 500; } .navbar .navbar-user .icon-person { background: no-repeat left url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAAA1ElEQVR4Ae3SPUoDYRSG0QPqDGQD4v9qdAu6BBGNcQO6FME+lbgCLSQhEqMb0EK7QSRoCuFqKcOHzIyIzZynf+HC1fqlXM/A1MzIkVxDaybiWxMrGshNRKmxTG09kWhPbQOR6EptU5Go+Meh9GmXauuKRLtqy92KUjcWNLBqXPqiZQ1lDlx79WboUKb1Jzq2nOi7V/j4qnCn79imjooyOy7MhHTvzm3L/Ghe17Oo0JN9c6RtGIkaDa1LWPIoavZgkbIz0aBTyl5EgwrKolntUIUqa30CLm2RNE9+n04AAAAASUVORK5CYII='); width: 32px; height: 32px; display: inline-block; vertical-align: middle; padding-right: 10px; opacity: 0.3; } a#menu-button { background: no-repeat center url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAQAAABLCVATAAAAJUlEQVR4AWOgKhgFo+A/eXAIGIQAo2A0HY2mo9F0NJqORsEoAAAO8PsFZyNgiAAAAABJRU5ErkJggg==); text-indent: 100%; white-space: nowrap; overflow: hidden; display: block; opacity: 0.3; height: 50px; width: 50px; } a#menu-button:hover { opacity: 0.5; } .main { padding-left: 250px; margin: 10px 10px; padding-top: 50px; display: inline-block; } .main .panel { border: 1px solid #d4d4d4; box-shadow: 0 2px 1px -1px rgba(0,0,0,0.1); background: #fff; margin: 5px; display: inline-block; } .main .panel-heading { background: #f5f5f5; border-bottom: 1px solid #d4d4d4; box-shadow: inset 0 0 1px 1px #fff; } .main .panel-heading h2 { margin: 0; padding-left: 10px; line-height: 30px; font-size: 14px; font-weight: 500; } .main .panel-body { padding: 5px; } .footer { border-top: 1px solid #d4d4d4; padding-left: 250px; } .footer p { display: inline-block; margin: 5px 10px; } .footer p.footer-right { float: right; } .footer, .footer a { color: #747474; text-decoration: none; } .footer a:hover { text-decoration: underline; } .sidebar-hidden .sidebar { left: -250px !important; } .sidebar-hidden .main, .sidebar-hidden .footer { padding-left: 0 !important; } .sidebar-hidden .navbar { left: 0 !important; } @media (max-width: 900px) { .sidebar, .navbar { transition: left 0.4s ease; } .sidebar { left: -250px; } .navbar { left: 0; } .main, .footer { padding-left: 0; } .sidebar-visible .sidebar { left: 0px !important; } .sidebar-visible .navbar { left: 250px !important; } } smokeping-2.7.3/htdocs/js/000077500000000000000000000000001342220157600154215ustar00rootroot00000000000000smokeping-2.7.3/htdocs/js/cropper/000077500000000000000000000000001342220157600170735ustar00rootroot00000000000000smokeping-2.7.3/htdocs/js/cropper/cropper.css000066400000000000000000000073611342220157600212660ustar00rootroot00000000000000.imgCrop_wrap { /* width: 500px; @done_in_js */ /* height: 375px; @done_in_js */ position: relative; cursor: crosshair; } /* an extra classname is applied for Opera < 9.0 to fix it's lack of opacity support */ .imgCrop_wrap.opera8 .imgCrop_overlay, .imgCrop_wrap.opera8 .imgCrop_clickArea { background-color: transparent; } /* fix for IE displaying all boxes at line-height by default, although they are still 1 pixel high until we combine them with the pointless span */ .imgCrop_wrap, .imgCrop_wrap * { font-size: 0; line-height: 0; opacity: 1; filter:alpha(opacity=100); } .imgCrop_overlay { background-color: #000; opacity: 0.5; filter:alpha(opacity=50); position: absolute; width: 100%; height: 100%; } .imgCrop_selArea { position: absolute; /* @done_in_js top: 20px; left: 20px; width: 200px; height: 200px; background: transparent url(castle.jpg) no-repeat -210px -110px; */ cursor: move; z-index: 2; } /* clickArea is all a fix for IE 5.5 & 6 to allow the user to click on the given area */ .imgCrop_clickArea { width: 100%; height: 100%; background-color: #FFF; opacity: 0.01; filter:alpha(opacity=01); } .imgCrop_marqueeHoriz { position: absolute; width: 100%; height: 1px; background: transparent url(marqueeHoriz.gif) repeat-x 0 0; z-index: 3; } .imgCrop_marqueeVert { position: absolute; height: 100%; width: 1px; background: transparent url(marqueeVert.gif) repeat-y 0 0; z-index: 3; } /* * FIX MARCHING ANTS IN IE * As IE <6 tries to load background images we can uncomment the follwoing hack * to remove that issue, not as pretty - but is anything in IE? * And yes I do know that 'filter' is evil, but it will make it look semi decent in IE * * html .imgCrop_marqueeHoriz, * html .imgCrop_marqueeVert { background: transparent; filter: Invert; } * html .imgCrop_marqueeNorth { border-top: 1px dashed #000; } * html .imgCrop_marqueeEast { border-right: 1px dashed #000; } * html .imgCrop_marqueeSouth { border-bottom: 1px dashed #000; } * html .imgCrop_marqueeWest { border-left: 1px dashed #000; } */ .imgCrop_marqueeNorth { top: 0; left: 0; } .imgCrop_marqueeEast { top: 0; right: 0; } .imgCrop_marqueeSouth { bottom: 0px; left: 0; } .imgCrop_marqueeWest { top: 0; left: 0; } .imgCrop_handle { position: absolute; border: 1px solid #333; width: 6px; height: 6px; background: #FFF; opacity: 0.5; filter:alpha(opacity=50); z-index: 4; } /* fix IE 5 box model */ * html .imgCrop_handle { width: 8px; height: 8px; wid\th: 6px; hei\ght: 6px; } .imgCrop_handleN { top: -3px; left: 0; /* margin-left: 49%; @done_in_js */ cursor: n-resize; } .imgCrop_handleNE { top: -3px; right: -3px; cursor: ne-resize; } .imgCrop_handleE { top: 0; right: -3px; /* margin-top: 49%; @done_in_js */ cursor: e-resize; } .imgCrop_handleSE { right: -3px; bottom: -3px; cursor: se-resize; } .imgCrop_handleS { right: 0; bottom: -3px; /* margin-right: 49%; @done_in_js */ cursor: s-resize; } .imgCrop_handleSW { left: -3px; bottom: -3px; cursor: sw-resize; } .imgCrop_handleW { top: 0; left: -3px; /* margin-top: 49%; @done_in_js */ cursor: w-resize; } .imgCrop_handleNW { top: -3px; left: -3px; cursor: nw-resize; } /** * Create an area to click & drag around on as the default browser behaviour is to let you drag the image */ .imgCrop_dragArea { width: 100%; height: 100%; z-index: 200; position: absolute; top: 0; left: 0; } .imgCrop_previewWrap { /* width: 200px; @done_in_js */ /* height: 200px; @done_in_js */ overflow: hidden; position: relative; } .imgCrop_previewWrap img { position: absolute; }smokeping-2.7.3/htdocs/js/cropper/cropper.js000066400000000000000000000325711342220157600211130ustar00rootroot00000000000000var CropDraggable=Class.create(Draggable,{initialize:function(a){this.options=Object.extend({drawMethod:function(){}},arguments[1]||{});this.element=$(a);this.handle=this.element;this.delta=this.currentDelta();this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this);},draw:function(a){var e=Element.cumulativeOffset(this.element),c=this.currentDelta();e[0]-=c[0];e[1]-=c[1];var b=[0,1].map(function(d){return(a[d]-e[d]-this.offset[d]);}.bind(this));this.options.drawMethod(b);}});var Cropper={};Cropper.Img=Class.create({initialize:function(c,a){this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true,onloadCoords:null,maxWidth:0,maxHeight:0,autoIncludeCSS:true},a||{});this.img=$(c);this.clickCoords={x:0,y:0};this.dragging=false;this.resizing=false;this.isWebKit=/Konqueror|Safari|KHTML/.test(navigator.userAgent);this.isIE=/MSIE/.test(navigator.userAgent);this.isOpera8=/Opera\s[1-8]/.test(navigator.userAgent);this.ratioX=0;this.ratioY=0;this.attached=false;this.fixedWidth=(this.options.maxWidth>0&&(this.options.minWidth>=this.options.maxWidth));this.fixedHeight=(this.options.maxHeight>0&&(this.options.minHeight>=this.options.maxHeight));if(typeof this.img=="undefined"){return;}if(this.options.autoIncludeCSS){$$("script").each(function(e){if(e.src.match(/\/cropper([^\/]*)\.js/)){var f=e.src.replace(/\/cropper([^\/]*)\.js.*/,""),d=document.createElement("link");d.rel="stylesheet";d.type="text/css";d.href=f+"/cropper.css";d.media="screen";document.getElementsByTagName("head")[0].appendChild(d);}});}if(this.options.ratioDim.x>0&&this.options.ratioDim.y>0){var b=this.getGCD(this.options.ratioDim.x,this.options.ratioDim.y);this.ratioX=this.options.ratioDim.x/b;this.ratioY=this.options.ratioDim.y/b;}this.subInitialize();if(this.img.complete||this.isWebKit){this.onLoad();}else{Event.observe(this.img,"load",this.onLoad.bindAsEventListener(this));}},getGCD:function(d,c){if(c===0){return d;}return this.getGCD(c,d%c);},onLoad:function(){var c="imgCrop_";var e=this.img.parentNode;var b="";if(this.isOpera8){b=" opera8";}this.imgWrap=new Element("div",{"class":c+"wrap"+b});this.north=new Element("div",{"class":c+"overlay "+c+"north"}).insert(new Element("span"));this.east=new Element("div",{"class":c+"overlay "+c+"east"}).insert(new Element("span"));this.south=new Element("div",{"class":c+"overlay "+c+"south"}).insert(new Element("span"));this.west=new Element("div",{"class":c+"overlay "+c+"west"}).insert(new Element("span"));var d=[this.north,this.east,this.south,this.west];this.dragArea=new Element("div",{"class":c+"dragArea"});d.each(function(f){this.dragArea.insert(f);},this);this.handleN=new Element("div",{"class":c+"handle "+c+"handleN"});this.handleNE=new Element("div",{"class":c+"handle "+c+"handleNE"});this.handleE=new Element("div",{"class":c+"handle "+c+"handleE"});this.handleSE=new Element("div",{"class":c+"handle "+c+"handleSE"});this.handleS=new Element("div",{"class":c+"handle "+c+"handleS"});this.handleSW=new Element("div",{"class":c+"handle "+c+"handleSW"});this.handleW=new Element("div",{"class":c+"handle "+c+"handleW"});this.handleNW=new Element("div",{"class":c+"handle "+c+"handleNW"});this.selArea=new Element("div",{"class":c+"selArea"});[new Element("div",{"class":c+"marqueeHoriz "+c+"marqueeNorth"}).insert(new Element("span")),new Element("div",{"class":c+"marqueeVert "+c+"marqueeEast"}).insert(new Element("span")),new Element("div",{"class":c+"marqueeHoriz "+c+"marqueeSouth"}).insert(new Element("span")),new Element("div",{"class":c+"marqueeVert "+c+"marqueeWest"}).insert(new Element("span")),this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW,new Element("div",{"class":c+"clickArea"})].each(function(f){this.selArea.insert(f);},this);this.imgWrap.appendChild(this.img);this.imgWrap.appendChild(this.dragArea);this.dragArea.appendChild(this.selArea);this.dragArea.appendChild(new Element("div",{"class":c+"clickArea"}));e.appendChild(this.imgWrap);this.startDragBind=this.startDrag.bindAsEventListener(this);Event.observe(this.dragArea,"mousedown",this.startDragBind);this.onDragBind=this.onDrag.bindAsEventListener(this);Event.observe(document,"mousemove",this.onDragBind);this.endCropBind=this.endCrop.bindAsEventListener(this);Event.observe(document,"mouseup",this.endCropBind);this.resizeBind=this.startResize.bindAsEventListener(this);this.handles=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];this.registerHandles(true);if(this.options.captureKeys){this.keysBind=this.handleKeys.bindAsEventListener(this);Event.observe(document,"keypress",this.keysBind);}var a=new CropDraggable(this.selArea,{drawMethod:this.moveArea.bindAsEventListener(this)});this.setParams();},registerHandles:function(b){for(var d=0;d0&&this.options.ratioDim.y>0){b.x1=Math.ceil((this.imgW-this.options.ratioDim.x)/2);b.y1=Math.ceil((this.imgH-this.options.ratioDim.y)/2);b.x2=b.x1+this.options.ratioDim.x;b.y2=b.y1+this.options.ratioDim.y;a=true;}}this.setAreaCoords(b,false,false,1);if(this.options.displayOnInit&&a){this.selArea.show();this.drawArea();this.endCrop();}this.attached=true;},remove:function(){if(this.attached){this.attached=false;this.imgWrap.parentNode.insertBefore(this.img,this.imgWrap);this.imgWrap.parentNode.removeChild(this.imgWrap);Event.stopObserving(this.dragArea,"mousedown",this.startDragBind);Event.stopObserving(document,"mousemove",this.onDragBind);Event.stopObserving(document,"mouseup",this.endCropBind);this.registerHandles(false);if(this.options.captureKeys){Event.stopObserving(document,"keypress",this.keysBind);}}},reset:function(){if(!this.attached){this.onLoad();}else{this.setParams();}this.endCrop();},handleKeys:function(b){var a={x:0,y:0};if(!this.dragging){switch(b.keyCode){case(37):a.x=-1;break;case(38):a.y=-1;break;case(39):a.x=1;break;case(40):a.y=1;break;}if(a.x!==0||a.y!==0){if(b.shiftKey){a.x*=10;a.y*=10;}this.moveArea([this.areaCoords.x1+a.x,this.areaCoords.y1+a.y]);this.endCrop();Event.stop(b);}}},calcW:function(){return(this.areaCoords.x2-this.areaCoords.x1);},calcH:function(){return(this.areaCoords.y2-this.areaCoords.y1);},moveArea:function(a){this.setAreaCoords({x1:a[0],y1:a[1],x2:a[0]+this.calcW(),y2:a[1]+this.calcH()},true,false);this.drawArea();},cloneCoords:function(a){return{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2};},setAreaCoords:function(i,a,m,h,k){if(a){var j=i.x2-i.x1,f=i.y2-i.y1;if(i.x1<0){i.x1=0;i.x2=j;}if(i.y1<0){i.y1=0;i.y2=f;}if(i.x2>this.imgW){i.x2=this.imgW;i.x1=this.imgW-j;}if(i.y2>this.imgH){i.y2=this.imgH;i.y1=this.imgH-f;}}else{if(i.x1<0){i.x1=0;}if(i.y1<0){i.y1=0;}if(i.x2>this.imgW){i.x2=this.imgW;}if(i.y2>this.imgH){i.y2=this.imgH;}if(h!==null){if(this.ratioX>0){this.applyRatio(i,{x:this.ratioX,y:this.ratioY},h,k);}else{if(m){this.applyRatio(i,{x:1,y:1},h,k);}}var b=[this.options.minWidth,this.options.minHeight],l=[this.options.maxWidth,this.options.maxHeight];if(b[0]>0||b[1]>0||l[0]>0||l[1]>0){var g={a1:i.x1,a2:i.x2},e={a1:i.y1,a2:i.y2},d={min:0,max:this.imgW},c={min:0,max:this.imgH};if((b[0]!==0||b[1]!==0)&&m){if(b[0]>0){b[1]=b[0];}else{if(b[1]>0){b[0]=b[1];}}}if((l[0]!==0||l[0]!==0)&&m){if(l[0]>0&&l[0]<=l[1]){l[1]=l[0];}else{if(l[1]>0&&l[1]<=l[0]){l[0]=l[1];}}}if(b[0]>0){this.applyDimRestriction(g,b[0],h.x,d,"min");}if(b[1]>1){this.applyDimRestriction(e,b[1],h.y,c,"min");}if(l[0]>0){this.applyDimRestriction(g,l[0],h.x,d,"max");}if(l[1]>1){this.applyDimRestriction(e,l[1],h.y,c,"max");}i={x1:g.a1,y1:e.a1,x2:g.a2,y2:e.a2};}}}this.areaCoords=i;},applyDimRestriction:function(d,f,e,c,b){var a;if(b=="min"){a=((d.a2-d.a1)f);}if(a){if(e==1){d.a2=d.a1+f;}else{d.a1=d.a2-f;}if(d.a1c.max){d.a1=c.max-f;d.a2=c.max;}}}},applyRatio:function(c,a,e,b){var d;if(b=="N"||b=="S"){d=this.applyRatioToAxis({a1:c.y1,b1:c.x1,a2:c.y2,b2:c.x2},{a:a.y,b:a.x},{a:e.y,b:e.x},{min:0,max:this.imgW});c.x1=d.b1;c.y1=d.a1;c.x2=d.b2;c.y2=d.a2;}else{d=this.applyRatioToAxis({a1:c.x1,b1:c.y1,a2:c.x2,b2:c.y2},{a:a.x,b:a.y},{a:e.x,b:e.y},{min:0,max:this.imgH});c.x1=d.a1;c.y1=d.b1;c.x2=d.a2;c.y2=d.b2;}},applyRatioToAxis:function(i,f,h,b){var j=Object.extend(i,{}),e=j.a2-j.a1,a=Math.floor(e*f.b/f.a),g=null,c=null,d=null;if(h.b==1){g=j.b1+a;if(g>b.max){g=b.max;d=g-j.b1;}j.b2=g;}else{g=j.b2-a;if(ga){c.reverse();}e[d+"1"]=c[0];e[d+"2"]=c[1];},endCrop:function(){this.dragging=false;this.resizing=false;this.options.onEndCrop(this.areaCoords,{width:this.calcW(),height:this.calcH()});},subInitialize:function(){},subDrawArea:function(){}});Cropper.ImgWithPreview=Class.create(Cropper.Img,{subInitialize:function(){this.hasPreviewImg=false;if(typeof(this.options.previewWrap)!="undefined"&&this.options.minWidth>0&&this.options.minHeight>0){this.previewWrap=$(this.options.previewWrap);this.previewImg=this.img.cloneNode(false);this.previewImg.id="imgCrop_"+this.previewImg.id;this.options.displayOnInit=true;this.hasPreviewImg=true;this.previewWrap.addClassName("imgCrop_previewWrap");this.previewWrap.setStyle({width:this.options.minWidth+"px",height:this.options.minHeight+"px"});this.previewWrap.appendChild(this.previewImg);}},subDrawArea:function(){if(this.hasPreviewImg){var d=this.calcW(),e=this.calcH();var f={x:this.imgW/d,y:this.imgH/e};var c={x:d/this.options.minWidth,y:e/this.options.minHeight};var a={w:Math.ceil(this.options.minWidth*f.x)+"px",h:Math.ceil(this.options.minHeight*f.y)+"px",x:"-"+Math.ceil(this.areaCoords.x1/c.x)+"px",y:"-"+Math.ceil(this.areaCoords.y1/c.y)+"px"};var b=this.previewImg.style;b.width=a.w;b.height=a.h;b.left=a.x;b.top=a.y;}}});smokeping-2.7.3/htdocs/js/cropper/cropper.uncompressed.js000066400000000000000000001433251342220157600236210ustar00rootroot00000000000000/** * Image Cropper (v. 1.2.2 - 2011-07-04 ) * Copyright (c) 2006-2011 David Spurr (http://www.defusion.org.uk/) * * The image cropper provides a way to draw a crop area on an image and capture * the coordinates of the drawn crop area. * * Features include: * - Based on Prototype and Scriptaculous * - Image editing package styling, the crop area functions and looks * like those found in popular image editing software * - Dynamic inclusion of required styles * - Drag to draw areas * - Shift drag to draw/resize areas as squares * - Selection area can be moved * - Seleciton area can be resized using resize handles * - Allows dimension ratio limited crop areas * - Allows minimum dimension crop areas * - Allows maximum dimesion crop areas * - If both min & max dimension options set to the same value for a single axis,then the cropper will not * display the resize handles as appropriate (when min & max dimensions are passed for both axes this * results in a 'fixed size' crop area) * - Allows dynamic preview of resultant crop ( if minimum width & height are provided ), this is * implemented as a subclass so can be excluded when not required * - Movement of selection area by arrow keys ( shift + arrow key will move selection area by * 10 pixels ) * - All operations stay within bounds of image * - All functionality & display compatible with most popular browsers supported by Prototype: * PC: IE 9, 8, 7, 6 & 5.5, Firefox 2+, Opera 8.5 (see known issues) & 9.0b +, Google Chrome * MAC: Camino 1.0, Firefox 2+, Safari 3.x+, Google Chrome * * Requires: * - Prototype v. 1.5.0_rc0 > (as packaged with Scriptaculous 1.6.1) * - Scriptaculous v. 1.6.1 > modules: dragdrop * Recommended (for IE9+ support): * - Prototype v. 1.7.0 > * - Scriptaculous v. 1.9.0 > * * Known issues: * - Safari animated gifs, only one of each will animate, this seems to be a known Safari issue * * - After drawing an area and then clicking to start a new drag in IE 5.5 the rendered height * appears as the last height until the user drags, this appears to be the related to the error * that the forceReRender() method fixes for IE 6, i.e. IE 5.5 is not redrawing the box properly. * * - Lack of CSS opacity support in Opera before version 9 mean we disable those style rules, these * could be fixed by using PNGs with transparency if Opera 8.5 support is high priority for you * * - Marching ants keep reloading in IE <6, it is a known issue in IE and I have * found no viable workarounds that can be included in the release. If this really is an issue for you * either try this post: http://mir.aculo.us/articles/2005/08/28/internet-explorer-and-ajax-image-caching-woes * or uncomment the 'FIX MARCHING ANTS IN IE' rules in the CSS file * * - Styling & borders on image, any CSS styling applied directly to the image itself (floats, borders, padding, margin, etc.) will * cause problems with the cropper. The use of a wrapper element to apply these styles to is recommended. * * - overflow: auto or overflow: scroll on parent will cause cropper to burst out of parent in IE and Opera (maybe Mac browsers too) * I'm not sure why yet. * * Usage: * See Cropper.Img & Cropper.ImgWithPreview for usage details * * Changelog: * v1.2.2 - 2011-07-04 * + Support for latest versions of Prototype & script.aculo.us (1.7.0 & 1.9.0 respectively) * + Support notice for IE9 * * v1.2.1 - 2009-10-06 * + Added support for latest versions of Prototype & script.aculo.us * (1.6.1.0 & 1.8.2 respectively). Changes provided by Tom Hirashima. * - No-longer package prototype & script.aculo.us with the release * * Changed tests to use google ajax libraries api to load prototype & script.aculo.us * + Added option to not auto include the cropper CSS file * * #00008 - Fixed bug: Dynamic include of cropper CSS expected cropper.js and failed when using cropper.uncompressed.js * * #00028 - Fixed bug: Doesn't work with latest script.aculo.us - Fix by Tom Hirashima * * #00030 - Fixed bug: Doesn't work in Firefox 3.5 (CSS include issue) * * #00007 - Fixed bug: onEndCrop isn't called when moving with keys * * #00011 - Fixed bug: The image that is to be cropped does not show in IE6.0 -- included CSS fix * * Tidied up source code & fixed issues that jslint found so it will compress better * * v1.2.0 - 2006-10-30 * + Added id to the preview image element using 'imgCrop_[originalImageID]' * * #00001 - Fixed bug: Doesn't account for scroll offsets * * #00009 - Fixed bug: Placing the cropper inside differently positioned elements causes incorrect co-ordinates and display * * #00013 - Fixed bug: I-bar cursor appears on drag plane * * #00014 - Fixed bug: If ID for image tag is not found in document script throws error * * Fixed bug with drag start co-ordinates if wrapper element has moved in browser (e.g. dragged to a new position) * * Fixed bug with drag start co-ordinates if image contained in a wrapper with scrolling - this may be buggy if image * has other ancestors with scrolling applied (except the body) * * #00015 - Fixed bug: When cropper removed and then reapplied onEndCrop callback gets called multiple times, solution suggestion from Bill Smith * * Various speed increases & code cleanup which meant improved performance in Mac - which allowed removal of different overlay methods for * IE and all other browsers, which led to a fix for: * * #00010 - Fixed bug: Select area doesn't adhere to image size when image resized using img attributes * - #00006 - Removed default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be passed in * + #00005 - Added ability to set maximum crop dimensions, if both min & max set as the same value then we'll get a fixed cropper size on the axes as appropriate * and the resize handles will not be displayed as appropriate * * Switched keydown for keypress for moving select area with cursor keys (makes for nicer action) - doesn't appear to work in Safari * * v1.1.3 - 2006-08-21 * * Fixed wrong cursor on western handle in CSS * + #00008 & #00003 - Added feature: Allow to set dimensions & position for cropper on load * * #00002 - Fixed bug: Pressing 'remove cropper' twice removes image in IE * * v1.1.2 - 2006-06-09 * * Fixed bugs with ratios when GCD is low (patch submitted by Andy Skelton) * * v1.1.1 - 2006-06-03 * * Fixed bug with rendering issues fix in IE 5.5 * * Fixed bug with endCrop callback issues once cropper had been removed & reset in IE * * v1.1.0 - 2006-06-02 * * Fixed bug with IE constantly trying to reload select area background image * * Applied more robust fix to Safari & IE rendering issues * + Added method to reset parameters - useful for when dynamically changing img cropper attached to * + Added method to remove cropper from image * * v1.0.0 - 2006-05-18 * + Initial verison * * * Copyright (c) 2006-2011, David Spurr (http://www.defusion.org.uk/) * * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * http://www.opensource.org/licenses/bsd-license.php * * See scriptaculous.js for full scriptaculous licence */ /** * Extend the Draggable class to allow us to pass the rendering * down to the Cropper object. */ var CropDraggable = Class.create(Draggable, { initialize: function(element) { this.options = Object.extend( { /** * The draw method to defer drawing to */ drawMethod: function() {} }, arguments[1] || {} ); this.element = $(element); this.handle = this.element; this.delta = this.currentDelta(); this.dragging = false; this.eventMouseDown = this.initDrag.bindAsEventListener(this); Event.observe(this.handle, "mousedown", this.eventMouseDown); Draggables.register(this); }, /** * Defers the drawing of the draggable to the supplied method */ draw: function(point) { var pos = Element.cumulativeOffset(this.element), d = this.currentDelta(); pos[0] -= d[0]; pos[1] -= d[1]; var p = [0,1].map(function(i) { return (point[i]-pos[i]-this.offset[i]); }.bind(this)); this.options.drawMethod( p ); } }); /** * The Cropper object, this will attach itself to the provided image by wrapping it with * the generated xHTML structure required by the cropper. * * Usage: * @param obj Image element to attach to * @param obj Optional options: * - ratioDim obj * The pixel dimensions to apply as a restrictive ratio, with properties x & y * * - minWidth int * The minimum width for the select area in pixels * * - minHeight int * The mimimum height for the select area in pixels * * - maxWidth int * The maximum width for the select areas in pixels (if both minWidth & maxWidth set to same the width of the cropper will be fixed) * * - maxHeight int * The maximum height for the select areas in pixels (if both minHeight & maxHeight set to same the height of the cropper will be fixed) * * - displayOnInit int * Whether to display the select area on initialisation, only used when providing minimum width & height or ratio * * - onEndCrop func * The callback function to provide the crop details to on end of a crop (see below) * * - captureKeys boolean * Whether to capture the keys for moving the select area, as these can cause some problems at the moment * * - onloadCoords obj * A coordinates object with properties x1, y1, x2 & y2; for the coordinates of the select area to display onload * * - autoIncludeCSS boolean * Whether to automatically include the stylesheet (assumes it lives in the same location as the cropper JS file) *- --------------------------------------------- * * The callback function provided via the onEndCrop option should accept the following parameters: * - coords obj * The coordinates object with properties x1, y1, x2 & y2; for the coordinates of the select area * * - dimensions obj * The dimensions object with properites width & height; for the dimensions of the select area * * * Example: * function onEndCrop( coords, dimensions ) { * $( 'x1' ).value = coords.x1; * $( 'y1' ).value = coords.y1; * $( 'x2' ).value = coords.x2; * $( 'y2' ).value = coords.y2; * $( 'width' ).value = dimensions.width; * $( 'height' ).value = dimensions.height; * } * */ var Cropper = {}; Cropper.Img = Class.create({ /** * Initialises the class * * @access public * @param obj Image element to attach to * @param obj Options * @return void */ initialize: function(element, options) { this.options = Object.extend( { /** * @var obj * The pixel dimensions to apply as a restrictive ratio */ ratioDim: { x: 0, y: 0 }, /** * @var int * The minimum pixel width, also used as restrictive ratio if min height passed too */ minWidth: 0, /** * @var int * The minimum pixel height, also used as restrictive ratio if min width passed too */ minHeight: 0, /** * @var boolean * Whether to display the select area on initialisation, only used when providing minimum width & height or ratio */ displayOnInit: false, /** * @var function * The call back function to pass the final values to */ onEndCrop: Prototype.emptyFunction, /** * @var boolean * Whether to capture key presses or not */ captureKeys: true, /** * @var obj Coordinate object x1, y1, x2, y2 * The coordinates to optionally display the select area at onload */ onloadCoords: null, /** * @var int * The maximum width for the select areas in pixels (if both minWidth & maxWidth set to same the width of the cropper will be fixed) */ maxWidth: 0, /** * @var int * The maximum height for the select areas in pixels (if both minHeight & maxHeight set to same the height of the cropper will be fixed) */ maxHeight: 0, /** * @var boolean - default true * Whether to automatically include the stylesheet (assumes it lives in the same location as the cropper JS file) */ autoIncludeCSS: true }, options || {} ); /** * @var obj * The img node to attach to */ this.img = $( element ); /** * @var obj * The x & y coordinates of the click point */ this.clickCoords = { x: 0, y: 0 }; /** * @var boolean * Whether the user is dragging */ this.dragging = false; /** * @var boolean * Whether the user is resizing */ this.resizing = false; /** * @var boolean * Whether the user is on a webKit browser */ this.isWebKit = /Konqueror|Safari|KHTML/.test( navigator.userAgent ); /** * @var boolean * Whether the user is on IE */ this.isIE = /MSIE/.test( navigator.userAgent ); /** * @var boolean * Whether the user is on Opera below version 9 */ this.isOpera8 = /Opera\s[1-8]/.test( navigator.userAgent ); /** * @var int * The x ratio */ this.ratioX = 0; /** * @var int * The y ratio */ this.ratioY = 0; /** * @var boolean * Whether we've attached sucessfully */ this.attached = false; /** * @var boolean * Whether we've got a fixed width (if minWidth EQ or GT maxWidth then we have a fixed width * in the case of minWidth > maxWidth maxWidth wins as the fixed width) */ this.fixedWidth = ( this.options.maxWidth > 0 && ( this.options.minWidth >= this.options.maxWidth ) ); /** * @var boolean * Whether we've got a fixed height (if minHeight EQ or GT maxHeight then we have a fixed height * in the case of minHeight > maxHeight maxHeight wins as the fixed height) */ this.fixedHeight = ( this.options.maxHeight > 0 && ( this.options.minHeight >= this.options.maxHeight ) ); // quit if the image element doesn't exist if( typeof this.img == 'undefined' ) { return; } // include the stylesheet if( this.options.autoIncludeCSS ) { $$('script').each(function(s) { if( s.src.match( /\/cropper([^\/]*)\.js/ ) ) { var path = s.src.replace( /\/cropper([^\/]*)\.js.*/, '' ), style = document.createElement( 'link' ); style.rel = 'stylesheet'; style.type = 'text/css'; style.href = path + '/cropper.css'; style.media = 'screen'; document.getElementsByTagName( 'head' )[0].appendChild( style ); } }); } // calculate the ratio when neccessary if( this.options.ratioDim.x > 0 && this.options.ratioDim.y > 0 ) { var gcd = this.getGCD( this.options.ratioDim.x, this.options.ratioDim.y ); this.ratioX = this.options.ratioDim.x / gcd; this.ratioY = this.options.ratioDim.y / gcd; // dump( 'RATIO : ' + this.ratioX + ':' + this.ratioY + '\n' ); } // initialise sub classes this.subInitialize(); // only load the event observers etc. once the image is loaded // this is done after the subInitialize() call just in case the sub class does anything // that will affect the result of the call to onLoad() if( this.img.complete || this.isWebKit ) { this.onLoad(); // for some reason Safari seems to support img.complete but returns 'undefined' on the this.img object } else { Event.observe( this.img, 'load', this.onLoad.bindAsEventListener( this) ); } }, /** * The Euclidean algorithm used to find the greatest common divisor * * @acces private * @param int Value 1 * @param int Value 2 * @return int */ getGCD : function( a , b ) { if( b === 0 ) { return a; } return this.getGCD(b, a % b ); }, /** * Attaches the cropper to the image once it has loaded * * @access private * @return void */ onLoad: function( ) { /* * Build the container and all related elements, will result in the following * *
* *
* *
*
*
*
*
* * *
*
*
*
* *
*
*
*
*
*
*
*
*
*
*
*
*
*/ var cNamePrefix = 'imgCrop_'; // get the point to insert the container var insertPoint = this.img.parentNode; // apply an extra class to the wrapper to fix Opera below version 9 var fixOperaClass = ''; if( this.isOpera8 ) { fixOperaClass = ' opera8'; } this.imgWrap = new Element( 'div', { 'class': cNamePrefix + 'wrap' + fixOperaClass } ); this.north = new Element( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'north' }).insert(new Element( 'span' )); this.east = new Element( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'east' }).insert(new Element( 'span' )); this.south = new Element( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'south' }).insert(new Element( 'span' )); this.west = new Element( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'west' }).insert(new Element( 'span' )); var overlays = [ this.north, this.east, this.south, this.west ]; this.dragArea = new Element( 'div', { 'class': cNamePrefix + 'dragArea' } ); overlays.each(function(o){this.dragArea.insert(o);}, this); this.handleN = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleN' } ); this.handleNE = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleNE' } ); this.handleE = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleE' } ); this.handleSE = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleSE' } ); this.handleS = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleS' } ); this.handleSW = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleSW' } ); this.handleW = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleW' } ); this.handleNW = new Element( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleNW' } ); this.selArea = new Element( 'div', { 'class': cNamePrefix + 'selArea' }); [ new Element( 'div', { 'class': cNamePrefix + 'marqueeHoriz ' + cNamePrefix + 'marqueeNorth' }).insert(new Element( 'span' )), new Element( 'div', { 'class': cNamePrefix + 'marqueeVert ' + cNamePrefix + 'marqueeEast' }).insert(new Element( 'span' )), new Element( 'div', { 'class': cNamePrefix + 'marqueeHoriz ' + cNamePrefix + 'marqueeSouth' }).insert(new Element( 'span' )), new Element( 'div', { 'class': cNamePrefix + 'marqueeVert ' + cNamePrefix + 'marqueeWest' }).insert(new Element( 'span' )), this.handleN, this.handleNE, this.handleE, this.handleSE, this.handleS, this.handleSW, this.handleW, this.handleNW, new Element( 'div', { 'class': cNamePrefix + 'clickArea' } ) ].each(function(o){this.selArea.insert(o);}, this); this.imgWrap.appendChild( this.img ); this.imgWrap.appendChild( this.dragArea ); this.dragArea.appendChild( this.selArea ); this.dragArea.appendChild( new Element( 'div', { 'class': cNamePrefix + 'clickArea' } ) ); insertPoint.appendChild( this.imgWrap ); // add event observers this.startDragBind = this.startDrag.bindAsEventListener( this ); Event.observe( this.dragArea, 'mousedown', this.startDragBind ); this.onDragBind = this.onDrag.bindAsEventListener( this ); Event.observe( document, 'mousemove', this.onDragBind ); this.endCropBind = this.endCrop.bindAsEventListener( this ); Event.observe( document, 'mouseup', this.endCropBind ); this.resizeBind = this.startResize.bindAsEventListener( this ); this.handles = [ this.handleN, this.handleNE, this.handleE, this.handleSE, this.handleS, this.handleSW, this.handleW, this.handleNW ]; this.registerHandles( true ); if( this.options.captureKeys ) { this.keysBind = this.handleKeys.bindAsEventListener( this ); Event.observe( document, 'keypress', this.keysBind ); } // attach the dragable to the select area var x = new CropDraggable( this.selArea, { drawMethod: this.moveArea.bindAsEventListener( this ) } ); this.setParams(); }, /** * Manages adding or removing the handle event handler and hiding or displaying them as appropriate * * @access private * @param boolean registration true = add, false = remove * @return void */ registerHandles: function( registration ) { for( var i = 0; i < this.handles.length; i++ ) { var handle = $( this.handles[i] ); if( registration ) { var hideHandle = false; // whether to hide the handle // disable handles asappropriate if we've got fixed dimensions // if both dimensions are fixed we don't need to do much if( this.fixedWidth && this.fixedHeight ) { hideHandle = true; } else if( this.fixedWidth || this.fixedHeight ) { // if one of the dimensions is fixed then just hide those handles var isCornerHandle = handle.className.match( /([S|N][E|W])$/ ), isWidthHandle = handle.className.match( /(E|W)$/ ), isHeightHandle = handle.className.match( /(N|S)$/ ); if( isCornerHandle || ( this.fixedWidth && isWidthHandle ) || ( this.fixedHeight && isHeightHandle ) ) { hideHandle = true; } } if( hideHandle ) { handle.hide(); } else { Event.observe( handle, 'mousedown', this.resizeBind ); } } else { handle.show(); Event.stopObserving( handle, 'mousedown', this.resizeBind ); } } }, /** * Sets up all the cropper parameters, this can be used to reset the cropper when dynamically * changing the images * * @access private * @return void */ setParams: function() { /** * @var int * The image width */ this.imgW = this.img.width; /** * @var int * The image height */ this.imgH = this.img.height; $( this.north ).setStyle( { height: 0 } ); $( this.east ).setStyle( { width: 0, height: 0 } ); $( this.south ).setStyle( { height: 0 } ); $( this.west ).setStyle( { width: 0, height: 0 } ); // resize the container to fit the image $( this.imgWrap ).setStyle( { 'width': this.imgW + 'px', 'height': this.imgH + 'px' } ); // hide the select area $( this.selArea ).hide(); // setup the starting position of the select area var startCoords = { x1: 0, y1: 0, x2: 0, y2: 0 }, validCoordsSet = false; // display the select area if( this.options.onloadCoords !== null ) { // if we've being given some coordinates to startCoords = this.cloneCoords( this.options.onloadCoords ); validCoordsSet = true; } else if( this.options.ratioDim.x > 0 && this.options.ratioDim.y > 0 ) { // if there is a ratio limit applied and the then set it to initial ratio startCoords.x1 = Math.ceil( ( this.imgW - this.options.ratioDim.x ) / 2 ); startCoords.y1 = Math.ceil( ( this.imgH - this.options.ratioDim.y ) / 2 ); startCoords.x2 = startCoords.x1 + this.options.ratioDim.x; startCoords.y2 = startCoords.y1 + this.options.ratioDim.y; validCoordsSet = true; } this.setAreaCoords( startCoords, false, false, 1 ); if( this.options.displayOnInit && validCoordsSet ) { this.selArea.show(); this.drawArea(); this.endCrop(); } this.attached = true; }, /** * Removes the cropper * * @access public * @return void */ remove: function() { if( this.attached ) { this.attached = false; // remove the elements we inserted this.imgWrap.parentNode.insertBefore( this.img, this.imgWrap ); this.imgWrap.parentNode.removeChild( this.imgWrap ); // remove the event observers Event.stopObserving( this.dragArea, 'mousedown', this.startDragBind ); Event.stopObserving( document, 'mousemove', this.onDragBind ); Event.stopObserving( document, 'mouseup', this.endCropBind ); this.registerHandles( false ); if( this.options.captureKeys ) { Event.stopObserving( document, 'keypress', this.keysBind ); } } }, /** * Resets the cropper, can be used either after being removed or any time you wish * * @access public * @return void */ reset: function() { if( !this.attached ) { this.onLoad(); } else { this.setParams(); } this.endCrop(); }, /** * Handles the key functionality, currently just using arrow keys to move, if the user * presses shift then the area will move by 10 pixels */ handleKeys: function( e ) { var dir = { x: 0, y: 0 }; // direction to move it in & the amount in pixels if( !this.dragging ) { // catch the arrow keys switch( e.keyCode ) { case( 37 ) : // left dir.x = -1; break; case( 38 ) : // up dir.y = -1; break; case( 39 ) : // right dir.x = 1; break; case( 40 ) : // down dir.y = 1; break; } if( dir.x !== 0 || dir.y !== 0 ) { // if shift is pressed then move by 10 pixels if( e.shiftKey ) { dir.x *= 10; dir.y *= 10; } this.moveArea( [ this.areaCoords.x1 + dir.x, this.areaCoords.y1 + dir.y ] ); this.endCrop(); Event.stop( e ); } } }, /** * Calculates the width from the areaCoords * * @access private * @return int */ calcW: function() { return (this.areaCoords.x2 - this.areaCoords.x1); }, /** * Calculates the height from the areaCoords * * @access private * @return int */ calcH: function() { return (this.areaCoords.y2 - this.areaCoords.y1); }, /** * Moves the select area to the supplied point (assumes the point is x1 & y1 of the select area) * * @access public * @param array Point for x1 & y1 to move select area to * @return void */ moveArea: function( point ) { // dump( 'moveArea : ' + point[0] + ',' + point[1] + ',' + ( point[0] + ( this.areaCoords.x2 - this.areaCoords.x1 ) ) + ',' + ( point[1] + ( this.areaCoords.y2 - this.areaCoords.y1 ) ) + '\n' ); this.setAreaCoords( { x1: point[0], y1: point[1], x2: point[0] + this.calcW(), y2: point[1] + this.calcH() }, true, false ); this.drawArea(); }, /** * Clones a co-ordinates object, stops problems with handling them by reference * * @access private * @param obj Coordinate object x1, y1, x2, y2 * @return obj Coordinate object x1, y1, x2, y2 */ cloneCoords: function( coords ) { return { x1: coords.x1, y1: coords.y1, x2: coords.x2, y2: coords.y2 }; }, /** * Sets the select coords to those provided but ensures they don't go * outside the bounding box * * @access private * @param obj Coordinates x1, y1, x2, y2 * @param boolean Whether this is a move * @param boolean Whether to apply squaring * @param obj Direction of mouse along both axis x, y ( -1 = negative, 1 = positive ) only required when moving etc. * @param string The current resize handle || null * @return void */ setAreaCoords: function( coords, moving, square, direction, resizeHandle ) { // dump( 'setAreaCoords (in) : ' + coords.x1 + ',' + coords.y1 + ',' + coords.x2 + ',' + coords.y2 ); if( moving ) { // if moving var targW = coords.x2 - coords.x1, targH = coords.y2 - coords.y1; // ensure we're within the bounds if( coords.x1 < 0 ) { coords.x1 = 0; coords.x2 = targW; } if( coords.y1 < 0 ) { coords.y1 = 0; coords.y2 = targH; } if( coords.x2 > this.imgW ) { coords.x2 = this.imgW; coords.x1 = this.imgW - targW; } if( coords.y2 > this.imgH ) { coords.y2 = this.imgH; coords.y1 = this.imgH - targH; } } else { // ensure we're within the bounds if( coords.x1 < 0 ) { coords.x1 = 0; } if( coords.y1 < 0 ) { coords.y1 = 0; } if( coords.x2 > this.imgW ) { coords.x2 = this.imgW; } if( coords.y2 > this.imgH ) { coords.y2 = this.imgH; } // This is passed as null in onload if( direction !== null ) { // apply the ratio or squaring where appropriate if( this.ratioX > 0 ) { this.applyRatio( coords, { x: this.ratioX, y: this.ratioY }, direction, resizeHandle ); } else if( square ) { this.applyRatio( coords, { x: 1, y: 1 }, direction, resizeHandle ); } var mins = [ this.options.minWidth, this.options.minHeight ], // minimum dimensions [x,y] maxs = [ this.options.maxWidth, this.options.maxHeight ]; // maximum dimensions [x,y] // apply dimensions where appropriate if( mins[0] > 0 || mins[1] > 0 || maxs[0] > 0 || maxs[1] > 0) { var coordsTransX = { a1: coords.x1, a2: coords.x2 }, coordsTransY = { a1: coords.y1, a2: coords.y2 }, boundsX = { min: 0, max: this.imgW }, boundsY = { min: 0, max: this.imgH }; // handle squaring properly on single axis minimum dimensions if( (mins[0] !== 0 || mins[1] !== 0) && square ) { if( mins[0] > 0 ) { mins[1] = mins[0]; } else if( mins[1] > 0 ) { mins[0] = mins[1]; } } if( (maxs[0] !== 0 || maxs[0] !== 0) && square ) { // if we have a max x value & it is less than the max y value then we set the y max to the max x (so we don't go over the minimum maximum of one of the axes - if that makes sense) if( maxs[0] > 0 && maxs[0] <= maxs[1] ) { maxs[1] = maxs[0]; } else if( maxs[1] > 0 && maxs[1] <= maxs[0] ) { maxs[0] = maxs[1]; } } if( mins[0] > 0 ) { this.applyDimRestriction( coordsTransX, mins[0], direction.x, boundsX, 'min' ); } if( mins[1] > 1 ) { this.applyDimRestriction( coordsTransY, mins[1], direction.y, boundsY, 'min' ); } if( maxs[0] > 0 ) { this.applyDimRestriction( coordsTransX, maxs[0], direction.x, boundsX, 'max' ); } if( maxs[1] > 1 ) { this.applyDimRestriction( coordsTransY, maxs[1], direction.y, boundsY, 'max' ); } coords = { x1: coordsTransX.a1, y1: coordsTransY.a1, x2: coordsTransX.a2, y2: coordsTransY.a2 }; } } } // dump( 'setAreaCoords (out) : ' + coords.x1 + ',' + coords.y1 + ',' + coords.x2 + ',' + coords.y2 + '\n' ); this.areaCoords = coords; }, /** * Applies the supplied dimension restriction to the supplied coordinates along a single axis * * @access private * @param obj Single axis coordinates, a1, a2 (e.g. for the x axis a1 = x1 & a2 = x2) * @param int The restriction value * @param int The direction ( -1 = negative, 1 = positive ) * @param obj The bounds of the image ( for this axis ) * @param string The dimension restriction type ( 'min' | 'max' ) * @return void */ applyDimRestriction: function( coords, val, direction, bounds, type ) { var check; if( type == 'min' ) { check = ( ( coords.a2 - coords.a1 ) < val ); } else { check = ( ( coords.a2 - coords.a1 ) > val ); } if( check ) { if( direction == 1 ) { coords.a2 = coords.a1 + val; } else { coords.a1 = coords.a2 - val; } // make sure we're still in the bounds (not too pretty for the user, but needed) if( coords.a1 < bounds.min ) { coords.a1 = bounds.min; coords.a2 = val; } else if( coords.a2 > bounds.max ) { coords.a1 = bounds.max - val; coords.a2 = bounds.max; } } }, /** * Applies the supplied ratio to the supplied coordinates * * @access private * @param obj Coordinates, x1, y1, x2, y2 * @param obj Ratio, x, y * @param obj Direction of mouse, x & y : -1 == negative 1 == positive * @param string The current resize handle || null * @return void */ applyRatio : function( coords, ratio, direction, resizeHandle ) { // dump( 'direction.y : ' + direction.y + '\n'); var newCoords; if( resizeHandle == 'N' || resizeHandle == 'S' ) { // dump( 'north south \n'); // if moving on either the lone north & south handles apply the ratio on the y axis newCoords = this.applyRatioToAxis( { a1: coords.y1, b1: coords.x1, a2: coords.y2, b2: coords.x2 }, { a: ratio.y, b: ratio.x }, { a: direction.y, b: direction.x }, { min: 0, max: this.imgW } ); coords.x1 = newCoords.b1; coords.y1 = newCoords.a1; coords.x2 = newCoords.b2; coords.y2 = newCoords.a2; } else { // otherwise deal with it as if we're applying the ratio on the x axis newCoords = this.applyRatioToAxis( { a1: coords.x1, b1: coords.y1, a2: coords.x2, b2: coords.y2 }, { a: ratio.x, b: ratio.y }, { a: direction.x, b: direction.y }, { min: 0, max: this.imgH } ); coords.x1 = newCoords.a1; coords.y1 = newCoords.b1; coords.x2 = newCoords.a2; coords.y2 = newCoords.b2; } }, /** * Applies the provided ratio to the provided coordinates based on provided direction & bounds, * use to encapsulate functionality to make it easy to apply to either axis. This is probably * quite hard to visualise so see the x axis example within applyRatio() * * Example in parameter details & comments is for requesting applying ratio to x axis. * * @access private * @param obj Coords object (a1, b1, a2, b2) where a = x & b = y in example * @param obj Ratio object (a, b) where a = x & b = y in example * @param obj Direction object (a, b) where a = x & b = y in example * @param obj Bounds (min, max) * @return obj Coords object (a1, b1, a2, b2) where a = x & b = y in example */ applyRatioToAxis: function( coords, ratio, direction, bounds ) { var newCoords = Object.extend( coords, {} ), calcDimA = newCoords.a2 - newCoords.a1, // calculate dimension a (e.g. width) targDimB = Math.floor( calcDimA * ratio.b / ratio.a ), // the target dimension b (e.g. height) targB = null, // to hold target b (e.g. y value) targDimA = null, // to hold target dimension a (e.g. width) calcDimB = null; // to hold calculated dimension b (e.g. height) // dump( 'newCoords[0]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n'); if( direction.b == 1 ) { // if travelling in a positive direction // make sure we're not going out of bounds targB = newCoords.b1 + targDimB; if( targB > bounds.max ) { targB = bounds.max; calcDimB = targB - newCoords.b1; // calcuate dimension b (e.g. height) } newCoords.b2 = targB; } else { // if travelling in a negative direction // make sure we're not going out of bounds targB = newCoords.b2 - targDimB; if( targB < bounds.min ) { targB = bounds.min; calcDimB = targB + newCoords.b2; // calcuate dimension b (e.g. height) } newCoords.b1 = targB; } // dump( 'newCoords[1]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n'); // apply the calculated dimensions if( calcDimB !== null ) { targDimA = Math.floor( calcDimB * ratio.a / ratio.b ); if( direction.a == 1 ) { newCoords.a2 = newCoords.a1 + targDimA; } else { newCoords.a1 = newCoords.a1 = newCoords.a2 - targDimA; } } // dump( 'newCoords[2]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n'); return newCoords; }, /** * Draws the select area * * @access private * @return void */ drawArea: function( ) { /* NOTE: I'm not using the Element.setStyle() shortcut as they make it quite sluggish on Mac based browsers */ // dump( 'drawArea : ' + this.areaCoords.x1 + ',' + this.areaCoords.y1 + ',' + this.areaCoords.x2 + ',' + this.areaCoords.y2 + '\n' ); var areaWidth = this.calcW(), areaHeight = this.calcH(); /* Calculate all the style strings before we use them, allows reuse & produces quicker rendering (especially noticable in Mac based browsers) */ var px = 'px', params = [ this.areaCoords.x1 + px, // the left of the selArea this.areaCoords.y1 + px, // the top of the selArea areaWidth + px, // width of the selArea areaHeight + px, // height of the selArea this.areaCoords.x2 + px, // bottom of the selArea this.areaCoords.y2 + px, // right of the selArea (this.img.width - this.areaCoords.x2) + px, // right edge of selArea (this.img.height - this.areaCoords.y2) + px // bottom edge of selArea ]; // do the select area var areaStyle = this.selArea.style; areaStyle.left = params[0]; areaStyle.top = params[1]; areaStyle.width = params[2]; areaStyle.height = params[3]; // position the north, east, south & west handles var horizHandlePos = Math.ceil( (areaWidth - 6) / 2 ) + px, vertHandlePos = Math.ceil( (areaHeight - 6) / 2 ) + px; this.handleN.style.left = horizHandlePos; this.handleE.style.top = vertHandlePos; this.handleS.style.left = horizHandlePos; this.handleW.style.top = vertHandlePos; // draw the four overlays this.north.style.height = params[1]; var eastStyle = this.east.style; eastStyle.top = params[1]; eastStyle.height = params[3]; eastStyle.left = params[4]; eastStyle.width = params[6]; var southStyle = this.south.style; southStyle.top = params[5]; southStyle.height = params[7]; var westStyle = this.west.style; westStyle.top = params[1]; westStyle.height = params[3]; westStyle.width = params[0]; // call the draw method on sub classes this.subDrawArea(); this.forceReRender(); }, /** * Force the re-rendering of the selArea element which fixes rendering issues in Safari * & IE PC, especially evident when re-sizing perfectly vertical using any of the south handles * * @access private * @return void */ forceReRender: function() { if( this.isIE || this.isWebKit) { var n = document.createTextNode(' '); var d,el,fixEL,i; if( this.isIE ) { fixEl = this.selArea; } else if( this.isWebKit ) { fixEl = document.getElementsByClassName( 'imgCrop_marqueeSouth', this.imgWrap )[0]; /* we have to be a bit more forceful for Safari, otherwise the the marquee & the south handles still don't move */ d = new Element( 'div' ); d.style.visibility = 'hidden'; var classList = ['SE','S','SW']; for( i = 0; i < classList.length; i++ ) { el = document.getElementsByClassName( 'imgCrop_handle' + classList[i], this.selArea )[0]; if( el.childNodes.length ) { el.removeChild( el.childNodes[0] ); } el.appendChild(d); } } fixEl.appendChild(n); fixEl.removeChild(n); } }, /** * Starts the resize * * @access private * @param obj Event * @return void */ startResize: function( e ) { this.startCoords = this.cloneCoords( this.areaCoords ); this.resizing = true; this.resizeHandle = Event.element( e ).classNames().toString().replace(/([^N|NE|E|SE|S|SW|W|NW])+/, ''); // dump( 'this.resizeHandle : ' + this.resizeHandle + '\n' ); Event.stop( e ); }, /** * Starts the drag * * @access private * @param obj Event * @return void */ startDrag: function( e ) { this.selArea.show(); this.clickCoords = this.getCurPos( e ); this.setAreaCoords( { x1: this.clickCoords.x, y1: this.clickCoords.y, x2: this.clickCoords.x, y2: this.clickCoords.y }, false, false, null ); this.dragging = true; this.onDrag( e ); // incase the user just clicks once after already making a selection Event.stop( e ); }, /** * Gets the current cursor position relative to the image * * @access private * @param obj Event * @return obj x,y pixels of the cursor */ getCurPos: function( e ) { // get the offsets for the wrapper within the document // get the offsets for the wrapper within the document var el = this.imgWrap, wrapOffsets = Element.cumulativeOffset( el ); // remove any scrolling that is applied to the wrapper (this may be buggy) - don't count the scroll on the body as that won't affect us while( el.nodeName != 'BODY' ) { wrapOffsets[1] -= el.scrollTop || 0; wrapOffsets[0] -= el.scrollLeft || 0; el = el.parentNode; } return { x: Event.pointerX(e) - wrapOffsets[0], y: Event.pointerY(e) - wrapOffsets[1] }; }, /** * Performs the drag for both resize & inital draw dragging * * @access private * @param obj Event * @return void */ onDrag: function( e ) { if( this.dragging || this.resizing ) { var resizeHandle = null, curPos = this.getCurPos( e ), newCoords = this.cloneCoords( this.areaCoords ), direction = { x: 1, y: 1 }; if( this.dragging ) { if( curPos.x < this.clickCoords.x ) { direction.x = -1; } if( curPos.y < this.clickCoords.y ) { direction.y = -1; } this.transformCoords( curPos.x, this.clickCoords.x, newCoords, 'x' ); this.transformCoords( curPos.y, this.clickCoords.y, newCoords, 'y' ); } else if( this.resizing ) { resizeHandle = this.resizeHandle; // do x movements first if( resizeHandle.match(/E/) ) { // if we're moving an east handle this.transformCoords( curPos.x, this.startCoords.x1, newCoords, 'x' ); if( curPos.x < this.startCoords.x1 ) { direction.x = -1; } } else if( resizeHandle.match(/W/) ) { // if we're moving an west handle this.transformCoords( curPos.x, this.startCoords.x2, newCoords, 'x' ); if( curPos.x < this.startCoords.x2 ) { direction.x = -1; } } // do y movements second if( resizeHandle.match(/N/) ) { // if we're moving an north handle this.transformCoords( curPos.y, this.startCoords.y2, newCoords, 'y' ); if( curPos.y < this.startCoords.y2 ) { direction.y = -1; } } else if( resizeHandle.match(/S/) ) { // if we're moving an south handle this.transformCoords( curPos.y, this.startCoords.y1, newCoords, 'y' ); if( curPos.y < this.startCoords.y1 ) { direction.y = -1; } } } this.setAreaCoords( newCoords, false, e.shiftKey, direction, resizeHandle ); this.drawArea(); Event.stop( e ); // stop the default event (selecting images & text) in Safari & IE PC } }, /** * Applies the appropriate transform to supplied co-ordinates, on the * defined axis, depending on the relationship of the supplied values * * @access private * @param int Current value of pointer * @param int Base value to compare current pointer val to * @param obj Coordinates to apply transformation on x1, x2, y1, y2 * @param string Axis to apply transformation on 'x' || 'y' * @return void */ transformCoords : function( curVal, baseVal, coords, axis ) { var newVals = [ curVal, baseVal ]; if( curVal > baseVal ) { newVals.reverse(); } coords[ axis + '1' ] = newVals[0]; coords[ axis + '2' ] = newVals[1]; }, /** * Ends the crop & passes the values of the select area on to the appropriate * callback function on completion of a crop * * @access private * @return void */ endCrop : function() { this.dragging = false; this.resizing = false; this.options.onEndCrop( this.areaCoords, { width: this.calcW(), height: this.calcH() } ); }, /** * Abstract method called on the end of initialization * * @access private * @abstract * @return void */ subInitialize: function() {}, /** * Abstract method called on the end of drawArea() * * @access private * @abstract * @return void */ subDrawArea: function() {} }); /** * Extend the Cropper.Img class to allow for presentation of a preview image of the resulting crop, * the option for displayOnInit is always overridden to true when displaying a preview image * * Usage: * @param obj Image element to attach to * @param obj Optional options: * - see Cropper.Img for base options * - previewWrap obj HTML element that will be used as a container for the preview image */ Cropper.ImgWithPreview = Class.create(Cropper.Img, { /** * Implements the abstract method from Cropper.Img to initialize preview image settings. * Will only attach a preview image is the previewWrap element is defined and the minWidth * & minHeight options are set. * * @see Croper.Img.subInitialize */ subInitialize: function() { /** * Whether or not we've attached a preview image * @var boolean */ this.hasPreviewImg = false; if( typeof(this.options.previewWrap) != 'undefined' && this.options.minWidth > 0 && this.options.minHeight > 0 ) { /** * The preview image wrapper element * @var obj HTML element */ this.previewWrap = $( this.options.previewWrap ); /** * The preview image element * @var obj HTML IMG element */ this.previewImg = this.img.cloneNode( false ); // set the ID of the preview image to be unique this.previewImg.id = 'imgCrop_' + this.previewImg.id; // set the displayOnInit option to true so we display the select area at the same time as the thumbnail this.options.displayOnInit = true; this.hasPreviewImg = true; this.previewWrap.addClassName( 'imgCrop_previewWrap' ); this.previewWrap.setStyle({ width: this.options.minWidth + 'px', height: this.options.minHeight + 'px' }); this.previewWrap.appendChild( this.previewImg ); } }, /** * Implements the abstract method from Cropper.Img to draw the preview image * * @see Croper.Img.subDrawArea */ subDrawArea: function() { if( this.hasPreviewImg ) { // get the ratio of the select area to the src image var calcWidth = this.calcW(), calcHeight = this.calcH(); // ratios for the dimensions of the preview image var dimRatio = { x: this.imgW / calcWidth, y: this.imgH / calcHeight }; //ratios for the positions within the preview var posRatio = { x: calcWidth / this.options.minWidth, y: calcHeight / this.options.minHeight }; // setting the positions in an obj before apply styles for rendering speed increase var calcPos = { w: Math.ceil( this.options.minWidth * dimRatio.x ) + 'px', h: Math.ceil( this.options.minHeight * dimRatio.y ) + 'px', x: '-' + Math.ceil( this.areaCoords.x1 / posRatio.x ) + 'px', y: '-' + Math.ceil( this.areaCoords.y1 / posRatio.y ) + 'px' }; var previewStyle = this.previewImg.style; previewStyle.width = calcPos.w; previewStyle.height= calcPos.h; previewStyle.left = calcPos.x; previewStyle.top = calcPos.y; } } }); smokeping-2.7.3/htdocs/js/cropper/licence.txt000066400000000000000000000030161342220157600212360ustar00rootroot00000000000000Copyright (c) 2006-2011, David Spurr (www.defusion.org.uk) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. http://www.opensource.org/licenses/bsd-license.phpsmokeping-2.7.3/htdocs/js/cropper/marqueeHoriz.gif000066400000000000000000000021451342220157600222370ustar00rootroot00000000000000GIF89a ! NETSCAPE2.0! ,    "4xp À! , A"`A! , G@ Lxp`A! , G(h C! , ࿁ "4xp À! , A"`A! , @@ Lxp`A!,  @+h ;smokeping-2.7.3/htdocs/js/cropper/marqueeVert.gif000066400000000000000000000021651342220157600220660ustar00rootroot00000000000000GIF89a(! NETSCAPE2.0! ,(   "4xp Å! ,(A"`! ,(G@ Lxp` ! ,(G(h C! ,(࿁ "4xp Å! ,(A"`! ,(@@ Lxp` !,( @+h C;smokeping-2.7.3/htdocs/js/prototype.js000066400000000000000000003167251342220157600200420ustar00rootroot00000000000000var Prototype={Version:"1.7.3",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div"),b=document.createElement("form"),a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"]*>([\\S\\s]*?)<\/script\\s*>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class=(function(){var d=(function(){for(var e in {toString:1}){if(e==="toString"){return false}}return true})();function a(){}function b(){var h=null,g=$A(arguments);if(Object.isFunction(g[0])){h=g.shift()}function e(){this.initialize.apply(this,arguments)}Object.extend(e,Class.Methods);e.superclass=h;e.subclasses=[];if(h){a.prototype=h.prototype;e.prototype=new a;h.subclasses.push(e)}for(var f=0,j=g.length;f0){match=source.match(pattern);if(match&&match[0].length>0){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length)}else{result+=source,source=""}}return result}function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0){return match[0]}return replacement(match)})}function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this)}function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?"...":truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this)}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?(\/)?>|<\/\w+>/gi,"")}function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")}function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,"img"),matchOne=new RegExp(Prototype.ScriptFragment,"im");return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||["",""])[1]})}function evalScripts(){return this.extractScripts().map(function(script){return eval(script)})}function escapeHTML(){return this.replace(/&/g,"&").replace(//g,">")}function unescapeHTML(){return this.stripTags().replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match){return{}}return match[1].split(separator||"&").inject({},function(hash,pair){if((pair=pair.split("="))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join("="):pair[0];if(value!=undefined){value=value.gsub("+"," ");value=decodeURIComponent(value)}if(key in hash){if(!Object.isArray(hash[key])){hash[key]=[hash[key]]}hash[key].push(value)}else{hash[key]=value}}return hash})}function toArray(){return this.split("")}function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)}function times(count){return count<1?"":new Array(count+1).join(this)}function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():""})}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}function underscore(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()}function dasherize(){return this.replace(/_/g,"-")}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character]}return"\\u00"+character.charCodeAt().toPaddedString(2,16)});if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"'}return"'"+escapedString.replace(/'/g,"\\'")+"'"}function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,"$1")}function isJSON(){var str=this;if(str.blank()){return false}str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,"");return(/^[\],:{}\s]*$/).test(str)}function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff\u0000]/g;if(cx.test(json)){json=json.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())}function parseJSON(){var json=this.unfilterJSON();return JSON.parse(json)}function include(pattern){return this.indexOf(pattern)>-1}function startsWith(pattern,position){position=Object.isNumber(position)?position:0;return this.lastIndexOf(pattern,position)===position}function endsWith(pattern,position){pattern=String(pattern);position=Object.isNumber(position)?position:this.length;if(position<0){position=0}if(position>this.length){position=this.length}var d=position-pattern.length;return d>=0&&this.indexOf(pattern,d)===d}function empty(){return this==""}function blank(){return/^\s*$/.test(this)}function interpolate(object,pattern){return new Template(this,pattern).evaluate(object)}return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:String.prototype.startsWith||startsWith,endsWith:String.prototype.endsWith||endsWith,empty:empty,blank:blank,interpolate:interpolate}})());var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return(d[1]+"")}var f=d[1]||"";if(f=="\\"){return d[2]}var b=a,g=d[3],e=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=e.exec(g);if(d==null){return f}while(d!=null){var c=d[1].startsWith("[")?d[2].replace(/\\\\]/g,"]"):d[1];b=b[c];if(null==b||""==d[3]){break}g=g.substring("["==d[3]?d[1].length:d[0].length);d=e.exec(g)}return f+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function c(x,w){try{this._each(x,w)}catch(y){if(y!=$break){throw y}}return this}function r(z,y,x){var w=-z,A=[],B=this.toArray();if(z<1){return B}while((w+=z)=w){w=A}},this);return w}function n(y,x){y=y||Prototype.K;var w;this.each(function(A,z){A=y.call(x,A,z,this);if(w==null||Ay?1:0}).pluck("value")}function o(){return this.map()}function s(){var x=Prototype.K,w=$A(arguments);if(Object.isFunction(w.last())){x=w.pop()}var y=[this].concat(w).map($A);return this.map(function(A,z){return x(y.pluck(z))})}function k(){return this.toArray().length}function u(){return"#"}return{each:c,eachSlice:r,all:b,every:b,any:i,some:i,collect:j,map:j,detect:t,findAll:h,select:h,filter:h,grep:g,include:a,member:a,inGroupsOf:q,inject:l,invoke:v,max:p,min:n,partition:e,pluck:f,reject:d,sortBy:m,toArray:o,entries:o,zip:s,size:k,inspect:u,find:t}})();function $A(c){if(!c){return[]}if("toArray" in Object(c)){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}Array.from=$A;(function(){var v=Array.prototype,o=v.slice,q=v.forEach;function b(B,A){for(var z=0,C=this.length>>>0;z>>0;if(B===0){return -1}A=Number(A);if(isNaN(A)){A=0}else{if(A!==0&&isFinite(A)){A=(A>0?1:-1)*Math.floor(Math.abs(A))}}if(A>B){return -1}var z=A>=0?A:Math.max(B-Math.abs(A),0);for(;z>>0;if(B===0){return -1}if(!Object.isUndefined(A)){A=Number(A);if(isNaN(A)){A=0}else{if(A!==0&&isFinite(A)){A=(A>0?1:-1)*Math.floor(Math.abs(A))}}}else{A=B}var z=A>=0?Math.min(A,B-1):B-Math.abs(A);for(;z>=0;z--){if(z in D&&D[z]===C){return z}}return -1}function c(G){var E=[],F=o.call(arguments,0),H,A=0;F.unshift(this);for(var D=0,z=F.length;D>>0;A>>0;A>>0;A>>0;A"}function h(){return new Hash(this)}return{initialize:e,_each:f,set:j,get:c,unset:m,toObject:o,toTemplateReplacements:o,keys:n,values:l,index:g,merge:i,update:d,toQueryString:a,inspect:k,toJSON:o,clone:h}})());Hash.from=$H;Object.extend(Number.prototype,(function(){function d(){return this.toPaddedString(2,16)}function b(){return this+1}function h(j,i){$R(0,this,true).each(j,i);return this}function g(k,j){var i=this.toString(j||10);return"0".times(k-i.length)+i}function a(){return Math.abs(this)}function c(){return Math.round(this)}function e(){return Math.ceil(this)}function f(){return Math.floor(this)}return{toColorPart:d,succ:b,times:h,toPaddedString:g,abs:a,round:c,ceil:e,floor:f}})());function $R(c,a,b){return new ObjectRange(c,a,b)}var ObjectRange=Class.create(Enumerable,(function(){function b(f,d,e){this.start=f;this.end=d;this.exclusive=e}function c(f,e){var g=this.start,d;for(d=0;this.include(g);d++){f.call(e,g,d);g=g.succ()}}function a(d){if(d1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b=200&&a<300)||a==304},getStatus:function(){try{if(this.transport.status===1223){return 204}return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(d){this.dispatchException(d)}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON)}catch(d){this.dispatchException(d)}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON()}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null}try{a=decodeURIComponent(escape(a))}catch(b){}try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(e,f){this.updateContent(e.responseText);if(Object.isFunction(d)){d(e,f)}}).bind(this);$super(c,b)},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts()}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b)}else{a.insertion(c,d)}}else{c.update(d)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});(function(a8){var aE;var a1=Array.prototype.slice;var av=document.createElement("div");function aZ(bp){if(arguments.length>1){for(var F=0,br=[],bq=arguments.length;F');return i.tagName.toLowerCase()==="input"&&i.name==="x"}catch(F){return false}})();var aI=a8.Element;function aF(F,i){i=i||{};F=F.toLowerCase();if(d&&i.name){F="<"+F+' name="'+i.name+'">';delete i.name;return aF.writeAttribute(document.createElement(F),i)}if(!r[F]){r[F]=aF.extend(document.createElement(F))}var bp=aQ(F,i)?r[F].cloneNode(false):document.createElement(F);return aF.writeAttribute(bp,i)}a8.Element=aF;Object.extend(a8.Element,aI||{});if(aI){a8.Element.prototype=aI.prototype}aF.Methods={ByTag:{},Simulated:{}};var a3={};var H={id:"id",className:"class"};function ba(F){F=aZ(F);var i="<"+F.tagName.toLowerCase();var bp,br;for(var bq in H){bp=H[bq];br=(F[bq]||"").toString();if(br){i+=" "+bp+"="+br.inspect(true)}}return i+">"}a3.inspect=ba;function v(i){return aZ(i).getStyle("display")!=="none"}function ax(F,i){F=aZ(F);if(typeof i!=="boolean"){i=!aF.visible(F)}aF[i?"show":"hide"](F);return F}function aH(i){i=aZ(i);i.style.display="none";return i}function j(i){i=aZ(i);i.style.display="";return i}Object.extend(a3,{visible:v,toggle:ax,hide:aH,show:j});function ad(i){i=aZ(i);i.parentNode.removeChild(i);return i}var aT=(function(){var i=document.createElement("select"),F=true;i.innerHTML='';if(i.options&&i.options[0]){F=i.options[0].nodeName.toUpperCase()!=="OPTION"}i=null;return F})();var I=(function(){try{var i=document.createElement("table");if(i&&i.tBodies){i.innerHTML="test";var bp=typeof i.tBodies[0]=="undefined";i=null;return bp}}catch(F){return true}})();var a2=(function(){try{var i=document.createElement("div");i.innerHTML="";var bp=(i.childNodes.length===0);i=null;return bp}catch(F){return true}})();var x=aT||I||a2;var aq=(function(){var i=document.createElement("script"),bp=false;try{i.appendChild(document.createTextNode(""));bp=!i.firstChild||i.firstChild&&i.firstChild.nodeType!==3}catch(F){bp=true}i=null;return bp})();function O(br,bt){br=aZ(br);var bu=br.getElementsByTagName("*"),bq=bu.length;while(bq--){Z(bu[bq])}if(bt&&bt.toElement){bt=bt.toElement()}if(Object.isElement(bt)){return br.update().insert(bt)}bt=Object.toHTML(bt);var bp=br.tagName.toUpperCase();if(bp==="SCRIPT"&&aq){br.text=bt;return br}if(x){if(bp in L.tags){while(br.firstChild){br.removeChild(br.firstChild)}var F=t(bp,bt.stripScripts());for(var bq=0,bs;bs=F[bq];bq++){br.appendChild(bs)}}else{if(a2&&Object.isString(bt)&&bt.indexOf("-1){while(br.firstChild){br.removeChild(br.firstChild)}var F=t(bp,bt.stripScripts(),true);for(var bq=0,bs;bs=F[bq];bq++){br.appendChild(bs)}}else{br.innerHTML=bt.stripScripts()}}}else{br.innerHTML=bt.stripScripts()}bt.evalScripts.bind(bt).defer();return br}function ah(F,bp){F=aZ(F);if(bp&&bp.toElement){bp=bp.toElement()}else{if(!Object.isElement(bp)){bp=Object.toHTML(bp);var i=F.ownerDocument.createRange();i.selectNode(F);bp.evalScripts.bind(bp).defer();bp=i.createContextualFragment(bp.stripScripts())}}F.parentNode.replaceChild(bp,F);return F}var L={before:function(i,F){i.parentNode.insertBefore(F,i)},top:function(i,F){i.insertBefore(F,i.firstChild)},bottom:function(i,F){i.appendChild(F)},after:function(i,F){i.parentNode.insertBefore(F,i.nextSibling)},tags:{TABLE:["","
",1],TBODY:["","
",2],TR:["","
",3],TD:["
","
",4],SELECT:["",1]}};var aJ=L.tags;Object.extend(aJ,{THEAD:aJ.TBODY,TFOOT:aJ.TBODY,TH:aJ.TD});function ao(bp,bs){bp=aZ(bp);if(bs&&bs.toElement){bs=bs.toElement()}if(Object.isElement(bs)){bp.parentNode.replaceChild(bs,bp);return bp}bs=Object.toHTML(bs);var br=bp.parentNode,F=br.tagName.toUpperCase();if(F in L.tags){var bt=aF.next(bp);var i=t(F,bs.stripScripts());br.removeChild(bp);var bq;if(bt){bq=function(bu){br.insertBefore(bu,bt)}}else{bq=function(bu){br.appendChild(bu)}}i.each(bq)}else{bp.outerHTML=bs.stripScripts()}bs.evalScripts.bind(bs).defer();return bp}if("outerHTML" in document.documentElement){ah=ao}function a7(i){if(Object.isUndefined(i)||i===null){return false}if(Object.isString(i)||Object.isNumber(i)){return true}if(Object.isElement(i)){return true}if(i.toElement||i.toHTML){return true}return false}function bn(br,bt,F){F=F.toLowerCase();var bv=L[F];if(bt&&bt.toElement){bt=bt.toElement()}if(Object.isElement(bt)){bv(br,bt);return br}bt=Object.toHTML(bt);var bq=((F==="before"||F==="after")?br.parentNode:br).tagName.toUpperCase();var bu=t(bq,bt.stripScripts());if(F==="top"||F==="after"){bu.reverse()}for(var bp=0,bs;bs=bu[bp];bp++){bv(br,bs)}bt.evalScripts.bind(bt).defer()}function Q(F,bp){F=aZ(F);if(a7(bp)){bp={bottom:bp}}for(var i in bp){bn(F,bp[i],i)}return F}function u(F,bp,i){F=aZ(F);if(Object.isElement(bp)){aZ(bp).writeAttribute(i||{})}else{if(Object.isString(bp)){bp=new aF(bp,i)}else{bp=new aF("div",bp)}}if(F.parentNode){F.parentNode.replaceChild(bp,F)}bp.appendChild(F);return bp}function w(F){F=aZ(F);var bp=F.firstChild;while(bp){var i=bp.nextSibling;if(bp.nodeType===Node.TEXT_NODE&&!/\S/.test(bp.nodeValue)){F.removeChild(bp)}bp=i}return F}function a4(i){return aZ(i).innerHTML.blank()}function t(bs,br,bt){var bq=L.tags[bs],bu=av;var F=!!bq;if(!F&&bt){F=true;bq=["","",0]}if(F){bu.innerHTML=" "+bq[0]+br+bq[1];bu.removeChild(bu.firstChild);for(var bp=bq[2];bp--;){bu=bu.firstChild}}else{bu.innerHTML=br}return $A(bu.childNodes)}function E(bq,F){if(!(bq=aZ(bq))){return}var bs=bq.cloneNode(F);if(!aY){bs._prototypeUID=aE;if(F){var br=aF.select(bs,"*"),bp=br.length;while(bp--){br[bp]._prototypeUID=aE}}}return aF.extend(bs)}function Z(F){var i=M(F);if(i){aF.stopObserving(F);if(!aY){F._prototypeUID=aE}delete aF.Storage[i]}}function bl(bp){var F=bp.length;while(F--){Z(bp[F])}}function at(br){var bq=br.length,bp,F;while(bq--){bp=br[bq];F=M(bp);delete aF.Storage[F];delete Event.cache[F]}}if(aY){bl=at}function m(bp){if(!(bp=aZ(bp))){return}Z(bp);var bq=bp.getElementsByTagName("*"),F=bq.length;while(F--){Z(bq[F])}return null}Object.extend(a3,{remove:ad,update:O,replace:ah,insert:Q,wrap:u,cleanWhitespace:w,empty:a4,clone:E,purge:m});function am(i,bp,bq){i=aZ(i);bq=bq||-1;var F=[];while(i=i[bp]){if(i.nodeType===Node.ELEMENT_NODE){F.push(aF.extend(i))}if(F.length===bq){break}}return F}function aL(i){return am(i,"parentNode")}function bm(i){return aF.select(i,"*")}function X(i){i=aZ(i).firstChild;while(i&&i.nodeType!==Node.ELEMENT_NODE){i=i.nextSibling}return aZ(i)}function bi(F){var i=[],bp=aZ(F).firstChild;while(bp){if(bp.nodeType===Node.ELEMENT_NODE){i.push(aF.extend(bp))}bp=bp.nextSibling}return i}function p(i){return am(i,"previousSibling")}function bh(i){return am(i,"nextSibling")}function aV(i){i=aZ(i);var bp=p(i),F=bh(i);return bp.reverse().concat(F)}function aR(F,i){F=aZ(F);if(Object.isString(i)){return Prototype.Selector.match(F,i)}return i.match(F)}function aW(F,bp,bq,i){F=aZ(F),bq=bq||0,i=i||0;if(Object.isNumber(bq)){i=bq,bq=null}while(F=F[bp]){if(F.nodeType!==1){continue}if(bq&&!Prototype.Selector.match(F,bq)){continue}if(--i>=0){continue}return aF.extend(F)}}function aa(F,bp,i){F=aZ(F);if(arguments.length===1){return aZ(F.parentNode)}return aW(F,"parentNode",bp,i)}function y(F,bq,i){if(arguments.length===1){return X(F)}F=aZ(F),bq=bq||0,i=i||0;if(Object.isNumber(bq)){i=bq,bq="*"}var bp=Prototype.Selector.select(bq,F)[i];return aF.extend(bp)}function h(F,bp,i){return aW(F,"previousSibling",bp,i)}function aB(F,bp,i){return aW(F,"nextSibling",bp,i)}function bb(i){i=aZ(i);var F=a1.call(arguments,1).join(", ");return Prototype.Selector.select(F,i)}function aD(bq){bq=aZ(bq);var bs=a1.call(arguments,1).join(", ");var bt=aF.siblings(bq),bp=[];for(var F=0,br;br=bt[F];F++){if(Prototype.Selector.match(br,bs)){bp.push(br)}}return bp}function D(F,i){F=aZ(F),i=aZ(i);if(!F||!i){return false}while(F=F.parentNode){if(F===i){return true}}return false}function B(F,i){F=aZ(F),i=aZ(i);if(!F||!i){return false}if(!i.contains){return D(F,i)}return i.contains(F)&&i!==F}function J(F,i){F=aZ(F),i=aZ(i);if(!F||!i){return false}return(F.compareDocumentPosition(i)&8)===8}var aM;if(av.compareDocumentPosition){aM=J}else{if(av.contains){aM=B}else{aM=D}}Object.extend(a3,{recursivelyCollect:am,ancestors:aL,descendants:bm,firstDescendant:X,immediateDescendants:bi,previousSiblings:p,nextSiblings:bh,siblings:aV,match:aR,up:aa,down:y,previous:h,next:aB,select:bb,adjacent:aD,descendantOf:aM,getElementsBySelector:bb,childElements:bi});var T=1;function aU(i){i=aZ(i);var F=aF.readAttribute(i,"id");if(F){return F}do{F="anonymous_element_"+T++}while(aZ(F));aF.writeAttribute(i,"id",F);return F}function a9(F,i){return aZ(F).getAttribute(i)}function K(F,i){F=aZ(F);var bp=aG.read;if(bp.values[i]){return bp.values[i](F,i)}if(bp.names[i]){i=bp.names[i]}if(i.include(":")){if(!F.attributes||!F.attributes[i]){return null}return F.attributes[i].value}return F.getAttribute(i)}function e(F,i){if(i==="title"){return F.title}return F.getAttribute(i)}var U=(function(){av.setAttribute("onclick",[]);var i=av.getAttribute("onclick");var F=Object.isArray(i);av.removeAttribute("onclick");return F})();if(U){a9=K}else{if(Prototype.Browser.Opera){a9=e}}function a0(bq,bp,bs){bq=aZ(bq);var F={},br=aG.write;if(typeof bp==="object"){F=bp}else{F[bp]=Object.isUndefined(bs)?true:bs}for(var i in F){bp=br.names[i]||i;bs=F[i];if(br.values[i]){bs=br.values[i](bq,bs);if(Object.isUndefined(bs)){continue}}if(bs===false||bs===null){bq.removeAttribute(bp)}else{if(bs===true){bq.setAttribute(bp,bp)}else{bq.setAttribute(bp,bs)}}}return bq}var a=(function(){if(!d){return false}var F=document.createElement('');F.checked=true;var i=F.getAttributeNode("checked");return !i||!i.specified})();function Y(i,bp){bp=aG.has[bp]||bp;var F=aZ(i).getAttributeNode(bp);return !!(F&&F.specified)}function bg(i,F){if(F==="checked"){return i.checked}return Y(i,F)}a8.Element.Methods.Simulated.hasAttribute=a?bg:Y;function k(i){return new aF.ClassNames(i)}var V={};function f(F){if(V[F]){return V[F]}var i=new RegExp("(^|\\s+)"+F+"(\\s+|$)");V[F]=i;return i}function al(i,F){if(!(i=aZ(i))){return}var bp=i.className;if(bp.length===0){return false}if(bp===F){return true}return f(F).test(bp)}function o(i,F){if(!(i=aZ(i))){return}if(!al(i,F)){i.className+=(i.className?" ":"")+F}return i}function au(i,F){if(!(i=aZ(i))){return}i.className=i.className.replace(f(F)," ").strip();return i}function ae(F,bp,i){if(!(F=aZ(F))){return}if(Object.isUndefined(i)){i=!al(F,bp)}var bq=aF[i?"addClassName":"removeClassName"];return bq(F,bp)}var aG={};var aP="className",ar="for";av.setAttribute(aP,"x");if(av.className!=="x"){av.setAttribute("class","x");if(av.className==="x"){aP="class"}}var aK=document.createElement("label");aK.setAttribute(ar,"x");if(aK.htmlFor!=="x"){aK.setAttribute("htmlFor","x");if(aK.htmlFor==="x"){ar="htmlFor"}}aK=null;function ac(i,F){return i.getAttribute(F)}function g(i,F){return i.getAttribute(F,2)}function A(i,bp){var F=i.getAttributeNode(bp);return F?F.value:""}function bj(i,F){return aZ(i).hasAttribute(F)?F:null}av.onclick=Prototype.emptyFunction;var P=av.getAttribute("onclick");var aw;if(String(P).indexOf("{")>-1){aw=function(i,F){var bp=i.getAttribute(F);if(!bp){return null}bp=bp.toString();bp=bp.split("{")[1];bp=bp.split("}")[0];return bp.strip()}}else{if(P===""){aw=function(i,F){var bp=i.getAttribute(F);if(!bp){return null}return bp.strip()}}}aG.read={names:{"class":aP,className:aP,"for":ar,htmlFor:ar},values:{style:function(i){return i.style.cssText.toLowerCase()},title:function(i){return i.title}}};aG.write={names:{className:"class",htmlFor:"for",cellpadding:"cellPadding",cellspacing:"cellSpacing"},values:{checked:function(i,F){F=!!F;i.checked=F;return F?"checked":null},style:function(i,F){i.style.cssText=F?F:""}}};aG.has={names:{}};Object.extend(aG.write.names,aG.read.names);var a6=$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder");for(var af=0,ag;ag=a6[af];af++){aG.write.names[ag.toLowerCase()]=ag;aG.has.names[ag.toLowerCase()]=ag}Object.extend(aG.read.values,{href:g,src:g,type:ac,action:A,disabled:bj,checked:bj,readonly:bj,multiple:bj,onload:aw,onunload:aw,onclick:aw,ondblclick:aw,onmousedown:aw,onmouseup:aw,onmouseover:aw,onmousemove:aw,onmouseout:aw,onfocus:aw,onblur:aw,onkeypress:aw,onkeydown:aw,onkeyup:aw,onsubmit:aw,onreset:aw,onselect:aw,onchange:aw});Object.extend(a3,{identify:aU,readAttribute:a9,writeAttribute:a0,classNames:k,hasClassName:al,addClassName:o,removeClassName:au,toggleClassName:ae});function W(i){if(i==="float"||i==="styleFloat"){return"cssFloat"}return i.camelize()}function bo(i){if(i==="float"||i==="cssFloat"){return"styleFloat"}return i.camelize()}function C(bp,bq){bp=aZ(bp);var bt=bp.style,F;if(Object.isString(bq)){bt.cssText+=";"+bq;if(bq.include("opacity")){var i=bq.match(/opacity:\s*(\d?\.?\d*)/)[1];aF.setOpacity(bp,i)}return bp}for(var bs in bq){if(bs==="opacity"){aF.setOpacity(bp,bq[bs])}else{var br=bq[bs];if(bs==="float"||bs==="cssFloat"){bs=Object.isUndefined(bt.styleFloat)?"cssFloat":"styleFloat"}bt[bs]=br}}return bp}function aO(F,bp){F=aZ(F);bp=W(bp);var bq=F.style[bp];if(!bq||bq==="auto"){var i=document.defaultView.getComputedStyle(F,null);bq=i?i[bp]:null}if(bp==="opacity"){return bq?parseFloat(bq):1}return bq==="auto"?null:bq}function s(i,F){switch(F){case"height":case"width":if(!aF.visible(i)){return null}var bp=parseInt(aO(i,F),10);if(bp!==i["offset"+F.capitalize()]){return bp+"px"}return aF.measure(i,F);default:return aO(i,F)}}function aj(i,F){i=aZ(i);F=bo(F);var bp=i.style[F];if(!bp&&i.currentStyle){bp=i.currentStyle[F]}if(F==="opacity"){if(!N){return be(i)}else{return bp?parseFloat(bp):1}}if(bp==="auto"){if((F==="width"||F==="height")&&aF.visible(i)){return aF.measure(i,F)+"px"}return null}return bp}function aA(i){return(i||"").replace(/alpha\([^\)]*\)/gi,"")}function ab(i){if(!i.currentStyle||!i.currentStyle.hasLayout){i.style.zoom=1}return i}var N=(function(){av.style.cssText="opacity:.55";return/^0.55/.test(av.style.opacity)})();function z(i,F){i=aZ(i);if(F==1||F===""){F=""}else{if(F<0.00001){F=0}}i.style.opacity=F;return i}function bf(i,bq){if(N){return z(i,bq)}i=ab(aZ(i));var bp=aF.getStyle(i,"filter"),F=i.style;if(bq==1||bq===""){bp=aA(bp);if(bp){F.filter=bp}else{F.removeAttribute("filter")}return i}if(bq<0.00001){bq=0}F.filter=aA(bp)+" alpha(opacity="+(bq*100)+")";return i}function bd(i){return aF.getStyle(i,"opacity")}function be(F){if(N){return bd(F)}var bp=aF.getStyle(F,"filter");if(bp.length===0){return 1}var i=(bp||"").match(/alpha\(opacity=(.*)\)/i);if(i&&i[1]){return parseFloat(i[1])/100}return 1}Object.extend(a3,{setStyle:C,getStyle:aO,setOpacity:z,getOpacity:bd});if("styleFloat" in av.style){a3.getStyle=aj;a3.setOpacity=bf;a3.getOpacity=be}var l=0;a8.Element.Storage={UID:1};function M(i){if(i===window){return 0}if(typeof i._prototypeUID==="undefined"){i._prototypeUID=aF.Storage.UID++}return i._prototypeUID}function c(i){if(i===window){return 0}if(i==document){return 1}return i.uniqueID}var aY=("uniqueID" in av);if(aY){M=c}function b(F){if(!(F=aZ(F))){return}var i=M(F);if(!aF.Storage[i]){aF.Storage[i]=$H()}return aF.Storage[i]}function a5(F,i,bp){if(!(F=aZ(F))){return}var bq=b(F);if(arguments.length===2){bq.update(i)}else{bq.set(i,bp)}return F}function aN(bp,F,i){if(!(bp=aZ(bp))){return}var br=b(bp),bq=br.get(F);if(Object.isUndefined(bq)){br.set(F,i);bq=i}return bq}Object.extend(a3,{getStorage:b,store:a5,retrieve:aN});var an={},aX=aF.Methods.ByTag,aC=Prototype.BrowserFeatures;if(!aC.ElementExtensions&&("__proto__" in av)){a8.HTMLElement={};a8.HTMLElement.prototype=av.__proto__;aC.ElementExtensions=true}function bc(i){if(typeof window.Element==="undefined"){return false}if(!d){return false}var bp=window.Element.prototype;if(bp){var br="_"+(Math.random()+"").slice(2),F=document.createElement(i);bp[br]="x";var bq=(F[br]!=="x");delete bp[br];F=null;return bq}return false}var ap=bc("object");function ak(F,i){for(var bq in i){var bp=i[bq];if(Object.isFunction(bp)&&!(bq in F)){F[bq]=bp.methodize()}}}var bk={};function ay(F){var i=M(F);return(i in bk)}function az(bp){if(!bp||ay(bp)){return bp}if(bp.nodeType!==Node.ELEMENT_NODE||bp==window){return bp}var i=Object.clone(an),F=bp.tagName.toUpperCase();if(aX[F]){Object.extend(i,aX[F])}ak(bp,i);bk[M(bp)]=true;return bp}function aS(F){if(!F||ay(F)){return F}var i=F.tagName;if(i&&(/^(?:object|applet|embed)$/i.test(i))){ak(F,aF.Methods);ak(F,aF.Methods.Simulated);ak(F,aF.Methods.ByTag[i.toUpperCase()])}return F}if(aC.SpecificElementExtensions){az=ap?aS:Prototype.K}function S(F,i){F=F.toUpperCase();if(!aX[F]){aX[F]={}}Object.extend(aX[F],i)}function q(F,bp,i){if(Object.isUndefined(i)){i=false}for(var br in bp){var bq=bp[br];if(!Object.isFunction(bq)){continue}if(!i||!(br in F)){F[br]=bq.methodize()}}}function ai(bq){var i;var bp={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(bp[bq]){i="HTML"+bp[bq]+"Element"}if(window[i]){return window[i]}i="HTML"+bq+"Element";if(window[i]){return window[i]}i="HTML"+bq.capitalize()+"Element";if(window[i]){return window[i]}var F=document.createElement(bq),br=F.__proto__||F.constructor.prototype;F=null;return br}function R(br){if(arguments.length===0){G()}if(arguments.length===2){var bt=br;br=arguments[1]}if(!bt){Object.extend(aF.Methods,br||{})}else{if(Object.isArray(bt)){for(var bs=0,bq;bq=bt[bs];bs++){S(bq,br)}}else{S(bt,br)}}var bp=window.HTMLElement?HTMLElement.prototype:aF.prototype;if(aC.ElementExtensions){q(bp,aF.Methods);q(bp,aF.Methods.Simulated,true)}if(aC.SpecificElementExtensions){for(var bq in aF.Methods.ByTag){var F=ai(bq);if(Object.isUndefined(F)){continue}q(F.prototype,aX[bq])}}Object.extend(aF,aF.Methods);Object.extend(aF,aF.Methods.Simulated);delete aF.ByTag;delete aF.Simulated;aF.extend.refresh();r={}}Object.extend(a8.Element,{extend:az,addMethods:R});if(az===Prototype.K){a8.Element.extend.refresh=Prototype.emptyFunction}else{a8.Element.extend.refresh=function(){if(Prototype.BrowserFeatures.ElementExtensions){return}Object.extend(an,aF.Methods);Object.extend(an,aF.Methods.Simulated);bk={}}}function G(){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(aF.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods),BUTTON:Object.clone(Form.Element.Methods)})}aF.addMethods(a3);function n(){av=null;r=null}if(window.attachEvent){window.attachEvent("onunload",n)}})(this);(function(){function k(G){var F=G.match(/^(\d+)%?$/i);if(!F){return null}return(Number(F[1])/100)}function y(G,H){G=$(G);var I=G.style[H];if(!I||I==="auto"){var F=document.defaultView.getComputedStyle(G,null);I=F?F[H]:null}if(H==="opacity"){return I?parseFloat(I):1}return I==="auto"?null:I}function B(F,G){var H=F.style[G];if(!H&&F.currentStyle){H=F.currentStyle[G]}return H}function r(H,G){var J=H.offsetWidth;var L=u(H,"borderLeftWidth",G)||0;var F=u(H,"borderRightWidth",G)||0;var I=u(H,"paddingLeft",G)||0;var K=u(H,"paddingRight",G)||0;return J-L-F-I-K}if(!Object.isUndefined(document.documentElement.currentStyle)&&!Prototype.Browser.Opera){y=B}function u(P,Q,G){var J=null;if(Object.isElement(P)){J=P;P=y(J,Q)}if(P===null||Object.isUndefined(P)){return null}if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(P)){return window.parseFloat(P)}var K=P.include("%"),H=(G===document.viewport);if(/\d/.test(P)&&J&&J.runtimeStyle&&!(K&&H)){var F=J.style.left,O=J.runtimeStyle.left;J.runtimeStyle.left=J.currentStyle.left;J.style.left=P||0;P=J.style.pixelLeft;J.style.left=F;J.runtimeStyle.left=O;return P}if(J&&K){G=G||J.parentNode;var I=k(P),L=null;var N=Q.include("left")||Q.include("right")||Q.include("width");var M=Q.include("top")||Q.include("bottom")||Q.include("height");if(G===document.viewport){if(N){L=document.viewport.getWidth()}else{if(M){L=document.viewport.getHeight()}}}else{if(N){L=$(G).measure("width")}else{if(M){L=$(G).measure("height")}}}return(L===null)?0:L*I}return 0}function j(F){if(Object.isString(F)&&F.endsWith("px")){return F}return F+"px"}function m(F){while(F&&F.parentNode){var G=F.getStyle("display");if(G==="none"){return false}F=$(F.parentNode)}return true}var g=Prototype.K;if("currentStyle" in document.documentElement){g=function(F){if(!F.currentStyle.hasLayout){F.style.zoom=1}return F}}function i(F){if(F.include("border")){F=F+"-width"}return F.camelize()}Element.Layout=Class.create(Hash,{initialize:function($super,G,F){$super();this.element=$(G);Element.Layout.PROPERTIES.each(function(H){this._set(H,null)},this);if(F){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false}},_set:function(G,F){return Hash.prototype.set.call(this,G,F)},set:function(G,F){throw"Properties of Element.Layout are read-only."},get:function($super,G){var F=$super(G);return F===null?this._compute(G):F},_begin:function(){if(this._isPrepared()){return}var J=this.element;if(m(J)){this._setPrepared(true);return}var L={position:J.style.position||"",width:J.style.width||"",visibility:J.style.visibility||"",display:J.style.display||""};J.store("prototype_original_styles",L);var M=y(J,"position"),F=J.offsetWidth;if(F===0||F===null){J.style.display="block";F=J.offsetWidth}var G=(M==="fixed")?document.viewport:J.parentNode;var N={visibility:"hidden",display:"block"};if(M!=="fixed"){N.position="absolute"}J.setStyle(N);var H=J.offsetWidth,I;if(F&&(H===F)){I=r(J,G)}else{if(M==="absolute"||M==="fixed"){I=r(J,G)}else{var O=J.parentNode,K=$(O).getLayout();I=K.get("width")-this.get("margin-left")-this.get("border-left")-this.get("padding-left")-this.get("padding-right")-this.get("border-right")-this.get("margin-right")}}J.setStyle({width:I+"px"});this._setPrepared(true)},_end:function(){var G=this.element;var F=G.retrieve("prototype_original_styles");G.store("prototype_original_styles",null);G.setStyle(F);this._setPrepared(false)},_compute:function(G){var F=Element.Layout.COMPUTATIONS;if(!(G in F)){throw"Property not found."}return this._set(G,F[G].call(this,this.element))},_isPrepared:function(){return this.element.retrieve("prototype_element_layout_prepared",false)},_setPrepared:function(F){return this.element.store("prototype_element_layout_prepared",F)},toObject:function(){var F=$A(arguments);var G=(F.length===0)?Element.Layout.PROPERTIES:F.join(" ").split(" ");var H={};G.each(function(I){if(!Element.Layout.PROPERTIES.include(I)){return}var J=this.get(I);if(J!=null){H[I]=J}},this);return H},toHash:function(){var F=this.toObject.apply(this,arguments);return new Hash(F)},toCSS:function(){var F=$A(arguments);var H=(F.length===0)?Element.Layout.PROPERTIES:F.join(" ").split(" ");var G={};H.each(function(I){if(!Element.Layout.PROPERTIES.include(I)){return}if(Element.Layout.COMPOSITE_PROPERTIES.include(I)){return}var J=this.get(I);if(J!=null){G[i(I)]=J+"px"}},this);return G},inspect:function(){return"#"}});Object.extend(Element.Layout,{PROPERTIES:$w("height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height"),COMPOSITE_PROPERTIES:$w("padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height"),COMPUTATIONS:{height:function(H){if(!this._preComputing){this._begin()}var F=this.get("border-box-height");if(F<=0){if(!this._preComputing){this._end()}return 0}var I=this.get("border-top"),G=this.get("border-bottom");var K=this.get("padding-top"),J=this.get("padding-bottom");if(!this._preComputing){this._end()}return F-I-G-K-J},width:function(H){if(!this._preComputing){this._begin()}var G=this.get("border-box-width");if(G<=0){if(!this._preComputing){this._end()}return 0}var K=this.get("border-left"),F=this.get("border-right");var I=this.get("padding-left"),J=this.get("padding-right");if(!this._preComputing){this._end()}return G-K-F-I-J},"padding-box-height":function(G){var F=this.get("height"),I=this.get("padding-top"),H=this.get("padding-bottom");return F+I+H},"padding-box-width":function(F){var G=this.get("width"),H=this.get("padding-left"),I=this.get("padding-right");return G+H+I},"border-box-height":function(G){if(!this._preComputing){this._begin()}var F=G.offsetHeight;if(!this._preComputing){this._end()}return F},"border-box-width":function(F){if(!this._preComputing){this._begin()}var G=F.offsetWidth;if(!this._preComputing){this._end()}return G},"margin-box-height":function(G){var F=this.get("border-box-height"),H=this.get("margin-top"),I=this.get("margin-bottom");if(F<=0){return 0}return F+H+I},"margin-box-width":function(H){var G=this.get("border-box-width"),I=this.get("margin-left"),F=this.get("margin-right");if(G<=0){return 0}return G+I+F},top:function(F){var G=F.positionedOffset();return G.top},bottom:function(F){var I=F.positionedOffset(),G=F.getOffsetParent(),H=G.measure("height");var J=this.get("border-box-height");return H-J-I.top},left:function(F){var G=F.positionedOffset();return G.left},right:function(H){var J=H.positionedOffset(),I=H.getOffsetParent(),F=I.measure("width");var G=this.get("border-box-width");return F-G-J.left},"padding-top":function(F){return u(F,"paddingTop")},"padding-bottom":function(F){return u(F,"paddingBottom")},"padding-left":function(F){return u(F,"paddingLeft")},"padding-right":function(F){return u(F,"paddingRight")},"border-top":function(F){return u(F,"borderTopWidth")},"border-bottom":function(F){return u(F,"borderBottomWidth")},"border-left":function(F){return u(F,"borderLeftWidth")},"border-right":function(F){return u(F,"borderRightWidth")},"margin-top":function(F){return u(F,"marginTop")},"margin-bottom":function(F){return u(F,"marginBottom")},"margin-left":function(F){return u(F,"marginLeft")},"margin-right":function(F){return u(F,"marginRight")}}});if("getBoundingClientRect" in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{right:function(G){var H=g(G.getOffsetParent());var I=G.getBoundingClientRect(),F=H.getBoundingClientRect();return(F.right-I.right).round()},bottom:function(G){var H=g(G.getOffsetParent());var I=G.getBoundingClientRect(),F=H.getBoundingClientRect();return(F.bottom-I.bottom).round()}})}Element.Offset=Class.create({initialize:function(G,F){this.left=G.round();this.top=F.round();this[0]=this.left;this[1]=this.top},relativeTo:function(F){return new Element.Offset(this.left-F.left,this.top-F.top)},inspect:function(){return"#".interpolate(this)},toString:function(){return"[#{left}, #{top}]".interpolate(this)},toArray:function(){return[this.left,this.top]}});function z(G,F){return new Element.Layout(G,F)}function d(F,G){return $(F).getLayout().get(G)}function q(F){return Element.getDimensions(F).height}function c(F){return Element.getDimensions(F).width}function s(G){G=$(G);var K=Element.getStyle(G,"display");if(K&&K!=="none"){return{width:G.offsetWidth,height:G.offsetHeight}}var H=G.style;var F={visibility:H.visibility,position:H.position,display:H.display};var J={visibility:"hidden",display:"block"};if(F.position!=="fixed"){J.position="absolute"}Element.setStyle(G,J);var I={width:G.offsetWidth,height:G.offsetHeight};Element.setStyle(G,F);return I}function p(F){F=$(F);function H(I){return n(I)?$(document.body):$(I)}if(h(F)||f(F)||o(F)||n(F)){return $(document.body)}var G=(Element.getStyle(F,"display")==="inline");if(!G&&F.offsetParent){return H(F.offsetParent)}while((F=F.parentNode)&&F!==document.body){if(Element.getStyle(F,"position")!=="static"){return H(F)}}return $(document.body)}function C(G){G=$(G);var F=0,H=0;if(G.parentNode){do{F+=G.offsetTop||0;H+=G.offsetLeft||0;G=G.offsetParent}while(G)}return new Element.Offset(H,F)}function w(G){G=$(G);var H=G.getLayout();var F=0,J=0;do{F+=G.offsetTop||0;J+=G.offsetLeft||0;G=G.offsetParent;if(G){if(o(G)){break}var I=Element.getStyle(G,"position");if(I!=="static"){break}}}while(G);J-=H.get("margin-left");F-=H.get("margin-top");return new Element.Offset(J,F)}function b(G){var F=0,H=0;do{if(G===document.body){var I=document.documentElement||document.body.parentNode||document.body;F+=!Object.isUndefined(window.pageYOffset)?window.pageYOffset:I.scrollTop||0;H+=!Object.isUndefined(window.pageXOffset)?window.pageXOffset:I.scrollLeft||0;break}else{F+=G.scrollTop||0;H+=G.scrollLeft||0;G=G.parentNode}}while(G);return new Element.Offset(H,F)}function A(J){var F=0,I=0,H=document.body;J=$(J);var G=J;do{F+=G.offsetTop||0;I+=G.offsetLeft||0;if(G.offsetParent==H&&Element.getStyle(G,"position")=="absolute"){break}}while(G=G.offsetParent);G=J;do{if(G!=H){F-=G.scrollTop||0;I-=G.scrollLeft||0}}while(G=G.parentNode);return new Element.Offset(I,F)}function x(F){F=$(F);if(Element.getStyle(F,"position")==="absolute"){return F}var J=p(F);var I=F.viewportOffset(),G=J.viewportOffset();var K=I.relativeTo(G);var H=F.getLayout();F.store("prototype_absolutize_original_styles",{position:F.getStyle("position"),left:F.getStyle("left"),top:F.getStyle("top"),width:F.getStyle("width"),height:F.getStyle("height")});F.setStyle({position:"absolute",top:K.top+"px",left:K.left+"px",width:H.get("width")+"px",height:H.get("height")+"px"});return F}function l(G){G=$(G);if(Element.getStyle(G,"position")==="relative"){return G}var F=G.retrieve("prototype_absolutize_original_styles");if(F){G.setStyle(F)}return G}function a(F){F=$(F);var G=Element.cumulativeOffset(F);window.scrollTo(G.left,G.top);return F}function v(G){G=$(G);var F=Element.getStyle(G,"position"),H={};if(F==="static"||!F){H.position="relative";if(Prototype.Browser.Opera){H.top=0;H.left=0}Element.setStyle(G,H);Element.store(G,"prototype_made_positioned",true)}return G}function t(F){F=$(F);var H=Element.getStorage(F),G=H.get("prototype_made_positioned");if(G){H.unset("prototype_made_positioned");Element.setStyle(F,{position:"",top:"",bottom:"",left:"",right:""})}return F}function e(G){G=$(G);var I=Element.getStorage(G),F=I.get("prototype_made_clipping");if(Object.isUndefined(F)){var H=Element.getStyle(G,"overflow");I.set("prototype_made_clipping",H);if(H!=="hidden"){G.style.overflow="hidden"}}return G}function D(F){F=$(F);var H=Element.getStorage(F),G=H.get("prototype_made_clipping");if(!Object.isUndefined(G)){H.unset("prototype_made_clipping");F.style.overflow=G||""}return F}function E(I,F,Q){Q=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},Q||{});var H=document.documentElement;F=$(F);I=$(I);var G,O,K,P={};if(Q.setLeft||Q.setTop){G=Element.viewportOffset(F);O=[0,0];if(Element.getStyle(I,"position")==="absolute"){var N=Element.getOffsetParent(I);if(N!==document.body){O=Element.viewportOffset(N)}}}function L(){var R=0,S=0;if(Object.isNumber(window.pageXOffset)){R=window.pageXOffset;S=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){R=document.body.scrollLeft;S=document.body.scrollTop}else{if(H&&(H.scrollLeft||H.scrollTop)){R=H.scrollLeft;S=H.scrollTop}}}return{x:R,y:S}}var J=L();if(Q.setWidth||Q.setHeight){K=Element.getLayout(F)}if(Q.setLeft){P.left=(G[0]+J.x-O[0]+Q.offsetLeft)+"px"}if(Q.setTop){P.top=(G[1]+J.y-O[1]+Q.offsetTop)+"px"}var M=I.getLayout();if(Q.setWidth){P.width=K.get("width")+"px"}if(Q.setHeight){P.height=K.get("height")+"px"}return Element.setStyle(I,P)}if(Prototype.Browser.IE){p=p.wrap(function(H,G){G=$(G);if(h(G)||f(G)||o(G)||n(G)){return $(document.body)}var F=G.getStyle("position");if(F!=="static"){return H(G)}G.setStyle({position:"relative"});var I=H(G);G.setStyle({position:F});return I});w=w.wrap(function(I,G){G=$(G);if(!G.parentNode){return new Element.Offset(0,0)}var F=G.getStyle("position");if(F!=="static"){return I(G)}var H=G.getOffsetParent();if(H&&H.getStyle("position")==="fixed"){g(H)}G.setStyle({position:"relative"});var J=I(G);G.setStyle({position:F});return J})}else{if(Prototype.Browser.Webkit){C=function(G){G=$(G);var F=0,H=0;do{F+=G.offsetTop||0;H+=G.offsetLeft||0;if(G.offsetParent==document.body){if(Element.getStyle(G,"position")=="absolute"){break}}G=G.offsetParent}while(G);return new Element.Offset(H,F)}}}Element.addMethods({getLayout:z,measure:d,getWidth:c,getHeight:q,getDimensions:s,getOffsetParent:p,cumulativeOffset:C,positionedOffset:w,cumulativeScrollOffset:b,viewportOffset:A,absolutize:x,relativize:l,scrollTo:a,makePositioned:v,undoPositioned:t,makeClipping:e,undoClipping:D,clonePosition:E});function o(F){return F.nodeName.toUpperCase()==="BODY"}function n(F){return F.nodeName.toUpperCase()==="HTML"}function h(F){return F.nodeType===Node.DOCUMENT_NODE}function f(F){return F!==document.body&&!Element.descendantOf(F,document.body)}if("getBoundingClientRect" in document.documentElement){Element.addMethods({viewportOffset:function(F){F=$(F);if(f(F)){return new Element.Offset(0,0)}var G=F.getBoundingClientRect(),H=document.documentElement;return new Element.Offset(G.left-H.clientLeft,G.top-H.clientTop)}})}})();(function(){var c=Prototype.Browser.Opera&&(window.parseFloat(window.opera.version())<9.5);var f=null;function b(){if(f){return f}f=c?document.body:document.documentElement;return f}function d(){return{width:this.getWidth(),height:this.getHeight()}}function a(){return b().clientWidth}function g(){return b().clientHeight}function e(){var h=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft;var i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;return new Element.Offset(h,i)}document.viewport={getDimensions:d,getWidth:a,getHeight:g,getScrollOffsets:e}})();window.$$=function(){var a=$A(arguments).join(", ");return Prototype.Selector.select(a,document)};Prototype.Selector=(function(){function a(){throw new Error('Method "Prototype.Selector.select" must be defined.')}function c(){throw new Error('Method "Prototype.Selector.match" must be defined.')}function d(l,m,h){h=h||0;var g=Prototype.Selector.match,k=l.length,f=0,j;for(j=0;j+~]|"+v+")"+v+"*"),z=new RegExp("="+v+"*([^\\]'\"]*?)"+v+"*\\]","g"),X=new RegExp(q),Z=new RegExp("^"+Q+"$"),ah={ID:new RegExp("^#("+a+")"),CLASS:new RegExp("^\\.("+a+")"),TAG:new RegExp("^("+a.replace("w","w*")+")"),ATTR:new RegExp("^"+al),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+v+"*(even|odd|(([+-]|)(\\d*)n|)"+v+"*(?:([+-]|)"+v+"*(\\d+)|))"+v+"*\\)|)","i"),bool:new RegExp("^(?:"+c+")$","i"),needsContext:new RegExp("^"+v+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+v+"*((?:-\\d)?\\d*)"+v+"*\\)|)(?=[^-]|$)","i")},h=/^(?:input|select|textarea|button)$/i,r=/^h\d$/i,U=/^[^{]+\{\s*\[native \w/,W=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ag=/[+~]/,S=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+v+"?|("+v+")|.)","ig"),ak=function(e,aE,i){var aD="0x"+aE-65536;return aD!==aD||i?aE:aD<0?String.fromCharCode(aD+65536):String.fromCharCode(aD>>10|55296,aD&1023|56320)};try{b.apply((ar=s.call(O.childNodes)),O.childNodes);ar[O.childNodes.length].nodeType}catch(I){b={apply:ar.length?function(i,e){R.apply(i,s.call(e))}:function(aF,aE){var e=aF.length,aD=0;while((aF[e++]=aE[aD++])){}aF.length=e-1}}}function B(aK,aD,aO,aQ){var aP,aH,aI,aM,aN,aG,aF,e,aE,aL;if((aD?aD.ownerDocument||aD:O)!==H){ae(aD)}aD=aD||H;aO=aO||[];if(!aK||typeof aK!=="string"){return aO}if((aM=aD.nodeType)!==1&&aM!==9){return[]}if(an&&!aQ){if((aP=W.exec(aK))){if((aI=aP[1])){if(aM===9){aH=aD.getElementById(aI);if(aH&&aH.parentNode){if(aH.id===aI){aO.push(aH);return aO}}else{return aO}}else{if(aD.ownerDocument&&(aH=aD.ownerDocument.getElementById(aI))&&K(aD,aH)&&aH.id===aI){aO.push(aH);return aO}}}else{if(aP[2]){b.apply(aO,aD.getElementsByTagName(aK));return aO}else{if((aI=aP[3])&&ay.getElementsByClassName&&aD.getElementsByClassName){b.apply(aO,aD.getElementsByClassName(aI));return aO}}}}if(ay.qsa&&(!ai||!ai.test(aK))){e=aF=ap;aE=aD;aL=aM===9&&aK;if(aM===1&&aD.nodeName.toLowerCase()!=="object"){aG=n(aK);if((aF=aD.getAttribute("id"))){e=aF.replace(S,"\\$&")}else{aD.setAttribute("id",e)}e="[id='"+e+"'] ";aN=aG.length;while(aN--){aG[aN]=e+o(aG[aN])}aE=ag.test(aK)&&Y(aD.parentNode)||aD;aL=aG.join(",")}if(aL){try{b.apply(aO,aE.querySelectorAll(aL));return aO}catch(aJ){}finally{if(!aF){aD.removeAttribute("id")}}}}}return ax(aK.replace(x,"$1"),aD,aO,aQ)}function F(){var i=[];function e(aD,aE){if(i.push(aD+" ")>t.cacheLength){delete e[i.shift()]}return(e[aD+" "]=aE)}return e}function p(e){e[ap]=true;return e}function l(i){var aE=H.createElement("div");try{return !!i(aE)}catch(aD){return false}finally{if(aE.parentNode){aE.parentNode.removeChild(aE)}aE=null}}function aA(aD,aF){var e=aD.split("|"),aE=aD.length;while(aE--){t.attrHandle[e[aE]]=aF}}function f(i,e){var aE=e&&i,aD=aE&&i.nodeType===1&&e.nodeType===1&&(~e.sourceIndex||V)-(~i.sourceIndex||V);if(aD){return aD}if(aE){while((aE=aE.nextSibling)){if(aE===e){return -1}}}return i?1:-1}function C(e){return function(aD){var i=aD.nodeName.toLowerCase();return i==="input"&&aD.type===e}}function g(e){return function(aD){var i=aD.nodeName.toLowerCase();return(i==="input"||i==="button")&&aD.type===e}}function am(e){return p(function(i){i=+i;return p(function(aD,aH){var aF,aE=e([],aD.length,i),aG=aE.length;while(aG--){if(aD[(aF=aE[aG])]){aD[aF]=!(aH[aF]=aD[aF])}}})})}function Y(e){return e&&typeof e.getElementsByTagName!==au&&e}ay=B.support={};P=B.isXML=function(e){var i=e&&(e.ownerDocument||e).documentElement;return i?i.nodeName!=="HTML":false};ae=B.setDocument=function(aD){var e,aE=aD?aD.ownerDocument||aD:O,i=aE.defaultView;if(aE===H||aE.nodeType!==9||!aE.documentElement){return H}H=aE;u=aE.documentElement;an=!P(aE);if(i&&i!==i.top){if(i.addEventListener){i.addEventListener("unload",function(){ae()},false)}else{if(i.attachEvent){i.attachEvent("onunload",function(){ae()})}}}ay.attributes=l(function(aF){aF.className="i";return !aF.getAttribute("className")});ay.getElementsByTagName=l(function(aF){aF.appendChild(aE.createComment(""));return !aF.getElementsByTagName("*").length});ay.getElementsByClassName=U.test(aE.getElementsByClassName)&&l(function(aF){aF.innerHTML="
";aF.firstChild.className="i";return aF.getElementsByClassName("i").length===2});ay.getById=l(function(aF){u.appendChild(aF).id=ap;return !aE.getElementsByName||!aE.getElementsByName(ap).length});if(ay.getById){t.find.ID=function(aH,aG){if(typeof aG.getElementById!==au&&an){var aF=aG.getElementById(aH);return aF&&aF.parentNode?[aF]:[]}};t.filter.ID=function(aG){var aF=aG.replace(y,ak);return function(aH){return aH.getAttribute("id")===aF}}}else{delete t.find.ID;t.filter.ID=function(aG){var aF=aG.replace(y,ak);return function(aI){var aH=typeof aI.getAttributeNode!==au&&aI.getAttributeNode("id");return aH&&aH.value===aF}}}t.find.TAG=ay.getElementsByTagName?function(aF,aG){if(typeof aG.getElementsByTagName!==au){return aG.getElementsByTagName(aF)}}:function(aF,aJ){var aK,aI=[],aH=0,aG=aJ.getElementsByTagName(aF);if(aF==="*"){while((aK=aG[aH++])){if(aK.nodeType===1){aI.push(aK)}}return aI}return aG};t.find.CLASS=ay.getElementsByClassName&&function(aG,aF){if(typeof aF.getElementsByClassName!==au&&an){return aF.getElementsByClassName(aG)}};aw=[];ai=[];if((ay.qsa=U.test(aE.querySelectorAll))){l(function(aF){aF.innerHTML="";if(aF.querySelectorAll("[t^='']").length){ai.push("[*^$]="+v+"*(?:''|\"\")")}if(!aF.querySelectorAll("[selected]").length){ai.push("\\["+v+"*(?:value|"+c+")")}if(!aF.querySelectorAll(":checked").length){ai.push(":checked")}});l(function(aG){var aF=aE.createElement("input");aF.setAttribute("type","hidden");aG.appendChild(aF).setAttribute("name","D");if(aG.querySelectorAll("[name=d]").length){ai.push("name"+v+"*[*^$|!~]?=")}if(!aG.querySelectorAll(":enabled").length){ai.push(":enabled",":disabled")}aG.querySelectorAll("*,:x");ai.push(",.*:")})}if((ay.matchesSelector=U.test((k=u.webkitMatchesSelector||u.mozMatchesSelector||u.oMatchesSelector||u.msMatchesSelector)))){l(function(aF){ay.disconnectedMatch=k.call(aF,"div");k.call(aF,"[s!='']:x");aw.push("!=",q)})}ai=ai.length&&new RegExp(ai.join("|"));aw=aw.length&&new RegExp(aw.join("|"));e=U.test(u.compareDocumentPosition);K=e||U.test(u.contains)?function(aG,aF){var aI=aG.nodeType===9?aG.documentElement:aG,aH=aF&&aF.parentNode;return aG===aH||!!(aH&&aH.nodeType===1&&(aI.contains?aI.contains(aH):aG.compareDocumentPosition&&aG.compareDocumentPosition(aH)&16))}:function(aG,aF){if(aF){while((aF=aF.parentNode)){if(aF===aG){return true}}}return false};J=e?function(aG,aF){if(aG===aF){ac=true;return 0}var aH=!aG.compareDocumentPosition-!aF.compareDocumentPosition;if(aH){return aH}aH=(aG.ownerDocument||aG)===(aF.ownerDocument||aF)?aG.compareDocumentPosition(aF):1;if(aH&1||(!ay.sortDetached&&aF.compareDocumentPosition(aG)===aH)){if(aG===aE||aG.ownerDocument===O&&K(O,aG)){return -1}if(aF===aE||aF.ownerDocument===O&&K(O,aF)){return 1}return N?(j.call(N,aG)-j.call(N,aF)):0}return aH&4?-1:1}:function(aG,aF){if(aG===aF){ac=true;return 0}var aM,aJ=0,aL=aG.parentNode,aI=aF.parentNode,aH=[aG],aK=[aF];if(!aL||!aI){return aG===aE?-1:aF===aE?1:aL?-1:aI?1:N?(j.call(N,aG)-j.call(N,aF)):0}else{if(aL===aI){return f(aG,aF)}}aM=aG;while((aM=aM.parentNode)){aH.unshift(aM)}aM=aF;while((aM=aM.parentNode)){aK.unshift(aM)}while(aH[aJ]===aK[aJ]){aJ++}return aJ?f(aH[aJ],aK[aJ]):aH[aJ]===O?-1:aK[aJ]===O?1:0};return aE};B.matches=function(i,e){return B(i,null,null,e)};B.matchesSelector=function(aD,aF){if((aD.ownerDocument||aD)!==H){ae(aD)}aF=aF.replace(z,"='$1']");if(ay.matchesSelector&&an&&(!aw||!aw.test(aF))&&(!ai||!ai.test(aF))){try{var i=k.call(aD,aF);if(i||ay.disconnectedMatch||aD.document&&aD.document.nodeType!==11){return i}}catch(aE){}}return B(aF,H,null,[aD]).length>0};B.contains=function(e,i){if((e.ownerDocument||e)!==H){ae(e)}return K(e,i)};B.attr=function(aD,e){if((aD.ownerDocument||aD)!==H){ae(aD)}var i=t.attrHandle[e.toLowerCase()],aE=i&&T.call(t.attrHandle,e.toLowerCase())?i(aD,e,!an):undefined;return aE!==undefined?aE:ay.attributes||!an?aD.getAttribute(e):(aE=aD.getAttributeNode(e))&&aE.specified?aE.value:null};B.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};B.uniqueSort=function(aE){var aF,aG=[],e=0,aD=0;ac=!ay.detectDuplicates;N=!ay.sortStable&&aE.slice(0);aE.sort(J);if(ac){while((aF=aE[aD++])){if(aF===aE[aD]){e=aG.push(aD)}}while(e--){aE.splice(aG[e],1)}}N=null;return aE};M=B.getText=function(aG){var aF,aD="",aE=0,e=aG.nodeType;if(!e){while((aF=aG[aE++])){aD+=M(aF)}}else{if(e===1||e===9||e===11){if(typeof aG.textContent==="string"){return aG.textContent}else{for(aG=aG.firstChild;aG;aG=aG.nextSibling){aD+=M(aG)}}}else{if(e===3||e===4){return aG.nodeValue}}}return aD};t=B.selectors={cacheLength:50,createPseudo:p,match:ah,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){e[1]=e[1].replace(y,ak);e[3]=(e[4]||e[5]||"").replace(y,ak);if(e[2]==="~="){e[3]=" "+e[3]+" "}return e.slice(0,4)},CHILD:function(e){e[1]=e[1].toLowerCase();if(e[1].slice(0,3)==="nth"){if(!e[3]){B.error(e[0])}e[4]=+(e[4]?e[5]+(e[6]||1):2*(e[3]==="even"||e[3]==="odd"));e[5]=+((e[7]+e[8])||e[3]==="odd")}else{if(e[3]){B.error(e[0])}}return e},PSEUDO:function(i){var e,aD=!i[5]&&i[2];if(ah.CHILD.test(i[0])){return null}if(i[3]&&i[4]!==undefined){i[2]=i[4]}else{if(aD&&X.test(aD)&&(e=n(aD,true))&&(e=aD.indexOf(")",aD.length-e)-aD.length)){i[0]=i[0].slice(0,e);i[2]=aD.slice(0,e)}}return i.slice(0,3)}},filter:{TAG:function(i){var e=i.replace(y,ak).toLowerCase();return i==="*"?function(){return true}:function(aD){return aD.nodeName&&aD.nodeName.toLowerCase()===e}},CLASS:function(e){var i=d[e+" "];return i||(i=new RegExp("(^|"+v+")"+e+"("+v+"|$)"))&&d(e,function(aD){return i.test(typeof aD.className==="string"&&aD.className||typeof aD.getAttribute!==au&&aD.getAttribute("class")||"")})},ATTR:function(aD,i,e){return function(aF){var aE=B.attr(aF,aD);if(aE==null){return i==="!="}if(!i){return true}aE+="";return i==="="?aE===e:i==="!="?aE!==e:i==="^="?e&&aE.indexOf(e)===0:i==="*="?e&&aE.indexOf(e)>-1:i==="$="?e&&aE.slice(-e.length)===e:i==="~="?(" "+aE+" ").indexOf(e)>-1:i==="|="?aE===e||aE.slice(0,e.length+1)===e+"-":false}},CHILD:function(i,aF,aE,aG,aD){var aI=i.slice(0,3)!=="nth",e=i.slice(-4)!=="last",aH=aF==="of-type";return aG===1&&aD===0?function(aJ){return !!aJ.parentNode}:function(aP,aN,aS){var aJ,aV,aQ,aU,aR,aM,aO=aI!==e?"nextSibling":"previousSibling",aT=aP.parentNode,aL=aH&&aP.nodeName.toLowerCase(),aK=!aS&&!aH;if(aT){if(aI){while(aO){aQ=aP;while((aQ=aQ[aO])){if(aH?aQ.nodeName.toLowerCase()===aL:aQ.nodeType===1){return false}}aM=aO=i==="only"&&!aM&&"nextSibling"}return true}aM=[e?aT.firstChild:aT.lastChild];if(e&&aK){aV=aT[ap]||(aT[ap]={});aJ=aV[i]||[];aR=aJ[0]===az&&aJ[1];aU=aJ[0]===az&&aJ[2];aQ=aR&&aT.childNodes[aR];while((aQ=++aR&&aQ&&aQ[aO]||(aU=aR=0)||aM.pop())){if(aQ.nodeType===1&&++aU&&aQ===aP){aV[i]=[az,aR,aU];break}}}else{if(aK&&(aJ=(aP[ap]||(aP[ap]={}))[i])&&aJ[0]===az){aU=aJ[1]}else{while((aQ=++aR&&aQ&&aQ[aO]||(aU=aR=0)||aM.pop())){if((aH?aQ.nodeName.toLowerCase()===aL:aQ.nodeType===1)&&++aU){if(aK){(aQ[ap]||(aQ[ap]={}))[i]=[az,aU]}if(aQ===aP){break}}}}}aU-=aD;return aU===aG||(aU%aG===0&&aU/aG>=0)}}},PSEUDO:function(aE,aD){var e,i=t.pseudos[aE]||t.setFilters[aE.toLowerCase()]||B.error("unsupported pseudo: "+aE);if(i[ap]){return i(aD)}if(i.length>1){e=[aE,aE,"",aD];return t.setFilters.hasOwnProperty(aE.toLowerCase())?p(function(aH,aJ){var aG,aF=i(aH,aD),aI=aF.length;while(aI--){aG=j.call(aH,aF[aI]);aH[aG]=!(aJ[aG]=aF[aI])}}):function(aF){return i(aF,0,e)}}return i}},pseudos:{not:p(function(e){var i=[],aD=[],aE=ab(e.replace(x,"$1"));return aE[ap]?p(function(aG,aL,aJ,aH){var aK,aF=aE(aG,null,aH,[]),aI=aG.length;while(aI--){if((aK=aF[aI])){aG[aI]=!(aL[aI]=aK)}}}):function(aH,aG,aF){i[0]=aH;aE(i,null,aF,aD);return !aD.pop()}}),has:p(function(e){return function(i){return B(e,i).length>0}}),contains:p(function(e){return function(i){return(i.textContent||i.innerText||M(i)).indexOf(e)>-1}}),lang:p(function(e){if(!Z.test(e||"")){B.error("unsupported lang: "+e)}e=e.replace(y,ak).toLowerCase();return function(aD){var i;do{if((i=an?aD.lang:aD.getAttribute("xml:lang")||aD.getAttribute("lang"))){i=i.toLowerCase();return i===e||i.indexOf(e+"-")===0}}while((aD=aD.parentNode)&&aD.nodeType===1);return false}}),target:function(e){var i=av.location&&av.location.hash;return i&&i.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===false},disabled:function(e){return e.disabled===true},checked:function(e){var i=e.nodeName.toLowerCase();return(i==="input"&&!!e.checked)||(i==="option"&&!!e.selected)},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeType<6){return false}}return true},parent:function(e){return !t.pseudos.empty(e)},header:function(e){return r.test(e.nodeName)},input:function(e){return h.test(e.nodeName)},button:function(i){var e=i.nodeName.toLowerCase();return e==="input"&&i.type==="button"||e==="button"},text:function(i){var e;return i.nodeName.toLowerCase()==="input"&&i.type==="text"&&((e=i.getAttribute("type"))==null||e.toLowerCase()==="text")},first:am(function(){return[0]}),last:am(function(e,i){return[i-1]}),eq:am(function(e,aD,i){return[i<0?i+aD:i]}),even:am(function(e,aE){var aD=0;for(;aD=0;){e.push(aD)}return e}),gt:am(function(e,aF,aE){var aD=aE<0?aE+aF:aE;for(;++aD1?function(aG,aF,aD){var aE=e.length;while(aE--){if(!e[aE](aG,aF,aD)){return false}}return true}:e[0]}function E(aD,aG,aF){var aE=0,e=aG.length;for(;aE-1){aR[aT]=!(aO[aT]=aL)}}}}else{aN=af(aN===aO?aN.splice(aI,aN.length):aN);if(aG){aG(null,aO,aN,aQ)}else{b.apply(aO,aN)}}})}function aq(aI){var aD,aG,aE,aH=aI.length,aL=t.relative[aI[0].type],aM=aL||t.relative[" "],aF=aL?1:0,aJ=w(function(i){return i===aD},aM,true),aK=w(function(i){return j.call(aD,i)>-1},aM,true),e=[function(aO,aN,i){return(!aL&&(i||aN!==aC))||((aD=aN).nodeType?aJ(aO,aN,i):aK(aO,aN,i))}];for(;aF1&&aB(e),aF>1&&o(aI.slice(0,aF-1).concat({value:aI[aF-2].type===" "?"*":""})).replace(x,"$1"),aG,aF0,aF=aE.length>0,i=function(aP,aJ,aO,aN,aS){var aK,aL,aQ,aU=0,aM="0",aG=aP&&[],aV=[],aT=aC,aI=aP||aF&&t.find.TAG("*",aS),aH=(az+=aT==null?1:Math.random()||0.1),aR=aI.length;if(aS){aC=aJ!==H&&aJ}for(;aM!==aR&&(aK=aI[aM])!=null;aM++){if(aF&&aK){aL=0;while((aQ=aE[aL++])){if(aQ(aK,aJ,aO)){aN.push(aK);break}}if(aS){az=aH}}if(e){if((aK=!aQ&&aK)){aU--}if(aP){aG.push(aK)}}}aU+=aM;if(e&&aM!==aU){aL=0;while((aQ=aD[aL++])){aQ(aG,aV,aJ,aO)}if(aP){if(aU>0){while(aM--){if(!(aG[aM]||aV[aM])){aV[aM]=at.call(aN)}}}aV=af(aV)}b.apply(aN,aV);if(aS&&!aP&&aV.length>0&&(aU+aD.length)>1){B.uniqueSort(aN)}}if(aS){az=aH;aC=aT}return aG};return e?p(i):i}ab=B.compile=function(e,aE){var aF,aD=[],aH=[],aG=L[e+" "];if(!aG){if(!aE){aE=n(e)}aF=aE.length;while(aF--){aG=aq(aE[aF]);if(aG[ap]){aD.push(aG)}else{aH.push(aG)}}aG=L(e,ad(aH,aD));aG.selector=e}return aG};ax=B.select=function(aE,e,aF,aI){var aG,aL,aD,aM,aJ,aK=typeof aE==="function"&&aE,aH=!aI&&n((aE=aK.selector||aE));aF=aF||[];if(aH.length===1){aL=aH[0]=aH[0].slice(0);if(aL.length>2&&(aD=aL[0]).type==="ID"&&ay.getById&&e.nodeType===9&&an&&t.relative[aL[1].type]){e=(t.find.ID(aD.matches[0].replace(y,ak),e)||[])[0];if(!e){return aF}else{if(aK){e=e.parentNode}}aE=aE.slice(aL.shift().value.length)}aG=ah.needsContext.test(aE)?0:aL.length;while(aG--){aD=aL[aG];if(t.relative[(aM=aD.type)]){break}if((aJ=t.find[aM])){if((aI=aJ(aD.matches[0].replace(y,ak),ag.test(aL[0].type)&&Y(e.parentNode)||e))){aL.splice(aG,1);aE=aI.length&&o(aL);if(!aE){b.apply(aF,aI);return aF}break}}}}(aK||ab(aE,aH))(aI,e,!an,aF,ag.test(aE)&&Y(e.parentNode)||e);return aF};ay.sortStable=ap.split("").sort(J).join("")===ap;ay.detectDuplicates=!!ac;ae();ay.sortDetached=l(function(e){return e.compareDocumentPosition(H.createElement("div"))&1});if(!l(function(e){e.innerHTML="";return e.firstChild.getAttribute("href")==="#"})){aA("type|href|height|width",function(i,e,aD){if(!aD){return i.getAttribute(e,e.toLowerCase()==="type"?1:2)}})}if(!ay.attributes||!l(function(e){e.innerHTML="";e.firstChild.setAttribute("value","");return e.firstChild.getAttribute("value")===""})){aA("value",function(i,e,aD){if(!aD&&i.nodeName.toLowerCase()==="input"){return i.defaultValue}})}if(!l(function(e){return e.getAttribute("disabled")==null})){aA(c,function(i,e,aE){var aD;if(!aE){return i[e]===true?e.toLowerCase():(aD=i.getAttributeNode(e))&&aD.specified?aD.value:null}})}if(typeof define==="function"&&define.amd){define(function(){return B})}else{if(typeof module!=="undefined"&&module.exports){module.exports=B}else{av.Sizzle=B}}})(window);(function(){if(typeof Sizzle!=="undefined"){return}if(typeof define!=="undefined"&&define.amd){window.Sizzle=Prototype._actual_sizzle;window.define=Prototype._original_define;delete Prototype._actual_sizzle;delete Prototype._original_define}else{if(typeof module!=="undefined"&&module.exports){window.Sizzle=module.exports;module.exports={}}}})();(function(c){var d=Prototype.Selector.extendElements;function a(e,f){return d(c(e,f||document))}function b(f,e){return c.matches(e,[f]).length==1}Prototype.Selector.engine=c;Prototype.Selector.select=a;Prototype.Selector.match=b})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;var Form={reset:function(a){a=$(a);a.reset();return a},serializeElements:function(h,d){if(typeof d!="object"){d={hash:!!d}}else{if(Object.isUndefined(d.hash)){d.hash=true}}var e,g,a=false,f=d.submit,b,c;if(d.hash){c={};b=function(i,j,k){if(j in i){if(!Object.isArray(i[j])){i[j]=[i[j]]}i[j]=i[j].concat(k)}else{i[j]=k}return i}}else{c="";b=function(i,k,j){if(!Object.isArray(j)){j=[j]}if(!j.length){return i}var l=encodeURIComponent(k).gsub(/%20/,"+");return i+(i?"&":"")+j.map(function(m){m=m.gsub(/(\r)?\n/,"\r\n");m=encodeURIComponent(m);m=m.gsub(/%20/,"+");return l+"="+m}).join("&")}}return h.inject(c,function(i,j){if(!j.disabled&&j.name){e=j.name;g=$(j).getValue();if(g!=null&&j.type!="file"&&(j.type!="submit"||(!a&&f!==false&&(!f||e==f)&&(a=true)))){i=b(i,e,g)}}return i})}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(e){var f=$(e).getElementsByTagName("*");var d,c=[],b=Form.Element.Serializers;for(var a=0;d=f[a];a++){if(b[d.tagName.toLowerCase()]){c.push(Element.extend(d))}}return c},getInputs:function(g,c,d){g=$(g);var a=g.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var e=0,h=[],f=a.length;e=0}).sortBy(function(d){return d.tabIndex}).first();return a?a:c.find(function(d){return/^(?:input|select|textarea)$/i.test(d.tagName)})},focusFirstElement:function(b){b=$(b);var a=b.findFirstElement();if(a){a.activate()}return b},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams()}Object.extend(a.parameters,d)}if(b.hasAttribute("method")&&!a.method){a.method=b.method}return new Ajax.Request(c,a)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!(/^(?:button|reset|submit)$/i.test(a.type)))){a.select()}}catch(b){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers=(function(){function b(h,i){switch(h.type.toLowerCase()){case"checkbox":case"radio":return f(h,i);default:return e(h,i)}}function f(h,i){if(Object.isUndefined(i)){return h.checked?h.value:null}else{h.checked=!!i}}function e(h,i){if(Object.isUndefined(i)){return h.value}else{h.value=i}}function a(k,n){if(Object.isUndefined(n)){return(k.type==="select-one"?c:d)(k)}var j,l,o=!Object.isArray(n);for(var h=0,m=k.length;h=0?g(i.options[h]):null}function d(l){var h,m=l.length;if(!m){return null}for(var k=0,h=[];k=this.offset[1]&&c=this.offset[0]&&a=this.offset[1]&&this.ycomp=this.offset[0]&&this.xcomp0})._each(b,a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);(function(){window.Selector=Class.create({initialize:function(a){this.expression=a.strip()},findElements:function(a){return Prototype.Selector.select(this.expression,a)},match:function(a){return Prototype.Selector.match(a,this.expression)},toString:function(){return this.expression},inspect:function(){return"#"}});Object.extend(Selector,{matchElements:function(f,g){var a=Prototype.Selector.match,d=[];for(var c=0,e=f.length;c"}catch(n){}var r=i.firstChild||null;if(r&&r.tagName.toUpperCase()!=e&&(r=r.getElementsByTagName(e)[0]),r||(r=document.createElement(e)),r){if(arguments[1])if(this._isStringOrNumber(arguments[1])||arguments[1]instanceof Array||arguments[1].tagName)this._children(r,arguments[1]);else{var s=this._attributes(arguments[1]);if(s.length){try{i.innerHTML="<"+e+" "+s+">"}catch(n){}if(r=i.firstChild||null,!r){r=document.createElement(e);for(attr in arguments[1])r["class"==attr?"className":attr]=arguments[1][attr]}r.tagName.toUpperCase()!=e&&(r=i.getElementsByTagName(e)[0])}}return arguments[2]&&this._children(r,arguments[2]),$(r)}},_text:function(e){return document.createTextNode(e)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(e){var t=[];for(attribute in e)t.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+(""+e[attribute]).escapeHTML().gsub(/"/,""")+'"');return t.join(" ")},_children:function(e,t){return t.tagName?(e.appendChild(t),void 0):("object"==typeof t?t.flatten().each(function(t){"object"==typeof t?e.appendChild(t):Builder._isStringOrNumber(t)&&e.appendChild(Builder._text(t))}):Builder._isStringOrNumber(t)&&e.appendChild(Builder._text(t)),void 0)},_isStringOrNumber:function(e){return"string"==typeof e||"number"==typeof e},build:function(e){var t=this.node("div");return $(t).update(e.strip()),t.down()},dump:function(e){"object"!=typeof e&&"function"!=typeof e&&(e=window);var t="A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR".split(/\s+/);t.each(function(t){e[t]=function(){return Builder.node.apply(Builder,[t].concat($A(arguments)))}})}};smokeping-2.7.3/htdocs/js/scriptaculous/controls.js000066400000000000000000000510271342220157600225270ustar00rootroot00000000000000if("undefined"==typeof Effect)throw"controls.js requires including script.aculo.us' effects.js library";var Autocompleter={};Autocompleter.Base=Class.create({baseInitialize:function(e,t,i){e=$(e),this.element=e,this.update=$(t),this.hasFocus=!1,this.changed=!1,this.active=!1,this.index=0,this.entryCount=0,this.oldElementValue=this.element.value,this.setOptions?this.setOptions(i):this.options=i||{},this.options.paramName=this.options.paramName||this.element.name,this.options.tokens=this.options.tokens||[],this.options.frequency=this.options.frequency||.4,this.options.minChars=this.options.minChars||1,this.options.onShow=this.options.onShow||function(e,t){t.style.position&&"absolute"!=t.style.position||(t.style.position="absolute",Position.clone(e,t,{setHeight:!1,offsetTop:e.offsetHeight})),Effect.Appear(t,{duration:.15})},this.options.onHide=this.options.onHide||function(e,t){new Effect.Fade(t,{duration:.15})},"string"==typeof this.options.tokens&&(this.options.tokens=Array(this.options.tokens)),this.options.tokens.include("\n")||this.options.tokens.push("\n"),this.observer=null,this.element.setAttribute("autocomplete","off"),Element.hide(this.update),Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this)),Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))},show:function(){"none"==Element.getStyle(this.update,"display")&&this.options.onShow(this.element,this.update),!this.iefix&&Prototype.Browser.IE&&"absolute"==Element.getStyle(this.update,"position")&&(new Insertion.After(this.update,''),this.iefix=$(this.update.id+"_iefix")),this.iefix&&setTimeout(this.fixIEOverlapping.bind(this),50)},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:!this.update.style.height}),this.iefix.style.zIndex=1,this.update.style.zIndex=2,Element.show(this.iefix)},hide:function(){this.stopIndicator(),"none"!=Element.getStyle(this.update,"display")&&this.options.onHide(this.element,this.update),this.iefix&&Element.hide(this.iefix)},startIndicator:function(){this.options.indicator&&Element.show(this.options.indicator)},stopIndicator:function(){this.options.indicator&&Element.hide(this.options.indicator)},onKeyPress:function(e){if(this.active)switch(e.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry(),Event.stop(e);case Event.KEY_ESC:return this.hide(),this.active=!1,Event.stop(e),void 0;case Event.KEY_LEFT:case Event.KEY_RIGHT:return;case Event.KEY_UP:return this.markPrevious(),this.render(),Event.stop(e),void 0;case Event.KEY_DOWN:return this.markNext(),this.render(),Event.stop(e),void 0}else if(e.keyCode==Event.KEY_TAB||e.keyCode==Event.KEY_RETURN||Prototype.Browser.WebKit>0&&0==e.keyCode)return;this.changed=!0,this.hasFocus=!0,this.observer&&clearTimeout(this.observer),this.observer=setTimeout(this.onObserverEvent.bind(this),1e3*this.options.frequency)},activate:function(){this.changed=!1,this.hasFocus=!0,this.getUpdatedChoices()},onHover:function(e){var t=Event.findElement(e,"LI");this.index!=t.autocompleteIndex&&(this.index=t.autocompleteIndex,this.render()),Event.stop(e)},onClick:function(e){var t=Event.findElement(e,"LI");this.index=t.autocompleteIndex,this.selectEntry(),this.hide()},onBlur:function(){setTimeout(this.hide.bind(this),250),this.hasFocus=!1,this.active=!1},render:function(){if(this.entryCount>0){for(var e=0;this.entryCount>e;e++)this.index==e?Element.addClassName(this.getEntry(e),"selected"):Element.removeClassName(this.getEntry(e),"selected");this.hasFocus&&(this.show(),this.active=!0)}else this.active=!1,this.hide()},markPrevious:function(){this.index>0?this.index--:this.index=this.entryCount-1,this.getEntry(this.index).scrollIntoView(!0)},markNext:function(){this.index0&&(t=Element.collectTextNodes(i[0],this.options.select))}else t=Element.collectTextNodesIgnoreClass(e,"informal");var n=this.getTokenBounds();if(-1!=n[0]){var r=this.element.value.substr(0,n[0]),s=this.element.value.substr(n[0]).match(/^\s+/);s&&(r+=s[0]),this.element.value=r+t+this.element.value.substr(n[1])}else this.element.value=t;this.oldElementValue=this.element.value,this.element.focus(),this.options.afterUpdateElement&&this.options.afterUpdateElement(this.element,e)},updateChoices:function(e){if(!this.changed&&this.hasFocus){if(this.update.innerHTML=e,Element.cleanWhitespace(this.update),Element.cleanWhitespace(this.update.down()),this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;for(var t=0;this.entryCount>t;t++){var i=this.getEntry(t);i.autocompleteIndex=t,this.addObservers(i)}}else this.entryCount=0;this.stopIndicator(),this.index=0,1==this.entryCount&&this.options.autoSelect?(this.selectEntry(),this.hide()):this.render()}},addObservers:function(e){Event.observe(e,"mouseover",this.onHover.bindAsEventListener(this)),Event.observe(e,"click",this.onClick.bindAsEventListener(this))},onObserverEvent:function(){this.changed=!1,this.tokenBounds=null,this.getToken().length>=this.options.minChars?this.getUpdatedChoices():(this.active=!1,this.hide()),this.oldElementValue=this.element.value},getToken:function(){var e=this.getTokenBounds();return this.element.value.substring(e[0],e[1]).strip()},getTokenBounds:function(){if(null!=this.tokenBounds)return this.tokenBounds;var e=this.element.value;if(e.strip().empty())return[-1,0];for(var t,i=arguments.callee.getFirstDifferencePos(e,this.oldElementValue),n=i==this.oldElementValue.length?1:0,r=-1,s=e.length,o=0,a=this.options.tokens.length;a>o;++o)t=e.lastIndexOf(this.options.tokens[o],i+n-1),t>r&&(r=t),t=e.indexOf(this.options.tokens[o],i+n),-1!=t&&s>t&&(s=t);return this.tokenBounds=[r+1,s]}}),Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(e,t){for(var i=Math.min(e.length,t.length),n=0;i>n;++n)if(e[n]!=t[n])return n;return i},Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(e,t,i,n){this.baseInitialize(e,t,n),this.options.asynchronous=!0,this.options.onComplete=this.onComplete.bind(this),this.options.defaultParams=this.options.parameters||null,this.url=i},getUpdatedChoices:function(){this.startIndicator();var e=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,e):e,this.options.defaultParams&&(this.options.parameters+="&"+this.options.defaultParams),new Ajax.Request(this.url,this.options)},onComplete:function(e){this.updateChoices(e.responseText)}}),Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(e,t,i,n){this.baseInitialize(e,t,n),this.options.array=i},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))},setOptions:function(e){this.options=Object.extend({choices:10,partialSearch:!0,partialChars:2,ignoreCase:!0,fullSearch:!1,selector:function(e){for(var t=[],i=[],n=e.getToken(),r=0;e.options.array.length>r&&t.length"+s.substr(0,n.length)+""+s.substr(n.length)+"");break}if(n.length>=e.options.partialChars&&e.options.partialSearch&&-1!=o&&(e.options.fullSearch||/\s/.test(s.substr(o-1,1)))){i.push("
  • "+s.substr(0,o)+""+s.substr(o,n.length)+""+s.substr(o+n.length)+"
  • ");break}o=e.options.ignoreCase?s.toLowerCase().indexOf(n.toLowerCase(),o+1):s.indexOf(n,o+1)}return i.length&&(t=t.concat(i.slice(0,e.options.choices-t.length))),"
      "+t.join("")+"
    "}},e||{})}}),Field.scrollFreeActivate=function(e){setTimeout(function(){Field.activate(e)},1)},Ajax.InPlaceEditor=Class.create({initialize:function(e,t,i){this.url=t,this.element=e=$(e),this.prepareOptions(),this._controls={},arguments.callee.dealWithDeprecatedOptions(i),Object.extend(this.options,i||{}),!this.options.formId&&this.element.id&&(this.options.formId=this.element.id+"-inplaceeditor",$(this.options.formId)&&(this.options.formId="")),this.options.externalControl&&(this.options.externalControl=$(this.options.externalControl)),this.options.externalControl||(this.options.externalControlOnly=!1),this._originalBackground=this.element.getStyle("background-color")||"transparent",this.element.title=this.options.clickToEditText,this._boundCancelHandler=this.handleFormCancellation.bind(this),this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this),this._boundFailureHandler=this.handleAJAXFailure.bind(this),this._boundSubmitHandler=this.handleFormSubmission.bind(this),this._boundWrapperHandler=this.wrapUp.bind(this),this.registerListeners()},checkForEscapeOrReturn:function(e){!this._editing||e.ctrlKey||e.altKey||e.shiftKey||(Event.KEY_ESC==e.keyCode?this.handleFormCancellation(e):Event.KEY_RETURN==e.keyCode&&this.handleFormSubmission(e))},createControl:function(e,t,i){var n=this.options[e+"Control"],r=this.options[e+"Text"];if("button"==n){var s=document.createElement("input");s.type="submit",s.value=r,s.className="editor_"+e+"_button","cancel"==e&&(s.onclick=this._boundCancelHandler),this._form.appendChild(s),this._controls[e]=s}else if("link"==n){var o=document.createElement("a");o.href="#",o.appendChild(document.createTextNode(r)),o.onclick="cancel"==e?this._boundCancelHandler:this._boundSubmitHandler,o.className="editor_"+e+"_link",i&&(o.className+=" "+i),this._form.appendChild(o),this._controls[e]=o}},createEditField:function(){var e,t=this.options.loadTextURL?this.options.loadingText:this.getText();if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){e=document.createElement("input"),e.type="text";var i=this.options.size||this.options.cols||0;i>0&&(e.size=i)}else e=document.createElement("textarea"),e.rows=1>=this.options.rows?this.options.autoRows:this.options.rows,e.cols=this.options.cols||40;e.name=this.options.paramName,e.value=t,e.className="editor_field",this.options.submitOnBlur&&(e.onblur=this._boundSubmitHandler),this._controls.editor=e,this.options.loadTextURL&&this.loadExternalText(),this._form.appendChild(this._controls.editor)},createForm:function(){function e(e,i){var n=t.options["text"+e+"Controls"];n&&i!==!1&&t._form.appendChild(document.createTextNode(n))}var t=this;this._form=$(document.createElement("form")),this._form.id=this.options.formId,this._form.addClassName(this.options.formClassName),this._form.onsubmit=this._boundSubmitHandler,this.createEditField(),"textarea"==this._controls.editor.tagName.toLowerCase()&&this._form.appendChild(document.createElement("br")),this.options.onFormCustomization&&this.options.onFormCustomization(this,this._form),e("Before",this.options.okControl||this.options.cancelControl),this.createControl("ok",this._boundSubmitHandler),e("Between",this.options.okControl&&this.options.cancelControl),this.createControl("cancel",this._boundCancelHandler,"editor_cancel"),e("After",this.options.okControl||this.options.cancelControl)},destroy:function(){this._oldInnerHTML&&(this.element.innerHTML=this._oldInnerHTML),this.leaveEditMode(),this.unregisterListeners()},enterEditMode:function(e){this._saving||this._editing||(this._editing=!0,this.triggerCallback("onEnterEditMode"),this.options.externalControl&&this.options.externalControl.hide(),this.element.hide(),this.createForm(),this.element.parentNode.insertBefore(this._form,this.element),this.options.loadTextURL||this.postProcessEditField(),e&&Event.stop(e))},enterHover:function(){this.options.hoverClassName&&this.element.addClassName(this.options.hoverClassName),this._saving||this.triggerCallback("onEnterHover")},getText:function(){return this.element.innerHTML.unescapeHTML()},handleAJAXFailure:function(e){this.triggerCallback("onFailure",e),this._oldInnerHTML&&(this.element.innerHTML=this._oldInnerHTML,this._oldInnerHTML=null)},handleFormCancellation:function(e){this.wrapUp(),e&&Event.stop(e)},handleFormSubmission:function(e){var t=this._form,i=$F(this._controls.editor);this.prepareSubmission();var n=this.options.callback(t,i)||"";if(Object.isString(n)&&(n=n.toQueryParams()),n.editorId=this.element.id,this.options.htmlResponse){var r=Object.extend({evalScripts:!0},this.options.ajaxOptions);Object.extend(r,{parameters:n,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler}),new Ajax.Updater({success:this.element},this.url,r)}else{var r=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(r,{parameters:n,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler}),new Ajax.Request(this.url,r)}e&&Event.stop(e)},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName),this.removeForm(),this.leaveHover(),this.element.style.backgroundColor=this._originalBackground,this.element.show(),this.options.externalControl&&this.options.externalControl.show(),this._saving=!1,this._editing=!1,this._oldInnerHTML=null,this.triggerCallback("onLeaveEditMode")},leaveHover:function(){this.options.hoverClassName&&this.element.removeClassName(this.options.hoverClassName),this._saving||this.triggerCallback("onLeaveHover")},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName),this._controls.editor.disabled=!0;var e=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(e,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(e){this._form.removeClassName(this.options.loadingClassName);var t=e.responseText;this.options.stripLoadedTextTags&&(t=t.stripTags()),this._controls.editor.value=t,this._controls.editor.disabled=!1,this.postProcessEditField()}.bind(this),onFailure:this._boundFailureHandler}),new Ajax.Request(this.options.loadTextURL,e)},postProcessEditField:function(){var e=this.options.fieldPostCreation;e&&$(this._controls.editor)["focus"==e?"focus":"activate"]()},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions),Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks),[this._extraDefaultOptions].flatten().compact().each(function(e){Object.extend(this.options,e)}.bind(this))},prepareSubmission:function(){this._saving=!0,this.removeForm(),this.leaveHover(),this.showSaving()},registerListeners:function(){this._listeners={};var e;$H(Ajax.InPlaceEditor.Listeners).each(function(t){e=this[t.value].bind(this),this._listeners[t.key]=e,this.options.externalControlOnly||this.element.observe(t.key,e),this.options.externalControl&&this.options.externalControl.observe(t.key,e)}.bind(this))},removeForm:function(){this._form&&(this._form.remove(),this._form=null,this._controls={})},showSaving:function(){this._oldInnerHTML=this.element.innerHTML,this.element.innerHTML=this.options.savingText,this.element.addClassName(this.options.savingClassName),this.element.style.backgroundColor=this._originalBackground,this.element.show()},triggerCallback:function(e,t){"function"==typeof this.options[e]&&this.options[e](this,t)},unregisterListeners:function(){$H(this._listeners).each(function(e){this.options.externalControlOnly||this.element.stopObserving(e.key,e.value),this.options.externalControl&&this.options.externalControl.stopObserving(e.key,e.value)}.bind(this))},wrapUp:function(e){this.leaveEditMode(),this._boundComplete(e,this.element)}}),Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy}),Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function(e,t,i,n){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions,e(t,i,n)},createEditField:function(){var e=document.createElement("select");e.name=this.options.paramName,e.size=1,this._controls.editor=e,this._collection=this.options.collection||[],this.options.loadCollectionURL?this.loadCollection():this.checkForExternalText(),this._form.appendChild(this._controls.editor)},loadCollection:function(){this._form.addClassName(this.options.loadingClassName),this.showLoadingText(this.options.loadingCollectionText);var options=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js))throw"Server returned an invalid collection representation.";this._collection=eval(js),this.checkForExternalText()}.bind(this),onFailure:this.onFailure}),new Ajax.Request(this.options.loadCollectionURL,options)},showLoadingText:function(e){this._controls.editor.disabled=!0;var t=this._controls.editor.firstChild;t||(t=document.createElement("option"),t.value="",this._controls.editor.appendChild(t),t.selected=!0),t.update((e||"").stripScripts().stripTags())},checkForExternalText:function(){this._text=this.getText(),this.options.loadTextURL?this.loadExternalText():this.buildOptionList()},loadExternalText:function(){this.showLoadingText(this.options.loadingText);var e=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(e,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(e){this._text=e.responseText.strip(),this.buildOptionList()}.bind(this),onFailure:this.onFailure}),new Ajax.Request(this.options.loadTextURL,e)},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName),this._collection=this._collection.map(function(e){return 2===e.length?e:[e,e].flatten()});var e="value"in this.options?this.options.value:this._text,t=this._collection.any(function(t){return t[0]==e}.bind(this));this._controls.editor.update("");var i;this._collection.each(function(n,r){i=document.createElement("option"),i.value=n[0],i.selected=t?n[0]==e:0==r,i.appendChild(document.createTextNode(n[1])),this._controls.editor.appendChild(i)}.bind(this)),this._controls.editor.disabled=!1,Field.scrollFreeActivate(this._controls.editor)}}),Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(e){function t(t,i){t in e||void 0===i||(e[t]=i)}e&&(t("cancelControl",e.cancelLink?"link":e.cancelButton?"button":0==(e.cancelLink==e.cancelButton)?!1:void 0),t("okControl",e.okLink?"link":e.okButton?"button":0==(e.okLink==e.okButton)?!1:void 0),t("highlightColor",e.highlightcolor),t("highlightEndColor",e.highlightendcolor))},Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:!1,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:!0,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:!1,submitOnBlur:!1,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(e){return Form.serialize(e)},onComplete:function(e,t){new Effect.Highlight(t,{startcolor:this.options.highlightColor,keepBackgroundImage:!0})},onEnterEditMode:null,onEnterHover:function(e){e.element.style.backgroundColor=e.options.highlightColor,e._effect&&e._effect.cancel()},onFailure:function(e){alert("Error communication with the server: "+e.responseText.stripTags())},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(e){e._effect=new Effect.Highlight(e.element,{startcolor:e.options.highlightColor,endcolor:e.options.highlightEndColor,restorecolor:e._originalBackground,keepBackgroundImage:!0})}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}}),Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."},Form.Element.DelayedObserver=Class.create({initialize:function(e,t,i){this.delay=t||.5,this.element=$(e),this.callback=i,this.timer=null,this.lastValue=$F(this.element),Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))},delayedListener:function(){this.lastValue!=$F(this.element)&&(this.timer&&clearTimeout(this.timer),this.timer=setTimeout(this.onTimerEvent.bind(this),1e3*this.delay),this.lastValue=$F(this.element))},onTimerEvent:function(){this.timer=null,this.callback(this.element,$F(this.element))}});smokeping-2.7.3/htdocs/js/scriptaculous/dragdrop.js000066400000000000000000000442361342220157600224720ustar00rootroot00000000000000if(Object.isUndefined(Effect))throw"dragdrop.js requires including script.aculo.us' effects.js library";var Droppables={drops:[],remove:function(e){this.drops=this.drops.reject(function(t){return t.element==$(e)})},add:function(e){e=$(e);var t=Object.extend({greedy:!0,hoverclass:null,tree:!1},arguments[1]||{});if(t.containment){t._containers=[];var i=t.containment;Object.isArray(i)?i.each(function(e){t._containers.push($(e))}):t._containers.push($(i))}t.accept&&(t.accept=[t.accept].flatten()),Element.makePositioned(e),t.element=e,this.drops.push(t)},findDeepestChild:function(e){for(deepest=e[0],i=1;e.length>i;++i)Element.isParent(e[i].element,deepest.element)&&(deepest=e[i]);return deepest},isContained:function(e,t){var i;return i=t.tree?e.treeNode:e.parentNode,t._containers.detect(function(e){return i==e})},isAffected:function(e,t,i){return i.element!=t&&(!i._containers||this.isContained(t,i))&&(!i.accept||Element.classNames(t).detect(function(e){return i.accept.include(e)}))&&Position.within(i.element,e[0],e[1])},deactivate:function(e){e.hoverclass&&Element.removeClassName(e.element,e.hoverclass),this.last_active=null},activate:function(e){e.hoverclass&&Element.addClassName(e.element,e.hoverclass),this.last_active=e},show:function(e,t){if(this.drops.length){var i,n=[];this.drops.each(function(i){Droppables.isAffected(e,t,i)&&n.push(i)}),n.length>0&&(i=Droppables.findDeepestChild(n)),this.last_active&&this.last_active!=i&&this.deactivate(this.last_active),i&&(Position.within(i.element,e[0],e[1]),i.onHover&&i.onHover(t,i.element,Position.overlap(i.overlap,i.element)),i!=this.last_active&&Droppables.activate(i))}},fire:function(e,t){return this.last_active?(Position.prepare(),this.isAffected([Event.pointerX(e),Event.pointerY(e)],t,this.last_active)&&this.last_active.onDrop?(this.last_active.onDrop(t,this.last_active.element,e),!0):void 0):void 0},reset:function(){this.last_active&&this.deactivate(this.last_active)}},Draggables={drags:[],observers:[],register:function(e){0==this.drags.length&&(this.eventMouseUp=this.endDrag.bindAsEventListener(this),this.eventMouseMove=this.updateDrag.bindAsEventListener(this),this.eventKeypress=this.keyPress.bindAsEventListener(this),Event.observe(document,"mouseup",this.eventMouseUp),Event.observe(document,"mousemove",this.eventMouseMove),Event.observe(document,"keypress",this.eventKeypress)),this.drags.push(e)},unregister:function(e){this.drags=this.drags.reject(function(t){return t==e}),0==this.drags.length&&(Event.stopObserving(document,"mouseup",this.eventMouseUp),Event.stopObserving(document,"mousemove",this.eventMouseMove),Event.stopObserving(document,"keypress",this.eventKeypress))},activate:function(e){e.options.delay?this._timeout=setTimeout(function(){Draggables._timeout=null,window.focus(),Draggables.activeDraggable=e}.bind(this),e.options.delay):(window.focus(),this.activeDraggable=e)},deactivate:function(){this.activeDraggable=null},updateDrag:function(e){if(this.activeDraggable){var t=[Event.pointerX(e),Event.pointerY(e)];this._lastPointer&&this._lastPointer.inspect()==t.inspect()||(this._lastPointer=t,this.activeDraggable.updateDrag(e,t))}},endDrag:function(e){this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.activeDraggable&&(this._lastPointer=null,this.activeDraggable.endDrag(e),this.activeDraggable=null)},keyPress:function(e){this.activeDraggable&&this.activeDraggable.keyPress(e)},addObserver:function(e){this.observers.push(e),this._cacheObserverCallbacks()},removeObserver:function(e){this.observers=this.observers.reject(function(t){return t.element==e}),this._cacheObserverCallbacks()},notify:function(e,t,i){this[e+"Count"]>0&&this.observers.each(function(n){n[e]&&n[e](e,t,i)}),t.options[e]&&t.options[e](t,i)},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(e){Draggables[e+"Count"]=Draggables.observers.select(function(t){return t[e]}).length})}},Draggable=Class.create({initialize:function(e){var t={handle:!1,reverteffect:function(e,t,i){var n=.02*Math.sqrt(Math.abs(2^t)+Math.abs(2^i));new Effect.Move(e,{x:-i,y:-t,duration:n,queue:{scope:"_draggable",position:"end"}})},endeffect:function(e){var t=Object.isNumber(e._opacity)?e._opacity:1;new Effect.Opacity(e,{duration:.2,from:.7,to:t,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[e]=!1}})},zindex:1e3,revert:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,snap:!1,delay:0};(!arguments[1]||Object.isUndefined(arguments[1].endeffect))&&Object.extend(t,{starteffect:function(e){e._opacity=Element.getOpacity(e),Draggable._dragging[e]=!0,new Effect.Opacity(e,{duration:.2,from:e._opacity,to:.7})}});var i=Object.extend(t,arguments[1]||{});this.element=$(e),i.handle&&Object.isString(i.handle)&&(this.handle=this.element.down("."+i.handle,0)),this.handle||(this.handle=$(i.handle)),this.handle||(this.handle=this.element),!i.scroll||i.scroll.scrollTo||i.scroll.outerHTML||(i.scroll=$(i.scroll),this._isScrollChild=Element.childOf(this.element,i.scroll)),Element.makePositioned(this.element),this.options=i,this.dragging=!1,this.eventMouseDown=this.initDrag.bindAsEventListener(this),Event.observe(this.handle,"mousedown",this.eventMouseDown),Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown),Draggables.unregister(this)},currentDelta:function(){return[parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")]},initDrag:function(e){if((Object.isUndefined(Draggable._dragging[this.element])||!Draggable._dragging[this.element])&&Event.isLeftClick(e)){var t=Event.element(e);if((tag_name=t.tagName.toUpperCase())&&("INPUT"==tag_name||"SELECT"==tag_name||"OPTION"==tag_name||"BUTTON"==tag_name||"TEXTAREA"==tag_name))return;var i=[Event.pointerX(e),Event.pointerY(e)],n=this.element.cumulativeOffset();this.offset=[0,1].map(function(e){return i[e]-n[e]}),Draggables.activate(this),Event.stop(e)}},startDrag:function(e){if(this.dragging=!0,this.delta||(this.delta=this.currentDelta()),this.options.zindex&&(this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex),this.options.ghosting&&(this._clone=this.element.cloneNode(!0),this._originallyAbsolute="absolute"==this.element.getStyle("position"),this._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element)),this.options.scroll)if(this.options.scroll==window){var t=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=t.left,this.originalScrollTop=t.top}else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,e),this.options.starteffect&&this.options.starteffect(this.element)},updateDrag:function(event,pointer){if(this.dragging||this.startDrag(event),this.options.quiet||(Position.prepare(),Droppables.show(pointer,this.element)),Draggables.notify("onDrag",this,event),this.draw(pointer),this.options.change&&this.options.change(this),this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window)with(this._getWindowScroll(this.options.scroll))p=[left,top,left+width,top+height];else p=Position.page(this.options.scroll).toArray(),p[0]+=this.options.scroll.scrollLeft+Position.deltaX,p[1]+=this.options.scroll.scrollTop+Position.deltaY,p.push(p[0]+this.options.scroll.offsetWidth),p.push(p[1]+this.options.scroll.offsetHeight);var speed=[0,0];pointer[0]p[2]-this.options.scrollSensitivity&&(speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)),pointer[1]>p[3]-this.options.scrollSensitivity&&(speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)),this.startScrolling(speed)}Prototype.Browser.WebKit&&window.scrollBy(0,0),Event.stop(event)},finishDrag:function(e,t){if(this.dragging=!1,this.options.quiet){Position.prepare();var i=[Event.pointerX(e),Event.pointerY(e)];Droppables.show(i,this.element)}this.options.ghosting&&(this._originallyAbsolute||Position.relativize(this.element),delete this._originallyAbsolute,Element.remove(this._clone),this._clone=null);var n=!1;t&&(n=Droppables.fire(e,this.element),n||(n=!1)),n&&this.options.onDropped&&this.options.onDropped(this.element),Draggables.notify("onEnd",this,e);var r=this.options.revert;r&&Object.isFunction(r)&&(r=r(this.element));var s=this.currentDelta();r&&this.options.reverteffect?(0==n||"failure"!=r)&&this.options.reverteffect(this.element,s[1]-this.delta[1],s[0]-this.delta[0]):this.delta=s,this.options.zindex&&(this.element.style.zIndex=this.originalZ),this.options.endeffect&&this.options.endeffect(this.element),Draggables.deactivate(this),Droppables.reset()},keyPress:function(e){e.keyCode==Event.KEY_ESC&&(this.finishDrag(e,!1),Event.stop(e))},endDrag:function(e){this.dragging&&(this.stopScrolling(),this.finishDrag(e,!0),Event.stop(e))},draw:function(e){var t=this.element.cumulativeOffset();if(this.options.ghosting){var i=Position.realOffset(this.element);t[0]+=i[0]-Position.deltaX,t[1]+=i[1]-Position.deltaY}var n=this.currentDelta();t[0]-=n[0],t[1]-=n[1],this.options.scroll&&this.options.scroll!=window&&this._isScrollChild&&(t[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft,t[1]-=this.options.scroll.scrollTop-this.originalScrollTop);var r=[0,1].map(function(i){return e[i]-t[i]-this.offset[i]}.bind(this));this.options.snap&&(r=Object.isFunction(this.options.snap)?this.options.snap(r[0],r[1],this):Object.isArray(this.options.snap)?r.map(function(e,t){return(e/this.options.snap[t]).round()*this.options.snap[t]}.bind(this)):r.map(function(e){return(e/this.options.snap).round()*this.options.snap}.bind(this)));var s=this.element.style;this.options.constraint&&"horizontal"!=this.options.constraint||(s.left=r[0]+"px"),this.options.constraint&&"vertical"!=this.options.constraint||(s.top=r[1]+"px"),"hidden"==s.visibility&&(s.visibility="")},stopScrolling:function(){this.scrollInterval&&(clearInterval(this.scrollInterval),this.scrollInterval=null,Draggables._lastScrollPointer=null)},startScrolling:function(e){(e[0]||e[1])&&(this.scrollSpeed=[e[0]*this.options.scrollSpeed,e[1]*this.options.scrollSpeed],this.lastScrolled=new Date,this.scrollInterval=setInterval(this.scroll.bind(this),10))},scroll:function(){var current=new Date,delta=current-this.lastScrolled;if(this.lastScrolled=current,this.options.scroll==window){with(this._getWindowScroll(this.options.scroll))if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1e3;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}else this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1e3,this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1e3;Position.prepare(),Droppables.show(Draggables._lastPointer,this.element),Draggables.notify("onDrag",this),this._isScrollChild&&(Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer),Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1e3,Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1e3,0>Draggables._lastScrollPointer[0]&&(Draggables._lastScrollPointer[0]=0),0>Draggables._lastScrollPointer[1]&&(Draggables._lastScrollPointer[1]=0),this.draw(Draggables._lastScrollPointer)),this.options.change&&this.options.change(this)},_getWindowScroll:function(w){var T,L,W,H;with(w.document)w.document.documentElement&&documentElement.scrollTop?(T=documentElement.scrollTop,L=documentElement.scrollLeft):w.document.body&&(T=body.scrollTop,L=body.scrollLeft),w.innerWidth?(W=w.innerWidth,H=w.innerHeight):w.document.documentElement&&documentElement.clientWidth?(W=documentElement.clientWidth,H=documentElement.clientHeight):(W=body.offsetWidth,H=body.offsetHeight);return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(e,t){this.element=$(e),this.observer=t,this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark(),this.lastValue!=Sortable.serialize(this.element)&&this.observer(this.element)}}),Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(e){for(;"BODY"!=e.tagName.toUpperCase();){if(e.id&&Sortable.sortables[e.id])return e;e=e.parentNode}},options:function(e){return(e=Sortable._findRootElement($(e)))?Sortable.sortables[e.id]:void 0},destroy:function(e){e=$(e);var t=Sortable.sortables[e.id];t&&(Draggables.removeObserver(t.element),t.droppables.each(function(e){Droppables.remove(e)}),t.draggables.invoke("destroy"),delete Sortable.sortables[t.element.id])},create:function(e){e=$(e);var t=Object.extend({element:e,tag:"li",dropOnEmpty:!1,tree:!1,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:e,handle:!1,only:!1,delay:0,hoverclass:null,ghosting:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:!1,handles:!1,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(e);var i={revert:!0,quiet:t.quiet,scroll:t.scroll,scrollSpeed:t.scrollSpeed,scrollSensitivity:t.scrollSensitivity,delay:t.delay,ghosting:t.ghosting,constraint:t.constraint,handle:t.handle};t.starteffect&&(i.starteffect=t.starteffect),t.reverteffect?i.reverteffect=t.reverteffect:t.ghosting&&(i.reverteffect=function(e){e.style.top=0,e.style.left=0}),t.endeffect&&(i.endeffect=t.endeffect),t.zindex&&(i.zindex=t.zindex);var n={overlap:t.overlap,containment:t.containment,tree:t.tree,hoverclass:t.hoverclass,onHover:Sortable.onHover},r={onHover:Sortable.onEmptyHover,overlap:t.overlap,containment:t.containment,hoverclass:t.hoverclass};Element.cleanWhitespace(e),t.draggables=[],t.droppables=[],(t.dropOnEmpty||t.tree)&&(Droppables.add(e,r),t.droppables.push(e)),(t.elements||this.findElements(e,t)||[]).each(function(r,s){var o=t.handles?$(t.handles[s]):t.handle?$(r).select("."+t.handle)[0]:r;t.draggables.push(new Draggable(r,Object.extend(i,{handle:o}))),Droppables.add(r,n),t.tree&&(r.treeNode=e),t.droppables.push(r)}),t.tree&&(Sortable.findTreeElements(e,t)||[]).each(function(i){Droppables.add(i,r),i.treeNode=e,t.droppables.push(i)}),this.sortables[e.identify()]=t,Draggables.addObserver(new SortableObserver(e,t.onUpdate))},findElements:function(e,t){return Element.findChildren(e,t.only,t.tree?!0:!1,t.tag)},findTreeElements:function(e,t){return Element.findChildren(e,t.only,t.tree?!0:!1,t.treeTag)},onHover:function(e,t,i){if(!(Element.isParent(t,e)||i>.33&&.66>i&&Sortable.options(t).tree))if(i>.5){if(Sortable.mark(t,"before"),t.previousSibling!=e){var n=e.parentNode;e.style.visibility="hidden",t.parentNode.insertBefore(e,t),t.parentNode!=n&&Sortable.options(n).onChange(e),Sortable.options(t.parentNode).onChange(e)}}else{Sortable.mark(t,"after");var r=t.nextSibling||null;if(r!=e){var n=e.parentNode;e.style.visibility="hidden",t.parentNode.insertBefore(e,r),t.parentNode!=n&&Sortable.options(n).onChange(e),Sortable.options(t.parentNode).onChange(e)}}},onEmptyHover:function(e,t,i){var n=e.parentNode,r=Sortable.options(t);if(!Element.isParent(t,e)){var s,o=Sortable.findElements(t,{tag:r.tag,only:r.only}),a=null;if(o){var l=Element.offsetSize(t,r.overlap)*(1-i);for(s=0;o.length>s;s+=1){if(!(l-Element.offsetSize(o[s],r.overlap)>=0)){if(l-Element.offsetSize(o[s],r.overlap)/2>=0){a=o.length>s+1?o[s+1]:null;break}a=o[s];break}l-=Element.offsetSize(o[s],r.overlap)}}t.insertBefore(e,a),Sortable.options(n).onChange(e),r.onChange(e)}},unmark:function(){Sortable._marker&&Sortable._marker.hide()},mark:function(e,t){var i=Sortable.options(e.parentNode);if(!i||i.ghosting){Sortable._marker||(Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"}),document.getElementsByTagName("body").item(0).appendChild(Sortable._marker));var n=e.cumulativeOffset();Sortable._marker.setStyle({left:n[0]+"px",top:n[1]+"px"}),"after"==t&&("horizontal"==i.overlap?Sortable._marker.setStyle({left:n[0]+e.clientWidth+"px"}):Sortable._marker.setStyle({top:n[1]+e.clientHeight+"px"})),Sortable._marker.show()}},_tree:function(e,t,i){for(var n=Sortable.findElements(e,t)||[],r=0;n.length>r;++r){var s=n[r].id.match(t.format);if(s){var o={id:encodeURIComponent(s?s[1]:null),element:e,parent:i,children:[],position:i.children.length,container:$(n[r]).down(t.treeTag)};o.container&&this._tree(o.container,t,o),i.children.push(o)}}return i},tree:function(e){e=$(e);var t=this.options(e),i=Object.extend({tag:t.tag,treeTag:t.treeTag,only:t.only,name:e.id,format:t.format},arguments[1]||{}),n={id:null,parent:null,children:[],container:e,position:0};return Sortable._tree(e,i,n)},_constructIndex:function(e){var t="";do e.id&&(t="["+e.position+"]"+t);while(null!=(e=e.parent));return t},sequence:function(e){e=$(e);var t=Object.extend(this.options(e),arguments[1]||{});return $(this.findElements(e,t)||[]).map(function(e){return e.id.match(t.format)?e.id.match(t.format)[1]:""})},setSequence:function(e,t){e=$(e);var i=Object.extend(this.options(e),arguments[2]||{}),n={};this.findElements(e,i).each(function(e){e.id.match(i.format)&&(n[e.id.match(i.format)[1]]=[e,e.parentNode]),e.parentNode.removeChild(e)}),t.each(function(e){var t=n[e];t&&(t[1].appendChild(t[0]),delete n[e])})},serialize:function(e){e=$(e);var t=Object.extend(Sortable.options(e),arguments[1]||{}),i=encodeURIComponent(arguments[1]&&arguments[1].name?arguments[1].name:e.id);return t.tree?Sortable.tree(e,arguments[1]).children.map(function(e){return[i+Sortable._constructIndex(e)+"[id]="+encodeURIComponent(e.id)].concat(e.children.map(arguments.callee))}).flatten().join("&"):Sortable.sequence(e,arguments[1]).map(function(e){return i+"[]="+encodeURIComponent(e)}).join("&")}};Element.isParent=function(e,t){return e.parentNode&&e!=t?e.parentNode==t?!0:Element.isParent(e.parentNode,t):!1},Element.findChildren=function(e,t,i,n){if(!e.hasChildNodes())return null;n=n.toUpperCase(),t&&(t=[t].flatten());var r=[];return $A(e.childNodes).each(function(e){if(!e.tagName||e.tagName.toUpperCase()!=n||t&&!Element.classNames(e).detect(function(e){return t.include(e)})||r.push(e),i){var s=Element.findChildren(e,t,i,n);s&&r.push(s)}}),r.length>0?r.flatten():[]},Element.offsetSize=function(e,t){return e["offset"+("vertical"==t||"height"==t?"Height":"Width")]};smokeping-2.7.3/htdocs/js/scriptaculous/effects.js000066400000000000000000000567371342220157600223200ustar00rootroot00000000000000String.prototype.parseColor=function(){var e="#";if("rgb("==this.slice(0,4)){var t=this.slice(4,this.length-1).split(","),i=0;do e+=parseInt(t[i]).toColorPart();while(3>++i)}else if("#"==this.slice(0,1)){if(4==this.length)for(var i=1;4>i;i++)e+=(this.charAt(i)+this.charAt(i)).toLowerCase();7==this.length&&(e=this.toLowerCase())}return 7==e.length?e:arguments[0]||this},Element.collectTextNodes=function(e){return $A($(e).childNodes).collect(function(e){return 3==e.nodeType?e.nodeValue:e.hasChildNodes()?Element.collectTextNodes(e):""}).flatten().join("")},Element.collectTextNodesIgnoreClass=function(e,t){return $A($(e).childNodes).collect(function(e){return 3==e.nodeType?e.nodeValue:e.hasChildNodes()&&!Element.hasClassName(e,t)?Element.collectTextNodesIgnoreClass(e,t):""}).flatten().join("")},Element.setContentZoom=function(e,t){return e=$(e),e.setStyle({fontSize:t/100+"em"}),Prototype.Browser.WebKit&&window.scrollBy(0,0),e},Element.getInlineOpacity=function(e){return $(e).style.opacity||""},Element.forceRerendering=function(e){try{e=$(e);var t=document.createTextNode(" ");e.appendChild(t),e.removeChild(t)}catch(i){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(e){return-Math.cos(e*Math.PI)/2+.5},reverse:function(e){return 1-e},flicker:function(e){var e=-Math.cos(e*Math.PI)/4+.75+Math.random()/4;return e>1?1:e},wobble:function(e){return-Math.cos(e*Math.PI*9*e)/2+.5},pulse:function(e,t){return-Math.cos(2*e*((t||5)-.5)*Math.PI)/2+.5},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)},none:function(){return 0},full:function(){return 1}},DefaultOptions:{duration:1,fps:100,sync:!1,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(e){var t="position:relative";Prototype.Browser.IE&&(t+=";zoom:1"),e=$(e),$A(e.childNodes).each(function(i){3==i.nodeType&&(i.nodeValue.toArray().each(function(n){e.insertBefore(new Element("span",{style:t}).update(" "==n?String.fromCharCode(160):n),i)}),Element.remove(i))})},multiple:function(e,t){var i;i=("object"==typeof e||Object.isFunction(e))&&e.length?e:$(e).childNodes;var n=Object.extend({speed:.1,delay:0},arguments[2]||{}),r=n.delay;$A(i).each(function(e,i){new t(e,Object.extend(n,{delay:i*n.speed+r}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(e,t,i){return e=$(e),t=(t||"appear").toLowerCase(),Effect[Effect.PAIRS[t][e.visible()?1:0]](e,Object.extend({queue:{position:"end",scope:e.id||"global",limit:1}},i||{}))}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal,Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[],this.interval=null},_each:function(e){this.effects._each(e)},add:function(e){var t=(new Date).getTime(),i=Object.isString(e.options.queue)?e.options.queue:e.options.queue.position;switch(i){case"front":this.effects.findAll(function(e){return"idle"==e.state}).each(function(t){t.startOn+=e.finishOn,t.finishOn+=e.finishOn});break;case"with-last":t=this.effects.pluck("startOn").max()||t;break;case"end":t=this.effects.pluck("finishOn").max()||t}e.startOn+=t,e.finishOn+=t,(!e.options.queue.limit||this.effects.lengtht;t++)this.effects[t]&&this.effects[t].loop(e)}}),Effect.Queues={instances:$H(),get:function(e){return Object.isString(e)?this.instances.get(e)||this.instances.set(e,new Effect.ScopedQueue):e}},Effect.Queue=Effect.Queues.get("global"),Effect.Base=Class.create({position:null,start:function(e){e&&e.transition===!1&&(e.transition=Effect.Transitions.linear),this.options=Object.extend(Object.extend({},Effect.DefaultOptions),e||{}),this.currentFrame=0,this.state="idle",this.startOn=1e3*this.options.delay,this.finishOn=this.startOn+1e3*this.options.duration,this.fromToDelta=this.options.to-this.options.from,this.totalTime=this.finishOn-this.startOn,this.totalFrames=this.options.fps*this.options.duration,this.render=function(){function e(e,t){e.options[t+"Internal"]&&e.options[t+"Internal"](e),e.options[t]&&e.options[t](e)}return function(t){"idle"===this.state&&(this.state="running",e(this,"beforeSetup"),this.setup&&this.setup(),e(this,"afterSetup")),"running"===this.state&&(t=this.options.transition(t)*this.fromToDelta+this.options.from,this.position=t,e(this,"beforeUpdate"),this.update&&this.update(t),e(this,"afterUpdate"))}}(),this.event("beforeStart"),this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)},loop:function(e){if(e>=this.startOn){if(e>=this.finishOn)return this.render(1),this.cancel(),this.event("beforeFinish"),this.finish&&this.finish(),this.event("afterFinish"),void 0;var t=(e-this.startOn)/this.totalTime,i=(t*this.totalFrames).round();i>this.currentFrame&&(this.render(t),this.currentFrame=i)}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this),this.state="finished"},event:function(e){this.options[e+"Internal"]&&this.options[e+"Internal"](this),this.options[e]&&this.options[e](this)},inspect:function(){var e=$H();for(property in this)Object.isFunction(this[property])||e.set(property,this[property]);return"#"}}),Effect.Parallel=Class.create(Effect.Base,{initialize:function(e){this.effects=e||[],this.start(arguments[1])},update:function(e){this.effects.invoke("render",e)},finish:function(e){this.effects.each(function(t){t.render(1),t.cancel(),t.event("beforeFinish"),t.finish&&t.finish(e),t.event("afterFinish")})}}),Effect.Tween=Class.create(Effect.Base,{initialize:function(e,t,i){e=Object.isString(e)?$(e):e;var n=$A(arguments),r=n.last(),s=5==n.length?n[3]:null;this.method=Object.isFunction(r)?r.bind(e):Object.isFunction(e[r])?e[r].bind(e):function(t){e[r]=t},this.start(Object.extend({from:t,to:i},s||{}))},update:function(e){this.method(e)}}),Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction}),Effect.Opacity=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});var t=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(t)},update:function(e){this.element.setOpacity(e)}}),Effect.Move=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(t)},setup:function(){this.element.makePositioned(),this.originalLeft=parseFloat(this.element.getStyle("left")||"0"),this.originalTop=parseFloat(this.element.getStyle("top")||"0"),"absolute"==this.options.mode&&(this.options.x=this.options.x-this.originalLeft,this.options.y=this.options.y-this.originalTop)},update:function(e){this.element.setStyle({left:(this.options.x*e+this.originalLeft).round()+"px",top:(this.options.y*e+this.originalTop).round()+"px"})}}),Effect.MoveBy=function(e,t,i){return new Effect.Move(e,Object.extend({x:i,y:t},arguments[3]||{}))},Effect.Scale=Class.create(Effect.Base,{initialize:function(e,t){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var i=Object.extend({scaleX:!0,scaleY:!0,scaleContent:!0,scaleFromCenter:!1,scaleMode:"box",scaleFrom:100,scaleTo:t},arguments[2]||{});this.start(i)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||!1,this.elementPositioning=this.element.getStyle("position"),this.originalStyle={},["top","left","width","height","fontSize"].each(function(e){this.originalStyle[e]=this.element.style[e]}.bind(this)),this.originalTop=this.element.offsetTop,this.originalLeft=this.element.offsetLeft;var e=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(t){e.indexOf(t)>0&&(this.fontSize=parseFloat(e),this.fontSizeType=t)}.bind(this)),this.factor=(this.options.scaleTo-this.options.scaleFrom)/100,this.dims=null,"box"==this.options.scaleMode&&(this.dims=[this.element.offsetHeight,this.element.offsetWidth]),/^content/.test(this.options.scaleMode)&&(this.dims=[this.element.scrollHeight,this.element.scrollWidth]),this.dims||(this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth])},update:function(e){var t=this.options.scaleFrom/100+this.factor*e;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*t+this.fontSizeType}),this.setDimensions(this.dims[0]*t,this.dims[1]*t)},finish:function(){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(e,t){var i={};if(this.options.scaleX&&(i.width=t.round()+"px"),this.options.scaleY&&(i.height=e.round()+"px"),this.options.scaleFromCenter){var n=(e-this.dims[0])/2,r=(t-this.dims[1])/2;"absolute"==this.elementPositioning?(this.options.scaleY&&(i.top=this.originalTop-n+"px"),this.options.scaleX&&(i.left=this.originalLeft-r+"px")):(this.options.scaleY&&(i.top=-n+"px"),this.options.scaleX&&(i.left=-r+"px"))}this.element.setStyle(i)}}),Effect.Highlight=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(t)},setup:function(){return"none"==this.element.getStyle("display")?(this.cancel(),void 0):(this.oldStyle={},this.options.keepBackgroundImage||(this.oldStyle.backgroundImage=this.element.getStyle("background-image"),this.element.setStyle({backgroundImage:"none"})),this.options.endcolor||(this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")),this.options.restorecolor||(this.options.restorecolor=this.element.getStyle("background-color")),this._base=$R(0,2).map(function(e){return parseInt(this.options.startcolor.slice(2*e+1,2*e+3),16)}.bind(this)),this._delta=$R(0,2).map(function(e){return parseInt(this.options.endcolor.slice(2*e+1,2*e+3),16)-this._base[e]}.bind(this)),void 0)},update:function(e){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(t,i,n){return t+(this._base[n]+this._delta[n]*e).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}}),Effect.ScrollTo=function(e){var t=arguments[1]||{},i=document.viewport.getScrollOffsets(),n=$(e).cumulativeOffset();return t.offset&&(n[1]+=t.offset),new Effect.Tween(null,i.top,n[1],t,function(e){scrollTo(i.left,e.round())})},Effect.Fade=function(e){e=$(e);var t=e.getInlineOpacity(),i=Object.extend({from:e.getOpacity()||1,to:0,afterFinishInternal:function(e){0==e.options.to&&e.element.hide().setStyle({opacity:t})}},arguments[1]||{});return new Effect.Opacity(e,i)},Effect.Appear=function(e){e=$(e);var t=Object.extend({from:"none"==e.getStyle("display")?0:e.getOpacity()||0,to:1,afterFinishInternal:function(e){e.element.forceRerendering()},beforeSetup:function(e){e.element.setOpacity(e.options.from).show()}},arguments[1]||{});return new Effect.Opacity(e,t)},Effect.Puff=function(e){e=$(e);var t={opacity:e.getInlineOpacity(),position:e.getStyle("position"),top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height};return new Effect.Parallel([new Effect.Scale(e,200,{sync:!0,scaleFromCenter:!0,scaleContent:!0,restoreAfterFinish:!0}),new Effect.Opacity(e,{sync:!0,to:0})],Object.extend({duration:1,beforeSetupInternal:function(e){Position.absolutize(e.effects[0].element)},afterFinishInternal:function(e){e.effects[0].element.hide().setStyle(t)}},arguments[1]||{}))},Effect.BlindUp=function(e){return e=$(e),e.makeClipping(),new Effect.Scale(e,0,Object.extend({scaleContent:!1,scaleX:!1,restoreAfterFinish:!0,afterFinishInternal:function(e){e.element.hide().undoClipping()}},arguments[1]||{}))},Effect.BlindDown=function(e){e=$(e);var t=e.getDimensions();return new Effect.Scale(e,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:0,scaleMode:{originalHeight:t.height,originalWidth:t.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(e){e.element.undoClipping()}},arguments[1]||{}))},Effect.SwitchOff=function(e){e=$(e);var t=e.getInlineOpacity();return new Effect.Appear(e,Object.extend({duration:.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(e){new Effect.Scale(e.element,1,{duration:.3,scaleFromCenter:!0,scaleX:!1,scaleContent:!1,restoreAfterFinish:!0,beforeSetup:function(e){e.element.makePositioned().makeClipping()},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned().setStyle({opacity:t})}})}},arguments[1]||{}))},Effect.DropOut=function(e){e=$(e);var t={top:e.getStyle("top"),left:e.getStyle("left"),opacity:e.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(e,{x:0,y:100,sync:!0}),new Effect.Opacity(e,{sync:!0,to:0})],Object.extend({duration:.5,beforeSetup:function(e){e.effects[0].element.makePositioned()},afterFinishInternal:function(e){e.effects[0].element.hide().undoPositioned().setStyle(t)}},arguments[1]||{}))},Effect.Shake=function(e){e=$(e);var t=Object.extend({distance:20,duration:.5},arguments[1]||{}),i=parseFloat(t.distance),n=parseFloat(t.duration)/10,r={top:e.getStyle("top"),left:e.getStyle("left")};return new Effect.Move(e,{x:i,y:0,duration:n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*-i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:2*i,y:0,duration:2*n,afterFinishInternal:function(e){new Effect.Move(e.element,{x:-i,y:0,duration:n,afterFinishInternal:function(e){e.element.undoPositioned().setStyle(r)}})}})}})}})}})}})},Effect.SlideDown=function(e){e=$(e).cleanWhitespace();var t=e.down().getStyle("bottom"),i=e.getDimensions();return new Effect.Scale(e,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makePositioned(),e.element.down().makePositioned(),window.opera&&e.element.setStyle({top:""}),e.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.undoClipping().undoPositioned(),e.element.down().undoPositioned().setStyle({bottom:t})}},arguments[1]||{}))},Effect.SlideUp=function(e){e=$(e).cleanWhitespace();var t=e.down().getStyle("bottom"),i=e.getDimensions();return new Effect.Scale(e,window.opera?0:1,Object.extend({scaleContent:!1,scaleX:!1,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:i.height,originalWidth:i.width},restoreAfterFinish:!0,afterSetup:function(e){e.element.makePositioned(),e.element.down().makePositioned(),window.opera&&e.element.setStyle({top:""}),e.element.makeClipping().show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned(),e.element.down().undoPositioned().setStyle({bottom:t})}},arguments[1]||{}))},Effect.Squish=function(e){return new Effect.Scale(e,window.opera?1:0,{restoreAfterFinish:!0,beforeSetup:function(e){e.element.makeClipping()},afterFinishInternal:function(e){e.element.hide().undoClipping()}})},Effect.Grow=function(e){e=$(e);var t,i,n,r,s=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{}),o={top:e.style.top,left:e.style.left,height:e.style.height,width:e.style.width,opacity:e.getInlineOpacity()},a=e.getDimensions();switch(s.direction){case"top-left":t=i=n=r=0;break;case"top-right":t=a.width,i=r=0,n=-a.width;break;case"bottom-left":t=n=0,i=a.height,r=-a.height;break;case"bottom-right":t=a.width,i=a.height,n=-a.width,r=-a.height;break;case"center":t=a.width/2,i=a.height/2,n=-a.width/2,r=-a.height/2}return new Effect.Move(e,{x:t,y:i,duration:.01,beforeSetup:function(e){e.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(e){new Effect.Parallel([new Effect.Opacity(e.element,{sync:!0,to:1,from:0,transition:s.opacityTransition}),new Effect.Move(e.element,{x:n,y:r,sync:!0,transition:s.moveTransition}),new Effect.Scale(e.element,100,{scaleMode:{originalHeight:a.height,originalWidth:a.width},sync:!0,scaleFrom:window.opera?1:0,transition:s.scaleTransition,restoreAfterFinish:!0})],Object.extend({beforeSetup:function(e){e.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(e){e.effects[0].element.undoClipping().undoPositioned().setStyle(o)}},s))}})},Effect.Shrink=function(e){e=$(e);var t,i,n=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{}),r={top:e.style.top,left:e.style.left,height:e.style.height,width:e.style.width,opacity:e.getInlineOpacity()},s=e.getDimensions();switch(n.direction){case"top-left":t=i=0;break;case"top-right":t=s.width,i=0;break;case"bottom-left":t=0,i=s.height;break;case"bottom-right":t=s.width,i=s.height;break;case"center":t=s.width/2,i=s.height/2}return new Effect.Parallel([new Effect.Opacity(e,{sync:!0,to:0,from:1,transition:n.opacityTransition}),new Effect.Scale(e,window.opera?1:0,{sync:!0,transition:n.scaleTransition,restoreAfterFinish:!0}),new Effect.Move(e,{x:t,y:i,sync:!0,transition:n.moveTransition})],Object.extend({beforeStartInternal:function(e){e.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(e){e.effects[0].element.hide().undoClipping().undoPositioned().setStyle(r)}},n))},Effect.Pulsate=function(e){e=$(e);var t=arguments[1]||{},i=e.getInlineOpacity(),n=t.transition||Effect.Transitions.linear,r=function(e){return 1-n(-Math.cos(2*e*(t.pulses||5)*Math.PI)/2+.5)};return new Effect.Opacity(e,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(e){e.element.setStyle({opacity:i})}},t),{transition:r}))},Effect.Fold=function(e){e=$(e);var t={top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height};return e.makeClipping(),new Effect.Scale(e,5,Object.extend({scaleContent:!1,scaleX:!1,afterFinishInternal:function(){new Effect.Scale(e,1,{scaleContent:!1,scaleY:!1,afterFinishInternal:function(e){e.element.hide().undoClipping().setStyle(t)}})}},arguments[1]||{}))},Effect.Morph=Class.create(Effect.Base,{initialize:function(e){if(this.element=$(e),!this.element)throw Effect._elementDoesNotExistError;var t=Object.extend({style:{}},arguments[1]||{});if(Object.isString(t.style))if(t.style.include(":"))this.style=t.style.parseStyle();else{this.element.addClassName(t.style),this.style=$H(this.element.getStyles()),this.element.removeClassName(t.style);var i=this.element.getStyles();this.style=this.style.reject(function(e){return e.value==i[e.key]}),t.afterFinishInternal=function(e){e.element.addClassName(e.options.style),e.transforms.each(function(t){e.element.style[t.style]=""})}}else this.style=$H(t.style);this.start(t)},setup:function(){function e(e){return(!e||["rgba(0, 0, 0, 0)","transparent"].include(e))&&(e="#ffffff"),e=e.parseColor(),$R(0,2).map(function(t){return parseInt(e.slice(2*t+1,2*t+3),16)})}this.transforms=this.style.map(function(t){var i=t[0],n=t[1],r=null;if("#zzzzzz"!=n.parseColor("#zzzzzz"))n=n.parseColor(),r="color";else if("opacity"==i)n=parseFloat(n),Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});else if(Element.CSS_LENGTH.test(n)){var s=n.match(/^([\+\-]?[0-9\.]+)(.*)$/);n=parseFloat(s[1]),r=3==s.length?s[2]:null}var o=this.element.getStyle(i);return{style:i.camelize(),originalValue:"color"==r?e(o):parseFloat(o||0),targetValue:"color"==r?e(n):n,unit:r}}.bind(this)).reject(function(e){return e.originalValue==e.targetValue||"color"!=e.unit&&(isNaN(e.originalValue)||isNaN(e.targetValue))})},update:function(e){for(var t,i={},n=this.transforms.length;n--;)i[(t=this.transforms[n]).style]="color"==t.unit?"#"+Math.round(t.originalValue[0]+(t.targetValue[0]-t.originalValue[0])*e).toColorPart()+Math.round(t.originalValue[1]+(t.targetValue[1]-t.originalValue[1])*e).toColorPart()+Math.round(t.originalValue[2]+(t.targetValue[2]-t.originalValue[2])*e).toColorPart():(t.originalValue+(t.targetValue-t.originalValue)*e).toFixed(3)+(null===t.unit?"":t.unit);this.element.setStyle(i,!0)}}),Effect.Transform=Class.create({initialize:function(e){this.tracks=[],this.options=arguments[1]||{},this.addTracks(e)},addTracks:function(e){return e.each(function(e){e=$H(e);var t=e.values().first();this.tracks.push($H({ids:e.keys().first(),effect:Effect.Morph,options:{style:t}}))}.bind(this)),this},play:function(){return new Effect.Parallel(this.tracks.map(function(e){var t=e.get("ids"),i=e.get("effect"),n=e.get("options"),r=[$(t)||$$(t)].flatten();return r.map(function(e){return new i(e,Object.extend({sync:!0},n))})}).flatten(),this.options)}}),Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex"),Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/,String.__parseStyleElement=document.createElement("div"),String.prototype.parseStyle=function(){var e,t=$H();return Prototype.Browser.WebKit?e=new Element("div",{style:this}).style:(String.__parseStyleElement.innerHTML='
    ',e=String.__parseStyleElement.childNodes[0].style),Element.CSS_PROPERTIES.each(function(i){e[i]&&t.set(i,e[i])}),Prototype.Browser.IE&&this.include("opacity")&&t.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]),t},Element.getStyles=document.defaultView&&document.defaultView.getComputedStyle?function(e){var t=document.defaultView.getComputedStyle($(e),null);return Element.CSS_PROPERTIES.inject({},function(e,i){return e[i]=t[i],e})}:function(e){e=$(e);var t,i=e.currentStyle;return t=Element.CSS_PROPERTIES.inject({},function(e,t){return e[t]=i[t],e}),t.opacity||(t.opacity=e.getOpacity()),t},Effect.Methods={morph:function(e,t){return e=$(e),new Effect.Morph(e,Object.extend({style:t},arguments[2]||{})),e},visualEffect:function(e,t,i){e=$(e);var n=t.dasherize().camelize(),r=n.charAt(0).toUpperCase()+n.substring(1);return new Effect[r](e,i),e},highlight:function(e,t){return e=$(e),new Effect.Highlight(e,t),e}},$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(e){Effect.Methods[e]=function(t,i){return t=$(t),Effect[e.charAt(0).toUpperCase()+e.substring(1)](t,i),t}}),$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(e){Effect.Methods[e]=Element[e]}),Element.addMethods(Effect.Methods);smokeping-2.7.3/htdocs/js/scriptaculous/scriptaculous.js000066400000000000000000000017441342220157600235650ustar00rootroot00000000000000var Scriptaculous={Version:"1.9.0",require:function(e){try{document.write('')}catch(t){var i=document.createElement("script");i.type="text/javascript",i.src=e,document.getElementsByTagName("head")[0].appendChild(i)}},REQUIRED_PROTOTYPE:"1.6.0.3",load:function(){function e(e){var t=e.replace(/_.*|\./g,"");return t=parseInt(t+"0".times(4-t.length)),e.indexOf("_")>-1?t-1:t}if("undefined"==typeof Prototype||"undefined"==typeof Element||Element.Methods===void 0||e(Prototype.Version)= "+Scriptaculous.REQUIRED_PROTOTYPE;var t=/scriptaculous\.js(\?.*)?$/;$$("script[src]").findAll(function(e){return e.src.match(t)}).each(function(e){var i=e.src.replace(t,""),n=e.src.match(/\?.*load=([a-z,]*)/);(n?n[1]:"builder,effects,dragdrop,controls,slider,sound").split(",").each(function(e){Scriptaculous.require(i+e+".js")})})}};Scriptaculous.load();smokeping-2.7.3/htdocs/js/scriptaculous/slider.js000066400000000000000000000146021342220157600221440ustar00rootroot00000000000000if(!Control)var Control={};Control.Slider=Class.create({initialize:function(e,t,i){var n=this;this.handles=Object.isArray(e)?e.collect(function(e){return $(e)}):[$(e)],this.track=$(t),this.options=i||{},this.axis=this.options.axis||"horizontal",this.increment=this.options.increment||1,this.step=parseInt(this.options.step||"1"),this.range=this.options.range||$R(0,1),this.value=0,this.values=this.handles.map(function(){return 0}),this.spans=this.options.spans?this.options.spans.map(function(e){return $(e)}):!1,this.options.startSpan=$(this.options.startSpan||null),this.options.endSpan=$(this.options.endSpan||null),this.restricted=this.options.restricted||!1,this.maximum=this.options.maximum||this.range.end,this.minimum=this.options.minimum||this.range.start,this.alignX=parseInt(this.options.alignX||"0"),this.alignY=parseInt(this.options.alignY||"0"),this.trackLength=this.maximumOffset()-this.minimumOffset(),this.handleLength=this.isVertical()?0!=this.handles[0].offsetHeight?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,""):0!=this.handles[0].offsetWidth?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""),this.active=!1,this.dragging=!1,this.disabled=!1,this.options.disabled&&this.setDisabled(),this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):!1,this.allowedValues&&(this.minimum=this.allowedValues.min(),this.maximum=this.allowedValues.max()),this.eventMouseDown=this.startDrag.bindAsEventListener(this),this.eventMouseUp=this.endDrag.bindAsEventListener(this),this.eventMouseMove=this.update.bindAsEventListener(this),this.handles.each(function(e,t){t=n.handles.length-1-t,n.setValue(parseFloat((Object.isArray(n.options.sliderValue)?n.options.sliderValue[t]:n.options.sliderValue)||n.range.start),t),e.makePositioned().observe("mousedown",n.eventMouseDown)}),this.track.observe("mousedown",this.eventMouseDown),document.observe("mouseup",this.eventMouseUp),document.observe("mousemove",this.eventMouseMove),this.initialized=!0},dispose:function(){var e=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown),Event.stopObserving(document,"mouseup",this.eventMouseUp),Event.stopObserving(document,"mousemove",this.eventMouseMove),this.handles.each(function(t){Event.stopObserving(t,"mousedown",e.eventMouseDown)})},setDisabled:function(){this.disabled=!0},setEnabled:function(){this.disabled=!1},getNearestValue:function(e){if(this.allowedValues){if(e>=this.allowedValues.max())return this.allowedValues.max();if(this.allowedValues.min()>=e)return this.allowedValues.min();var t=Math.abs(this.allowedValues[0]-e),i=this.allowedValues[0];return this.allowedValues.each(function(n){var r=Math.abs(n-e);t>=r&&(i=n,t=r)}),i}return e>this.range.end?this.range.end:this.range.start>e?this.range.start:e},setValue:function(e,t){this.active||(this.activeHandleIdx=t||0,this.activeHandle=this.handles[this.activeHandleIdx],this.updateStyles()),t=t||this.activeHandleIdx||0,this.initialized&&this.restricted&&(t>0&&this.values[t-1]>e&&(e=this.values[t-1]),this.handles.length-1>t&&e>this.values[t+1]&&(e=this.values[t+1])),e=this.getNearestValue(e),this.values[t]=e,this.value=this.values[0],this.handles[t].style[this.isVertical()?"top":"left"]=this.translateToPx(e),this.drawSpans(),this.dragging&&this.event||this.updateFinished()},setValueBy:function(e,t){this.setValue(this.values[t||this.activeHandleIdx||0]+e,t||this.activeHandleIdx||0)},translateToPx:function(e){return Math.round((this.trackLength-this.handleLength)/(this.range.end-this.range.start)*(e-this.range.start))+"px"},translateToValue:function(e){return e/(this.trackLength-this.handleLength)*(this.range.end-this.range.start)+this.range.start},getRange:function(e){var t=this.values.sortBy(Prototype.K);return e=e||0,$R(t[e],t[e+1])},minimumOffset:function(){return this.isVertical()?this.alignY:this.alignX},maximumOffset:function(){return this.isVertical()?(0!=this.track.offsetHeight?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(0!=this.track.offsetWidth?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX},isVertical:function(){return"vertical"==this.axis},drawSpans:function(){var e=this;this.spans&&$R(0,this.spans.length-1).each(function(t){e.setSpan(e.spans[t],e.getRange(t))}),this.options.startSpan&&this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value)),this.options.endSpan&&this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))},setSpan:function(e,t){this.isVertical()?(e.style.top=this.translateToPx(t.start),e.style.height=this.translateToPx(t.end-t.start+this.range.start)):(e.style.left=this.translateToPx(t.start),e.style.width=this.translateToPx(t.end-t.start+this.range.start))},updateStyles:function(){this.handles.each(function(e){Element.removeClassName(e,"selected")}),Element.addClassName(this.activeHandle,"selected")},startDrag:function(e){if(Event.isLeftClick(e)){if(!this.disabled){this.active=!0;var t=Event.element(e),i=[Event.pointerX(e),Event.pointerY(e)],n=t;if(n==this.track){var r=this.track.cumulativeOffset();this.event=e,this.setValue(this.translateToValue((this.isVertical()?i[1]-r[1]:i[0]-r[0])-this.handleLength/2));var r=this.activeHandle.cumulativeOffset();this.offsetX=i[0]-r[0],this.offsetY=i[1]-r[1]}else{for(;-1==this.handles.indexOf(t)&&t.parentNode;)t=t.parentNode;if(-1!=this.handles.indexOf(t)){this.activeHandle=t,this.activeHandleIdx=this.handles.indexOf(this.activeHandle),this.updateStyles();var r=this.activeHandle.cumulativeOffset();this.offsetX=i[0]-r[0],this.offsetY=i[1]-r[1]}}}Event.stop(e)}},update:function(e){this.active&&(this.dragging||(this.dragging=!0),this.draw(e),Prototype.Browser.WebKit&&window.scrollBy(0,0),Event.stop(e))},draw:function(e){var t=[Event.pointerX(e),Event.pointerY(e)],i=this.track.cumulativeOffset();t[0]-=this.offsetX+i[0],t[1]-=this.offsetY+i[1],this.event=e,this.setValue(this.translateToValue(this.isVertical()?t[1]:t[0])),this.initialized&&this.options.onSlide&&this.options.onSlide(this.values.length>1?this.values:this.value,this)},endDrag:function(e){this.active&&this.dragging&&(this.finishDrag(e,!0),Event.stop(e)),this.active=!1,this.dragging=!1},finishDrag:function(){this.active=!1,this.dragging=!1,this.updateFinished()},updateFinished:function(){this.initialized&&this.options.onChange&&this.options.onChange(this.values.length>1?this.values:this.value,this),this.event=null}});smokeping-2.7.3/htdocs/js/scriptaculous/sound.js000066400000000000000000000030611342220157600220070ustar00rootroot00000000000000Sound={tracks:{},_enabled:!0,template:new Template(''),enable:function(){Sound._enabled=!0},disable:function(){Sound._enabled=!1},play:function(e){if(Sound._enabled){var t=Object.extend({track:"global",url:e,replace:!1},arguments[1]||{});t.replace&&this.tracks[t.track]&&($R(0,this.tracks[t.track].id).each(function(e){var i=$("sound_"+t.track+"_"+e);i.Stop&&i.Stop(),i.remove()}),this.tracks[t.track]=null),this.tracks[t.track]?this.tracks[t.track].id++:this.tracks[t.track]={id:0},t.id=this.tracks[t.track].id,$$("body")[0].insert(Prototype.Browser.IE?new Element("bgsound",{id:"sound_"+t.track+"_"+t.id,src:t.url,loop:1,autostart:!0}):Sound.template.evaluate(t))}}},Prototype.Browser.Gecko&&navigator.userAgent.indexOf("Win")>0&&(navigator.plugins&&$A(navigator.plugins).detect(function(e){return-1!=e.name.indexOf("QuickTime")})?Sound.template=new Template(''):navigator.plugins&&$A(navigator.plugins).detect(function(e){return-1!=e.name.indexOf("Windows Media")})?Sound.template=new Template(''):navigator.plugins&&$A(navigator.plugins).detect(function(e){return-1!=e.name.indexOf("RealPlayer")})?Sound.template=new Template(''):Sound.play=function(){});smokeping-2.7.3/htdocs/js/scriptaculous/unittest.js000066400000000000000000000303361342220157600225430ustar00rootroot00000000000000Event.simulateMouse=function(e,t){var i=Object.extend({pointerX:0,pointerY:0,buttons:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},arguments[2]||{}),n=document.createEvent("MouseEvents");n.initMouseEvent(t,!0,!0,document.defaultView,i.buttons,i.pointerX,i.pointerY,i.pointerX,i.pointerY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,0,$(e)),this.mark&&Element.remove(this.mark),this.mark=document.createElement("div"),this.mark.appendChild(document.createTextNode(" ")),document.body.appendChild(this.mark),this.mark.style.position="absolute",this.mark.style.top=i.pointerY+"px",this.mark.style.left=i.pointerX+"px",this.mark.style.width="5px",this.mark.style.height="5px;",this.mark.style.borderTop="1px solid red;",this.mark.style.borderLeft="1px solid red;",this.step&&alert("["+(""+(new Date).getTime())+"] "+t+"/"+Test.Unit.inspect(i)),$(e).dispatchEvent(n)},Event.simulateKey=function(e,t){var i=Object.extend({ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:0,charCode:0},arguments[2]||{}),n=document.createEvent("KeyEvents");n.initKeyEvent(t,!0,!0,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode),$(e).dispatchEvent(n)},Event.simulateKeys=function(e,t){for(var i=0;t.length>i;i++)Event.simulateKey(e,"keypress",{charCode:t.charCodeAt(i)})};var Test={};Test.Unit={},Test.Unit.inspect=Object.inspect,Test.Unit.Logger=Class.create(),Test.Unit.Logger.prototype={initialize:function(e){this.log=$(e),this.log&&this._createLogTable()},start:function(e){this.log&&(this.testName=e,this.lastLogLine=document.createElement("tr"),this.statusCell=document.createElement("td"),this.nameCell=document.createElement("td"),this.nameCell.className="nameCell",this.nameCell.appendChild(document.createTextNode(e)),this.messageCell=document.createElement("td"),this.lastLogLine.appendChild(this.statusCell),this.lastLogLine.appendChild(this.nameCell),this.lastLogLine.appendChild(this.messageCell),this.loglines.appendChild(this.lastLogLine))},finish:function(e,t){this.log&&(this.lastLogLine.className=e,this.statusCell.innerHTML=e,this.messageCell.innerHTML=this._toHTML(t),this.addLinksToResults())},message:function(e){this.log&&(this.messageCell.innerHTML=this._toHTML(e))},summary:function(e){this.log&&(this.logsummary.innerHTML=this._toHTML(e))},_createLogTable:function(){this.log.innerHTML='
    StatusTestMessage
    ',this.logsummary=$("logsummary"),this.loglines=$("loglines")},_toHTML:function(e){return e.escapeHTML().replace(/\n/g,"
    ")},addLinksToResults:function(){$$("tr.failed .nameCell").each(function(e){e.title="Run only this test",Event.observe(e,"click",function(){window.location.search="?tests="+e.innerHTML})}),$$("tr.passed .nameCell").each(function(e){e.title="Run all tests",Event.observe(e,"click",function(){window.location.search=""})})}},Test.Unit.Runner=Class.create(),Test.Unit.Runner.prototype={initialize:function(e){if(this.options=Object.extend({testLog:"testlog"},arguments[1]||{}),this.options.resultsURL=this.parseResultsURLQueryParameter(),this.options.tests=this.parseTestsQueryParameter(),this.options.testLog&&(this.options.testLog=$(this.options.testLog)||null),this.options.tests){this.tests=[];for(var t=0;this.options.tests.length>t;t++)/^test/.test(this.options.tests[t])&&this.tests.push(new Test.Unit.Testcase(this.options.tests[t],e[this.options.tests[t]],e.setup,e.teardown))}else if(this.options.test)this.tests=[new Test.Unit.Testcase(this.options.test,e[this.options.test],e.setup,e.teardown)];else{this.tests=[];for(var i in e)/^test/.test(i)&&this.tests.push(new Test.Unit.Testcase(this.options.context?" -> "+this.options.titles[i]:i,e[i],e.setup,e.teardown))}this.currentTest=0,this.logger=new Test.Unit.Logger(this.options.testLog),setTimeout(this.runTests.bind(this),1e3)},parseResultsURLQueryParameter:function(){return window.location.search.parseQuery().resultsURL},parseTestsQueryParameter:function(){return window.location.search.parseQuery().tests?window.location.search.parseQuery().tests.split(","):void 0},getResult:function(){for(var e=!1,t=0;this.tests.length>t;t++){if(this.tests[t].errors>0)return"ERROR";this.tests[t].failures>0&&(e=!0)}return e?"FAILURE":"SUCCESS"},postResults:function(){this.options.resultsURL&&new Ajax.Request(this.options.resultsURL,{method:"get",parameters:"result="+this.getResult(),asynchronous:!1})},runTests:function(){var e=this.tests[this.currentTest];return e?(e.isWaiting||this.logger.start(e.name),e.run(),e.isWaiting?(this.logger.message("Waiting for "+e.timeToWait+"ms"),setTimeout(this.runTests.bind(this),e.timeToWait||1e3)):(this.logger.finish(e.status(),e.summary()),this.currentTest++,this.runTests()),void 0):(this.postResults(),this.logger.summary(this.summary()),void 0)},summary:function(){for(var e=0,t=0,i=0,n=0;this.tests.length>n;n++)e+=this.tests[n].assertions,t+=this.tests[n].failures,i+=this.tests[n].errors;return(this.options.context?this.options.context+": ":"")+this.tests.length+" tests, "+e+" assertions, "+t+" failures, "+i+" errors"}},Test.Unit.Assertions=Class.create(),Test.Unit.Assertions.prototype={initialize:function(){this.assertions=0,this.failures=0,this.errors=0,this.messages=[]},summary:function(){return this.assertions+" assertions, "+this.failures+" failures, "+this.errors+" errors"+"\n"+this.messages.join("\n")},pass:function(){this.assertions++},fail:function(e){this.failures++,this.messages.push("Failure: "+e)},info:function(e){this.messages.push("Info: "+e)},error:function(e){this.errors++,this.messages.push(e.name+": "+e.message+"("+Test.Unit.inspect(e)+")")},status:function(){return this.failures>0?"failed":this.errors>0?"error":"passed"},assert:function(e){var t=arguments[1]||'assert: got "'+Test.Unit.inspect(e)+'"';try{e?this.pass():this.fail(t)}catch(i){this.error(i)}},assertEqual:function(e,t){var i=arguments[2]||"assertEqual";try{e==t?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+Test.Unit.inspect(t)+'"')}catch(n){this.error(n)}},assertInspect:function(e,t){var i=arguments[2]||"assertInspect";try{e==t.inspect()?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+Test.Unit.inspect(t)+'"')}catch(n){this.error(n)}},assertEnumEqual:function(e,t){var i=arguments[2]||"assertEnumEqual";try{$A(e).length==$A(t).length&&e.zip(t).all(function(e){return e[0]==e[1]})?this.pass():this.fail(i+": expected "+Test.Unit.inspect(e)+", actual "+Test.Unit.inspect(t))}catch(n){this.error(n)}},assertNotEqual:function(e,t){var i=arguments[2]||"assertNotEqual";try{e!=t?this.pass():this.fail(i+': got "'+Test.Unit.inspect(t)+'"')}catch(n){this.error(n)}},assertIdentical:function(e,t){var i=arguments[2]||"assertIdentical";try{e===t?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+Test.Unit.inspect(t)+'"')}catch(n){this.error(n)}},assertNotIdentical:function(e,t){var i=arguments[2]||"assertNotIdentical";try{e!==t?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+Test.Unit.inspect(t)+'"')}catch(n){this.error(n)}},assertNull:function(e){var t=arguments[1]||"assertNull";try{null==e?this.pass():this.fail(t+': got "'+Test.Unit.inspect(e)+'"')}catch(i){this.error(i)}},assertMatch:function(e,t){var i=arguments[2]||"assertMatch",n=RegExp(e);try{n.exec(t)?this.pass():this.fail(i+' : regex: "'+Test.Unit.inspect(e)+" did not match: "+Test.Unit.inspect(t)+'"')}catch(r){this.error(r)}},assertHidden:function(e){var t=arguments[1]||"assertHidden";this.assertEqual("none",e.style.display,t)},assertNotNull:function(e){var t=arguments[1]||"assertNotNull";this.assert(null!=e,t)},assertType:function(e,t){var i=arguments[2]||"assertType";try{t.constructor==e?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+t.constructor+'"')}catch(n){this.error(n)}},assertNotOfType:function(e,t){var i=arguments[2]||"assertNotOfType";try{t.constructor!=e?this.pass():this.fail(i+': expected "'+Test.Unit.inspect(e)+'", actual "'+t.constructor+'"')}catch(n){this.error(n)}},assertInstanceOf:function(e,t){var i=arguments[2]||"assertInstanceOf";try{t instanceof e?this.pass():this.fail(i+": object was not an instance of the expected type")}catch(n){this.error(n)}},assertNotInstanceOf:function(e,t){var i=arguments[2]||"assertNotInstanceOf";try{t instanceof e?this.fail(i+": object was an instance of the not expected type"):this.pass()}catch(n){this.error(n)}},assertRespondsTo:function(e,t){var i=arguments[2]||"assertRespondsTo";try{t[e]&&"function"==typeof t[e]?this.pass():this.fail(i+": object doesn't respond to ["+e+"]")}catch(n){this.error(n)}},assertReturnsTrue:function(e,t){var i=arguments[2]||"assertReturnsTrue";try{var n=t[e];n||(n=t["is"+e.charAt(0).toUpperCase()+e.slice(1)]),n()?this.pass():this.fail(i+": method returned false")}catch(r){this.error(r)}},assertReturnsFalse:function(e,t){var i=arguments[2]||"assertReturnsFalse";try{var n=t[e];n||(n=t["is"+e.charAt(0).toUpperCase()+e.slice(1)]),n()?this.fail(i+": method returned true"):this.pass()}catch(r){this.error(r)}},assertRaise:function(e,t){var i=arguments[2]||"assertRaise";try{t(),this.fail(i+": exception expected but none was raised")}catch(n){null==e||n.name==e?this.pass():this.error(n)}},assertElementsMatch:function(){var e=$A(arguments),t=$A(e.shift());return t.length!=e.length?(this.fail("assertElementsMatch: size mismatch: "+t.length+" elements, "+e.length+" expressions"),!1):(t.zip(e).all(function(e,t){var i=$(e.first()),n=e.last();return i.match(n)?!0:(this.fail("assertElementsMatch: (in index "+t+") expected "+n.inspect()+" but got "+i.inspect()),void 0)}.bind(this))&&this.pass(),void 0)},assertElementMatches:function(e,t){this.assertElementsMatch([e],t)},benchmark:function(e,t){var i=new Date;(t||1).times(e);var n=new Date-i;return this.info((arguments[2]||"Operation")+" finished "+t+" iterations in "+n/1e3+"s"),n},_isVisible:function(e){return e=$(e),e.parentNode?(this.assertNotNull(e),e.style&&"none"==Element.getStyle(e,"display")?!1:this._isVisible(e.parentNode)):!0},assertNotVisible:function(e){this.assert(!this._isVisible(e),Test.Unit.inspect(e)+" was not hidden and didn't have a hidden parent either. "+(""||arguments[1]))},assertVisible:function(e){this.assert(this._isVisible(e),Test.Unit.inspect(e)+" was not visible. "+(""||arguments[1]))},benchmark:function(e,t){var i=new Date;(t||1).times(e);var n=new Date-i;return this.info((arguments[2]||"Operation")+" finished "+t+" iterations in "+n/1e3+"s"),n}},Test.Unit.Testcase=Class.create(),Object.extend(Object.extend(Test.Unit.Testcase.prototype,Test.Unit.Assertions.prototype),{initialize:function(name,test,setup,teardown){Test.Unit.Assertions.prototype.initialize.bind(this)(),this.name=name,"string"==typeof test?(test=test.gsub(/(\.should[^\(]+\()/,"#{0}this,"),test=test.gsub(/(\.should[^\(]+)\(this,\)/,"#{1}(this)"),this.test=function(){eval("with(this){"+test+"}")}):this.test=test||function(){},this.setup=setup||function(){},this.teardown=teardown||function(){},this.isWaiting=!1,this.timeToWait=1e3},wait:function(e,t){this.isWaiting=!0,this.test=t,this.timeToWait=e},run:function(){try{try{this.isWaiting||this.setup.bind(this)(),this.isWaiting=!1,this.test.bind(this)()}finally{this.isWaiting||this.teardown.bind(this)()}}catch(e){this.error(e)}}}),Test.setupBDDExtensionMethods=function(){var e={shouldEqual:"assertEqual",shouldNotEqual:"assertNotEqual",shouldEqualEnum:"assertEnumEqual",shouldBeA:"assertType",shouldNotBeA:"assertNotOfType",shouldBeAn:"assertType",shouldNotBeAn:"assertNotOfType",shouldBeNull:"assertNull",shouldNotBeNull:"assertNotNull",shouldBe:"assertReturnsTrue",shouldNotBe:"assertReturnsFalse",shouldRespondTo:"assertRespondsTo"},t=function(e,t,i){this[e].apply(this,(t||[]).concat([i]))};Test.BDDMethods={},$H(e).each(function(e){Test.BDDMethods[e.key]=function(){var i=$A(arguments),n=i.shift();t.apply(n,[e.value,i,this])}}),[Array.prototype,String.prototype,Number.prototype,Boolean.prototype].each(function(e){Object.extend(e,Test.BDDMethods)})},Test.context=function(e,t,i){Test.setupBDDExtensionMethods();var n={},r={};for(specName in t)switch(specName){case"setup":case"teardown":n[specName]=t[specName];break;default:var s="test"+specName.gsub(/\s+/,"-").camelize(),o=(""+t[specName]).split("\n").slice(1);/^\{/.test(o[0])&&(o=o.slice(1)),o.pop(),o=o.map(function(e){return e.strip()}),n[s]=o.join("\n"),r[s]=specName}new Test.Unit.Runner(n,{titles:r,testLog:i||"testlog",context:e})};smokeping-2.7.3/htdocs/js/smokeping.js000066400000000000000000000056631342220157600177650ustar00rootroot00000000000000/*++ from bonsai.js ++ urlObj +++++++++++++++++++++++++++++++++++++++++*/ function urlObj(url) { var urlBaseAndParameters; urlBaseAndParameters = url.split("?"); this.urlBase = urlBaseAndParameters[0]; this.urlParameters = urlBaseAndParameters[1].split(/[;&]/); this.getUrlBase = urlObjGetUrlBase; } /*++ from bonsai.js ++ urlObjGetUrlBase +++++++++++++++++++++++++++++++*/ function urlObjGetUrlBase() { return this.urlBase; } // example with minimum dimensions var myCropper; var StartEpoch = 0; var EndEpoch = 0; function changeRRDImage(coords,dimensions){ var SelectLeft = Math.min(coords.x1,coords.x2); var SelectRight = Math.max(coords.x1,coords.x2); if (SelectLeft == SelectRight) return; // abort if nothing is selected. var RRDLeft = 67; // difference between left border of RRD image and content var RRDRight = 26; // difference between right border of RRD image and content var RRDImgWidth = $('zoom').getDimensions().width; // Width of the Smokeping RRD Graphik var RRDImgUsable = RRDImgWidth - RRDRight - RRDLeft; var form = $('range_form'); if (StartEpoch == 0) StartEpoch = +$F('epoch_start'); if (EndEpoch == 0) EndEpoch = +$F('epoch_end'); var DivEpoch = EndEpoch - StartEpoch; var Target = $F('target'); var Hierarchy = $F('hierarchy'); // construct Image URL var myURLObj = new urlObj(document.URL); var myURL = myURLObj.getUrlBase(); // Generate Selected Range in Unix Timestamps var LeftFactor = 1; var RightFactor = 1; if (SelectLeft < RRDLeft) LeftFactor = 10; StartEpoch = Math.floor(StartEpoch + (SelectLeft - RRDLeft) * DivEpoch / RRDImgUsable * LeftFactor ); if (SelectRight > RRDImgWidth - RRDRight) RightFactor = 10; EndEpoch = Math.ceil(EndEpoch + (SelectRight - (RRDImgWidth - RRDRight) ) * DivEpoch / RRDImgUsable * RightFactor); $('zoom').src = myURL + '?displaymode=a;start=' + StartEpoch + ';end=' + EndEpoch + ';target=' + Target + ';hierarchy=' + Hierarchy; myCropper.setParams(); }; Event.observe( window, 'load', function() { $('menu-button').observe('click', function (e) { if ($('sidebar').getStyle('left') == '0px') { $('body').addClassName('sidebar-hidden'); $('body').removeClassName('sidebar-visible'); } else { $('body').removeClassName('sidebar-hidden'); $('body').addClassName('sidebar-visible'); } Event.stop(e); }); if ($('zoom') != null) { myCropper = new Cropper.Img( 'zoom', { minHeight: $('zoom').getDimensions().height, maxHeight: $('zoom').getDimensions().height, onEndCrop: changeRRDImage } ) } } ); smokeping-2.7.3/lib/000077500000000000000000000000001342220157600142675ustar00rootroot00000000000000smokeping-2.7.3/lib/BER.pm000066400000000000000000000662131342220157600152450ustar00rootroot00000000000000### -*- mode: Perl -*- ###################################################################### ### BER (Basic Encoding Rules) encoding and decoding. ###################################################################### ### Copyright (c) 1995-2008, Simon Leinen. ### ### This program is free software; you can redistribute it under the ### "Artistic License 2.0" included in this distribution ### (file "Artistic"). ###################################################################### ### This module implements encoding and decoding of ASN.1-based data ### structures using the Basic Encoding Rules (BER). Only the subset ### necessary for SNMP is implemented. ###################################################################### ### Created by: Simon Leinen ### ### Contributions and fixes by: ### ### Andrzej Tobola : Added long String decode ### Tobias Oetiker : Added 5 Byte Integer decode ... ### Dave Rand : Added SysUpTime decode ### Philippe Simonet : Support larger subids ### Yufang HU : Support even larger subids ### Mike Mitchell : New generalized encode_int() ### Mike Diehn : encode_ip_address() ### Rik Hoorelbeke : encode_oid() fix ### Brett T Warden : pretty UInteger32 ### Bert Driehuis : Handle SNMPv2 exception codes ### Jakob Ilves (/IlvJa) : PDU decoding ### Jan Kasprzak : Fix for PDU syntax check ### Milen Pavlov : Recognize variant length for ints ###################################################################### package BER; require 5.002; use strict; use vars qw(@ISA @EXPORT $VERSION $pretty_print_timeticks %pretty_printer %default_printer $errmsg); use Exporter; $VERSION = '1.05'; @ISA = qw(Exporter); @EXPORT = qw(context_flag constructor_flag encode_int encode_int_0 encode_null encode_oid encode_sequence encode_tagged_sequence encode_string encode_ip_address encode_timeticks encode_uinteger32 encode_counter32 encode_counter64 encode_gauge32 decode_sequence decode_by_template pretty_print pretty_print_timeticks hex_string hex_string_of_type encoded_oid_prefix_p errmsg register_pretty_printer unregister_pretty_printer); ### Variables ## Bind this to zero if you want to avoid that TimeTicks are converted ## into "human readable" strings containing days, hours, minutes and ## seconds. ## ## If the variable is zero, pretty_print will simply return an ## unsigned integer representing hundredths of seconds. ## $pretty_print_timeticks = 1; ### Prototypes sub encode_header ($$); sub encode_int_0 (); sub encode_int ($); sub encode_oid (@); sub encode_null (); sub encode_sequence (@); sub encode_tagged_sequence ($@); sub encode_string ($); sub encode_ip_address ($); sub encode_timeticks ($); sub pretty_print ($); sub pretty_using_decoder ($$); sub pretty_string ($); sub pretty_intlike ($); sub pretty_unsignedlike ($); sub pretty_oid ($); sub pretty_uptime ($); sub pretty_uptime_value ($); sub pretty_ip_address ($); sub pretty_generic_sequence ($); sub register_pretty_printer ($); sub unregister_pretty_printer ($); sub hex_string ($); sub hex_string_of_type ($$); sub decode_oid ($); sub decode_by_template; sub decode_by_template_2; sub decode_sequence ($); sub decode_int ($); sub decode_intlike ($); sub decode_unsignedlike ($); sub decode_intlike_s ($$); sub decode_string ($); sub decode_length ($@); sub encoded_oid_prefix_p ($$); sub decode_subid ($$$); sub decode_generic_tlv ($); sub error (@); sub template_error ($$$); sub version () { $VERSION; } ### Flags for different types of tags sub universal_flag { 0x00 } sub application_flag { 0x40 } sub context_flag { 0x80 } sub private_flag { 0xc0 } sub primitive_flag { 0x00 } sub constructor_flag { 0x20 } ### Universal tags sub boolean_tag { 0x01 } sub int_tag { 0x02 } sub bit_string_tag { 0x03 } sub octet_string_tag { 0x04 } sub null_tag { 0x05 } sub object_id_tag { 0x06 } sub sequence_tag { 0x10 } sub set_tag { 0x11 } sub uptime_tag { 0x43 } ### Flag for length octet announcing multi-byte length field sub long_length { 0x80 } ### SNMP specific tags sub snmp_ip_address_tag { 0x00 | application_flag () } sub snmp_counter32_tag { 0x01 | application_flag () } sub snmp_gauge32_tag { 0x02 | application_flag () } sub snmp_timeticks_tag { 0x03 | application_flag () } sub snmp_opaque_tag { 0x04 | application_flag () } sub snmp_nsap_address_tag { 0x05 | application_flag () } sub snmp_counter64_tag { 0x06 | application_flag () } sub snmp_uinteger32_tag { 0x07 | application_flag () } ## Error codes (SNMPv2 and later) ## sub snmp_nosuchobject { context_flag () | 0x00 } sub snmp_nosuchinstance { context_flag () | 0x01 } sub snmp_endofmibview { context_flag () | 0x02 } ### pretty-printer initialization code. Create a hash with ### the most common types of pretty-printer routines. BEGIN { $default_printer{int_tag()} = \&pretty_intlike; $default_printer{snmp_counter32_tag()} = \&pretty_unsignedlike; $default_printer{snmp_gauge32_tag()} = \&pretty_unsignedlike; $default_printer{snmp_counter64_tag()} = \&pretty_unsignedlike; $default_printer{snmp_uinteger32_tag()} = \&pretty_unsignedlike; $default_printer{octet_string_tag()} = \&pretty_string; $default_printer{object_id_tag()} = \&pretty_oid; $default_printer{snmp_ip_address_tag()} = \&pretty_ip_address; %pretty_printer = %default_printer; } #### Encoding sub encode_header ($$) { my ($type,$length) = @_; return pack ("C C", $type, $length) if $length < 128; return pack ("C C C", $type, long_length | 1, $length) if $length < 256; return pack ("C C n", $type, long_length | 2, $length) if $length < 65536; return error ("Cannot encode length $length yet"); } sub encode_int_0 () { return pack ("C C C", 2, 1, 0); } sub encode_int ($) { return encode_intlike ($_[0], int_tag); } sub encode_uinteger32 ($) { return encode_intlike ($_[0], snmp_uinteger32_tag); } sub encode_counter32 ($) { return encode_intlike ($_[0], snmp_counter32_tag); } sub encode_counter64 ($) { return encode_intlike ($_[0], snmp_counter64_tag); } sub encode_gauge32 ($) { return encode_intlike ($_[0], snmp_gauge32_tag); } sub encode_intlike ($$) { my ($int, $tag)=@_; my ($sign, $val, @vals); $sign = ($int >= 0) ? 0 : 0xff; if (ref $int && $int->isa ("Math::BigInt")) { for(;;) { $val = $int->copy()->bmod (256); unshift(@vals, $val); return encode_header ($tag, $#vals + 1).pack ("C*", @vals) if ($int >= -128 && $int < 128); $int->bsub ($sign)->bdiv (256); } } else { for(;;) { $val = $int & 0xff; unshift(@vals, $val); return encode_header ($tag, $#vals + 1).pack ("C*", @vals) if ($int >= -128 && $int < 128); $int -= $sign, $int = int($int / 256); } } } sub encode_oid (@) { my @oid = @_; my ($result,$subid); $result = ''; ## Ignore leading empty sub-ID. The favourite reason for ## those to occur is that people cut&paste numeric OIDs from ## CMU/UCD SNMP including the leading dot. shift @oid if $oid[0] eq ''; return error ("Object ID too short: ", join('.',@oid)) if $#oid < 1; ## The first two subids in an Object ID are encoded as a single ## byte in BER, according to a funny convention. This poses ## restrictions on the ranges of those subids. In the past, I ## didn't check for those. But since so many people try to use ## OIDs in CMU/UCD SNMP's format and leave out the mib-2 or ## enterprises prefix, I introduced this check to catch those ## errors. ## return error ("first subid too big in Object ID ", join('.',@oid)) if $oid[0] > 2; $result = shift (@oid) * 40; $result += shift @oid; return error ("second subid too big in Object ID ", join('.',@oid)) if $result > 255; $result = pack ("C", $result); foreach $subid (@oid) { if ( ($subid>=0) && ($subid<128) ){ #7 bits long subid $result .= pack ("C", $subid); } elsif ( ($subid>=128) && ($subid<16384) ){ #14 bits long subid $result .= pack ("CC", 0x80 | $subid >> 7, $subid & 0x7f); } elsif ( ($subid>=16384) && ($subid<2097152) ) {#21 bits long subid $result .= pack ("CCC", 0x80 | (($subid>>14) & 0x7f), 0x80 | (($subid>>7) & 0x7f), $subid & 0x7f); } elsif ( ($subid>=2097152) && ($subid<268435456) ){ #28 bits long subid $result .= pack ("CCCC", 0x80 | (($subid>>21) & 0x7f), 0x80 | (($subid>>14) & 0x7f), 0x80 | (($subid>>7) & 0x7f), $subid & 0x7f); } elsif ( ($subid>=268435456) && ($subid<4294967296) ){ #32 bits long subid $result .= pack ("CCCCC", 0x80 | (($subid>>28) & 0x0f), #mask the bits beyond 32 0x80 | (($subid>>21) & 0x7f), 0x80 | (($subid>>14) & 0x7f), 0x80 | (($subid>>7) & 0x7f), $subid & 0x7f); } else { return error ("Cannot encode subid $subid"); } } encode_header (object_id_tag, length $result).$result; } sub encode_null () { encode_header (null_tag, 0); } sub encode_sequence (@) { encode_tagged_sequence (sequence_tag, @_); } sub encode_tagged_sequence ($@) { my ($tag,$result); $tag = shift @_; $result = join '',@_; return encode_header ($tag | constructor_flag, length $result).$result; } sub encode_string ($) { my ($string)=@_; return encode_header (octet_string_tag, length $string).$string; } sub encode_ip_address ($) { my ($addr)=@_; my @octets; if (length $addr == 4) { ## Four bytes... let's suppose that this is a binary IP address ## in network byte order. return encode_header (snmp_ip_address_tag, length $addr).$addr; } elsif (@octets = ($addr =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/)) { return encode_ip_address (pack ("CCCC", @octets)); } else { return error ("IP address must be four bytes long or a dotted-quad"); } } sub encode_timeticks ($) { my ($tt) = @_; return encode_intlike ($tt, snmp_timeticks_tag); } #### Decoding sub pretty_print ($) { my ($packet) = @_; return undef unless defined $packet; my $result = ord (substr ($packet, 0, 1)); if (exists ($pretty_printer{$result})) { my $c_ref = $pretty_printer{$result}; return &$c_ref ($packet); } return ($pretty_print_timeticks ? pretty_uptime ($packet) : pretty_unsignedlike ($packet)) if $result == uptime_tag; return "(null)" if $result == null_tag; return error ("Exception code: noSuchObject") if $result == snmp_nosuchobject; return error ("Exception code: noSuchInstance") if $result == snmp_nosuchinstance; return error ("Exception code: endOfMibView") if $result == snmp_endofmibview; # IlvJa # pretty print sequences and their contents. my $ctx_cons_flags = context_flag | constructor_flag; if($result == (&constructor_flag | &sequence_tag) # sequence || $result == (0 | $ctx_cons_flags) #get_request || $result == (1 | $ctx_cons_flags) #getnext_request || $result == (2 | $ctx_cons_flags) #response || $result == (3 | $ctx_cons_flags) #set_request || $result == (4 | $ctx_cons_flags) #trap_request || $result == (5 | $ctx_cons_flags) #getbulk_request || $result == (6 | $ctx_cons_flags) #inform_request || $result == (7 | $ctx_cons_flags) #trap2_request ) { my $pretty_result = pretty_generic_sequence($packet); $pretty_result =~ s/^/ /gm; #Indent. my $seq_type_desc = { (constructor_flag | sequence_tag) => "Sequence", (0 | $ctx_cons_flags) => "GetRequest", (1 | $ctx_cons_flags) => "GetNextRequest", (2 | $ctx_cons_flags) => "Response", (3 | $ctx_cons_flags) => "SetRequest", (4 | $ctx_cons_flags) => "Trap", (5 | $ctx_cons_flags) => "GetBulkRequest", (6 | $ctx_cons_flags) => "InformRequest", (7 | $ctx_cons_flags) => "SNMPv2-Trap", (8 | $ctx_cons_flags) => "Report", }->{($result)}; return $seq_type_desc . "{\n" . $pretty_result . "\n}"; } return sprintf ("#", $result); } sub pretty_using_decoder ($$) { my ($decoder, $packet) = @_; my ($decoded,$rest); ($decoded,$rest) = &$decoder ($packet); return error ("Junk after object") unless $rest eq ''; return $decoded; } sub pretty_string ($) { pretty_using_decoder (\&decode_string, $_[0]); } sub pretty_intlike ($) { my $decoded = pretty_using_decoder (\&decode_intlike, $_[0]); $decoded; } sub pretty_unsignedlike ($) { return pretty_using_decoder (\&decode_unsignedlike, $_[0]); } sub pretty_oid ($) { my ($oid) = shift; my ($result,$subid,$next); my (@oid); $result = ord (substr ($oid, 0, 1)); return error ("Object ID expected") unless $result == object_id_tag; ($result, $oid) = decode_length ($oid, 1); return error ("inconsistent length in OID") unless $result == length $oid; @oid = (); $subid = ord (substr ($oid, 0, 1)); push @oid, int ($subid / 40); push @oid, $subid % 40; $oid = substr ($oid, 1); while ($oid ne '') { $subid = ord (substr ($oid, 0, 1)); if ($subid < 128) { $oid = substr ($oid, 1); push @oid, $subid; } else { $next = $subid; $subid = 0; while ($next >= 128) { $subid = ($subid << 7) + ($next & 0x7f); $oid = substr ($oid, 1); $next = ord (substr ($oid, 0, 1)); } $subid = ($subid << 7) + $next; $oid = substr ($oid, 1); push @oid, $subid; } } join ('.', @oid); } sub pretty_uptime ($) { my ($packet,$uptime); ($uptime,$packet) = &decode_unsignedlike (@_); pretty_uptime_value ($uptime); } sub pretty_uptime_value ($) { my ($uptime) = @_; my ($seconds,$minutes,$hours,$days,$result); ## We divide the uptime by hundred since we're not interested in ## sub-second precision. $uptime = int ($uptime / 100); $days = int ($uptime / (60 * 60 * 24)); $uptime %= (60 * 60 * 24); $hours = int ($uptime / (60 * 60)); $uptime %= (60 * 60); $minutes = int ($uptime / 60); $seconds = $uptime % 60; if ($days == 0){ $result = sprintf ("%d:%02d:%02d", $hours, $minutes, $seconds); } elsif ($days == 1) { $result = sprintf ("%d day, %d:%02d:%02d", $days, $hours, $minutes, $seconds); } else { $result = sprintf ("%d days, %d:%02d:%02d", $days, $hours, $minutes, $seconds); } return $result; } sub pretty_ip_address ($) { my $pdu = shift; my ($length, $rest); return error ("IP Address tag (".snmp_ip_address_tag.") expected") unless ord (substr ($pdu, 0, 1)) == snmp_ip_address_tag; ($length,$pdu) = decode_length ($pdu, 1); return error ("Length of IP address should be four") unless $length == 4; sprintf "%d.%d.%d.%d", unpack ("CCCC", $pdu); } # IlvJa # Returns a string with the pretty prints of all # the elements in the sequence. sub pretty_generic_sequence ($) { my ($pdu) = shift; my $rest; my $type = ord substr ($pdu, 0 ,1); my $flags = context_flag | constructor_flag; return error (sprintf ("Tag 0x%x is not a valid sequence tag",$type)) unless ($type == (&constructor_flag | &sequence_tag) # sequence || $type == (0 | $flags) #get_request || $type == (1 | $flags) #getnext_request || $type == (2 | $flags) #response || $type == (3 | $flags) #set_request || $type == (4 | $flags) #trap_request || $type == (5 | $flags) #getbulk_request || $type == (6 | $flags) #inform_request || $type == (7 | $flags) #trap2_request ); my $curelem; my $pretty_result; # Holds the pretty printed sequence. my $pretty_elem; # Holds the pretty printed current elem. my $first_elem = 'true'; # Cut away the first Tag and Length from $packet and then # init $rest with that. (undef, $rest) = decode_length ($pdu, 1); while($rest) { ($curelem,$rest) = decode_generic_tlv($rest); $pretty_elem = pretty_print($curelem); $pretty_result .= "\n" if not $first_elem; $pretty_result .= $pretty_elem; # The rest of the iterations are not related to the # first element of the sequence so.. $first_elem = '' if $first_elem; } return $pretty_result; } sub hex_string ($) { &hex_string_of_type ($_[0], octet_string_tag); } sub hex_string_of_type ($$) { my ($pdu, $wanted_type) = @_; my ($length); return error ("BER tag ".$wanted_type." expected") unless ord (substr ($pdu, 0, 1)) == $wanted_type; ($length,$pdu) = decode_length ($pdu, 1); hex_string_aux ($pdu); } sub hex_string_aux ($) { my ($binary_string) = @_; my ($c, $result); $result = ''; for $c (unpack "C*", $binary_string) { $result .= sprintf "%02x", $c; } $result; } sub decode_oid ($) { my ($pdu) = @_; my ($result,$pdu_rest); my (@result); $result = ord (substr ($pdu, 0, 1)); return error ("Object ID expected") unless $result == object_id_tag; ($result, $pdu_rest) = decode_length ($pdu, 1); return error ("Short PDU") if $result > length $pdu_rest; @result = (substr ($pdu, 0, $result + (length ($pdu) - length ($pdu_rest))), substr ($pdu_rest, $result)); @result; } # IlvJa # This takes a PDU and returns a two element list consisting of # the first element found in the PDU (whatever it is) and the # rest of the PDU sub decode_generic_tlv ($) { my ($pdu) = @_; my (@result); my ($elemlength,$pdu_rest) = decode_length ($pdu, 1); @result = (# Extract the first element. substr ($pdu, 0, $elemlength + (length ($pdu) - length ($pdu_rest) ) ), #Extract the rest of the PDU. substr ($pdu_rest, $elemlength) ); @result; } sub decode_by_template { my ($pdu) = shift; local ($_) = shift; return decode_by_template_2 ($pdu, $_, 0, 0, @_); } my $template_debug = 0; sub decode_by_template_2 { my ($pdu, $template, $pdu_index, $template_index); local ($_); $pdu = shift; $template = $_ = shift; $pdu_index = shift; $template_index = shift; my (@results); my ($length,$expected,$read,$rest); return undef unless defined $pdu; while (0 < length ($_)) { if (substr ($_, 0, 1) eq '%') { print STDERR "template $_ ", length $pdu," bytes remaining\n" if $template_debug; $_ = substr ($_,1); ++$template_index; if (($expected) = /^(\d*|\*)\{(.*)/) { ## %{ $template_index += length ($expected) + 1; print STDERR "%{\n" if $template_debug; $_ = $2; $expected = shift | constructor_flag if ($expected eq '*'); $expected = sequence_tag | constructor_flag if $expected eq ''; return template_error ("Unexpected end of PDU", $template, $template_index) if !defined $pdu or $pdu eq ''; return template_error ("Expected sequence tag $expected, got ". ord (substr ($pdu, 0, 1)), $template, $template_index) unless (ord (substr ($pdu, 0, 1)) == $expected); (($length,$pdu) = decode_length ($pdu, 1)) || return template_error ("cannot read length", $template, $template_index); return template_error ("Expected length $length, got ".length $pdu , $template, $template_index) unless length $pdu == $length; } elsif (($expected,$rest) = /^(\*|)s(.*)/) { ## %s $template_index += length ($expected) + 1; ($expected = shift) if $expected eq '*'; (($read,$pdu) = decode_string ($pdu)) || return template_error ("cannot read string", $template, $template_index); print STDERR "%s => $read\n" if $template_debug; if ($expected eq '') { push @results, $read; } else { return template_error ("Expected $expected, read $read", $template, $template_index) unless $expected eq $read; } $_ = $rest; } elsif (($rest) = /^A(.*)/) { ## %A $template_index += 1; { my ($tag, $length, $value); $tag = ord (substr ($pdu, 0, 1)); return error ("Expected IP address, got tag ".$tag) unless $tag == snmp_ip_address_tag; ($length, $pdu) = decode_length ($pdu, 1); return error ("Inconsistent length of InetAddress encoding") if $length > length $pdu; return template_error ("IP address must be four bytes long", $template, $template_index) unless $length == 4; $read = substr ($pdu, 0, $length); $pdu = substr ($pdu, $length); } print STDERR "%A => $read\n" if $template_debug; push @results, $read; $_ = $rest; } elsif (/^O(.*)/) { ## %O $template_index += 1; $_ = $1; (($read,$pdu) = decode_oid ($pdu)) || return template_error ("cannot read OID", $template, $template_index); print STDERR "%O => ".pretty_oid ($read)."\n" if $template_debug; push @results, $read; } elsif (($expected,$rest) = /^(\d*|\*|)i(.*)/) { ## %i $template_index += length ($expected) + 1; print STDERR "%i\n" if $template_debug; $_ = $rest; (($read,$pdu) = decode_int ($pdu)) || return template_error ("cannot read int", $template, $template_index); if ($expected eq '') { push @results, $read; } else { $expected = int (shift) if $expected eq '*'; return template_error (sprintf ("Expected %d (0x%x), got %d (0x%x)", $expected, $expected, $read, $read), $template, $template_index) unless ($expected == $read) } } elsif (($rest) = /^u(.*)/) { ## %u $template_index += 1; print STDERR "%u\n" if $template_debug; $_ = $rest; (($read,$pdu) = decode_unsignedlike ($pdu)) || return template_error ("cannot read uptime", $template, $template_index); push @results, $read; } elsif (/^\@(.*)/) { ## %@ $template_index += 1; print STDERR "%@\n" if $template_debug; $_ = $1; push @results, $pdu; $pdu = ''; } else { return template_error ("Unknown decoding directive in template: $_", $template, $template_index); } } else { if (substr ($_, 0, 1) ne substr ($pdu, 0, 1)) { return template_error ("Expected ".substr ($_, 0, 1).", got ".substr ($pdu, 0, 1), $template, $template_index); } $_ = substr ($_,1); $pdu = substr ($pdu,1); } } return template_error ("PDU too long", $template, $template_index) if length ($pdu) > 0; return template_error ("PDU too short", $template, $template_index) if length ($_) > 0; @results; } sub decode_sequence ($) { my ($pdu) = @_; my ($result); my (@result); $result = ord (substr ($pdu, 0, 1)); return error ("Sequence expected") unless $result == (sequence_tag | constructor_flag); ($result, $pdu) = decode_length ($pdu, 1); return error ("Short PDU") if $result > length $pdu; @result = (substr ($pdu, 0, $result), substr ($pdu, $result)); @result; } sub decode_int ($) { my ($pdu) = @_; my $tag = ord (substr ($pdu, 0, 1)); return error ("Integer expected, found tag ".$tag) unless $tag == int_tag; decode_intlike ($pdu); } sub decode_intlike ($) { decode_intlike_s ($_[0], 1); } sub decode_unsignedlike ($) { decode_intlike_s ($_[0], 0); } my $have_math_bigint_p = 0; sub decode_intlike_s ($$) { my ($pdu, $signedp) = @_; my ($length,$result); ($length,$pdu) = decode_length ($pdu, 1); my $ptr = 0; $result = unpack ($signedp ? "c" : "C", substr ($pdu, $ptr++, 1)); if ($length > 5 || ($length == 5 && $result > 0)) { require 'Math/BigInt.pm' unless $have_math_bigint_p++; $result = new Math::BigInt ($result); } while (--$length > 0) { $result *= 256; $result += unpack ("C", substr ($pdu, $ptr++, 1)); } ($result, substr ($pdu, $ptr)); } sub decode_string ($) { my ($pdu) = shift; my ($result); $result = ord (substr ($pdu, 0, 1)); return error ("Expected octet string, got tag ".$result) unless $result == octet_string_tag; ($result, $pdu) = decode_length ($pdu, 1); return error ("Short PDU") if $result > length $pdu; return (substr ($pdu, 0, $result), substr ($pdu, $result)); } sub decode_length ($@) { my ($pdu) = shift; my $index = shift || 0; my ($result); my (@result); $result = ord (substr ($pdu, $index, 1)); if ($result & long_length) { if ($result == (long_length | 1)) { @result = (ord (substr ($pdu, $index+1, 1)), substr ($pdu, $index+2)); } elsif ($result == (long_length | 2)) { @result = ((ord (substr ($pdu, $index+1, 1)) << 8) + ord (substr ($pdu, $index+2, 1)), substr ($pdu, $index+3)); } else { return error ("Unsupported length"); } } else { @result = ($result, substr ($pdu, $index+1)); } @result; } # This takes a hashref that specifies functions to call when # the specified value type is being printed. It returns the # number of functions that were registered. sub register_pretty_printer($) { my ($h_ref) = shift; my ($type, $val, $cnt); $cnt = 0; while(($type, $val) = each %$h_ref) { if (ref $val eq "CODE") { $pretty_printer{$type} = $val; $cnt++; } } return($cnt); } # This takes a hashref that specifies functions to call when # the specified value type is being printed. It removes the # functions from the list for the types specified. # It returns the number of functions that were unregistered. sub unregister_pretty_printer($) { my ($h_ref) = shift; my ($type, $val, $cnt); $cnt = 0; while(($type, $val) = each %$h_ref) { if ((exists ($pretty_printer{$type})) && ($pretty_printer{$type} == $val)) { if (exists($default_printer{$type})) { $pretty_printer{$type} = $default_printer{$type}; } else { delete $pretty_printer{$type}; } $cnt++; } } return($cnt); } #### OID prefix check ### encoded_oid_prefix_p OID1 OID2 ### ### OID1 and OID2 should be BER-encoded OIDs. ### The function returns non-zero iff OID1 is a prefix of OID2. ### This can be used in the termination condition of a loop that walks ### a table using GetNext or GetBulk. ### sub encoded_oid_prefix_p ($$) { my ($oid1, $oid2) = @_; my ($i1, $i2); my ($l1, $l2); my ($subid1, $subid2); return error ("OID tag expected") unless ord (substr ($oid1, 0, 1)) == object_id_tag; return error ("OID tag expected") unless ord (substr ($oid2, 0, 1)) == object_id_tag; ($l1,$oid1) = decode_length ($oid1, 1); ($l2,$oid2) = decode_length ($oid2, 1); for ($i1 = 0, $i2 = 0; $i1 < $l1 && $i2 < $l2; ++$i1, ++$i2) { ($subid1,$i1) = &decode_subid ($oid1, $i1, $l1); ($subid2,$i2) = &decode_subid ($oid2, $i2, $l2); return 0 unless $subid1 == $subid2; } return $i2 if $i1 == $l1; return 0; } ### decode_subid OID INDEX ### ### Decodes a subid field from a BER-encoded object ID. ### Returns two values: the field, and the index of the last byte that ### was actually decoded. ### sub decode_subid ($$$) { my ($oid, $i, $l) = @_; my $subid = 0; my $next; while (($next = ord (substr ($oid, $i, 1))) >= 128) { $subid = ($subid << 7) + ($next & 0x7f); ++$i; return error ("decoding object ID: short field") unless $i < $l; } return (($subid << 7) + $next, $i); } sub error (@) { $errmsg = join ("",@_); return undef; } sub template_error ($$$) { my ($errmsg, $template, $index) = @_; return error ($errmsg."\n ".$template."\n ".(' ' x $index)."^"); } 1; smokeping-2.7.3/lib/Makefile.am000066400000000000000000000021461342220157600163260ustar00rootroot00000000000000# Copyright (C) 2010 Stanislav Sinyagin # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # AUTOMAKE_OPTIONS = foreign PM := $(wildcard *.pm) SP := $(wildcard Smokeping/*.pm) SORT := $(wildcard Smokeping/sorters/*.pm) PROBE := $(wildcard Smokeping/probes/*.pm) MATCH := $(wildcard Smokeping/matchers/*.pm) EXTRA_DIST = $(PM) $(SP) $(SORT) $(PROBE) $(MATCH) perllibdir = $(prefix)/lib nobase_perllib_DATA = $(EXTRA_DIST) smokeping-2.7.3/lib/Makefile.in000066400000000000000000000347101342220157600163410ustar00rootroot00000000000000# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2010 Stanislav Sinyagin # Copyright (C) 2011 Tobias Oetiker # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(perllibdir)" DATA = $(nobase_perllib_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CP = @CP@ CURL = @CURL@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ FIND = @FIND@ GMAKE = @GMAKE@ GREP = @GREP@ HTDOCSDIR = @HTDOCSDIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NROFF = @NROFF@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ RM = @RM@ RMDIR = @RMDIR@ SED = @SED@ SENDMAIL = @SENDMAIL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ URL_CAT = @URL_CAT@ VERSION = @VERSION@ WGET = @WGET@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ enable_pkgonly = @enable_pkgonly@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # AUTOMAKE_OPTIONS = foreign PM := $(wildcard *.pm) SP := $(wildcard Smokeping/*.pm) SORT := $(wildcard Smokeping/sorters/*.pm) PROBE := $(wildcard Smokeping/probes/*.pm) MATCH := $(wildcard Smokeping/matchers/*.pm) EXTRA_DIST = $(PM) $(SP) $(SORT) $(PROBE) $(MATCH) perllibdir = $(prefix)/lib nobase_perllib_DATA = $(EXTRA_DIST) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nobase_perllibDATA: $(nobase_perllib_DATA) @$(NORMAL_INSTALL) @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(perllibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(perllibdir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(perllibdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(perllibdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(perllibdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(perllibdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_perllibDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_perllib_DATA)'; test -n "$(perllibdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(perllibdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(perllibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_perllibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_perllibDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nobase_perllibDATA \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nobase_perllibDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: smokeping-2.7.3/lib/SNMP_Session.pm000066400000000000000000001050451342220157600171120ustar00rootroot00000000000000### -*- mode: Perl -*- ###################################################################### ### SNMP Request/Response Handling ###################################################################### ### Copyright (c) 1995-2008, Simon Leinen. ### ### This program is free software; you can redistribute it under the ### "Artistic License 2.0" included in this distribution ### (file "Artistic"). ###################################################################### ### The abstract class SNMP_Session defines objects that can be used ### to communicate with SNMP entities. It has methods to send ### requests to and receive responses from an agent. ### ### Two instantiable subclasses are defined: ### SNMPv1_Session implements SNMPv1 (RFC 1157) functionality ### SNMPv2c_Session implements community-based SNMPv2. ###################################################################### ### Created by: Simon Leinen ### ### Contributions and fixes by: ### ### Matthew Trunnell ### Tobias Oetiker ### Heine Peters ### Daniel L. Needles ### Mike Mitchell ### Clinton Wong ### Alan Nichols ### Mike McCauley ### Andrew W. Elble ### Brett T Warden : pretty UInteger32 ### Michael Deegan ### Sergio Macedo ### Jakob Ilves (/IlvJa) : PDU capture ### Valerio Bontempi : IPv6 support ### Lorenzo Colitti : IPv6 support ### Philippe Simonet : Export avoid... ### Luc Pauwels : use_16bit_request_ids ### Andrew Cornford-Matheson : inform ### Gerry Dalton : strict subs bug ### Mike Fischer : pass MSG_DONTWAIT to recv() ###################################################################### package SNMP_Session; require 5.002; use strict; use Exporter; use vars qw(@ISA $VERSION @EXPORT $errmsg $suppress_warnings $default_avoid_negative_request_ids $default_use_16bit_request_ids); use Socket; use BER '1.05'; use Carp; sub map_table ($$$ ); sub map_table_4 ($$$$); sub map_table_start_end ($$$$$$); sub index_compare ($$); sub oid_diff ($$); $VERSION = '1.13'; @ISA = qw(Exporter); @EXPORT = qw(errmsg suppress_warnings index_compare oid_diff recycle_socket ipv6available); my $default_debug = 0; ### Default initial timeout (in seconds) waiting for a response PDU ### after a request is sent. Note that when a request is retried, the ### timeout is increased by BACKOFF (see below). ### my $default_timeout = 2.0; ### Default number of attempts to get a reply for an SNMP request. If ### no response is received after TIMEOUT seconds, the request is ### resent and a new response awaited with a longer timeout (see the ### documentation on BACKOFF below). The "retries" value should be at ### least 1, because the first attempt counts, too (the name "retries" ### is confusing, sorry for that). ### my $default_retries = 5; ### Default backoff factor for SNMP_Session objects. This factor is ### used to increase the TIMEOUT every time an SNMP request is ### retried. ### my $default_backoff = 1.0; ### Default value for maxRepetitions. This specifies how many table ### rows are requested in getBulk requests. Used when walking tables ### using getBulk (only available in SNMPv2(c) and later). If this is ### too small, then a table walk will need unnecessarily many ### request/response exchanges. If it is too big, the agent may ### compute many variables after the end of the table. It is ### recommended to set this explicitly for each table walk by using ### map_table_4(). ### my $default_max_repetitions = 12; ### Default value for "avoid_negative_request_ids". ### ### Set this to non-zero if you have agents that have trouble with ### negative request IDs, and don't forget to complain to your agent ### vendor. According to the spec (RFC 1905), the request-id is an ### Integer32, i.e. its range is from -(2^31) to (2^31)-1. However, ### some agents erroneously encode the response ID as an unsigned, ### which prevents this code from matching such responses to requests. ### $SNMP_Session::default_avoid_negative_request_ids = 0; ### Default value for "use_16bit_request_ids". ### ### Set this to non-zero if you have agents that use 16bit request IDs, ### and don't forget to complain to your agent vendor. ### $SNMP_Session::default_use_16bit_request_ids = 0; ### Whether all SNMP_Session objects should share a single UDP socket. ### $SNMP_Session::recycle_socket = 0; ### IPv6 initialization code: check that IPv6 libraries are available, ### and if so load them. ### We store the length of an IPv6 socket address structure in the class ### so we can determine if a socket address is IPv4 or IPv6 just by checking ### its length. The proper way to do this would be to use sockaddr_family(), ### but this function is only available in recent versions of Socket.pm. my $ipv6_addr_len; ### Flags to be passed to recv() when non-blocking behavior is ### desired. On most POSIX-like systems this will be set to ### MSG_DONTWAIT, on other systems we leave it at zero. ### my $dont_wait_flags; BEGIN { $ipv6_addr_len = undef; $SNMP_Session::ipv6available = 0; $dont_wait_flags = 0; if (eval {local $SIG{__DIE__};require Socket6;} && eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) { import Socket6; $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1"))); $SNMP_Session::ipv6available = 1; } eval 'local $SIG{__DIE__};local $SIG{__WARN__};$dont_wait_flags = MSG_DONTWAIT();'; } ### Cache for reusable sockets. This is indexed by socket (address) ### family, so that we don't try to reuse an IPv4 socket for IPv6 or ### vice versa. ### my %the_socket = (); $SNMP_Session::errmsg = ''; $SNMP_Session::suppress_warnings = 0; sub get_request { 0 | context_flag () }; sub getnext_request { 1 | context_flag () }; sub get_response { 2 | context_flag () }; sub set_request { 3 | context_flag () }; sub trap_request { 4 | context_flag () }; sub getbulk_request { 5 | context_flag () }; sub inform_request { 6 | context_flag () }; sub trap2_request { 7 | context_flag () }; sub standard_udp_port { 161 }; sub open { return SNMPv1_Session::open (@_); } sub timeout { $_[0]->{timeout} } sub retries { $_[0]->{retries} } sub backoff { $_[0]->{backoff} } sub set_timeout { my ($session, $timeout) = @_; croak ("timeout ($timeout) must be a positive number") unless $timeout > 0.0; $session->{'timeout'} = $timeout; } sub set_retries { my ($session, $retries) = @_; croak ("retries ($retries) must be a non-negative integer") unless $retries == int ($retries) && $retries >= 0; $session->{'retries'} = $retries; } sub set_backoff { my ($session, $backoff) = @_; croak ("backoff ($backoff) must be a number >= 1.0") unless $backoff == int ($backoff) && $backoff >= 1.0; $session->{'backoff'} = $backoff; } sub encode_request_3 ($$$@) { my($this, $reqtype, $encoded_oids_or_pairs, $i1, $i2) = @_; my($request); local($_); $this->{request_id} = ($this->{request_id} == 0x7fffffff) ? -0x80000000 : $this->{request_id}+1; $this->{request_id} += 0x80000000 if ($this->{avoid_negative_request_ids} && $this->{request_id} < 0); $this->{request_id} &= 0x0000ffff if ($this->{use_16bit_request_ids}); foreach $_ (@{$encoded_oids_or_pairs}) { if (ref ($_) eq 'ARRAY') { $_ = &encode_sequence ($_->[0], $_->[1]) || return $this->ber_error ("encoding pair"); } else { $_ = &encode_sequence ($_, encode_null()) || return $this->ber_error ("encoding value/null pair"); } } $request = encode_tagged_sequence ($reqtype, encode_int ($this->{request_id}), defined $i1 ? encode_int ($i1) : encode_int_0 (), defined $i2 ? encode_int ($i2) : encode_int_0 (), encode_sequence (@{$encoded_oids_or_pairs})) || return $this->ber_error ("encoding request PDU"); return $this->wrap_request ($request); } sub encode_get_request { my($this, @oids) = @_; return encode_request_3 ($this, get_request, \@oids); } sub encode_getnext_request { my($this, @oids) = @_; return encode_request_3 ($this, getnext_request, \@oids); } sub encode_getbulk_request { my($this, $non_repeaters, $max_repetitions, @oids) = @_; return encode_request_3 ($this, getbulk_request, \@oids, $non_repeaters, $max_repetitions); } sub encode_set_request { my($this, @encoded_pairs) = @_; return encode_request_3 ($this, set_request, \@encoded_pairs); } sub encode_trap_request ($$$$$$@) { my($this, $ent, $agent, $gen, $spec, $dt, @pairs) = @_; my($request); local($_); foreach $_ (@pairs) { if (ref ($_) eq 'ARRAY') { $_ = &encode_sequence ($_->[0], $_->[1]) || return $this->ber_error ("encoding pair"); } else { $_ = &encode_sequence ($_, encode_null()) || return $this->ber_error ("encoding value/null pair"); } } $request = encode_tagged_sequence (trap_request, $ent, $agent, $gen, $spec, $dt, encode_sequence (@pairs)) || return $this->ber_error ("encoding trap PDU"); return $this->wrap_request ($request); } sub encode_v2_trap_request ($@) { my($this, @pairs) = @_; return encode_request_3($this, trap2_request, \@pairs); } sub decode_get_response { my($this, $response) = @_; my @rest; @{$this->{'unwrapped'}}; } sub decode_trap_request ($$) { my ($this, $trap) = @_; my ($snmp_version, $community, $ent, $agent, $gen, $spec, $dt, $request_id, $error_status, $error_index, $bindings); ($snmp_version, $community, $ent, $agent, $gen, $spec, $dt, $bindings) = decode_by_template ($trap, "%{%i%s%*{%O%A%i%i%u%{%@", trap_request); if (!defined $snmp_version) { ($snmp_version, $community, $request_id, $error_status, $error_index, $bindings) = decode_by_template ($trap, "%{%i%s%*{%i%i%i%{%@", trap2_request); if (!defined $snmp_version) { ($snmp_version, $community,$request_id, $error_status, $error_index, $bindings) = decode_by_template ($trap, "%{%i%s%*{%i%i%i%{%@", inform_request); } return $this->error_return ("v2 trap/inform request contained errorStatus/errorIndex " .$error_status."/".$error_index) if defined $error_status && defined $error_index && ($error_status != 0 || $error_index != 0); } if (!defined $snmp_version) { return $this->error_return ("BER error decoding trap:\n ".$BER::errmsg); } return ($community, $ent, $agent, $gen, $spec, $dt, $bindings); } sub wait_for_response { my($this) = shift; my($timeout) = shift || 10.0; my($rin,$win,$ein) = ('','',''); my($rout,$wout,$eout); vec($rin,$this->sockfileno,1) = 1; select($rout=$rin,$wout=$win,$eout=$ein,$timeout); } sub get_request_response ($@) { my($this, @oids) = @_; return $this->request_response_5 ($this->encode_get_request (@oids), get_response, \@oids, 1); } sub set_request_response ($@) { my($this, @pairs) = @_; return $this->request_response_5 ($this->encode_set_request (@pairs), get_response, \@pairs, 1); } sub getnext_request_response ($@) { my($this,@oids) = @_; return $this->request_response_5 ($this->encode_getnext_request (@oids), get_response, \@oids, 1); } sub getbulk_request_response ($$$@) { my($this,$non_repeaters,$max_repetitions,@oids) = @_; return $this->request_response_5 ($this->encode_getbulk_request ($non_repeaters,$max_repetitions,@oids), get_response, \@oids, 1); } sub trap_request_send ($$$$$$@) { my($this, $ent, $agent, $gen, $spec, $dt, @pairs) = @_; my($req); $req = $this->encode_trap_request ($ent, $agent, $gen, $spec, $dt, @pairs); ## Encoding may have returned an error. return undef unless defined $req; $this->send_query($req) || return $this->error ("send_trap: $!"); return 1; } sub v2_trap_request_send ($$$@) { my($this, $trap_oid, $dt, @pairs) = @_; my @sysUptime_OID = ( 1,3,6,1,2,1,1,3 ); my @snmpTrapOID_OID = ( 1,3,6,1,6,3,1,1,4,1 ); my($req); unshift @pairs, [encode_oid (@snmpTrapOID_OID,0), encode_oid (@{$trap_oid})]; unshift @pairs, [encode_oid (@sysUptime_OID,0), encode_timeticks ($dt)]; $req = $this->encode_v2_trap_request (@pairs); ## Encoding may have returned an error. return undef unless defined $req; $this->send_query($req) || return $this->error ("send_trap: $!"); return 1; } sub request_response_5 ($$$$$) { my ($this, $req, $response_tag, $oids, $errorp) = @_; my $retries = $this->retries; my $timeout = $this->timeout; my ($nfound, $timeleft); ## Encoding may have returned an error. return undef unless defined $req; $timeleft = $timeout; while ($retries > 0) { $this->send_query ($req) || return $this->error ("send_query: $!"); # IlvJa # Add request pdu to capture_buffer push @{$this->{'capture_buffer'}}, $req if (defined $this->{'capture_buffer'} and ref $this->{'capture_buffer'} eq 'ARRAY'); # wait_for_response: ($nfound, $timeleft) = $this->wait_for_response($timeleft); if ($nfound > 0) { my($response_length); $response_length = $this->receive_response_3 ($response_tag, $oids, $errorp, 1); if ($response_length) { # IlvJa # Add response pdu to capture_buffer push (@{$this->{'capture_buffer'}}, substr($this->{'pdu_buffer'}, 0, $response_length) ) if (defined $this->{'capture_buffer'} and ref $this->{'capture_buffer'} eq 'ARRAY'); # return $response_length; } elsif (defined ($response_length)) { goto wait_for_response; # A response has been received, but for a different # request ID or from a different IP address. } else { return undef; } } else { ## No response received - retry --$retries; $timeout *= $this->backoff; $timeleft = $timeout; } } # IlvJa # Add empty packet to capture_buffer push @{$this->{'capture_buffer'}}, "" if (defined $this->{'capture_buffer'} and ref $this->{'capture_buffer'} eq 'ARRAY'); # $this->error ("no response received"); } sub map_table ($$$) { my ($session, $columns, $mapfn) = @_; return $session->map_table_4 ($columns, $mapfn, $session->default_max_repetitions ()); } sub map_table_4 ($$$$) { my ($session, $columns, $mapfn, $max_repetitions) = @_; return $session->map_table_start_end ($columns, $mapfn, "", undef, $max_repetitions); } sub map_table_start_end ($$$$$$) { my ($session, $columns, $mapfn, $start, $end, $max_repetitions) = @_; my @encoded_oids; my $call_counter = 0; my $base_index = $start; do { foreach (@encoded_oids = @{$columns}) { $_=encode_oid (@{$_},split '\.',$base_index) || return $session->ber_error ("encoding OID $base_index"); } if ($session->getnext_request_response (@encoded_oids)) { my $response = $session->pdu_buffer; my ($bindings) = $session->decode_get_response ($response); my $smallest_index = undef; my @collected_values = (); my @bases = @{$columns}; while ($bindings ne '') { my ($binding, $oid, $value); my $base = shift @bases; ($binding, $bindings) = decode_sequence ($bindings); ($oid, $value) = decode_by_template ($binding, "%O%@"); my $out_index; $out_index = &oid_diff ($base, $oid); my $cmp; if (!defined $smallest_index || ($cmp = index_compare ($out_index,$smallest_index)) == -1) { $smallest_index = $out_index; grep ($_=undef, @collected_values); push @collected_values, $value; } elsif ($cmp == 1) { push @collected_values, undef; } else { push @collected_values, $value; } } (++$call_counter, &$mapfn ($smallest_index, @collected_values)) if defined $smallest_index; $base_index = $smallest_index; } else { return undef; } } while (defined $base_index && (!defined $end || index_compare ($base_index, $end) < 0)); $call_counter; } sub index_compare ($$) { my ($i1, $i2) = @_; $i1 = '' unless defined $i1; $i2 = '' unless defined $i2; if ($i1 eq '') { return $i2 eq '' ? 0 : 1; } elsif ($i2 eq '') { return 1; } elsif (!$i1) { return $i2 eq '' ? 1 : !$i2 ? 0 : 1; } elsif (!$i2) { return -1; } else { my ($f1,$r1) = split('\.',$i1,2); my ($f2,$r2) = split('\.',$i2,2); if ($f1 < $f2) { return -1; } elsif ($f1 > $f2) { return 1; } else { return index_compare ($r1,$r2); } } } sub oid_diff ($$) { my($base, $full) = @_; my $base_dotnot = join ('.',@{$base}); my $full_dotnot = BER::pretty_oid ($full); return undef unless substr ($full_dotnot, 0, length $base_dotnot) eq $base_dotnot && substr ($full_dotnot, length $base_dotnot, 1) eq '.'; substr ($full_dotnot, length ($base_dotnot)+1); } # Pretty_address returns a human-readable representation of an IPv4 or IPv6 address. sub pretty_address { my($addr) = shift; my($port, $addrunpack, $addrstr); # Disable strict subs to stop old versions of perl from # complaining about AF_INET6 when Socket6 is not available if( (defined $ipv6_addr_len) && (length $addr == $ipv6_addr_len)) { ($port,$addrunpack) = unpack_sockaddr_in6 ($addr); $addrstr = inet_ntop (AF_INET6(), $addrunpack); } else { ($port,$addrunpack) = unpack_sockaddr_in ($addr); $addrstr = inet_ntoa ($addrunpack); } return sprintf ("[%s].%d", $addrstr, $port); } sub version { $VERSION; } sub error_return ($$) { my ($this,$message) = @_; $SNMP_Session::errmsg = $message; unless ($SNMP_Session::suppress_warnings) { $message =~ s/^/ /mg; carp ("Error:\n".$message."\n"); } return undef; } sub error ($$) { my ($this,$message) = @_; my $session = $this->to_string; $SNMP_Session::errmsg = $message."\n".$session; unless ($SNMP_Session::suppress_warnings) { $session =~ s/^/ /mg; $message =~ s/^/ /mg; carp ("SNMP Error:\n".$SNMP_Session::errmsg."\n"); } return undef; } sub ber_error ($$) { my ($this,$type) = @_; my ($errmsg) = $BER::errmsg; $errmsg =~ s/^/ /mg; return $this->error ("$type:\n$errmsg"); } package SNMPv1_Session; use strict qw(vars subs); # see above use vars qw(@ISA); use SNMP_Session; use Socket; use BER; use IO::Socket; use Carp; BEGIN { if($SNMP_Session::ipv6available) { import IO::Socket::INET6; import Socket6; } } @ISA = qw(SNMP_Session); sub snmp_version { 0 } # Supports both IPv4 and IPv6. # Numeric IPv6 addresses must be passed between square brackets [] sub open { my($this, $remote_hostname,$community,$port, $max_pdu_len,$local_port,$max_repetitions, $local_hostname,$ipv4only) = @_; my($remote_addr,$socket,$sockfamily); $ipv4only = 1 unless defined $ipv4only; $sockfamily = AF_INET; $community = 'public' unless defined $community; $port = SNMP_Session::standard_udp_port unless defined $port; $max_pdu_len = 8000 unless defined $max_pdu_len; $max_repetitions = $default_max_repetitions unless defined $max_repetitions; if ($ipv4only || ! $SNMP_Session::ipv6available) { # IPv4-only code, uses only Socket and INET calls if (defined $remote_hostname) { $remote_addr = inet_aton ($remote_hostname) or return $this->error_return ("can't resolve \"$remote_hostname\" to IP address"); } if ($SNMP_Session::recycle_socket && exists $the_socket{$sockfamily}) { $socket = $the_socket{$sockfamily}; } else { $socket = IO::Socket::INET->new(Proto => 17, Type => SOCK_DGRAM, LocalAddr => $local_hostname, LocalPort => $local_port) || return $this->error_return ("creating socket: $!"); $the_socket{$sockfamily} = $socket if $SNMP_Session::recycle_socket; } $remote_addr = pack_sockaddr_in ($port, $remote_addr) if defined $remote_addr; } else { # IPv6-capable code. Will use IPv6 or IPv4 depending on the address. # Uses Socket6 and INET6 calls. # If it's a numeric IPv6 addresses, remove square brackets if ($remote_hostname =~ /^\[(.*)\]$/) { $remote_hostname = $1; } my (@res, $socktype_tmp, $proto_tmp, $canonname_tmp); @res = getaddrinfo($remote_hostname, $port, AF_UNSPEC, SOCK_DGRAM); ($sockfamily, $socktype_tmp, $proto_tmp, $remote_addr, $canonname_tmp) = @res; if (scalar(@res) < 5) { return $this->error_return ("can't resolve \"$remote_hostname\" to IPv6 address"); } if ($SNMP_Session::recycle_socket && exists $the_socket{$sockfamily}) { $socket = $the_socket{$sockfamily}; } elsif ($sockfamily == AF_INET) { $socket = IO::Socket::INET->new(Proto => 17, Type => SOCK_DGRAM, LocalAddr => $local_hostname, LocalPort => $local_port) || return $this->error_return ("creating socket: $!"); } else { $socket = IO::Socket::INET6->new(Proto => 17, Type => SOCK_DGRAM, LocalAddr => $local_hostname, LocalPort => $local_port) || return $this->error_return ("creating socket: $!"); $the_socket{$sockfamily} = $socket if $SNMP_Session::recycle_socket; } } bless { 'sock' => $socket, 'sockfileno' => fileno ($socket), 'community' => $community, 'remote_hostname' => $remote_hostname, 'remote_addr' => $remote_addr, 'sockfamily' => $sockfamily, 'max_pdu_len' => $max_pdu_len, 'pdu_buffer' => '\0' x $max_pdu_len, 'request_id' => (int (rand 0x10000) << 16) + int (rand 0x10000) - 0x80000000, 'timeout' => $default_timeout, 'retries' => $default_retries, 'backoff' => $default_backoff, 'debug' => $default_debug, 'error_status' => 0, 'error_index' => 0, 'default_max_repetitions' => $max_repetitions, 'use_getbulk' => 1, 'lenient_source_address_matching' => 1, 'lenient_source_port_matching' => 1, 'avoid_negative_request_ids' => $SNMP_Session::default_avoid_negative_request_ids, 'use_16bit_request_ids' => $SNMP_Session::default_use_16bit_request_ids, 'capture_buffer' => undef, }; } sub open_trap_session (@) { my ($this, $port) = @_; $port = 162 unless defined $port; return $this->open (undef, "", 161, undef, $port); } sub sock { $_[0]->{sock} } sub sockfileno { $_[0]->{sockfileno} } sub remote_addr { $_[0]->{remote_addr} } sub pdu_buffer { $_[0]->{pdu_buffer} } sub max_pdu_len { $_[0]->{max_pdu_len} } sub default_max_repetitions { defined $_[1] ? $_[0]->{default_max_repetitions} = $_[1] : $_[0]->{default_max_repetitions} } sub debug { defined $_[1] ? $_[0]->{debug} = $_[1] : $_[0]->{debug} } sub close { my($this) = shift; ## Avoid closing the socket if it may be shared with other session ## objects. if (! exists $the_socket{$this->{sockfamily}} or $this->sock ne $the_socket{$this->{sockfamily}}) { close ($this->sock) || $this->error ("close: $!"); } } sub wrap_request { my($this) = shift; my($request) = shift; encode_sequence (encode_int ($this->snmp_version), encode_string ($this->{community}), $request) || return $this->ber_error ("wrapping up request PDU"); } my @error_status_code = qw(noError tooBig noSuchName badValue readOnly genErr noAccess wrongType wrongLength wrongEncoding wrongValue noCreation inconsistentValue resourceUnavailable commitFailed undoFailed authorizationError notWritable inconsistentName); sub unwrap_response_5b { my ($this,$response,$tag,$oids,$errorp) = @_; my ($community,$request_id,@rest,$snmpver); ($snmpver,$community,$request_id, $this->{error_status}, $this->{error_index}, @rest) = decode_by_template ($response, "%{%i%s%*{%i%i%i%{%@", $tag); return $this->ber_error ("Error decoding response PDU") unless defined $snmpver; return $this->error ("Received SNMP response with unknown snmp-version field $snmpver") unless $snmpver == $this->snmp_version; if ($this->{error_status} != 0) { if ($errorp) { my ($oid, $errmsg); $errmsg = $error_status_code[$this->{error_status}] || $this->{error_status}; $oid = $oids->[$this->{error_index}-1] if $this->{error_index} > 0 && $this->{error_index}-1 <= $#{$oids}; $oid = $oid->[0] if ref($oid) eq 'ARRAY'; return ($community, $request_id, $this->error ("Received SNMP response with error code\n" ." error status: $errmsg\n" ." index ".$this->{error_index} .(defined $oid ? " (OID: ".&BER::pretty_oid($oid).")" : ""))); } else { if ($this->{error_index} == 1) { @rest[$this->{error_index}-1..$this->{error_index}] = (); } } } ($community, $request_id, @rest); } sub send_query ($$) { my ($this,$query) = @_; send ($this->sock,$query,0,$this->remote_addr); } ## Compare two sockaddr_in structures for equality. This is used when ## matching incoming responses with outstanding requests. Previous ## versions of the code simply did a bytewise comparison ("eq") of the ## two sockaddr_in structures, but this didn't work on some systems ## where sockaddr_in contains other elements than just the IP address ## and port number, notably FreeBSD. ## ## We allow for varying degrees of leniency when checking the source ## address. By default we now ignore it altogether, because there are ## agents that don't respond from UDP port 161, and there are agents ## that don't respond from the IP address the query had been sent to. ## ## The address family is stored in the session object. We could use ## sockaddr_family() to determine it from the sockaddr, but this function ## is only available in recent versions of Socket.pm. sub sa_equal_p ($$$) { my ($this, $sa1, $sa2) = @_; my ($p1,$a1,$p2,$a2); # Disable strict subs to stop old versions of perl from # complaining about AF_INET6 when Socket6 is not available if($this->{'sockfamily'} == AF_INET) { # IPv4 addresses ($p1,$a1) = unpack_sockaddr_in ($sa1); ($p2,$a2) = unpack_sockaddr_in ($sa2); } elsif($this->{'sockfamily'} == AF_INET6()) { # IPv6 addresses ($p1,$a1) = unpack_sockaddr_in6 ($sa1); ($p2,$a2) = unpack_sockaddr_in6 ($sa2); } else { return 0; } use strict "subs"; if (! $this->{'lenient_source_address_matching'}) { return 0 if $a1 ne $a2; } if (! $this->{'lenient_source_port_matching'}) { return 0 if $p1 != $p2; } return 1; } sub receive_response_3 { my ($this, $response_tag, $oids, $errorp, $dont_block_p) = @_; my ($remote_addr); my $flags = 0; $flags = $dont_wait_flags if defined $dont_block_p and $dont_block_p; $remote_addr = recv ($this->sock,$this->{'pdu_buffer'},$this->max_pdu_len,$flags); return $this->error ("receiving response PDU: $!") unless defined $remote_addr; return $this->error ("short (".length $this->{'pdu_buffer'} ." bytes) response PDU") unless length $this->{'pdu_buffer'} > 2; my $response = $this->{'pdu_buffer'}; ## ## Check whether the response came from the address we've sent the ## request to. If this is not the case, we should probably ignore ## it, as it may relate to another request. ## if (defined $this->{'remote_addr'}) { if (! $this->sa_equal_p ($remote_addr, $this->{'remote_addr'})) { if ($this->{'debug'} && !$SNMP_Session::recycle_socket) { carp ("Response came from ".&SNMP_Session::pretty_address($remote_addr) .", not ".&SNMP_Session::pretty_address($this->{'remote_addr'})) unless $SNMP_Session::suppress_warnings; } return 0; } } $this->{'last_sender_addr'} = $remote_addr; my ($response_community, $response_id, @unwrapped) = $this->unwrap_response_5b ($response, $response_tag, $oids, $errorp); if ($response_community ne $this->{community} || $response_id ne $this->{request_id}) { if ($this->{'debug'}) { carp ("$response_community != $this->{community}") unless $SNMP_Session::suppress_warnings || $response_community eq $this->{community}; carp ("$response_id != $this->{request_id}") unless $SNMP_Session::suppress_warnings || $response_id == $this->{request_id}; } return 0; } if (!defined $unwrapped[0]) { $this->{'unwrapped'} = undef; return undef; } $this->{'unwrapped'} = \@unwrapped; return length $this->pdu_buffer; } sub receive_trap { my ($this) = @_; my ($remote_addr, $iaddr, $port, $trap); $remote_addr = recv ($this->sock,$this->{'pdu_buffer'},$this->max_pdu_len,0); return undef unless $remote_addr; if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) { ($port,$iaddr) = unpack_sockaddr_in6($remote_addr); } else { ($port,$iaddr) = unpack_sockaddr_in($remote_addr); } $trap = $this->{'pdu_buffer'}; return ($trap, $iaddr, $port); } sub describe { my($this) = shift; print $this->to_string (),"\n"; } sub to_string { my($this) = shift; my ($class,$prefix); $class = ref($this); $prefix = ' ' x (length ($class) + 2); ($class .(defined $this->{remote_hostname} ? " (remote host: \"".$this->{remote_hostname}."\"" ." ".&SNMP_Session::pretty_address ($this->remote_addr).")" : " (no remote host specified)") ."\n" .$prefix." community: \"".$this->{'community'}."\"\n" .$prefix." request ID: ".$this->{'request_id'}."\n" .$prefix."PDU bufsize: ".$this->{'max_pdu_len'}." bytes\n" .$prefix." timeout: ".$this->{timeout}."s\n" .$prefix." retries: ".$this->{retries}."\n" .$prefix." backoff: ".$this->{backoff}.")"); ## sprintf ("SNMP_Session: %s (size %d timeout %g)", ## &SNMP_Session::pretty_address ($this->remote_addr),$this->max_pdu_len, ## $this->timeout); } ### SNMP Agent support ### contributed by Mike McCauley ### sub receive_request { my ($this) = @_; my ($remote_addr, $iaddr, $port, $request); $remote_addr = recv($this->sock, $this->{'pdu_buffer'}, $this->{'max_pdu_len'}, 0); return undef unless $remote_addr; if( (defined $ipv6_addr_len) && (length $remote_addr == $ipv6_addr_len)) { ($port,$iaddr) = unpack_sockaddr_in6($remote_addr); } else { ($port,$iaddr) = unpack_sockaddr_in($remote_addr); } $request = $this->{'pdu_buffer'}; return ($request, $iaddr, $port); } sub decode_request { my ($this, $request) = @_; my ($snmp_version, $community, $requestid, $errorstatus, $errorindex, $bindings); ($snmp_version, $community, $requestid, $errorstatus, $errorindex, $bindings) = decode_by_template ($request, "%{%i%s%*{%i%i%i%@", SNMP_Session::get_request); if (defined $snmp_version) { # Its a valid get_request return(SNMP_Session::get_request, $requestid, $bindings, $community); } ($snmp_version, $community, $requestid, $errorstatus, $errorindex, $bindings) = decode_by_template ($request, "%{%i%s%*{%i%i%i%@", SNMP_Session::getnext_request); if (defined $snmp_version) { # Its a valid getnext_request return(SNMP_Session::getnext_request, $requestid, $bindings, $community); } ($snmp_version, $community, $requestid, $errorstatus, $errorindex, $bindings) = decode_by_template ($request, "%{%i%s%*{%i%i%i%@", SNMP_Session::set_request); if (defined $snmp_version) { # Its a valid set_request return(SNMP_Session::set_request, $requestid, $bindings, $community); } # Something wrong with this packet # Decode failed return undef; } package SNMPv2c_Session; use strict qw(vars subs); # see above use vars qw(@ISA); use SNMP_Session; use BER; use Carp; @ISA = qw(SNMPv1_Session); sub snmp_version { 1 } sub open { my $session = SNMPv1_Session::open (@_); return undef unless defined $session; return bless $session; } ## map_table_start_end using get-bulk ## sub map_table_start_end ($$$$$$) { my ($session, $columns, $mapfn, $start, $end, $max_repetitions) = @_; my @encoded_oids; my $call_counter = 0; my $base_index = $start; my $ncols = @{$columns}; my @collected_values = (); if (! $session->{'use_getbulk'}) { return SNMP_Session::map_table_start_end ($session, $columns, $mapfn, $start, $end, $max_repetitions); } $max_repetitions = $session->default_max_repetitions unless defined $max_repetitions; for (;;) { foreach (@encoded_oids = @{$columns}) { $_=encode_oid (@{$_},split '\.',$base_index) || return $session->ber_error ("encoding OID $base_index"); } if ($session->getbulk_request_response (0, $max_repetitions, @encoded_oids)) { my $response = $session->pdu_buffer; my ($bindings) = $session->decode_get_response ($response); my @colstack = (); my $k = 0; my $j; my $min_index = undef; my @bases = @{$columns}; my $n_bindings = 0; my $binding; ## Copy all bindings into the colstack. ## The colstack is a vector of vectors. ## It contains one vector for each "repeater" variable. ## while ($bindings ne '') { ($binding, $bindings) = decode_sequence ($bindings); my ($oid, $value) = decode_by_template ($binding, "%O%@"); push @{$colstack[$k]}, [$oid, $value]; ++$k; $k = 0 if $k >= $ncols; } ## Now collect rows from the column stack: ## ## Iterate through the column stacks to find the smallest ## index, collecting the values for that index in ## @collected_values. ## ## As long as a row can be assembled, the map function is ## called on it and the iteration proceeds. ## $base_index = undef; walk_rows_from_pdu: for (;;) { my $min_index = undef; for ($k = 0; $k < $ncols; ++$k) { $collected_values[$k] = undef; my $pair = $colstack[$k]->[0]; unless (defined $pair) { $min_index = undef; last walk_rows_from_pdu; } my $this_index = SNMP_Session::oid_diff ($columns->[$k], $pair->[0]); if (defined $this_index) { my $cmp = !defined $min_index ? -1 : SNMP_Session::index_compare ($this_index, $min_index); if ($cmp == -1) { for ($j = 0; $j < $k; ++$j) { unshift (@{$colstack[$j]}, [$min_index, $collected_values[$j]]); $collected_values[$j] = undef; } $min_index = $this_index; } if ($cmp <= 0) { $collected_values[$k] = $pair->[1]; shift @{$colstack[$k]}; } } } ($base_index = undef), last if !defined $min_index; last if defined $end and SNMP_Session::index_compare ($min_index, $end) >= 0; &$mapfn ($min_index, @collected_values); ++$call_counter; $base_index = $min_index; } } else { return undef; } last if !defined $base_index; last if defined $end and SNMP_Session::index_compare ($base_index, $end) >= 0; } $call_counter; } 1; smokeping-2.7.3/lib/SNMP_util.pm000066400000000000000000001204211342220157600164370ustar00rootroot00000000000000### - *- mode: Perl -*- ###################################################################### ### SNMP_util -- SNMP utilities using SNMP_Session.pm and BER.pm ###################################################################### ### Copyright (c) 1998-2008, Mike Mitchell. ### ### This program is free software; you can redistribute it under the ### "Artistic License 2.0" included in this distribution ### (file "Artistic"). ###################################################################### ### Created by: Mike Mitchell ### ### Contributions and fixes by: ### ### Tobias Oetiker : Basic layout ### Simon Leinen : SNMP_session.pm/BER.pm ### Jeff Allen : length() of undefined value ### Johannes Demel : MIB file parse problem ### Simon Leinen : more OIDs from Interface MIB ### Jacques Supcik : Specify local IP, port ### Tobias Oetiker : HASH as first OID to set SNMP options ### Simon Leinen : 'undefined port' bug ### Daniel McDonald : request for getbulk support ### Laurent Girod : code for snmpwalkhash ### Ian Duplisse : MIB parsing suggestions ### Jakob Ilves : return_array_refs for snmpwalk() ### Valerio Bontempi : IPv6 support ### Lorenzo Colitti : IPv6 support ### Joerg Kummer : TimeTicks support in snmpset() ### Christopher J. Tengi : Gauge32 support in snmpset() ### Nicolai Petri : hashref passing for snmpwalkhash() ###################################################################### package SNMP_util; require 5.004; use strict; use vars qw(@ISA @EXPORT $VERSION); use Exporter; use Carp; use BER "1.02"; use SNMP_Session "1.00"; use Socket; $VERSION = '1.13'; @ISA = qw(Exporter); @EXPORT = qw(snmpget snmpgetnext snmpwalk snmpset snmptrap snmpgetbulk snmpmaptable snmpmaptable4 snmpwalkhash snmpmapOID snmpMIB_to_OID snmpLoad_OID_Cache snmpQueue_MIB_File); # The OID numbers from RFC1213 (MIB-II) and RFC1315 (Frame Relay) # are pre-loaded below. %SNMP_util::OIDS = ( 'iso' => '1', 'org' => '1.3', 'dod' => '1.3.6', 'internet' => '1.3.6.1', 'directory' => '1.3.6.1.1', 'mgmt' => '1.3.6.1.2', 'mib-2' => '1.3.6.1.2.1', 'system' => '1.3.6.1.2.1.1', 'sysDescr' => '1.3.6.1.2.1.1.1.0', 'sysObjectID' => '1.3.6.1.2.1.1.2.0', 'sysUpTime' => '1.3.6.1.2.1.1.3.0', 'sysUptime' => '1.3.6.1.2.1.1.3.0', 'sysContact' => '1.3.6.1.2.1.1.4.0', 'sysName' => '1.3.6.1.2.1.1.5.0', 'sysLocation' => '1.3.6.1.2.1.1.6.0', 'sysServices' => '1.3.6.1.2.1.1.7.0', 'interfaces' => '1.3.6.1.2.1.2', 'ifNumber' => '1.3.6.1.2.1.2.1.0', 'ifTable' => '1.3.6.1.2.1.2.2', 'ifEntry' => '1.3.6.1.2.1.2.2.1', 'ifIndex' => '1.3.6.1.2.1.2.2.1.1', 'ifInOctets' => '1.3.6.1.2.1.2.2.1.10', 'ifInUcastPkts' => '1.3.6.1.2.1.2.2.1.11', 'ifInNUcastPkts' => '1.3.6.1.2.1.2.2.1.12', 'ifInDiscards' => '1.3.6.1.2.1.2.2.1.13', 'ifInErrors' => '1.3.6.1.2.1.2.2.1.14', 'ifInUnknownProtos' => '1.3.6.1.2.1.2.2.1.15', 'ifOutOctets' => '1.3.6.1.2.1.2.2.1.16', 'ifOutUcastPkts' => '1.3.6.1.2.1.2.2.1.17', 'ifOutNUcastPkts' => '1.3.6.1.2.1.2.2.1.18', 'ifOutDiscards' => '1.3.6.1.2.1.2.2.1.19', 'ifDescr' => '1.3.6.1.2.1.2.2.1.2', 'ifOutErrors' => '1.3.6.1.2.1.2.2.1.20', 'ifOutQLen' => '1.3.6.1.2.1.2.2.1.21', 'ifSpecific' => '1.3.6.1.2.1.2.2.1.22', 'ifType' => '1.3.6.1.2.1.2.2.1.3', 'ifMtu' => '1.3.6.1.2.1.2.2.1.4', 'ifSpeed' => '1.3.6.1.2.1.2.2.1.5', 'ifPhysAddress' => '1.3.6.1.2.1.2.2.1.6', 'ifAdminHack' => '1.3.6.1.2.1.2.2.1.7', 'ifAdminStatus' => '1.3.6.1.2.1.2.2.1.7', 'ifOperHack' => '1.3.6.1.2.1.2.2.1.8', 'ifOperStatus' => '1.3.6.1.2.1.2.2.1.8', 'ifLastChange' => '1.3.6.1.2.1.2.2.1.9', 'at' => '1.3.6.1.2.1.3', 'atTable' => '1.3.6.1.2.1.3.1', 'atEntry' => '1.3.6.1.2.1.3.1.1', 'atIfIndex' => '1.3.6.1.2.1.3.1.1.1', 'atPhysAddress' => '1.3.6.1.2.1.3.1.1.2', 'atNetAddress' => '1.3.6.1.2.1.3.1.1.3', 'ip' => '1.3.6.1.2.1.4', 'ipForwarding' => '1.3.6.1.2.1.4.1', 'ipOutRequests' => '1.3.6.1.2.1.4.10', 'ipOutDiscards' => '1.3.6.1.2.1.4.11', 'ipOutNoRoutes' => '1.3.6.1.2.1.4.12', 'ipReasmTimeout' => '1.3.6.1.2.1.4.13', 'ipReasmReqds' => '1.3.6.1.2.1.4.14', 'ipReasmOKs' => '1.3.6.1.2.1.4.15', 'ipReasmFails' => '1.3.6.1.2.1.4.16', 'ipFragOKs' => '1.3.6.1.2.1.4.17', 'ipFragFails' => '1.3.6.1.2.1.4.18', 'ipFragCreates' => '1.3.6.1.2.1.4.19', 'ipDefaultTTL' => '1.3.6.1.2.1.4.2', 'ipAddrTable' => '1.3.6.1.2.1.4.20', 'ipAddrEntry' => '1.3.6.1.2.1.4.20.1', 'ipAdEntAddr' => '1.3.6.1.2.1.4.20.1.1', 'ipAdEntIfIndex' => '1.3.6.1.2.1.4.20.1.2', 'ipAdEntNetMask' => '1.3.6.1.2.1.4.20.1.3', 'ipAdEntBcastAddr' => '1.3.6.1.2.1.4.20.1.4', 'ipAdEntReasmMaxSize' => '1.3.6.1.2.1.4.20.1.5', 'ipRouteTable' => '1.3.6.1.2.1.4.21', 'ipRouteEntry' => '1.3.6.1.2.1.4.21.1', 'ipRouteDest' => '1.3.6.1.2.1.4.21.1.1', 'ipRouteAge' => '1.3.6.1.2.1.4.21.1.10', 'ipRouteMask' => '1.3.6.1.2.1.4.21.1.11', 'ipRouteMetric5' => '1.3.6.1.2.1.4.21.1.12', 'ipRouteInfo' => '1.3.6.1.2.1.4.21.1.13', 'ipRouteIfIndex' => '1.3.6.1.2.1.4.21.1.2', 'ipRouteMetric1' => '1.3.6.1.2.1.4.21.1.3', 'ipRouteMetric2' => '1.3.6.1.2.1.4.21.1.4', 'ipRouteMetric3' => '1.3.6.1.2.1.4.21.1.5', 'ipRouteMetric4' => '1.3.6.1.2.1.4.21.1.6', 'ipRouteNextHop' => '1.3.6.1.2.1.4.21.1.7', 'ipRouteType' => '1.3.6.1.2.1.4.21.1.8', 'ipRouteProto' => '1.3.6.1.2.1.4.21.1.9', 'ipNetToMediaTable' => '1.3.6.1.2.1.4.22', 'ipNetToMediaEntry' => '1.3.6.1.2.1.4.22.1', 'ipNetToMediaIfIndex' => '1.3.6.1.2.1.4.22.1.1', 'ipNetToMediaPhysAddress' => '1.3.6.1.2.1.4.22.1.2', 'ipNetToMediaNetAddress' => '1.3.6.1.2.1.4.22.1.3', 'ipNetToMediaType' => '1.3.6.1.2.1.4.22.1.4', 'ipRoutingDiscards' => '1.3.6.1.2.1.4.23', 'ipInReceives' => '1.3.6.1.2.1.4.3', 'ipInHdrErrors' => '1.3.6.1.2.1.4.4', 'ipInAddrErrors' => '1.3.6.1.2.1.4.5', 'ipForwDatagrams' => '1.3.6.1.2.1.4.6', 'ipInUnknownProtos' => '1.3.6.1.2.1.4.7', 'ipInDiscards' => '1.3.6.1.2.1.4.8', 'ipInDelivers' => '1.3.6.1.2.1.4.9', 'icmp' => '1.3.6.1.2.1.5', 'icmpInMsgs' => '1.3.6.1.2.1.5.1', 'icmpInTimestamps' => '1.3.6.1.2.1.5.10', 'icmpInTimestampReps' => '1.3.6.1.2.1.5.11', 'icmpInAddrMasks' => '1.3.6.1.2.1.5.12', 'icmpInAddrMaskReps' => '1.3.6.1.2.1.5.13', 'icmpOutMsgs' => '1.3.6.1.2.1.5.14', 'icmpOutErrors' => '1.3.6.1.2.1.5.15', 'icmpOutDestUnreachs' => '1.3.6.1.2.1.5.16', 'icmpOutTimeExcds' => '1.3.6.1.2.1.5.17', 'icmpOutParmProbs' => '1.3.6.1.2.1.5.18', 'icmpOutSrcQuenchs' => '1.3.6.1.2.1.5.19', 'icmpInErrors' => '1.3.6.1.2.1.5.2', 'icmpOutRedirects' => '1.3.6.1.2.1.5.20', 'icmpOutEchos' => '1.3.6.1.2.1.5.21', 'icmpOutEchoReps' => '1.3.6.1.2.1.5.22', 'icmpOutTimestamps' => '1.3.6.1.2.1.5.23', 'icmpOutTimestampReps' => '1.3.6.1.2.1.5.24', 'icmpOutAddrMasks' => '1.3.6.1.2.1.5.25', 'icmpOutAddrMaskReps' => '1.3.6.1.2.1.5.26', 'icmpInDestUnreachs' => '1.3.6.1.2.1.5.3', 'icmpInTimeExcds' => '1.3.6.1.2.1.5.4', 'icmpInParmProbs' => '1.3.6.1.2.1.5.5', 'icmpInSrcQuenchs' => '1.3.6.1.2.1.5.6', 'icmpInRedirects' => '1.3.6.1.2.1.5.7', 'icmpInEchos' => '1.3.6.1.2.1.5.8', 'icmpInEchoReps' => '1.3.6.1.2.1.5.9', 'tcp' => '1.3.6.1.2.1.6', 'tcpRtoAlgorithm' => '1.3.6.1.2.1.6.1', 'tcpInSegs' => '1.3.6.1.2.1.6.10', 'tcpOutSegs' => '1.3.6.1.2.1.6.11', 'tcpRetransSegs' => '1.3.6.1.2.1.6.12', 'tcpConnTable' => '1.3.6.1.2.1.6.13', 'tcpConnEntry' => '1.3.6.1.2.1.6.13.1', 'tcpConnState' => '1.3.6.1.2.1.6.13.1.1', 'tcpConnLocalAddress' => '1.3.6.1.2.1.6.13.1.2', 'tcpConnLocalPort' => '1.3.6.1.2.1.6.13.1.3', 'tcpConnRemAddress' => '1.3.6.1.2.1.6.13.1.4', 'tcpConnRemPort' => '1.3.6.1.2.1.6.13.1.5', 'tcpInErrs' => '1.3.6.1.2.1.6.14', 'tcpOutRsts' => '1.3.6.1.2.1.6.15', 'tcpRtoMin' => '1.3.6.1.2.1.6.2', 'tcpRtoMax' => '1.3.6.1.2.1.6.3', 'tcpMaxConn' => '1.3.6.1.2.1.6.4', 'tcpActiveOpens' => '1.3.6.1.2.1.6.5', 'tcpPassiveOpens' => '1.3.6.1.2.1.6.6', 'tcpAttemptFails' => '1.3.6.1.2.1.6.7', 'tcpEstabResets' => '1.3.6.1.2.1.6.8', 'tcpCurrEstab' => '1.3.6.1.2.1.6.9', 'udp' => '1.3.6.1.2.1.7', 'udpInDatagrams' => '1.3.6.1.2.1.7.1', 'udpNoPorts' => '1.3.6.1.2.1.7.2', 'udpInErrors' => '1.3.6.1.2.1.7.3', 'udpOutDatagrams' => '1.3.6.1.2.1.7.4', 'udpTable' => '1.3.6.1.2.1.7.5', 'udpEntry' => '1.3.6.1.2.1.7.5.1', 'udpLocalAddress' => '1.3.6.1.2.1.7.5.1.1', 'udpLocalPort' => '1.3.6.1.2.1.7.5.1.2', 'egp' => '1.3.6.1.2.1.8', 'egpInMsgs' => '1.3.6.1.2.1.8.1', 'egpInErrors' => '1.3.6.1.2.1.8.2', 'egpOutMsgs' => '1.3.6.1.2.1.8.3', 'egpOutErrors' => '1.3.6.1.2.1.8.4', 'egpNeighTable' => '1.3.6.1.2.1.8.5', 'egpNeighEntry' => '1.3.6.1.2.1.8.5.1', 'egpNeighState' => '1.3.6.1.2.1.8.5.1.1', 'egpNeighStateUps' => '1.3.6.1.2.1.8.5.1.10', 'egpNeighStateDowns' => '1.3.6.1.2.1.8.5.1.11', 'egpNeighIntervalHello' => '1.3.6.1.2.1.8.5.1.12', 'egpNeighIntervalPoll' => '1.3.6.1.2.1.8.5.1.13', 'egpNeighMode' => '1.3.6.1.2.1.8.5.1.14', 'egpNeighEventTrigger' => '1.3.6.1.2.1.8.5.1.15', 'egpNeighAddr' => '1.3.6.1.2.1.8.5.1.2', 'egpNeighAs' => '1.3.6.1.2.1.8.5.1.3', 'egpNeighInMsgs' => '1.3.6.1.2.1.8.5.1.4', 'egpNeighInErrs' => '1.3.6.1.2.1.8.5.1.5', 'egpNeighOutMsgs' => '1.3.6.1.2.1.8.5.1.6', 'egpNeighOutErrs' => '1.3.6.1.2.1.8.5.1.7', 'egpNeighInErrMsgs' => '1.3.6.1.2.1.8.5.1.8', 'egpNeighOutErrMsgs' => '1.3.6.1.2.1.8.5.1.9', 'egpAs' => '1.3.6.1.2.1.8.6', 'transmission' => '1.3.6.1.2.1.10', 'frame-relay' => '1.3.6.1.2.1.10.32', 'frDlcmiTable' => '1.3.6.1.2.1.10.32.1', 'frDlcmiEntry' => '1.3.6.1.2.1.10.32.1.1', 'frDlcmiIfIndex' => '1.3.6.1.2.1.10.32.1.1.1', 'frDlcmiState' => '1.3.6.1.2.1.10.32.1.1.2', 'frDlcmiAddress' => '1.3.6.1.2.1.10.32.1.1.3', 'frDlcmiAddressLen' => '1.3.6.1.2.1.10.32.1.1.4', 'frDlcmiPollingInterval' => '1.3.6.1.2.1.10.32.1.1.5', 'frDlcmiFullEnquiryInterval' => '1.3.6.1.2.1.10.32.1.1.6', 'frDlcmiErrorThreshold' => '1.3.6.1.2.1.10.32.1.1.7', 'frDlcmiMonitoredEvents' => '1.3.6.1.2.1.10.32.1.1.8', 'frDlcmiMaxSupportedVCs' => '1.3.6.1.2.1.10.32.1.1.9', 'frDlcmiMulticast' => '1.3.6.1.2.1.10.32.1.1.10', 'frCircuitTable' => '1.3.6.1.2.1.10.32.2', 'frCircuitEntry' => '1.3.6.1.2.1.10.32.2.1', 'frCircuitIfIndex' => '1.3.6.1.2.1.10.32.2.1.1', 'frCircuitDlci' => '1.3.6.1.2.1.10.32.2.1.2', 'frCircuitState' => '1.3.6.1.2.1.10.32.2.1.3', 'frCircuitReceivedFECNs' => '1.3.6.1.2.1.10.32.2.1.4', 'frCircuitReceivedBECNs' => '1.3.6.1.2.1.10.32.2.1.5', 'frCircuitSentFrames' => '1.3.6.1.2.1.10.32.2.1.6', 'frCircuitSentOctets' => '1.3.6.1.2.1.10.32.2.1.7', 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7', 'frCircuitReceivedFrames' => '1.3.6.1.2.1.10.32.2.1.8', 'frCircuitReceivedOctets' => '1.3.6.1.2.1.10.32.2.1.9', 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9', 'frCircuitCreationTime' => '1.3.6.1.2.1.10.32.2.1.10', 'frCircuitLastTimeChange' => '1.3.6.1.2.1.10.32.2.1.11', 'frCircuitCommittedBurst' => '1.3.6.1.2.1.10.32.2.1.12', 'frCircuitExcessBurst' => '1.3.6.1.2.1.10.32.2.1.13', 'frCircuitThroughput' => '1.3.6.1.2.1.10.32.2.1.14', 'frErrTable' => '1.3.6.1.2.1.10.32.3', 'frErrEntry' => '1.3.6.1.2.1.10.32.3.1', 'frErrIfIndex' => '1.3.6.1.2.1.10.32.3.1.1', 'frErrType' => '1.3.6.1.2.1.10.32.3.1.2', 'frErrData' => '1.3.6.1.2.1.10.32.3.1.3', 'frErrTime' => '1.3.6.1.2.1.10.32.3.1.4', 'frame-relay-globals' => '1.3.6.1.2.1.10.32.4', 'frTrapState' => '1.3.6.1.2.1.10.32.4.1', 'snmp' => '1.3.6.1.2.1.11', 'snmpInPkts' => '1.3.6.1.2.1.11.1', 'snmpInBadValues' => '1.3.6.1.2.1.11.10', 'snmpInReadOnlys' => '1.3.6.1.2.1.11.11', 'snmpInGenErrs' => '1.3.6.1.2.1.11.12', 'snmpInTotalReqVars' => '1.3.6.1.2.1.11.13', 'snmpInTotalSetVars' => '1.3.6.1.2.1.11.14', 'snmpInGetRequests' => '1.3.6.1.2.1.11.15', 'snmpInGetNexts' => '1.3.6.1.2.1.11.16', 'snmpInSetRequests' => '1.3.6.1.2.1.11.17', 'snmpInGetResponses' => '1.3.6.1.2.1.11.18', 'snmpInTraps' => '1.3.6.1.2.1.11.19', 'snmpOutPkts' => '1.3.6.1.2.1.11.2', 'snmpOutTooBigs' => '1.3.6.1.2.1.11.20', 'snmpOutNoSuchNames' => '1.3.6.1.2.1.11.21', 'snmpOutBadValues' => '1.3.6.1.2.1.11.22', 'snmpOutGenErrs' => '1.3.6.1.2.1.11.24', 'snmpOutGetRequests' => '1.3.6.1.2.1.11.25', 'snmpOutGetNexts' => '1.3.6.1.2.1.11.26', 'snmpOutSetRequests' => '1.3.6.1.2.1.11.27', 'snmpOutGetResponses' => '1.3.6.1.2.1.11.28', 'snmpOutTraps' => '1.3.6.1.2.1.11.29', 'snmpInBadVersions' => '1.3.6.1.2.1.11.3', 'snmpEnableAuthenTraps' => '1.3.6.1.2.1.11.30', 'snmpInBadCommunityNames' => '1.3.6.1.2.1.11.4', 'snmpInBadCommunityUses' => '1.3.6.1.2.1.11.5', 'snmpInASNParseErrs' => '1.3.6.1.2.1.11.6', 'snmpInTooBigs' => '1.3.6.1.2.1.11.8', 'snmpInNoSuchNames' => '1.3.6.1.2.1.11.9', 'ifName' => '1.3.6.1.2.1.31.1.1.1.1', 'ifInMulticastPkts' => '1.3.6.1.2.1.31.1.1.1.2', 'ifInBroadcastPkts' => '1.3.6.1.2.1.31.1.1.1.3', 'ifOutMulticastPkts' => '1.3.6.1.2.1.31.1.1.1.4', 'ifOutBroadcastPkts' => '1.3.6.1.2.1.31.1.1.1.5', 'ifHCInOctets' => '1.3.6.1.2.1.31.1.1.1.6', 'ifHCInUcastPkts' => '1.3.6.1.2.1.31.1.1.1.7', 'ifHCInMulticastPkts' => '1.3.6.1.2.1.31.1.1.1.8', 'ifHCInBroadcastPkts' => '1.3.6.1.2.1.31.1.1.1.9', 'ifHCOutOctets' => '1.3.6.1.2.1.31.1.1.1.10', 'ifHCOutUcastPkts' => '1.3.6.1.2.1.31.1.1.1.11', 'ifHCOutMulticastPkts' => '1.3.6.1.2.1.31.1.1.1.12', 'ifHCOutBroadcastPkts' => '1.3.6.1.2.1.31.1.1.1.13', 'ifLinkUpDownTrapEnable' => '1.3.6.1.2.1.31.1.1.1.14', 'ifHighSpeed' => '1.3.6.1.2.1.31.1.1.1.15', 'ifPromiscuousMode' => '1.3.6.1.2.1.31.1.1.1.16', 'ifConnectorPresent' => '1.3.6.1.2.1.31.1.1.1.17', 'ifAlias' => '1.3.6.1.2.1.31.1.1.1.18', 'ifCounterDiscontinuityTime' => '1.3.6.1.2.1.31.1.1.1.19', 'experimental' => '1.3.6.1.3', 'private' => '1.3.6.1.4', 'enterprises' => '1.3.6.1.4.1', ); # GIL my %revOIDS = (); # Reversed %SNMP_util::OIDS hash my $RevNeeded = 1; my $agent_start_time = time; undef $SNMP_util::Host; undef $SNMP_util::Session; undef $SNMP_util::Version; undef $SNMP_util::LHost; undef $SNMP_util::IPv4only; $SNMP_util::Debug = 0; $SNMP_util::CacheFile = "OID_cache.txt"; $SNMP_util::CacheLoaded = 0; $SNMP_util::Return_array_refs = 0; $SNMP_util::Return_hash_refs = 0; srand(time + $$); ### Prototypes sub snmpget ($@); sub snmpgetnext ($@); sub snmpopen ($$$); sub snmpwalk ($@); sub snmpwalk_flg ($$@); sub snmpset ($@); sub snmptrap ($$$$$@); sub snmpgetbulk ($$$@); sub snmpmaptable ($$@); sub snmpmaptable4 ($$$@); sub snmpwalkhash ($$@); sub toOID (@); sub snmpmapOID (@); sub snmpMIB_to_OID ($); sub encode_oid_with_errmsg ($); sub Check_OID ($); sub snmpLoad_OID_Cache ($); sub snmpQueue_MIB_File (@); sub MIB_fill_OID ($); sub version () { $VERSION; } # # Start an snmp session # sub snmpopen ($$$) { my($host, $type, $vars) = @_; my($nhost, $port, $community, $lhost, $lport, $nlhost); my($timeout, $retries, $backoff, $version); my $v4onlystr; $type = 0 if (!defined($type)); $community = "public"; $nlhost = ""; ($community, $host) = ($1, $2) if ($host =~ /^(.*)@([^@]+)$/); # We can't split on the : character because a numeric IPv6 # address contains a variable number of :'s my $opts; if( ($host =~ /^(\[.*\]):(.*)$/) or ($host =~ /^(\[.*\])$/) ) { # Numeric IPv6 address between [] ($host, $opts) = ($1, $2); } else { # Hostname or numeric IPv4 address ($host, $opts) = split(':', $host, 2); } ($port, $timeout, $retries, $backoff, $version, $v4onlystr) = split(':', $opts, 6) if(defined($opts) and (length $opts > 0) ); undef($version) if (defined($version) and length($version) <= 0); $v4onlystr = "" unless defined $v4onlystr; $version = '1' unless defined $version; if (defined($port) and ($port =~ /^([^!]*)!(.*)$/)) { ($port, $lhost) = ($1, $2); $nlhost = $lhost; ($lhost, $lport) = ($1, $2) if ($lhost =~ /^(.*)!(.*)$/); undef($lhost) if (defined($lhost) and (length($lhost) <= 0)); undef($lport) if (defined($lport) and (length($lport) <= 0)); } undef($port) if (defined($port) and length($port) <= 0); $port = 162 if ($type == 1 and !defined($port)); $nhost = "$community\@$host"; $nhost .= ":" . $port if (defined($port)); if ((!defined($SNMP_util::Session)) or ($SNMP_util::Host ne $nhost) or ($SNMP_util::Version ne $version) or ($SNMP_util::LHost ne $nlhost) or ($SNMP_util::IPv4only ne $v4onlystr)) { if (defined($SNMP_util::Session)) { $SNMP_util::Session->close(); undef $SNMP_util::Session; undef $SNMP_util::Host; undef $SNMP_util::Version; undef $SNMP_util::LHost; undef $SNMP_util::IPv4only; } $SNMP_util::Session = ($version =~ /^2c?$/i) ? SNMPv2c_Session->open($host, $community, $port, undef, $lport, undef, $lhost, ($v4onlystr eq 'v4only') ? 1:0 ) : SNMP_Session->open($host, $community, $port, undef, $lport, undef, $lhost, ($v4onlystr eq 'v4only') ? 1:0 ); ($SNMP_util::Host = $nhost, $SNMP_util::Version = $version, $SNMP_util::LHost = $nlhost, $SNMP_util::IPv4only = $v4onlystr) if defined($SNMP_util::Session); } if (defined($SNMP_util::Session)) { if (ref $vars->[0] eq 'HASH') { my $opts = shift @$vars; foreach $type (keys %$opts) { if ($type eq 'return_array_refs') { $SNMP_util::Return_array_refs = $opts->{$type}; } elsif ($type eq 'return_hash_refs') { $SNMP_util::Return_hash_refs = $opts->{$type}; } else { if (exists $SNMP_util::Session->{$type}) { if ($type eq 'timeout') { $SNMP_util::Session->set_timeout($opts->{$type}); } elsif ($type eq 'retries') { $SNMP_util::Session->set_retries($opts->{$type}); } elsif ($type eq 'backoff') { $SNMP_util::Session->set_backoff($opts->{$type}); } else { $SNMP_util::Session->{$type} = $opts->{$type}; } } else { carp "SNMPopen Unknown SNMP Option Key '$type'\n" unless ($SNMP_Session::suppress_warnings > 1); } } } } $SNMP_util::Session->set_timeout($timeout) if (defined($timeout) and (length($timeout) > 0)); $SNMP_util::Session->set_retries($retries) if (defined($retries) and (length($retries) > 0)); $SNMP_util::Session->set_backoff($backoff) if (defined($backoff) and (length($backoff) > 0)); } return $SNMP_util::Session; } # # A restricted snmpget. # sub snmpget ($@) { my($host, @vars) = @_; my(@enoid, $var, $response, $bindings, $binding, $value, $oid, @retvals); my $session; $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPGET Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } @enoid = &toOID(@vars); return undef unless defined $enoid[0]; if ($session->get_request_response(@enoid)) { $response = $session->pdu_buffer; ($bindings) = $session->decode_get_response($response); while ($bindings) { ($binding, $bindings) = decode_sequence($bindings); ($oid, $value) = decode_by_template($binding, "%O%@"); my $tempo = pretty_print($value); push @retvals, $tempo; } return wantarray ? @retvals : $retvals[0]; } $var = join(' ', @vars); carp "SNMPGET Problem for $var on $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } # # A restricted snmpgetnext. # sub snmpgetnext ($@) { my($host, @vars) = @_; my(@enoid, $var, $response, $bindings, $binding); my($value, $upoid, $oid, @retvals); my($noid); my $session; $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPGETNEXT Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } @enoid = &toOID(@vars); return undef unless defined $enoid[0]; undef @vars; undef @retvals; foreach $noid (@enoid) { $upoid = pretty_print($noid); push(@vars, $upoid); } if ($session->getnext_request_response(@enoid)) { $response = $session->pdu_buffer; ($bindings) = $session->decode_get_response($response); while ($bindings) { ($binding, $bindings) = decode_sequence($bindings); ($oid, $value) = decode_by_template($binding, "%O%@"); my $tempo = pretty_print($oid); my $tempv = pretty_print($value); push @retvals, "$tempo:$tempv"; } return wantarray ? @retvals : $retvals[0]; } else { $var = join(' ', @vars); carp "SNMPGETNEXT Problem for $var on $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } } # # A restricted snmpwalk. # sub snmpwalk ($@) { my($host, @vars) = @_; return(&snmpwalk_flg($host, undef, @vars)); } # # Walk the MIB, putting everything you find into hashes. # sub snmpwalkhash($$@) { # my($host, $hash_sub, @vars) = @_; return(&snmpwalk_flg( @_ )); } sub snmpwalk_flg ($$@) { my($host, $hash_sub, @vars) = @_; my(@enoid, $var, $response, $bindings, $binding); my($value, $upoid, $oid, @retvals, @retvaltmprefs); my($got, @nnoid, $noid, $ok, $ix, @avars); my $session; my(%soid); my(%done, %rethash, $h_ref); $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPWALK Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } $h_ref = (ref $vars[$#vars] eq "HASH") ? pop(@vars) : \%rethash; @enoid = toOID(@vars); return undef unless defined $enoid[0]; # GIL # # Create/Refresh a reversed hash with oid -> name # if (defined($hash_sub) and ($RevNeeded)) { %revOIDS = reverse %SNMP_util::OIDS; $RevNeeded = 0; } $got = 0; @nnoid = @enoid; undef @vars; foreach $noid (@enoid) { $upoid = pretty_print($noid); push(@vars, $upoid); } # @vars is the original set of walked variables. # @avars is the current set of walked variables as the # walk goes on. # @vars stays static while @avars may shrink as we reach end # of walk for individual variables during PDU exchange. @avars = @vars; # IlvJa # # Create temporary array of refs to return vals. if ($SNMP_util::Return_array_refs) { for($ix = 0;$ix < scalar @vars; $ix++) { my $tmparray = []; $retvaltmprefs[$ix] = $tmparray; $retvals[$ix] = $tmparray; } } while(($SNMP_util::Version ne '1' and $session->{'use_getbulk'}) ? $session->getbulk_request_response(0, $session->default_max_repetitions(), @nnoid) : $session->getnext_request_response(@nnoid)) { $got = 1; $response = $session->pdu_buffer; ($bindings) = $session->decode_get_response($response); $ix = 0; while ($bindings) { ($binding, $bindings) = decode_sequence($bindings); unless ($nnoid[$ix]) { # IlvJa $ix = ++$ix % (scalar @avars); next; } ($oid, $value) = decode_by_template($binding, "%O%@"); $ok = 0; my $tempo = pretty_print($oid); $noid = $avars[$ix]; # IlvJa if ($tempo =~ /^$noid\./ or $tempo eq $noid ) { $ok = 1; $upoid = $noid; } else { # IlvJa # # The walk for variable $vars[$ix] has been finished as # $nnoid[$ix] no longer is in the $avar[$ix] OID tree. # So we exclude this variable from further requests. $avars[$ix] = ""; $nnoid[$ix] = ""; $retvaltmprefs[$ix] = undef if $SNMP_util::Return_array_refs; } if ($ok) { my $tmp = encode_oid_with_errmsg ($tempo); return undef unless defined $tmp; if (exists($done{$tmp})) { # GIL, Ilvja # # We've detected a loop for $nnoid[$ix], so mark it as finished. # Exclude this variable from further requests. # $avars[$ix] = ""; $nnoid[$ix] = ""; $retvaltmprefs[$ix] = undef if $SNMP_util::Return_array_refs; next; } $nnoid[$ix] = $tmp; # Keep on walking. (IlvJa) my $tempv = pretty_print($value); if (defined($hash_sub)) { # # extract name of the oid, if possible, the rest becomes the instance # my $inst = ""; my $upo = $upoid; while (!exists($revOIDS{$upo}) and length($upo)) { $upo =~ s/(\.\d+?)$//; if (defined($1) and length($1)) { $inst = $1 . $inst; } else { $upo = ""; last; } } if (length($upo) and exists($revOIDS{$upo})) { $upo = $revOIDS{$upo} . $inst; } else { $upo = $upoid; } $inst = ""; while (!exists($revOIDS{$tempo}) and length($tempo)) { $tempo =~ s/(\.\d+?)$//; if (defined($1) and length($1)) { $inst = $1 . $inst; } else { $tempo = ""; last; } } if (length($tempo) and exists($revOIDS{$tempo})) { $var = $revOIDS{$tempo}; } else { $var = pretty_print($oid); } # # call hash_sub # &$hash_sub($h_ref, $host, $var, $tempo, $inst, $tempv, $upo); } else { if ($SNMP_util::Return_array_refs) { $tempo=~s/^$upoid\.//; push @{$retvaltmprefs[$ix]}, "$tempo:$tempv"; } else { $tempo=~s/^$upoid\.// if ($#enoid <= 0); push @retvals, "$tempo:$tempv"; } } $done{$tmp} = 1; # GIL } $ix = ++$ix % (scalar @avars); } # Ok, @nnoid should contain the remaining variables for the # next request. Some or all entries in @nnoid might be the empty # string. If the nth element in @nnoid is "" that means that # the walk related to the nth variable in the last request has been # completed and we should not include that var in subsequent reqs. # Clean up both @nnoid and @avars so "" elements are removed. @nnoid = grep (($_), @nnoid); @avars = grep (($_), @avars); @retvaltmprefs = grep (($_), @retvaltmprefs); last if ($#nnoid < 0); # @nnoid empty means we are done walking. } if ($got) { if (defined($hash_sub)) { return ($h_ref) if ($SNMP_util::Return_hash_refs); return (%$h_ref); } else { return (@retvals); } } else { $var = join(' ', @vars); carp "SNMPWALK Problem for $var on $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } } # # A restricted snmpset. # sub snmpset($@) { my($host, @vars) = @_; my(@enoid, $response, $bindings, $binding); my($oid, @retvals, $type, $value, $val); my $session; $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPSET Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } while(@vars) { ($oid) = toOID((shift @vars)); $type = shift @vars; $value = shift @vars; $type =~ tr/A-Z/a-z/; if ($type eq "int") { $val = encode_int($value); } elsif ($type eq "integer") { $val = encode_int($value); } elsif ($type eq "string") { $val = encode_string($value); } elsif ($type eq "octetstring") { $val = encode_string($value); } elsif ($type eq "octet string") { $val = encode_string($value); } elsif ($type eq "oid") { $val = encode_oid_with_errmsg($value); } elsif ($type eq "object id") { $val = encode_oid_with_errmsg($value); } elsif ($type eq "object identifier") { $val = encode_oid_with_errmsg($value); } elsif ($type eq "ipaddr") { $val = encode_ip_address($value); } elsif ($type eq "ip address") { $val = encode_ip_address($value); } elsif ($type eq "timeticks") { $val = encode_timeticks($value); } elsif ($type eq "uint") { $val = encode_uinteger32($value); } elsif ($type eq "uinteger") { $val = encode_uinteger32($value); } elsif ($type eq "uinteger32") { $val = encode_uinteger32($value); } elsif ($type eq "unsigned int") { $val = encode_uinteger32($value); } elsif ($type eq "unsigned integer") { $val = encode_uinteger32($value); } elsif ($type eq "unsigned integer32") { $val = encode_uinteger32($value); } elsif ($type eq "counter") { $val = encode_counter32($value); } elsif ($type eq "counter32") { $val = encode_counter32($value); } elsif ($type eq "counter64") { $val = encode_counter64($value); } elsif ($type eq "gauge") { $val = encode_gauge32($value); } elsif ($type eq "gauge32") { $val = encode_gauge32($value); } else { carp "unknown SNMP type: $type\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } if (!defined($val)) { carp "SNMP type $type value $value didn't encode properly\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } push @enoid, [$oid,$val]; } return undef unless defined $enoid[0]; if ($session->set_request_response(@enoid)) { $response = $session->pdu_buffer; ($bindings) = $session->decode_get_response($response); while ($bindings) { ($binding, $bindings) = decode_sequence($bindings); ($oid, $value) = decode_by_template($binding, "%O%@"); my $tempo = pretty_print($value); push @retvals, $tempo; } return wantarray ? @retvals : $retvals[0]; } return undef; } # # Send an SNMP trap # sub snmptrap($$$$$@) { my($host, $ent, $agent, $gen, $spec, @vars) = @_; my($oid, @retvals, $type, $value); my(@enoid); my $session; $session = &snmpopen($host, 1, \@vars); if (!defined($session)) { carp "SNMPTRAP Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } if ($agent =~ /^\d+\.\d+\.\d+\.\d+(.*)/ ) { $agent = pack("C*", split /\./, $agent); } else { $agent = inet_aton($agent); } push @enoid, toOID(($ent)); push @enoid, encode_ip_address($agent); push @enoid, encode_int($gen); push @enoid, encode_int($spec); push @enoid, encode_timeticks((time-$agent_start_time) * 100); while(@vars) { ($oid) = toOID((shift @vars)); $type = shift @vars; $value = shift @vars; if ($type =~ /string/i) { $value = encode_string($value); push @enoid, [$oid,$value]; } elsif ($type =~ /ipaddr/i) { $value = encode_ip_address($value); push @enoid, [$oid,$value]; } elsif ($type =~ /int/i) { $value = encode_int($value); push @enoid, [$oid,$value]; } elsif ($type =~ /oid/i) { my $tmp = encode_oid_with_errmsg($value); return undef unless defined $tmp; push @enoid, [$oid,$tmp]; } else { carp "unknown SNMP type: $type\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } } return($session->trap_request_send(@enoid)); } # # A restricted snmpgetbulk. # sub snmpgetbulk ($$$@) { my($host, $nr, $mr, @vars) = @_; my(@enoid, $var, $response, $bindings, $binding); my($value, $upoid, $oid, @retvals); my($noid); my $session; $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPGETBULK Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } @enoid = &toOID(@vars); return undef unless defined $enoid[0]; undef @vars; undef @retvals; foreach $noid (@enoid) { $upoid = pretty_print($noid); push(@vars, $upoid); } if ($session->getbulk_request_response($nr, $mr, @enoid)) { $response = $session->pdu_buffer; ($bindings) = $session->decode_get_response($response); while ($bindings) { ($binding, $bindings) = decode_sequence($bindings); ($oid, $value) = decode_by_template($binding, "%O%@"); my $tempo = pretty_print($oid); my $tempv = pretty_print($value); push @retvals, "$tempo:$tempv"; } return (@retvals); } else { $var = join(' ', @vars); carp "SNMPGETBULK Problem for $var on $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } } # # walk a table, calling a user-supplied function for each # column of a table. # sub snmpmaptable($$@) { my($host, $fun, @vars) = @_; return snmpmaptable4($host, $fun, 0, @vars); } sub snmpmaptable4($$$@) { my($host, $fun, $max_reps, @vars) = @_; my(@enoid, $var, $session); $session = &snmpopen($host, 0, \@vars); if (!defined($session)) { carp "SNMPMAPTABLE Problem for $host\n" unless ($SNMP_Session::suppress_warnings > 1); return undef; } foreach $var (toOID(@vars)) { push(@enoid, [split('\.', pretty_print($var))]); } $max_reps = $session->default_max_repetitions() if ($max_reps <= 0); return $session->map_table_start_end( [@enoid], sub() { my ($ind, @vals) = @_; my (@pvals, $val); foreach $val (@vals) { push(@pvals, pretty_print($val)); } &$fun($ind, @pvals); }, "", undef, $max_reps); } # # Given an OID in either ASN.1 or mixed text/ASN.1 notation, return an # encoded OID. # sub toOID(@) { my(@vars) = @_; my($oid, $var, $tmp, $tmpv, @retvar); undef @retvar; foreach $var (@vars) { ($oid, $tmp) = &Check_OID($var); if (!$oid and $SNMP_util::CacheLoaded == 0) { $tmp = $SNMP_Session::suppress_warnings; $SNMP_Session::suppress_warnings = 1000; &snmpLoad_OID_Cache($SNMP_util::CacheFile); $SNMP_util::CacheLoaded = 1; $SNMP_Session::suppress_warnings = $tmp; ($oid, $tmp) = &Check_OID($var); } while (!$oid and $#SNMP_util::MIB_Files >= 0) { $tmp = $SNMP_Session::suppress_warnings; $SNMP_Session::suppress_warnings = 1000; snmpMIB_to_OID(shift(@SNMP_util::MIB_Files)); $SNMP_Session::suppress_warnings = $tmp; ($oid, $tmp) = &Check_OID($var); if ($oid) { open(CACHE, ">>$SNMP_util::CacheFile"); print CACHE "$tmp\t$oid\n"; close(CACHE); } } if ($oid) { $var =~ s/^$tmp/$oid/; } else { carp "Unknown SNMP var $var\n" unless ($SNMP_Session::suppress_warnings > 1); next; } while ($var =~ /\"([^\"]*)\"/) { $tmp = sprintf("%d.%s", length($1), join(".", map(ord, split(//, $1)))); $var =~ s/\"$1\"/$tmp/; } print "toOID: $var\n" if $SNMP_util::Debug; $tmp = encode_oid_with_errmsg($var); return undef unless defined $tmp; push(@retvar, $tmp); } return @retvar; } # # Add passed-in text, OID pairs to the OID mapping table. # sub snmpmapOID(@) { my(@vars) = @_; my($oid, $txt); while($#vars >= 0) { $txt = shift @vars; $oid = shift @vars; next unless($txt =~ /^[a-zA-Z][\w\-]*(\.[a-zA-Z][\w\-])*$/); next unless($oid =~ /^\d+(\.\d+)*$/); $SNMP_util::OIDS{$txt} = $oid; $RevNeeded = 1; print "snmpmapOID: $txt => $oid\n" if $SNMP_util::Debug; } return undef; } # # Open the passed-in file name and read it in to populate # the cache of text-to-OID map table. It expects lines # with two fields, the first the textual string like "ifInOctets", # and the second the OID value, like "1.3.6.1.2.1.2.2.1.10". # # blank lines and anything after a '#' or between '--' is ignored. # sub snmpLoad_OID_Cache ($) { my($arg) = @_; my($txt, $oid); if (!open(CACHE, $arg)) { carp "snmpLoad_OID_Cache: Can't open $arg: $!" unless ($SNMP_Session::suppress_warnings > 1); return -1; } while() { s/#.*//; # '#' starts a comment s/--.*--//g; # comment delimited by '--', like MIBs s/--.*//; # comment started by '--' next if (/^$/); next unless (/\s/); # must have whitespace as separator chomp; ($txt, $oid) = split(' ', $_, 2); $txt = $1 if ($txt =~ /^[\'\"](.*)[\'\"]/); $oid = $1 if ($oid =~ /^[\'\"](.*)[\'\"]/); if (($txt =~ /^\.?\d+(\.\d+)*\.?$/) and ($oid !~ /^\.?\d+(\.\d+)*\.?$/)) { my($a) = $oid; $oid = $txt; $txt = $a; } $oid =~ s/^\.//; $oid =~ s/\.$//; &snmpmapOID($txt, $oid); } close(CACHE); return 0; } # # Check to see if an OID is in the text-to-OID cache. # Returns the OID and the corresponding text as two separate # elements. # sub Check_OID ($) { my($var) = @_; my($tmp, $tmpv, $oid); if ($var =~ /^[a-zA-Z][\w\-]*(\.[a-zA-Z][\w\-]*)*/) { $tmp = $&; $tmpv = $tmp; for (;;) { last if exists($SNMP_util::OIDS{$tmpv}); last if !($tmpv =~ s/^[^\.]*\.//); } $oid = $SNMP_util::OIDS{$tmpv}; if ($oid) { return ($oid, $tmp); } else { return undef; } } return ($var, $var); } # # Save the passed-in list of MIB files until an OID can't be # found in the existing table. At that time the MIB file will # be loaded, and the lookup attempted again. # sub snmpQueue_MIB_File (@) { my(@files) = @_; my($file); foreach $file (@files) { push(@SNMP_util::MIB_Files, $file); } } # # Read in the passed MIB file, parsing it # for their text-to-OID mappings # sub snmpMIB_to_OID ($) { my($arg) = @_; my($cnt, $quote, $buf, %tOIDs, $tgot); my($var, @parts, $strt, $indx, $ind, $val); if (!open(MIB, $arg)) { carp "snmpMIB_to_OID: Can't open $arg: $!" unless ($SNMP_Session::suppress_warnings > 1); return -1; } print "snmpMIB_to_OID: loading $arg\n" if $SNMP_util::Debug; $cnt = 0; $quote = 0; $tgot = 0; $buf = ''; while() { if ($quote) { next unless /"/; $quote = 0; } else { s/--.*--//g; # throw away comments (-- anything --) s/^\s*--.*//; # throw away comments at start of line } chomp; $buf .= ' ' . $_; $buf =~ s/"[^"]*"//g; if ($buf =~ /"/) { $quote = 1; next; } $buf =~ s/--.*--//g; # throw away comments (-- anything --) $buf =~ s/--.*//; # throw away comments (-- anything EOL) $buf =~ s/\s+/ /g; if ($buf =~ /DEFINITIONS *::= *BEGIN/) { $cnt += MIB_fill_OID(\%tOIDs) if ($tgot); $buf = ''; %tOIDs = (); $tgot = 0; next; } $buf =~ s/OBJECT-TYPE/OBJECT IDENTIFIER/; $buf =~ s/OBJECT-IDENTITY/OBJECT IDENTIFIER/; $buf =~ s/OBJECT-GROUP/OBJECT IDENTIFIER/; $buf =~ s/MODULE-IDENTITY/OBJECT IDENTIFIER/; $buf =~ s/NOTIFICATION-TYPE/OBJECT IDENTIFIER/; $buf =~ s/ IMPORTS .*\;//; $buf =~ s/ SEQUENCE *{.*}//; $buf =~ s/ SYNTAX .*//; $buf =~ s/ [\w\-]+ *::= *OBJECT IDENTIFIER//; $buf =~ s/ OBJECT IDENTIFIER.*::= *{/ OBJECT IDENTIFIER ::= {/; if ($buf =~ / ([\w\-]+) OBJECT IDENTIFIER *::= *{([^}]+)}/) { $var = $1; $buf = $2; $buf =~ s/ +$//; $buf =~ s/\s+\(/\(/g; # remove spacing around '(' $buf =~ s/\(\s+/\(/g; $buf =~ s/\s+\)/\)/g; # remove spacing before ')' @parts = split(' ', $buf); $strt = ''; foreach $indx (@parts) { if ($indx =~ /([\w\-]+)\((\d+)\)/) { $ind = $1; $val = $2; if (exists($tOIDs{$strt})) { $tOIDs{$ind} = $tOIDs{$strt} . '.' . $val; } elsif ($strt ne '') { $tOIDs{$ind} = "${strt}.${val}"; } else { $tOIDs{$ind} = $val; } $strt = $ind; $tgot = 1; } elsif ($indx =~ /^\d+$/) { if (exists($tOIDs{$strt})) { $tOIDs{$var} = $tOIDs{$strt} . '.' . $indx; } else { $tOIDs{$var} = "${strt}.${indx}"; } $tgot = 1; } else { $strt = $indx; } } $buf = ''; } } $cnt += MIB_fill_OID(\%tOIDs) if ($tgot); $RevNeeded = 1 if ($cnt > 0); return $cnt; } # # Fill the OIDS hash with results from the MIB parsing # sub MIB_fill_OID ($) { my($href) = @_; my($cnt, $changed, @del, $var, $val, @parts, $indx); my(%seen); $cnt = 0; do { $changed = 0; @del = (); foreach $var (keys %$href) { $val = $href->{$var}; @parts = split('\.', $val); $val = ''; foreach $indx (@parts) { if ($indx =~ /^\d+$/) { $val .= '.' . $indx; } else { if (exists($SNMP_util::OIDS{$indx})) { $val = $SNMP_util::OIDS{$indx}; } else { $val .= '.' . $indx; } } } if ($val =~ /^[\d\.]+$/) { $val =~ s/^\.+//; if (!exists($SNMP_util::OIDS{$var}) || (length($val) > length($SNMP_util::OIDS{$var}))) { $SNMP_util::OIDS{$var} = $val; print "'$var' => '$val'\n" if $SNMP_util::Debug; $changed = 1; $cnt++; } push @del, $var; } } foreach $var (@del) { delete $href->{$var}; } } while($changed); $Carp::CarpLevel++; foreach $var (sort keys %$href) { $val = $href->{$var}; $val =~ s/\..*//; next if (exists($seen{$val})); $seen{$val} = 1; $seen{$var} = 1; carp "snmpMIB_to_OID: prefix \"$val\" unknown, load the parent MIB first.\n" unless ($SNMP_Session::suppress_warnings > 1); } $Carp::CarpLevel--; return $cnt; } sub encode_oid_with_errmsg ($) { my ($oid) = @_; my $tmp = encode_oid(split(/\./, $oid)); if (! defined $tmp) { carp "cannot encode Object ID $oid: $BER::errmsg" unless ($SNMP_Session::suppress_warnings > 1); return undef; } return $tmp; } 1; smokeping-2.7.3/lib/Smokeping.pm000066400000000000000000005523421342220157600165740ustar00rootroot00000000000000# -*- perl -*- package Smokeping; use strict; use CGI; use Getopt::Long; use Pod::Usage; use Digest::MD5 qw(md5_base64); use SNMP_util; use SNMP_Session; # enable locale?? #use locale; use POSIX qw(fmod locale_h signal_h sys_wait_h); use Smokeping::Config; use RRDs; use Sys::Syslog qw(:DEFAULT setlogsock); use Sys::Hostname; use Smokeping::Colorspace; use Smokeping::Master; use Smokeping::Slave; use Smokeping::RRDhelpers; use Smokeping::Graphs; use URI::Escape; use Time::HiRes; setlogsock('unix') if grep /^ $^O $/xo, ("linux", "openbsd", "freebsd", "netbsd"); # make sure we do not end up with , in odd places where one would expect a '.' # we set the environment variable so that our 'kids' get the benefit too my $xssBadRx = qr/[<>%&'";]/; $ENV{'LC_NUMERIC'}='C'; if (setlocale(LC_NUMERIC,"") ne "C") { if ($ENV{'LC_ALL'} eq 'C') { # This has got to be a bug in perl/mod_perl, apache or libc die("Your internalization implementation on your operating system is " . "not responding to your setup of LC_ALL to \"C\" as LC_NUMERIC is " . "coming up as \"" . setlocale(LC_NUMERIC, "") . "\" leaving " . "smokeping unable to compare numbers..."); } elsif ($ENV{'LC_ALL'} ne "") { # This error is most likely setup related and easy to fix with proper # setup of the operating system or multilanguage locale setup. Hint, # setting LANG is better than setting LC_ALL... die("Resetting LC_NUMERIC failed probably because your international " . "setup of the LC_ALL to \"". $ENV{'LC_ALL'} . "\" is overridding " . "LC_NUMERIC. Setting LC_ALL is not compatible with smokeping..."); } else { # This is pretty nasty to figure out. Seems there are still lots # of bugs in LOCALE behavior and if you get this error, you are # affected by it. The worst is when "setlocale" is reading the # environment variables of your webserver and not reading the PERL # %ENV array like it should. die("Something is wrong with the internalization setup of your " . "operating system, webserver, or the perl plugin to your webserver " . "(like mod_perl) and smokeping can not compare numbers correctly. " . "On unix, check your /etc/locale.gen and run sudo locale-gen, set " . "LC_NUMERIC in your perl plugin config or even your webserver " . "startup script to potentially fix or work around the problem..."); } } use File::Basename; use Smokeping::Examples; use Smokeping::RRDtools; # globale persistent variables for speedy use vars qw($cfg $probes $VERSION $havegetaddrinfo $cgimode); $VERSION = "2.007003"; # we want opts everywhere my %opt; BEGIN { $havegetaddrinfo = 0; eval 'use Socket6'; $havegetaddrinfo = 1 unless $@; } my $DEFAULTPRIORITY = 'info'; # default syslog priority my $logging = 0; # keeps track of whether we have a logging method enabled sub find_libdir { # find the directory where the probe and matcher modules are located # by looking for 'Smokeping/probes/FPing.pm' in @INC # # yes, this is ugly. Suggestions welcome. for (@INC) { -f "$_/Smokeping/probes/FPing.pm" or next; return $_; } return undef; } sub do_log(@); sub load_probe($$$$); sub dummyCGI::param { return wantarray ? () : ""; } sub dummyCGI::script_name { return "sorry_no_script_name_when_running_offline"; } sub load_probes ($){ my $cfg = shift; my %prbs; foreach my $probe (keys %{$cfg->{Probes}}) { my @subprobes = grep { ref $cfg->{Probes}{$probe}{$_} eq 'HASH' } keys %{$cfg->{Probes}{$probe}}; if (@subprobes) { my $modname = $probe; for my $subprobe (@subprobes) { $prbs{$subprobe} = load_probe($modname, $cfg->{Probes}{$probe}{$subprobe},$cfg, $subprobe); } } else { $prbs{$probe} = load_probe($probe, $cfg->{Probes}{$probe},$cfg, $probe); } } return \%prbs; }; sub load_probe ($$$$) { my $modname = shift; my $properties = shift; my $cfg = shift; my $name = shift; $name = $modname unless defined $name; # just in case, make sure we have the module loaded. unless # we are running as slave, this will already be the case # after reading the config file eval 'require Smokeping::probes::'.$modname; die "$@\n" if $@; my $rv; eval '$rv = Smokeping::probes::'.$modname.'->new( $properties,$cfg,$name);'; die "$@\n" if $@; die "Failed to load Probe $name (module $modname)\n" unless defined $rv; return $rv; } sub snmpget_ident ($) { my $host = shift; $SNMP_Session::suppress_warnings = 10; # be silent my @get = snmpget("${host}::1:1:1", qw(sysContact sysName sysLocation)); return undef unless @get; my $answer = join "/", grep { defined } @get; $answer =~ s/\s+//g; return $answer; } sub cgiurl { my ($q, $cfg) = @_; my %url_of = ( absolute => $cfg->{General}{cgiurl}, relative => q{}, original => $q->script_name, ); my $linkstyle = $cfg->{General}->{linkstyle}; die('unknown value for $cfg->{General}->{linkstyle}: ' . $linkstyle ) unless exists $url_of{$linkstyle}; return $url_of{$linkstyle}; } sub hierarchy ($){ my $q = shift; my $hierarchy = ''; my $h = $q->param('hierarchy'); if ($q->param('hierarchy')){ $h =~ s/$xssBadRx/_/g; $hierarchy = 'hierarchy='.$h.';'; }; return $hierarchy; } sub lnk ($$) { my ($q, $path) = @_; if ($q->isa('dummyCGI')) { return $path . ".html"; } else { return cgiurl($q, $cfg) . "?".hierarchy($q)."target=" . $path; } } sub dyndir ($) { my $cfg = shift; return $cfg->{General}{dyndir} || $cfg->{General}{datadir}; } sub make_cgi_directories { my $targets = shift; my $dir = shift; my $perms = shift; while (my ($k, $v) = each %$targets) { next if ref $v ne "HASH"; if ( ! -d "$dir/$k" ) { my $saved = umask 0; mkdir "$dir/$k", oct($perms); umask $saved; } make_cgi_directories($targets->{$k}, "$dir/$k", $perms); } } sub update_dynaddr ($$){ my $cfg = shift; my $q = shift; my @target = split /\./, $q->param('target'); my $secret = md5_base64($q->param('secret')); my $address = $ENV{REMOTE_ADDR}; my $targetptr = $cfg->{Targets}; foreach my $step (@target){ $step =~ s/$xssBadRx/_/g; return "Error: Unknown target $step" unless defined $targetptr->{$step}; $targetptr = $targetptr->{$step}; }; return "Error: Invalid target or secret" unless defined $targetptr->{host} and $targetptr->{host} eq "DYNAMIC/${secret}"; my $file = dyndir($cfg); for (0..$#target-1) { $file .= "/" . $target[$_]; ( -d $file ) || mkdir $file, 0755; } $file.= "/" . $target[-1]; my $prevaddress = "?"; my $snmp = snmpget_ident $address; if (-r "$file.adr" and not -z "$file.adr"){ open(D, "<$file.adr") or return "Error opening $file.adr: $!\n"; chomp($prevaddress = ); close D; } if ( $prevaddress ne $address){ open(D, ">$file.adr.new") or return "Error writing $file.adr.new: $!"; print D $address,"\n"; close D; rename "$file.adr.new","$file.adr"; } if ( $snmp ) { open (D, ">$file.snmp.new") or return "Error writing $file.snmp.new: $!"; print D $snmp,"\n"; close D; rename "$file.snmp.new", "$file.snmp"; } elsif ( -f "$file.snmp") { unlink "$file.snmp" }; } sub sendmail ($$$){ my $from = shift; my $to = shift; $to = $1 if $to =~ /<(.*?)>/; my $body = shift; if ($cfg->{General}{mailhost} and my $smtp = Net::SMTP->new([split /\s*,\s*/, $cfg->{General}{mailhost}],Timeout=>5) ){ $smtp->auth($cfg->{General}{mailuser}, $cfg->{General}{mailpass}) if ($cfg->{General}{mailuser} and $cfg->{General}{mailpass}); $smtp->mail($from); $smtp->to(split(/\s*,\s*/, $to)); $smtp->data(); $smtp->datasend($body); $smtp->dataend(); $smtp->quit; } elsif ($cfg->{General}{sendmail} or -x "/usr/lib/sendmail"){ open (M, "|-") || exec (($cfg->{General}{sendmail} || "/usr/lib/sendmail"),"-f",$from,$to); print M $body; close M; } else { warn "ERROR: not sending mail to $to, as all methodes failed\n"; } } sub sendsnpp ($$){ my $to = shift; my $msg = shift; if ($cfg->{General}{snpphost} and my $snpp = Net::SNPP->new($cfg->{General}{snpphost}, Timeout => 60)){ $snpp->send( Pager => $to, Message => $msg) || do_debuglog("ERROR - ". $snpp->message); $snpp->quit; } else { warn "ERROR: not sending page to $to, as all SNPP setup failed\n"; } } sub min ($$) { my ($a, $b) = @_; return $a < $b ? $a : $b; } sub init_alerts ($){ my $cfg = shift; foreach my $al (keys %{$cfg->{Alerts}}) { my $x = $cfg->{Alerts}{$al}; next unless ref $x eq 'HASH'; if ($x->{type} eq 'matcher'){ $x->{pattern} =~ /(\S+)\((.+)\)/ or die "ERROR: Alert $al pattern entry '$_' is invalid\n"; my $matcher = $1; my $arg = $2; die "ERROR: matcher $matcher: all matchers start with a capital letter since version 2.0\n" unless $matcher =~ /^[A-Z]/; eval 'require Smokeping::matchers::'.$matcher; die "Matcher '$matcher' could not be loaded: $@\n" if $@; my $hand; eval "\$hand = Smokeping::matchers::$matcher->new($arg)"; die "ERROR: Matcher '$matcher' could not be instantiated\nwith arguments $arg:\n$@\n" if $@; $x->{minlength} = $hand->Length; $x->{maxlength} = $x->{minlength}; $x->{sub} = sub { $hand->Test(shift) } ; } else { my $sub_front = <{$x->{type}}; for(1){ SUB my $sub; my $sub_back = " return 1;\n }\n return 0;\n}\n"; my @ops = split /\s*,\s*/, $x->{pattern}; $x->{minlength} = scalar grep /^[!=><]/, @ops; $x->{maxlength} = $x->{minlength}; my $multis = scalar grep /^[*]/, @ops; my $it = ""; for(1..$multis){ my $ind = " " x ($_-1); my $extra = ""; for (1..$_-1) { $extra .= "-\$i$_"; } $sub .= <{maxlength}; my $incr = 0; for (@ops) { my $extra = ""; $it = " " x $multis; for(1..$multis){ $extra .= "-\$i$_"; }; /^(==|!=|<|>|<=|>=|\*)(\d+(?:\.\d*)?|U|S|\d*\*)(%?)(?:(<|>|<=|>=)(\d+(?:\.\d*)?)(%?))?$/ or die "ERROR: Alert $al pattern entry '$_' is invalid\n"; my $op = $1; my $value = $2; my $perc = $3; my $op2 = $4; my $value2 = $5; my $perc2 = $6; if ($op eq '*') { if ($value =~ /^([1-9]\d*)\*$/) { $value = $1; $x->{maxlength} += $value; $sub_front .= " my \$imax$multis = min(\@\$y - $x->{minlength}, $value);\n"; $sub_back .= "\n"; $sub .= <= min(\$maxlength$extra,\$imax$multis); FOR $multis--; next; } else { die "ERROR: multi-match operator * must be followed by Number* in Alert $al definition\n"; } } elsif ($value eq 'U') { if ($op eq '==') { $sub .= "$it next if defined \$y->[$i$extra];\n"; } elsif ($op eq '!=') { $sub .= "$it next unless defined \$y->[$i$extra];\n"; } else { die "ERROR: invalid operator $op in connection U in Alert $al definition\n"; } } elsif ($value eq 'S') { if ($op eq '==') { $sub .= "$it next unless defined \$y->[$i$extra] and \$y->[$i$extra] eq 'S';\n"; } else { die "ERROR: S is only valid with == operator in Alert $al definition\n"; } } elsif ($value eq '*') { if ($op ne '==') { die "ERROR: operator $op makes no sense with * in Alert $al definition\n"; } # do nothing else ... } else { if ( $x->{type} eq 'loss') { die "ERROR: loss should be specified in % (alert $al pattern)\n" unless $perc eq "%"; } elsif ( $x->{type} eq 'rtt' ) { $value /= 1000; } else { die "ERROR: unknown alert type $x->{type}\n"; } $sub .= <[$i$extra] $it and \$y->[$i$extra] =~ /^\\d/ $it and \$y->[$i$extra] $op $value IF if ($op2){ if ( $x->{type} eq 'loss') { die "ERROR: loss should be specified in % (alert $al pattern)\n" unless $perc2 eq "%"; } elsif ( $x->{type} eq 'rtt' ) { $value2 /= 1000; } $sub .= <[$i$extra] $op2 $value2 IF } $sub .= "$it ;"; } $i++; } $sub_front .= "$it my \$minlength = $x->{minlength};\n"; $sub_front .= "$it my \$maxlength = $x->{maxlength};\n"; $sub_front .= "$it next if scalar \@\$y < \$minlength ;\n"; do_debuglog(<{pattern} $sub_front$sub$sub_back COMP $x->{sub} = eval ( $sub_front.$sub.$sub_back ); die "ERROR: compiling alert pattern $al ($x->{pattern}): $@\n" if $@; } } } sub check_filter ($$) { my $cfg = shift; my $name = shift; # remove the path prefix when filtering and make sure the path again starts with / my $prefix = $cfg->{General}{datadir}; $name =~ s|^${prefix}/*|/|; # if there is a filter do neither schedule these nor make rrds if ($opt{filter} && scalar @{$opt{filter}}){ my $ok = 0; for (@{$opt{filter}}){ /^\!(.+)$/ && do { my $rx = $1; $name !~ /^$rx/ && do{ $ok = 1}; next; }; /^(.+)$/ && do { my $rx = $1; $name =~ /^$rx/ && do {$ok = 1}; next; }; } return $ok; }; return 1; } sub add_targets ($$$$); sub add_targets ($$$$){ my $cfg = shift; my $probes = shift; my $tree = shift; my $name = shift; die "Error: Invalid Probe: $tree->{probe}" unless defined $probes->{$tree->{probe}}; my $probeobj = $probes->{$tree->{probe}}; foreach my $prop (keys %{$tree}) { if (ref $tree->{$prop} eq 'HASH'){ add_targets $cfg, $probes, $tree->{$prop}, "$name/$prop"; } if ($prop eq 'host' and ( check_filter($cfg,$name) and $tree->{$prop} !~ m|^/| )) { if($tree->{host} =~ /^DYNAMIC/) { $probeobj->add($tree,$name); } else { $probeobj->add($tree,$tree->{host}); } } } } sub init_target_tree ($$$$); # predeclare recursive subs sub init_target_tree ($$$$) { my $cfg = shift; my $probes = shift; my $tree = shift; my $name = shift; my $hierarchies = $cfg->{__hierarchies}; die "Error: Invalid Probe: $tree->{probe}" unless defined $probes->{$tree->{probe}}; my $probeobj = $probes->{$tree->{probe}}; if ($tree->{alerts}){ die "ERROR: no Alerts section\n" unless exists $cfg->{Alerts}; $tree->{alerts} = [ split(/\s*,\s*/, $tree->{alerts}) ] unless ref $tree->{alerts} eq 'ARRAY'; $tree->{fetchlength} = 0; foreach my $al (@{$tree->{alerts}}) { die "ERROR: alert $al ($name) is not defined\n" unless defined $cfg->{Alerts}{$al}; $tree->{fetchlength} = $cfg->{Alerts}{$al}{maxlength} if $tree->{fetchlength} < $cfg->{Alerts}{$al}{maxlength}; } }; # fill in menu and title if missing $tree->{menu} ||= $tree->{host} || "unknown"; $tree->{title} ||= $tree->{host} || "unknown"; my $real_path = $name; my $dataroot = $cfg->{General}{datadir}; $real_path =~ s/^$dataroot\/*//; my @real_path = split /\//, $real_path; foreach my $prop (keys %{$tree}) { if (ref $tree->{$prop} eq 'HASH'){ if (not -d $name and not $cgimode) { mkdir $name, 0755 or die "ERROR: mkdir $name: $!\n"; }; if (defined $tree->{$prop}{parents}){ for my $parent (split /\s/, $tree->{$prop}{parents}){ my($hierarchy,$path)=split /:/,$parent,2; die "ERROR: unknown hierarchy $hierarchy in $name. Make sure it is listed in Presentation->hierarchies.\n" unless $cfg->{Presentation}{hierarchies} and $cfg->{Presentation}{hierarchies}{$hierarchy}; my @path = split /\/+/, $path; shift @path; # drop empty root element; if ( not exists $hierarchies->{$hierarchy} ){ $hierarchies->{$hierarchy} = {}; }; my $point = $hierarchies->{$hierarchy}; for my $item (@path){ if (not exists $point->{$item}){ $point->{$item} = {}; } $point = $point->{$item}; }; $point->{$prop}{__tree_link} = $tree->{$prop}; $point->{$prop}{__real_path} = [ @real_path,$prop ]; } } init_target_tree $cfg, $probes, $tree->{$prop}, "$name/$prop"; } if ($prop eq 'host' and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/|) { # print "init $name\n"; my $step = $probeobj->step(); # we have to do the add before calling the _pings method, it won't work otherwise my $pings = $probeobj->_pings($tree); my @slaves = (""); if ($tree->{slaves}){ push @slaves, split /\s+/, $tree->{slaves}; }; for my $slave (@slaves){ die "ERROR: slave '$slave' is not defined in the '*** Slaves ***' section!\n" unless $slave eq '' or defined $cfg->{Slaves}{$slave}; my $s = $slave ? "~".$slave : ""; my @create = ($name.$s.".rrd", "--start",(time-1),"--step",$step, "DS:uptime:GAUGE:".(2*$step).":0:U", "DS:loss:GAUGE:".(2*$step).":0:".$pings, "DS:median:GAUGE:".(2*$step).":0:U", (map { "DS:ping${_}:GAUGE:".(2*$step).":0:U" } 1..$pings), (map { "RRA:".(join ":", @{$_}) } @{$cfg->{Database}{_table}} )); if (not -f $name.$s.".rrd"){ unless ($cgimode) { do_debuglog("Calling RRDs::create(@create)"); RRDs::create(@create); my $ERROR = RRDs::error(); do_log "RRDs::create ERROR: $ERROR\n" if $ERROR; } } else { shift @create; # remove the filename my ($fatal, $comparison) = Smokeping::RRDtools::compare($name.$s.".rrd", \@create); die("Error: RRD parameter mismatch ('$comparison'). You must delete $name$s.rrd or fix the configuration parameters.\n") if $fatal; warn("Warning: RRD parameter mismatch('$comparison'). Continuing anyway.\n") if $comparison and not $fatal; Smokeping::RRDtools::tuneds($name.$s.".rrd", \@create); } } } } }; sub enable_dynamic($$$$); sub enable_dynamic($$$$){ my $cfg = shift; my $cfgfile = $cfg->{__cfgfile}; my $tree = shift; my $path = shift; my $email = ($tree->{email} || shift); my $print; die "ERROR: smokemail property in $cfgfile not specified\n" unless defined $cfg->{General}{smokemail}; die "ERROR: cgiurl property in $cfgfile not specified\n" unless defined $cfg->{General}{cgiurl}; if (defined $tree->{host} and $tree->{host} eq 'DYNAMIC' ) { if ( not defined $email ) { warn "WARNING: No email address defined for $path\n"; } else { my $usepath = $path; $usepath =~ s/\.$//; my $secret = int(rand 1000000); my $md5 = md5_base64($secret); open C, "<$cfgfile" or die "ERROR: Reading $cfgfile: $!\n"; open G, ">$cfgfile.new" or die "ERROR: Writing $cfgfile.new: $!\n"; my $section ; my @goal = split /\./, $usepath; my $indent = "+"; my $done; while (){ $done && do { print G; next }; /^\s*\Q*** Targets ***\E\s*$/ && do{$section = 'match'}; @goal && $section && /^\s*\Q${indent}\E\s*\Q$goal[0]\E/ && do { $indent .= "+"; shift @goal; }; (not @goal) && /^\s*host\s*=\s*DYNAMIC$/ && do { print G "host = DYNAMIC/$md5\n"; $done = 1; next; }; print G; } close G; rename "$cfgfile.new", $cfgfile; close C; my $body; open SMOKE, $cfg->{General}{smokemail} or die "ERROR: can't read $cfg->{General}{smokemail}: $!\n"; while (){ s/<##PATH##>/$usepath/ig; s/<##SECRET##>/$secret/ig; s/<##URL##>/$cfg->{General}{cgiurl}/; s/<##FROM##>/$cfg->{General}{contact}/; s/<##OWNER##>/$cfg->{General}{owner}/; s/<##TO##>/$email/; $body .= $_; } close SMOKE; my $mail; print STDERR "Sending smoke-agent for $usepath to $email ... "; sendmail $cfg->{General}{contact},$email,$body; print STDERR "DONE\n"; } } foreach my $prop ( keys %{$tree}) { enable_dynamic $cfg, $tree->{$prop},"$path$prop.",$email if ref $tree->{$prop} eq 'HASH'; } }; sub get_tree($$){ my $cfg = shift; my $open = shift; my $tree = $cfg->{Targets}; for (@{$open}){ $tree = $tree->{$_}; } return $tree; } sub target_menu($$$$;$); sub target_menu($$$$;$){ my $tree = shift; my $open = shift; $open = [@$open]; # make a copy my $path = shift; my $filter = shift; my $suffix = shift || ''; my $print; my $current = shift @{$open} || ""; my @hashes; foreach my $prop (sort {exists $tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)} grep { ref $tree->{$_} eq 'HASH' and not /^__/ } keys %$tree) { push @hashes, $prop; } return wantarray ? () : "" unless @hashes; $print .= qq{\n" unless $filter; if ($filter){ if (wantarray()){ return @matches; } else { $print .= qq{\n"; } } return $print; }; sub fill_template ($$;$){ my $template = shift; my $subst = shift; my $data = shift; if ($template){ my $line = $/; undef $/; open I, $template or return undef; $data = ; close I; $/ = $line; } foreach my $tag (keys %{$subst}) { my $replace = $subst->{$tag} || ''; $data =~ s/<##${tag}##>/$replace/g; } return $data; } sub exp2seconds ($) { my $x = shift; $x =~/(\d+)m/ && return $1*60; $x =~/(\d+)h/ && return $1*60*60; $x =~/(\d+)d/ && return $1*60*60*24; $x =~/(\d+)w/ && return $1*60*60*24*7; $x =~/(\d+)y/ && return $1*60*60*24*365; return $x; } sub calc_stddev { my $rrd = shift; my $id = shift; my $pings = shift; my @G = map {("DEF:pin${id}p${_}=${rrd}:ping${_}:AVERAGE","CDEF:p${id}p${_}=pin${id}p${_},UN,0,pin${id}p${_},IF")} 1..$pings; push @G, "CDEF:pings${id}="."$pings,p${id}p1,UN,".join(",",map {"p${id}p$_,UN,+"} 2..$pings).",-"; push @G, "CDEF:m${id}="."p${id}p1,".join(",",map {"p${id}p$_,+"} 2..$pings).",pings${id},/"; push @G, "CDEF:sdev${id}=p${id}p1,m${id},-,DUP,*,".join(",",map {"p${id}p$_,m${id},-,DUP,*,+"} 2..$pings).",pings${id},/,SQRT"; return @G; } sub brighten_webcolor { my $web = shift; my @rgb = Smokeping::Colorspace::web_to_rgb($web); my @hsl = Smokeping::Colorspace::rgb_to_hsl(@rgb); $hsl[2] = (1 - $hsl[2]) * (2/3) + $hsl[2]; @rgb = Smokeping::Colorspace::hsl_to_rgb(@hsl); return Smokeping::Colorspace::rgb_to_web(@rgb); } sub get_overview ($$$$){ my $cfg = shift; my $q = shift; my $tree = shift; my $open = shift; my $page =""; my $date = $cfg->{Presentation}{overview}{strftime} ? POSIX::strftime($cfg->{Presentation}{overview}{strftime}, localtime(time)) : scalar localtime(time); if ( $RRDs::VERSION >= 1.199908 ){ $date =~ s|:|\\:|g; } foreach my $prop (sort {exists $tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)} grep { ref $tree->{$_} eq 'HASH' and not /^__/ } keys %$tree) { my @slaves; my $phys_tree = $tree->{$prop}; my $phys_open = $open; my $dir = ""; if ($tree->{$prop}{__tree_link}){ $phys_tree = $tree->{$prop}{__tree_link}; $phys_open = [ @{$tree->{$prop}{__real_path}} ]; pop @$phys_open; } next unless $phys_tree->{host}; next if $phys_tree->{hide} and $phys_tree->{hide} eq 'yes'; if (not $phys_tree->{nomasterpoll} or $phys_tree->{nomasterpoll} eq 'no'){ @slaves = (""); }; if ($phys_tree->{host} =~ m|^/|){ # multi host syntax @slaves = split /\s+/, $phys_tree->{host}; } elsif ($phys_tree->{slaves}){ push @slaves, split /\s+/,$phys_tree->{slaves}; } next if 0 == @slaves; for (@$phys_open) { $dir .= "/$_"; mkdir $cfg->{General}{imgcache}.$dir, 0755 unless -d $cfg->{General}{imgcache}.$dir; die "ERROR: creating $cfg->{General}{imgcache}$dir: $!\n" unless -d $cfg->{General}{imgcache}.$dir; } my @G; #Graph 'script' my $max = $cfg->{Presentation}{overview}{max_rtt} || "100000"; my $probe = $probes->{$phys_tree->{probe}}; my $pings = $probe->_pings($phys_tree); my $i = 0; my @colors = split /\s+/, $cfg->{Presentation}{multihost}{colors}; my $ProbeUnit = $probe->ProbeUnit(); for my $slave (@slaves){ $i++; my $rrd; my $medc; my $label; if ($slave =~ m|^/|){ # multihost entry $rrd = $cfg->{General}{datadir}.'/'.$slave.".rrd"; $medc = shift @colors; my @tree_path = split /\//,$slave; shift @tree_path; my ($host,$real_slave) = split /~/, $tree_path[-1]; #/ $tree_path[-1]= $host; my $tree = get_tree($cfg,\@tree_path); # not all multihost entries must have the same number of pings $probe = $probes->{$tree->{probe}}; $pings = $probe->_pings($tree); $label = $tree->{menu}; # if there are multiple units ... lets say so ... if ($ProbeUnit ne $probe->ProbeUnit()){ $ProbeUnit = 'var units'; } if ($real_slave){ $label .= "<". $cfg->{Slaves}{$real_slave}{display_name}; } $label = sprintf("%-20s",$label); push @colors, $medc; } else { my $s = $slave ? "~".$slave : ""; $rrd = $cfg->{General}{datadir}.$dir.'/'.$prop.$s.'.rrd'; $medc = $slave ? $cfg->{Slaves}{$slave}{color} : ($cfg->{Presentation}{overview}{median_color} || shift @colors); if ($#slaves > 0){ $label = sprintf("%-25s","median RTT from ".($slave ? $cfg->{Slaves}{$slave}{display_name} : $cfg->{General}{display_name} || hostname)); } else { $label = "med RTT" } }; $label =~ s/:/\\:/g; my $sdc = $medc; $sdc =~ s/^(......).*/${1}30/; push @G, "DEF:median$i=${rrd}:median:AVERAGE", "DEF:loss$i=${rrd}:loss:AVERAGE", "CDEF:ploss$i=loss$i,$pings,/,100,*", "CDEF:dm$i=median$i,0,$max,LIMIT", calc_stddev($rrd,$i,$pings), "CDEF:dmlow$i=dm$i,sdev$i,2,/,-", "CDEF:s2d$i=sdev$i", # "CDEF:dm2=median,1.5,*,0,$max,LIMIT", # "LINE1:dm2", # this is for kicking things down a bit "AREA:dmlow$i", "AREA:s2d${i}#${sdc}::STACK", "LINE1:dm$i#${medc}:${label}", "VDEF:avmed$i=median$i,AVERAGE", "VDEF:avsd$i=sdev$i,AVERAGE", "CDEF:msr$i=median$i,POP,avmed$i,avsd$i,/", "VDEF:avmsr$i=msr$i,AVERAGE", "GPRINT:avmed$i:%5.1lf %ss av md ", "GPRINT:ploss$i:AVERAGE:%5.1lf %% av ls", "GPRINT:avsd$i:%5.1lf %ss av sd", "GPRINT:avmsr$i:%5.1lf %s am/as\\l"; } my ($graphret,$xs,$ys) = RRDs::graph ($cfg->{General}{imgcache}.$dir."/${prop}_mini.png", # '--lazy', '--start','-'.exp2seconds($cfg->{Presentation}{overview}{range}), '--title',$cfg->{Presentation}{htmltitle} ne 'yes' ? $phys_tree->{title} : '', '--height',$cfg->{Presentation}{overview}{height}, '--width',$cfg->{Presentation}{overview}{width}, '--vertical-label', $ProbeUnit, '--imgformat','PNG', Smokeping::Graphs::get_colors($cfg), '--alt-autoscale-max', '--alt-y-grid', '--rigid', '--lower-limit','0', @G, "COMMENT:$date\\r"); my $ERROR = RRDs::error(); $page .= "
    "; $page .= "

    ".$phys_tree->{title}."

    " if $cfg->{Presentation}{htmltitle} eq 'yes'; $page .= "
    "; if (defined $ERROR) { $page .= "ERROR: $ERROR
    ".join("
    ", map {"'$_'"} @G); } else { $page.="". "\"\"{General}{imgurl}.$dir."/${prop}_mini.png\">"; } $page .="
    \n"; } return $page; } sub findmax ($$) { my $cfg = shift; my $rrd = shift; # my $pings = "ping".int($cfg->{Database}{pings}/1.1); my %maxmedian; my @maxmedian; for (@{$cfg->{Presentation}{detail}{_table}}) { my ($desc,$start) = @{$_}; $start = exp2seconds($start); my ($graphret,$xs,$ys) = RRDs::graph ("dummy", '--start', -$start, '--width',$cfg->{Presentation}{overview}{width}, '--end','-'.int($start / $cfg->{Presentation}{detail}{width}), "DEF:maxping=${rrd}:median:AVERAGE", 'PRINT:maxping:MAX:%le' ); my $ERROR = RRDs::error(); do_log $ERROR if $ERROR; my $val = $graphret->[0]; $val = 0 if $val =~ /nan/i; $maxmedian{$start} = $val; push @maxmedian, $val; } my $med = (sort @maxmedian)[int(($#maxmedian) / 2 )]; my $max = 0.000001; foreach my $x ( keys %maxmedian ){ if ( not defined $cfg->{Presentation}{detail}{unison_tolerance} or ( $maxmedian{$x} <= $cfg->{Presentation}{detail}{unison_tolerance} * $med and $maxmedian{$x} >= $med / $cfg->{Presentation}{detail}{unison_tolerance}) ){ $max = $maxmedian{$x} unless $maxmedian{$x} < $max; $maxmedian{$x} = undef; }; } foreach my $x ( keys %maxmedian ){ if (defined $maxmedian{$x}) { $maxmedian{$x} *= 1.2; } else { $maxmedian{$x} = $max * 1.2; } $maxmedian{$x} = $cfg->{Presentation}{detail}{max_rtt} if $cfg->{Presentation}{detail}{max_rtt} and $maxmedian{$x} > $cfg->{Presentation}{detail}{max_rtt} }; return \%maxmedian; } sub smokecol ($) { my $count = shift; return [] unless $count > 2; my $half = $count/2; my @items; my $itop=$count; my $ibot=1; for (; $itop > $ibot; $itop--,$ibot++){ my $color = int(190/$half * ($half-$ibot))+50; push @items, "CDEF:smoke${ibot}=cp${ibot},UN,UNKN,cp${itop},cp${ibot},-,IF"; push @items, "AREA:cp${ibot}"; push @items, "STACK:smoke${ibot}#".(sprintf("%02x",$color) x 3); }; return \@items; } sub parse_datetime($){ my $in = shift; for ($in){ $in =~ s/$xssBadRx/_/g; /^(\d+)$/ && do { my $value = $1; $value = time if $value > 2**32; return $value}; /^\s*(\d{4})-(\d{1,2})-(\d{1,2})(?:\s+(\d{1,2}):(\d{2})(?::(\d{2}))?)?\s*$/ && return POSIX::mktime($6||0,$5||0,$4||0,$3,$2-1,$1-1900,0,0,-1); /^now$/ && return time; /([ -:a-z0-9]+)/ && return $1; }; return time; } sub get_detail ($$$$;$){ # when drawing the detail page there are three modes for doing it # a) 's' classic with several static graphs on the page # b) 'n' navigator mode with one graph. below the graph one can specify the end time # and the length of the graph. # c) 'c' chart mode, one graph with a link to it's full page # d) 'a' ajax mode, generate image based on given url and dump in on stdout # my $cfg = shift; my $q = shift; my $tree = shift; my $open = shift; my $mode = shift || $q->param('displaymode') || 's'; $mode =~ s/$xssBadRx/_/g; my $phys_tree = $tree; my $phys_open = $open; if ($tree->{__tree_link}){ $phys_tree=$tree->{__tree_link}; $phys_open = $tree->{__real_path}; } if ($phys_tree->{host} and $phys_tree->{host} =~ m|^/|){ return Smokeping::Graphs::get_multi_detail($cfg,$q,$tree,$open,$mode); } # don't distinguish anymore ... tree is now phys_tree $tree = $phys_tree; my @slaves; if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no' or $mode eq 'a' or $mode eq 'n'){ @slaves = (""); }; if ($tree->{slaves} and $mode eq 's'){ push @slaves, split /\s+/,$tree->{slaves}; }; return "" if not defined $tree->{host} or 0 == @slaves; my $file = $mode eq 'c' ? (split(/~/, $open->[-1]))[0] : $open->[-1]; my @dirs = @{$phys_open}; pop @dirs; my $dir = ""; return "
    ERROR: ".(join ".", @dirs)." has no probe defined
    " unless $tree->{probe}; return "
    ERROR: ".(join ".", @dirs)." $tree->{probe} is not known
    " unless $cfg->{__probes}{$tree->{probe}}; my $probe = $cfg->{__probes}{$tree->{probe}}; my $ProbeDesc = $probe->ProbeDesc(); my $ProbeUnit = $probe->ProbeUnit(); my $pings = $probe->_pings($tree); my $step = $probe->step(); my $page; return "
    ERROR: unknown displaymode $mode
    " unless $mode =~ /^[snca]$/; for (@dirs) { $dir .= "/$_"; mkdir $cfg->{General}{imgcache}.$dir, 0755 unless -d $cfg->{General}{imgcache}.$dir; die "ERROR: creating $cfg->{General}{imgcache}$dir: $!\n" unless -d $cfg->{General}{imgcache}.$dir; } my $base_rrd = $cfg->{General}{datadir}.$dir."/${file}"; my $imgbase; my $imghref; my $max = {}; my @tasks; my %lastheight; if ($mode eq 's'){ # in nav mode there is only one graph, so the height calculation # is not necessary. $imgbase = $cfg->{General}{imgcache}."/".(join "/", @dirs)."/${file}"; $imghref = $cfg->{General}{imgurl}."/".(join "/", @dirs)."/${file}"; @tasks = @{$cfg->{Presentation}{detail}{_table}}; for my $slave (@slaves){ my $s = $slave ? "~$slave" : ""; if (open (HG,"<${imgbase}.maxheight$s")){ while (){ chomp; my @l = split / /; $lastheight{$s}{$l[0]} = $l[1]; } close HG; } $max->{$s} = findmax $cfg, $base_rrd.$s.".rrd"; if (open (HG,">${imgbase}.maxheight$s")){ foreach my $size (keys %{$max->{$s}}){ print HG "$s $max->{$s}{$size}\n"; } close HG; } } } elsif ($mode eq 'n' or $mode eq 'a') { my $slave = (split(/~/, $open->[-1]))[1]; my $name = $slave ? " as seen from ". $cfg->{Slaves}{$slave}{display_name} : ""; mkdir $cfg->{General}{imgcache}."/__navcache",0755 unless -d $cfg->{General}{imgcache}."/__navcache"; # remove old images after one hour my $pattern = $cfg->{General}{imgcache}."/__navcache/*.png"; for (glob $pattern){ unlink $_ if time - (stat $_)[9] > 3600; } if ($mode eq 'n') { $imgbase =$cfg->{General}{imgcache}."/__navcache/".time()."$$"; $imghref =$cfg->{General}{imgurl}."/__navcache/".time()."$$"; } else { my $serial = int(rand(2000)); $imgbase =$cfg->{General}{imgcache}."/__navcache/".$serial; $imghref =$cfg->{General}{imgurl}."/__navcache/".$serial; } $q->param('epoch_start',parse_datetime($q->param('start'))); $q->param('epoch_end',parse_datetime($q->param('end'))); my $title = $q->param('title') || ("Navigator Graph".$name); @tasks = ([$title, parse_datetime($q->param('start')),parse_datetime($q->param('end'))]); my ($graphret,$xs,$ys) = RRDs::graph ("dummy", '--start', $tasks[0][1], '--end',$tasks[0][2], "DEF:maxping=${base_rrd}.rrd:median:AVERAGE", 'PRINT:maxping:MAX:%le' ); my $ERROR = RRDs::error(); return "
    RRDtool did not understand your input: $ERROR.
    " if $ERROR; my $val = $graphret->[0]; $val = 1 if $val =~ /nan/i; $max->{''} = { $tasks[0][1] => $val * 1.5 }; } else { # chart mode mkdir $cfg->{General}{imgcache}."/__chartscache",0755 unless -d $cfg->{General}{imgcache}."/__chartscache"; # remove old images after one hour my $pattern = $cfg->{General}{imgcache}."/__chartscache/*.png"; for (glob $pattern){ unlink $_ if time - (stat $_)[9] > 3600; } my $desc = join "/",@{$open}; @tasks = ([$desc , 3600]); $imgbase = $cfg->{General}{imgcache}."/__chartscache/".(join ".", @dirs).".${file}"; $imghref = $cfg->{General}{imgurl}."/__chartscache/".(join ".", @dirs).".${file}"; my ($graphret,$xs,$ys) = RRDs::graph ("dummy", '--start', time()-3600, '--end', time(), "DEF:maxping=${base_rrd}.rrd:median:AVERAGE", 'PRINT:maxping:MAX:%le' ); my $ERROR = RRDs::error(); return "
    RRDtool did not understand your input: $ERROR.
    " if $ERROR; my $val = $graphret->[0]; $val = 1 if $val =~ /nan/i; $max->{''} = { $tasks[0][1] => $val * 1.5 }; } my $smoke = $pings >= 3 ? smokecol $pings : [ 'COMMENT:(Not enough pings to draw any smoke.)\s', 'COMMENT:\s' ]; # one \s doesn't seem to be enough my @upargs; my @upsmoke; my %lc; my %lcback; if ( defined $cfg->{Presentation}{detail}{loss_colors}{_table} ) { for (@{$cfg->{Presentation}{detail}{loss_colors}{_table}}) { my ($num,$col,$txt) = @{$_}; $lc{$num} = [ $txt, "#".$col ]; } } else { my $p = $pings; %lc = (0 => ['0', '#26ff00'], 1 => ["1/$p", '#00b8ff'], 2 => ["2/$p", '#0059ff'], 3 => ["3/$p", '#5e00ff'], 4 => ["4/$p", '#7e00ff'], int($p/2) => [int($p/2)."/$p", '#dd00ff'], $p-1 => [($p-1)."/$p", '#ff0000'], ); }; # determine a more 'pastel' version of the ping colours; this is # used for the optional loss background colouring foreach my $key (keys %lc) { if ($key == 0) { $lcback{$key} = ""; next; } my $web = $lc{$key}[1]; my @rgb = Smokeping::Colorspace::web_to_rgb($web); my @hsl = Smokeping::Colorspace::rgb_to_hsl(@rgb); $hsl[2] = (1 - $hsl[2]) * (2/3) + $hsl[2]; @rgb = Smokeping::Colorspace::hsl_to_rgb(@hsl); $web = Smokeping::Colorspace::rgb_to_web(@rgb); $lcback{$key} = $web; } my %upt; if ( defined $cfg->{Presentation}{detail}{uptime_colors}{_table} ) { for (@{$cfg->{Presentation}{detail}{uptime_colors}{_table}}) { my ($num,$col,$txt) = @{$_}; $upt{$num} = [ $txt, "#".$col]; } } else { %upt = (3600 => ['<1h', '#FFD3D3'], 2*3600 => ['<2h', '#FFE4C7'], 6*3600 => ['<6h', '#FFF9BA'], 12*3600 => ['<12h','#F3FFC0'], 24*3600 => ['<1d', '#E1FFCC'], 7*24*3600 => ['<1w', '#BBFFCB'], 30*24*3600 => ['<1m', '#BAFFF5'], '1e100' => ['>1m', '#DAECFF'] ); } my $BS = ''; if ( $RRDs::VERSION >= 1.199908 ){ $ProbeDesc =~ s|:|\\:|g; $BS = '\\'; } for (@tasks) { my ($desc,$start,$end) = @{$_}; my %xs; my %ys; my $sigtime = ($end and $end =~ /^\d+$/) ? $end : time; my $date = $cfg->{Presentation}{detail}{strftime} ? POSIX::strftime($cfg->{Presentation}{detail}{strftime}, localtime($sigtime)) : scalar localtime($sigtime); if ( $RRDs::VERSION >= 1.199908 ){ $date =~ s|:|\\:|g; } $end ||= 'last'; $start = exp2seconds($start) if $mode =~ /[s]/; my $startstr = $start =~ /^\d+$/ ? POSIX::strftime("%Y-%m-%d %H:%M",localtime($mode eq 'n' ? $start : time-$start)) : $start; my $endstr = $end =~ /^\d+$/ ? POSIX::strftime("%Y-%m-%d %H:%M",localtime($mode eq 'n' ? $end : time)) : $end; my $realstart = ( $mode =~ /[sc]/ ? '-'.$start : $start); for my $slave (@slaves){ my $s = $slave ? "~$slave" : ""; my $swidth = $max->{$s}{$start} / $cfg->{Presentation}{detail}{height}; my $rrd = $base_rrd.$s.".rrd"; my $stddev = Smokeping::RRDhelpers::get_stddev($rrd,'median','AVERAGE',$realstart,$sigtime) || 0; my @median = ("DEF:median=${rrd}:median:AVERAGE", "CDEF:ploss=loss,$pings,/,100,*", "VDEF:avmed=median,AVERAGE", "CDEF:mesd=median,POP,avmed,$stddev,/", 'GPRINT:avmed:median rtt\: %.1lf %ss avg', 'GPRINT:median:MAX:%.1lf %ss max', 'GPRINT:median:MIN:%.1lf %ss min', 'GPRINT:median:LAST:%.1lf %ss now', sprintf('COMMENT:%.1f ms sd',$stddev*1000.0), 'GPRINT:mesd:AVERAGE:%.1lf %s am/s\l', "LINE1:median#202020" ); push @median, ( "GPRINT:ploss:AVERAGE:packet loss\\: %.2lf %% avg", "GPRINT:ploss:MAX:%.2lf %% max", "GPRINT:ploss:MIN:%.2lf %% min", 'GPRINT:ploss:LAST:%.2lf %% now\l', 'COMMENT:loss color\:' ); my @lossargs = (); my @losssmoke = (); my $last = -1; foreach my $loss (sort {$a <=> $b} keys %lc){ next if $loss >= $pings; my $lvar = $loss; $lvar =~ s/\./d/g ; push @median, ( "CDEF:me$lvar=loss,$last,GT,loss,$loss,LE,*,1,UNKN,IF,median,*", "CDEF:meL$lvar=me$lvar,$swidth,-", "CDEF:meH$lvar=me$lvar,0,*,$swidth,2,*,+", "AREA:meL$lvar", "STACK:meH$lvar$lc{$loss}[1]:$lc{$loss}[0]" # "LINE2:me$lvar$lc{$loss}[1]:$lc{$loss}[0]" ); if ($cfg->{Presentation}{detail}{loss_background} and $cfg->{Presentation}{detail}{loss_background} eq 'yes') { push @lossargs, ( "CDEF:lossbg$lvar=loss,$last,GT,loss,$loss,LE,*,INF,UNKN,IF", "AREA:lossbg$lvar$lcback{$loss}", ); push @losssmoke, ( "CDEF:lossbgs$lvar=loss,$last,GT,loss,$loss,LE,*,cp2,UNKN,IF", "AREA:lossbgs$lvar$lcback{$loss}", ); } $last = $loss; } # if we have uptime draw a colorful background or the graph showing the uptime my $cdir=dyndir($cfg)."/".(join "/", @dirs)."/"; if ((not defined $cfg->{Presentation}{detail}{loss_background} or $cfg->{Presentation}{detail}{loss_background} ne 'yes') && (-f "$cdir/${file}.adr")) { @upsmoke = (); @upargs = ("COMMENT:Link Up${BS}: ", "DEF:uptime=${base_rrd}.rrd:uptime:AVERAGE", "CDEF:duptime=uptime,86400,/", 'GPRINT:duptime:LAST: %0.1lf days ('); my $lastup = 0; foreach my $uptime (sort {$a <=> $b} keys %upt){ push @upargs, ( "CDEF:up$uptime=uptime,$lastup,GE,uptime,$uptime,LE,*,INF,UNKN,IF", "AREA:up$uptime$upt{$uptime}[1]:$upt{$uptime}[0]" ); push @upsmoke, ( "CDEF:ups$uptime=uptime,$lastup,GE,uptime,$uptime,LE,*,cp2,UNKN,IF", "AREA:ups$uptime$upt{$uptime}[1]" ); $lastup=$uptime; } push @upargs, 'COMMENT:)\l'; # map {print "$_
    "} @upargs; }; my @log = (); push @log, "--logarithmic" if $cfg->{Presentation}{detail}{logarithmic} and $cfg->{Presentation}{detail}{logarithmic} eq 'yes'; my @lazy =(); @lazy = ('--lazy') if $mode eq 's' and $lastheight{$s} and $lastheight{$s}{$start} and $lastheight{$s}{$start} == $max->{$s}{$start}; my $timer_start = time(); my $title = ""; if ($cfg->{Presentation}{htmltitle} ne 'yes') { $title = "$desc from " . ($s ? $cfg->{Slaves}{$slave}{display_name}: $cfg->{General}{display_name} || hostname); } my @task = ("${imgbase}${s}_${end}_${start}.png", @lazy, '--start',$realstart, ($end ne 'last' ? ('--end',$end) : ()), '--height',$cfg->{Presentation}{detail}{height}, '--width',$cfg->{Presentation}{detail}{width}, '--title',$title, '--rigid', '--upper-limit', $max->{$s}{$start}, @log, '--lower-limit',(@log ? ($max->{$s}{$start} > 0.01) ? '0.001' : '0.0001' : '0'), '--vertical-label',$ProbeUnit, '--imgformat','PNG', Smokeping::Graphs::get_colors($cfg), (map {"DEF:ping${_}=${rrd}:ping${_}:AVERAGE"} 1..$pings), (map {"CDEF:cp${_}=ping${_},$max->{$s}{$start},LT,ping${_},INF,IF"} 1..$pings), ("DEF:loss=${rrd}:loss:AVERAGE"), @upargs,# draw the uptime bg color @lossargs, # draw the loss bg color @$smoke, @upsmoke, # draw the rest of the uptime bg color @losssmoke, # draw the rest of the loss bg color @median,'COMMENT: \l', # Gray background for times when no data was collected, so they can # be distinguished from network being down. ( $cfg->{Presentation}{detail}{nodata_color} ? ( 'CDEF:nodata=loss,UN,INF,UNKN,IF', "AREA:nodata#$cfg->{Presentation}{detail}{nodata_color}" ): ()), 'HRULE:0#000000', "COMMENT:probe${BS}: $pings $ProbeDesc every ${step}s", 'COMMENT:end\: '.$date.'\j' ); # do_log ("***** begin task *****
    "); # do_log (@task); # do_log ("***** end task *****
    "); my $graphret; ($graphret,$xs{$s},$ys{$s}) = RRDs::graph @task; # die "
    INFO:".join("
    ",@task)."
    "; my $ERROR = RRDs::error(); if ($ERROR) { return "
    ERROR: $ERROR
    ".join("
    ",@task)."
    "; }; } if ($mode eq 'a'){ # ajax mode open my $img, "${imgbase}_${end}_${start}.png" or die "${imgbase}_${end}_${start}.png: $!"; binmode $img; print "Content-Type: image/png\n"; my $data; read($img,$data,(stat($img))[7]); close $img; print "Content-Length: ".length($data)."\n\n"; print $data; unlink "${imgbase}_${end}_${start}.png"; return undef; } elsif ($mode eq 'n'){ # navigator mode $page .= "
    "; if ($cfg->{Presentation}{htmltitle} eq 'yes') { # TODO we generate this above to, maybe share code or store variable ? $page .= "

    $desc

    "; } $page .= "
    "; $page .= qq|| ; $page .= $q->start_form(-method=>'POST', -id=>'range_form') . "

    Time range: " . $q->hidden(-name=>'epoch_start',-id=>'epoch_start') . $q->hidden(-name=>'hierarchy',-id=>'hierarchy') . $q->hidden(-name=>'epoch_end',-id=>'epoch_end') . $q->hidden(-name=>'target',-id=>'target' ) . $q->hidden(-name=>'displaymode',-default=>$mode ) . $q->textfield(-name=>'start',-default=>$startstr) . "  to  ".$q->textfield(-name=>'end',-default=>$endstr) . " " . $q->submit(-name=>'Generate!') . "

    " . $q->end_form(); $page .= "
    \n"; } elsif ($mode eq 's') { # classic mode $startstr =~ s/\s/%20/g; $endstr =~ s/\s/%20/g; my $t = $q->param('target'); $t =~ s/$xssBadRx/_/g; for my $slave (@slaves){ my $s = $slave ? "~$slave" : ""; $page .= "
    "; # $page .= (time-$timer_start)."
    "; # $page .= join " ",map {"'$_'"} @task; if ($cfg->{Presentation}{htmltitle} eq 'yes') { # TODO we generate this above to, maybe share code or store variable ? my $title = "$desc from " . ($s ? $cfg->{Slaves}{$slave}{display_name}: $cfg->{General}{display_name} || hostname); $page .= "

    $title

    "; } $page .= "
    "; $page .= ( qq{' . qq{}."" ); #" $page .= "
    \n"; } } else { # chart mode $page .= qq{
    }; my $href= (split /~/, (join ".", @$open))[0]; #/ # the link is 'slave free' $page .= ( qq{} . qq{}."" ); #" $page .= "
    "; } } return $page; } sub get_charts ($$$){ my $cfg = shift; my $q = shift; my $open = shift; my $cache = $cfg->{__sortercache}; my $page = "

    $cfg->{Presentation}{charts}{title}

    "; return $page."

    Waiting for initial data ...

    " unless $cache; my %charts; for my $chart ( keys %{$cfg->{Presentation}{charts}} ) { next unless ref $cfg->{Presentation}{charts}{$chart} eq 'HASH'; $charts{$chart} = $cfg->{Presentation}{charts}{$chart}{__obj}->SortTree($cache->{$chart}); } if (not defined $open->[1]){ for my $chart ( keys %charts ){ $page .= "
    "; $page .= "

    $cfg->{Presentation}{charts}{$chart}{title}

    \n"; if (not defined $charts{$chart}[0]){ $page .= "

    No targets returned by the sorter.

    " } else { my $tree = $cfg->{Targets}; my $chartentry = $charts{$chart}[0]; for (@{$chartentry->{open}}) { my ($host,$slave) = split(/~/, $_); die "ERROR: Section '$host' does not exist.\n" unless exists $tree->{$host}; last unless ref $tree->{$host} eq 'HASH'; $tree = $tree->{$host}; } $page .= get_detail($cfg,$q,$tree,$chartentry->{open},'c'); } $page .= "
    \n"; } } else { my $chart = $open->[1]; $page = "

    $cfg->{Presentation}{charts}{$chart}{title}

    \n"; if (not defined $charts{$chart}[0]){ $page .= "

    No targets returned by the sorter.

    " } else { my $rank =1; for my $chartentry (@{$charts{$chart}}){ my $tree = $cfg->{Targets}; for (@{$chartentry->{open}}) { my ($host,$slave) = split(/~/, $_); die "ERROR: Section '$_' does not exist.\n" unless exists $tree->{$host}; last unless ref $tree->{$host} eq 'HASH'; $tree = $tree->{$host}; } $page .= "
    "; $page .= "

    $rank."; $page .= " ".sprintf($cfg->{Presentation}{charts}{$chart}{format},$chartentry->{value}) if ($cfg->{Presentation}{charts}{$chart}{format}); $page .= "

    "; $rank++; $page .= get_detail($cfg,$q,$tree,$chartentry->{open},'c'); $page .= "
    \n"; } } } return $page; } sub load_sortercache($){ my $cfg = shift; my %cache; my $found; for (glob "$cfg->{General}{datadir}/__sortercache/data*.storable"){ # kill old caches ... if ((time - (stat "$_")[9]) > $cfg->{Database}{step}*2){ unlink $_; next; } my $data = Storable::retrieve("$_"); for my $chart (keys %$data){ PATH: for my $path (keys %{$data->{$chart}}){ warn "Warning: Duplicate entry $chart/$path in sortercache\n" if defined $cache{$chart}{$path}; my $root = $cfg->{Targets}; for my $element (split /\//, $path){ if (ref $root eq 'HASH' and defined $root->{$element}){ $root = $root->{$element} } else { warn "Warning: Dropping $chart/$path from sortercache\n"; next PATH; } } $cache{$chart}{$path} = $data->{$chart}{$path} } } $found = 1; } return ( $found ? \%cache : undef ) } sub hierarchy_switcher($$){ my $q = shift; my $cfg = shift; my $print =$q->start_form(-name=>'hswitch',-method=>'get',-action=>$cfg->{General}{cgiurl}); if ($cfg->{Presentation}{hierarchies}){ $print .= "
    "; $print .= ""; $print .= "
    "; $print .= $q->popup_menu(-name=>'hierarchy', -onChange=>'hswitch.submit()', -id=>'hierarchy', -values=>[0, sort map {ref $cfg->{Presentation}{hierarchies}{$_} eq 'HASH' ? $_ : () } keys %{$cfg->{Presentation}{hierarchies}}], -labels=>{0=>'Default Hierarchy', map {ref $cfg->{Presentation}{hierarchies}{$_} eq 'HASH' ? ($_ => $cfg->{Presentation}{hierarchies}{$_}{title} ) : () } keys %{$cfg->{Presentation}{hierarchies}} } ); $print .= "
    "; } $print .= "
    "; $print .= ""; $print .= "
    "; $print .= $q->textfield (-name=>'filter', -id=>'filter', -placeholder=>'Filter menu...', -onChange=>'hswitch.submit()', -size=>15, ); $print .= '
    '.$q->end_form(); return $print; } sub display_webpage($$){ my $cfg = shift; my $q = shift; my $targ = ''; my $t = $q->param('target'); if ( $t and $t !~ /\.\./ and $t =~ /(\S+)/){ $targ = $1; $targ =~ s/$xssBadRx/_/g; } my ($path,$slave) = split(/~/,$targ); if ($slave and $slave =~ /(\S+)/){ die "ERROR: slave '$slave' is not defined in the '*** Slaves ***' section!\n" unless defined $cfg->{Slaves}{$slave}; $slave = $1; } my $hierarchy = $q->param('hierarchy'); $hierarchy =~ s/$xssBadRx/_/g; die "ERROR: unknown hierarchy $hierarchy\n" if $hierarchy and not $cfg->{Presentation}{hierarchies}{$hierarchy}; my $open = [ (split /\./,$path||'') ]; my $open_orig = [@$open]; $open_orig->[-1] .= '~'.$slave if $slave; my($filter) = ($q->param('filter') and $q->param('filter') =~ m{([- _0-9a-zA-Z\+\*\(\)\|\^\[\]\.\$]+)}); my $tree = $cfg->{Targets}; if ($hierarchy){ $tree = $cfg->{__hierarchies}{$hierarchy}; }; my $menu_root = $tree; my $targets = $cfg->{Targets}; my $step = $cfg->{__probes}{$targets->{probe}}->step(); # lets see if the charts are opened my $charts = 0; $charts = 1 if defined $cfg->{Presentation}{charts} and $open->[0] and $open->[0] eq '_charts'; if ($charts and ( not defined $cfg->{__sortercache} or $cfg->{__sortercachekeeptime} < time )){ # die "ERROR: Chart $open->[1] does not exit.\n" # unless $cfg->{Presentation}{charts}{$open->[1]}; $cfg->{__sortercache} = load_sortercache $cfg; $cfg->{__sortercachekeeptime} = time + 60; }; if (not $charts){ for (@$open) { die "ERROR: Section '$_' does not exist (display webpage)." # .(join "", map {"$_=$ENV{$_}"} keys %ENV)."\n" unless exists $tree->{$_}; last unless ref $tree->{$_} eq 'HASH'; $tree = $tree->{$_}; } } gen_imgs($cfg); # create logos in imgcache my $readversion = "?"; $VERSION =~ /(\d+)\.(\d{3})(\d{3})/ and $readversion = sprintf("%d.%d.%d",$1,$2,$3); my $menu = $targets; if (defined $cfg->{Presentation}{charts} and not $hierarchy){ my $order = 1; $menu_root = { %{$menu_root}, _charts => { _order => -99, menu => $cfg->{Presentation}{charts}{menu}, map { $_ => { menu => $cfg->{Presentation}{charts}{$_}{menu}, _order => $order++ } } sort grep { ref $cfg->{Presentation}{charts}{$_} eq 'HASH' } keys %{$cfg->{Presentation}{charts}} } }; } my $hierarchy_arg = ''; if ($hierarchy){ $hierarchy_arg = 'hierarchy='.uri_escape($hierarchy).';'; }; my $filter_arg =''; if ($filter){ $filter_arg = 'filter='.uri_escape($filter).';'; }; # if we are in a hierarchy, recover the original path my $display_tree = $tree->{__tree_link} ? $tree->{__tree_link} : $tree; my $authuser = $ENV{REMOTE_USER} || 'Guest'; my $getdetailoutput = get_detail( $cfg,$q,$tree,$open_orig ); return if not defined $getdetailoutput; my $page = fill_template ($cfg->{Presentation}{template}, { menu => hierarchy_switcher($q,$cfg). target_menu( $menu_root, [@$open], #copy this because it gets changed cgiurl($q, $cfg) ."?${hierarchy_arg}${filter_arg}target=", $filter ), title => $charts ? "" : $display_tree->{title}, remark => $charts ? "" : ($display_tree->{remark} || ''), overview => $charts ? get_charts($cfg,$q,$open) : get_overview( $cfg,$q,$tree,$open), body => $charts ? "" : $getdetailoutput, target_ip => $charts ? "" : ($display_tree->{host} || ''), owner => $cfg->{General}{owner}, contact => $cfg->{General}{contact}, author => 'Tobi Oetiker and Niko Tyni', smokeping => 'SmokePing-'.$readversion.'', step => $step, rrdlogo => 'RRDtool', smokelogo => 'Smokeping', authuser => $authuser, } ); my $expi = $cfg->{Database}{step} > 120 ? $cfg->{Database}{step} : 120; print $q->header(-type=>'text/html', -expires=>'+'.$expi.'s', -charset=> ( $cfg->{Presentation}{charset} || 'utf-8'), -Content_length => length($page), ); print $page || "ERROR: Reading page template".$cfg->{Presentation}{template}.""; } # fetch all data. sub run_probes($$) { my $probes = shift; my $justthisprobe = shift; if (defined $justthisprobe) { $probes->{$justthisprobe}->ping(); } else { foreach my $probe (keys %{$probes}) { $probes->{$probe}->ping(); } } } # report probe status sub report_probes($$) { my $probes = shift; my $justthisprobe = shift; if (defined $justthisprobe) { $probes->{$justthisprobe}->report(); } else { foreach my $probe (keys %{$probes}){ $probes->{$probe}->report(); } } } sub load_sorters($){ my $subcfg = shift; foreach my $key ( keys %{$subcfg} ) { my $x = $subcfg->{$key}; next unless ref $x eq 'HASH'; $x->{sorter} =~ /(\S+)\((.+)\)/; my $sorter = $1; my $arg = $2; die "ERROR: sorter $sorter: all sorters start with a capital letter\n" unless $sorter =~ /^[A-Z]/; eval 'require Smokeping::sorters::'.$sorter; die "Sorter '$sorter' could not be loaded: $@\n" if $@; $x->{__obj} = eval "Smokeping::sorters::$sorter->new($arg)"; die "ERROR: sorter $sorter: instantiation with Smokeping::sorters::$sorter->new($arg): $@\n" if $@; } } sub update_sortercache($$$$$){ my $cfg = shift; return unless $cfg->{Presentation}{charts}; my $cache = shift; my $path = shift; my $base = $cfg->{General}{datadir}; $path =~ s/^$base\/?//; my @updates = map {/U/ ? undef : 0.0+$_ } split /:/, shift; my $alert = shift; my %info; $info{uptime} = shift @updates; $info{loss} = shift @updates; $info{median} = shift @updates; $info{alert} = $alert; $info{pings} = \@updates; foreach my $chart ( keys %{$cfg->{Presentation}{charts}} ) { next unless ref $cfg->{Presentation}{charts}{$chart} eq 'HASH'; $cache->{$chart}{$path} = $cfg->{Presentation}{charts}{$chart}{__obj}->CalcValue(\%info); } } sub save_sortercache($$$){ my $cfg = shift; my $cache = shift; my $probe = shift; return unless $cfg->{Presentation}{charts}; my $dir = $cfg->{General}{datadir}."/__sortercache"; my $ext = ''; $ext .= $probe if $probe; $ext .= join "",@{$opt{filter}} if @{$opt{filter}}; $ext =~ s/[^-_=0-9a-z]/_/gi; $ext = ".$ext" if $ext; mkdir $dir,0755 unless -d $dir; Storable::store ($cache, "$dir/new$ext"); rename "$dir/new$ext","$dir/data$ext.storable" } sub check_alerts { my $cfg = shift; my $tree = shift; my $pings = shift; my $name = shift; my $prop = shift; my $loss = shift; my $rtt = shift; my $slave = shift; my $gotalert; my $s = ""; if ($slave) { $s = '~'.$slave } if ( $tree->{alerts} ) { my $priority_done; $tree->{'stack'.$s} = {loss=>['S'],rtt=>['S']} unless defined $tree->{'stack'.$s}; my $x = $tree->{'stack'.$s}; $loss = undef if $loss eq 'U'; my $lossprct = $loss * 100 / $pings; $rtt = undef if $rtt eq 'U'; push @{$x->{loss}}, $lossprct; push @{$x->{rtt}}, $rtt; if (scalar @{$x->{loss}} > $tree->{fetchlength}){ shift @{$x->{loss}}; shift @{$x->{rtt}}; } for (sort { ($cfg->{Alerts}{$a}{priority}||0) <=> ($cfg->{Alerts}{$b}{priority}||0)} @{$tree->{alerts}}) { my $alert = $cfg->{Alerts}{$_}; if ( not $alert ) { do_log "WARNING: Empty alert in ".(join ",", @{$tree->{alerts}})." ($name)\n"; next; }; if ( ref $alert->{sub} ne 'CODE' ) { do_log "WARNING: Alert '$_' did not resolve to a Sub Ref. Skipping\n"; next; }; my $prevmatch = $tree->{'prevmatch'.$s}{$_} || 0; # add the current state of an edge triggered alert to the # data passed into a matcher, which allows for somewhat # more intelligent alerting due to state awareness. $x->{prevmatch} = $prevmatch; my $priority = $alert->{priority}; my $match = &{$alert->{sub}}($x) || 0; # Avgratio returns undef $gotalert = $match unless $gotalert; my $edgetrigger = $alert->{edgetrigger} eq 'yes'; my $what; if ($edgetrigger and $prevmatch != $match) { $what = ($prevmatch == 0 ? "was raised" : "was cleared"); } if (not $edgetrigger and $match) { $what = "is active"; } if ($what and (not defined $priority or not defined $priority_done )) { $priority_done = $priority if $priority and not $priority_done; # send something my $from; my $line = "$name/$prop"; my $base = $cfg->{General}{datadir}; $line =~ s|^$base/||; $line =~ s|/host$||; $line =~ s|/|.|g; my $urlline = $cfg->{General}{cgiurl}."?target=".$line; $line .= " [from $slave]" if $slave; my $lossratio = "$loss/$pings"; my $loss = "loss: ".join ", ",map {defined $_ ? (/^\d/ ? sprintf "%.0f%%", $_ :$_):"U" } @{$x->{loss}}; my $rtt = "rtt: ".join ", ",map {defined $_ ? (/^\d/ ? sprintf "%.0fms", $_*1000 :$_):"U" } @{$x->{rtt}}; my $time = time; do_log("Alert $_ $what for $line $loss(${lossratio}) $rtt prevmatch: $prevmatch comment: $alert->{comment}"); my @stamp = localtime($time); my $stamp = localtime($time); my @to; foreach my $addr (map {$_ ? (split /\s*,\s*/,$_) : ()} $cfg->{Alerts}{to},$tree->{alertee},$alert->{to}){ next unless $addr; if ( $addr =~ /^\|(.+)/) { my $cmd = $1; # fork them in case they take a long time my $pid; unless ($pid = fork) { unless (fork) { $SIG{CHLD} = 'DEFAULT'; if ($edgetrigger) { exec $cmd,$_,$line,$loss,$rtt,$tree->{host}, ($what =~/raise/); } else { exec $cmd,$_,$line,$loss,$rtt,$tree->{host}; } die "exec failed!"; } exit 0; } waitpid($pid, 0); } elsif ( $addr =~ /^snpp:(.+)/ ) { sendsnpp $1, <{comment} $_ $what on $line $loss $rtt SNPPALERT } elsif ( $addr =~ /^xmpp:(.+)/ ) { my $xmpparg = "$1 -s '[Smokeping] Alert'"; my $xmppalert = <{pattern} Data (old --> now) $loss $rtt Comment: $alert->{comment} ************************************************** XMPPALERT if (-x "/usr/bin/sendxmpp"){ open (M, "|-") || exec ("/usr/bin/sendxmpp $xmpparg"); print M $xmppalert; close M; } else { warn "Command sendxmpp not found. Try 'apt-get install sendxmpp' to install it. xmpp message with arg line $xmpparg could not be sent"; } } else { push @to, $addr; } }; if (@to){ my $default_mail = < <##WHAT##> on <##LINE##> <##STAMP##> Alert "<##ALERT##>" <##WHAT##> for <##URL##> Pattern ------- <##PAT##> Data (old --> now) ------------------ <##LOSS##> <##RTT##> Comment ------- <##COMMENT##> DOC my $mail = fill_template($alert->{mailtemplate}, { ALERT => $_, WHAT => $what, LINE => $line, URL => $urlline, STAMP => $stamp, PAT => $alert->{pattern}, LOSS => $loss, RTT => $rtt, COMMENT => $alert->{comment} },$default_mail) || "Subject: smokeping failed to open mailtemplate '$alert->{mailtemplate}'\n\nsee subject\n"; my $oldLocale = POSIX::setlocale(LC_TIME); POSIX::setlocale(LC_TIME,"en_US"); my $rfc2822stamp = POSIX::strftime("%a, %e %b %Y %H:%M:%S %z", @stamp); POSIX::setlocale(LC_TIME,$oldLocale); my $to = join ",",@to; sendmail $cfg->{Alerts}{from},$to, <{Alerts}{from} Date: $rfc2822stamp $mail ALERT } } else { do_debuglog("Alert \"$_\": no match for target $name\n"); } if ($match == 0) { $tree->{'prevmatch'.$s}{$_} = $match; } else { $tree->{'prevmatch'.$s}{$_} += $match; } } } # end alerts return $gotalert; } sub update_rrds($$$$$$); sub update_rrds($$$$$$) { my $cfg = shift; my $probes = shift; my $tree = shift; my $name = shift; my $justthisprobe = shift; # if defined, update only the targets probed by this probe my $sortercache = shift; my $probe = $tree->{probe}; foreach my $prop (keys %{$tree}) { if (ref $tree->{$prop} eq 'HASH'){ update_rrds $cfg, $probes, $tree->{$prop}, $name."/$prop", $justthisprobe, $sortercache; } # if we are looking down a branche where no probe property is set there is no sense # in further exploring it next unless defined $probe; next if defined $justthisprobe and $probe ne $justthisprobe; my $probeobj = $probes->{$probe}; my $pings = $probeobj->_pings($tree); if ($prop eq 'host' and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/|) { # skip multihost my @updates; if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){ @updates = ([ "", time, $probeobj->rrdupdate_string($tree) ]); } if ($tree->{slaves}){ my @slaves = split(/\s+/, $tree->{slaves}); foreach my $slave (@slaves) { my $lines = Smokeping::Master::get_slaveupdates($cfg, $name, $slave); push @updates, @$lines; } #foreach my $checkslave } for my $update (sort {$a->[1] <=> $b->[1]} @updates){ # make sure we put the updates in chronological order in my $s = $update->[0] ? "~".$update->[0] : ""; if ( $tree->{rawlog} ){ my $file = POSIX::strftime $tree->{rawlog},localtime($update->[1]); if (open LOG,">>$name$s.$file.csv"){ print LOG time,"\t",join("\t",split /:/,$update->[2]),"\n"; close LOG; } else { do_log "Warning: failed to open $name$s.$file for logging: $!\n"; } } my @rrdupdate = ( $name.$s.".rrd", '--template', ( join ":", "uptime", "loss", "median", map { "ping${_}" } 1..$pings ), $update->[1].":".$update->[2] ); do_debuglog("Calling RRDs::update(@rrdupdate)"); RRDs::update ( @rrdupdate ); my $ERROR = RRDs::error(); do_log "RRDs::update ERROR: $ERROR\n" if $ERROR; # check alerts my ($loss,$rtt) = (split /:/, $update->[2])[1,2]; my $gotalert = check_alerts $cfg,$tree,$pings,$name,$prop,$loss,$rtt,$update->[0]; update_sortercache $cfg,$sortercache,$name.$s,$update->[2],$gotalert; } } } } sub _deepcopy { # this handles circular references on consecutive levels, # but breaks if there are any levels in between my $what = shift; return $what unless ref $what; for (ref $what) { /^ARRAY$/ and return [ map { $_ eq $what ? $_ : _deepcopy($_) } @$what ]; /^HASH$/ and return { map { $_ => $what->{$_} eq $what ? $what->{$_} : _deepcopy($what->{$_}) } keys %$what }; /^CODE$/ and return $what; # we don't need to copy the subs } die "Cannot _deepcopy reference type @{[ref $what]}"; } sub get_parser () { # The _dyn() stuff here is quite confusing, so here's a walkthrough: # 1 Probe is defined in the Probes section # 1.1 _dyn is called for the section to add the probe- and target-specific # vars into the grammar for this section and its subsections (subprobes) # 1.2 A _dyn sub is installed for all mandatory target-specific variables so # that they are made non-mandatory in the Targets section if they are # specified here. The %storedtargetvars hash holds this information. # 1.3 If a probe section has any subsections (subprobes) defined, the main # section turns into a template that just offers default values for # the subprobes. Because of this a _dyn sub is installed for subprobe # sections that makes any mandatory variables in the main section non-mandatory. # 1.4 A similar _dyn sub as in 1.2 is installed for the subprobe target-specific # variables as well. # 2 Probe is selected in the Targets section top # 2.1 _dyn is called for the section to add the probe- and target-specific # vars into the grammar for this section and its subsections. Any _default # values for the vars are removed, as they will be propagated from the Probes # section. # 2.2 Another _dyn sub is installed for the 'probe' variable in target subsections # that behaves as 2.1 # 2.3 A _dyn sub is installed for the 'host' variable that makes the mandatory # variables mandatory only in those sections that have a 'host' setting. # 2.4 A _sub sub is installed for the 'probe' variable in target subsections that # bombs out if 'probe' is defined after any variables that depend on the # current 'probe' setting. my $KEYD_RE = '[-_0-9a-zA-Z]+'; my $KEYDD_RE = '[-_0-9a-zA-Z.]+'; my $PROBE_RE = '[A-Z][a-zA-Z]+'; my $e = "="; my %knownprobes; # the probes encountered so far # get a list of available probes for _dyndoc sections my $libdir = find_libdir(); my $probedir = $libdir . "/Smokeping/probes"; my $matcherdir = $libdir . "/Smokeping/matchers"; my $sorterdir = $libdir . "/Smokeping/sorters"; my $probelist; my @matcherlist; my @sorterlist; die("Can't find probe module directory") unless defined $probedir; opendir(D, $probedir) or die("opendir $probedir: $!"); for (readdir D) { next unless s/\.pm$//; next unless /^$PROBE_RE/; $probelist->{$_} = "(See the L for details about each variable.)"; } closedir D; die("Can't find matcher module directory") unless defined $matcherdir; opendir(D, $matcherdir) or die("opendir $matcherdir: $!"); for (sort readdir D) { next unless /[A-Z]/; next unless s/\.pm$//; push @matcherlist, $_; } die("Can't find sorter module directory") unless defined $sorterdir; opendir(D, $sorterdir) or die("opendir $sorterdir: $!"); for (sort readdir D) { next unless /[A-Z]/; next unless s/\.pm$//; push @sorterlist, $_; } # The target-specific vars of each probe # We need to store them to relay information from Probes section to Target section # see 1.2 above my %storedtargetvars; # the part of target section syntax that doesn't depend on the selected probe my $TARGETCOMMON; # predeclare self-referencing structures # the common variables my $TARGETCOMMONVARS = [ qw (probe menu title alerts note email host remark rawlog alertee slaves menuextra parents hide nomasterpoll) ]; $TARGETCOMMON = { _vars => $TARGETCOMMONVARS, _inherited=> [ qw (probe alerts alertee slaves menuextra nomasterpoll) ], _sections => [ "/$KEYD_RE/" ], _recursive=> [ "/$KEYD_RE/" ], _sub => sub { my $val = shift; return "PROBE_CONF sections are neither needed nor supported any longer. Please see the smokeping_upgrade document." if $val eq 'PROBE_CONF'; return undef; }, "/$KEYD_RE/" => {}, _order => 1, _varlist => 1, _doc => < { _doc => 'Comma separated list of alert names', _re => '([^\s,]+(,[^\s,]+)*)?', _re_error => 'Comma separated list of alert names', }, hide => { _doc => <