catalog/INDEX010064400000000000003000000014441167241767500131420ustar00rootsys00000000000000distribution layout_version 1.0 data_model_revision 2.40 uuid 8facf06c-2739-11e1-bf37-f4ce46f5cede mod_time 1323966397 create_time 1323966397 path_max 255 name_max 100 media sequence_number 1 product tag scc-srv data_model_revision 2.40 instance_id 1 control_directory scc-srv revision 1.11.18 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1323966397 create_time 1323966397 os_name HP-UX os_release ?.1?.* directory / all_filesets scc-srv-run is_locatable false fileset tag scc-srv-run data_model_revision 2.40 instance_id 1 control_directory scc-srv-run size 631720 revision 1.11.18 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1323966397 create_time 1323966397 state available catalog/dfiles/INDEX010064400000000000003000000003011167241767500143770ustar00rootsys00000000000000distribution layout_version 1.0 data_model_revision 2.40 uuid 8facf06c-2739-11e1-bf37-f4ce46f5cede mod_time 1323966397 create_time 1323966397 path_max 255 name_max 100 media sequence_number 1 catalog/dfiles/INFO010064400000000000003000000002121167241767500142640ustar00rootsys00000000000000control_file path INDEX size 132 mode 0444 mtime 1323966397 tag INDEX control_file path INFO size 198 mode 0444 mtime 1323966397 tag INFO catalog/scc-srv/pfiles/INDEX010044400000000000003000000005141167241767500157770ustar00rootsys00000000000000product tag scc-srv data_model_revision 2.40 instance_id 1 control_directory scc-srv revision 1.11.18 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1323966397 create_time 1323966397 os_name HP-UX os_release ?.1?.* directory / all_filesets scc-srv-run is_locatable false catalog/scc-srv/pfiles/INFO010044400000000000003000000002121167241767500156560ustar00rootsys00000000000000control_file path INDEX size 332 mode 0444 mtime 1323966397 tag INDEX control_file path INFO size 198 mode 0444 mtime 1323966397 tag INFO catalog/scc-srv/scc-srv-run/INDEX010044400000000000003000000004271167241767500167020ustar00rootsys00000000000000fileset tag scc-srv-run data_model_revision 2.40 instance_id 1 control_directory scc-srv-run size 631720 revision 1.11.18 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1323966397 create_time 1323966397 state available catalog/scc-srv/scc-srv-run/INFO010044400000000000003000000402571167241767500165730ustar00rootsys00000000000000control_file path INDEX size 279 mode 0444 mtime 1323966397 tag INDEX control_file path INFO size 16617 mode 0444 mtime 1323966397 tag INFO control_file path postinstall size 7571 cksum 3985808922 mode 0544 mtime 1323891810 tag postinstall control_file path postremove size 1624 cksum 211221327 mode 0544 mtime 1323891810 tag postremove file path /opt/scc-srv type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/bin type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/bin/scc-baseline type f size 3274 cksum 1623198433 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/bin/scc-debug type f size 2889 cksum 2596272185 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/bin/scc-pack type f size 1924 cksum 2149039233 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-pull type f size 9427 cksum 1996890423 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-realm type f size 10624 cksum 3386514742 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-receive-mail type f size 1783 cksum 1371496823 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-rules type f size 20898 cksum 2983342109 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-setup type f size 4932 cksum 4168434336 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-smt type f size 18509 cksum 2214245667 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-summary type f size 21356 cksum 118752201 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/bin/scc-syscmp type f size 3211 cksum 1247065791 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/bin/scc-transfer type f size 18301 cksum 1724305755 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/bin/scc-update type f size 9639 cksum 2712347650 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/bin/scc-wrapper.cgi type f size 1937 cksum 30242785 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/bin/scc.cgi type f size 19751 cksum 283608371 mode 0555 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/doc type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/doc/COPYING type f size 17997 cksum 3097571973 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /opt/scc-srv/doc/scc-baseline.html type f size 2982 cksum 3987364579 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/doc/scc-debug.html type f size 3030 cksum 1273835450 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-pack.html type f size 2691 cksum 785996256 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-pull.html type f size 8377 cksum 3541458762 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-realm.html type f size 10231 cksum 2380269306 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-receive-mail.html type f size 3823 cksum 566931511 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-rules.html type f size 6499 cksum 1096991306 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-setup.html type f size 4261 cksum 2788468859 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-smt.html type f size 4794 cksum 3820477164 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/doc/scc-srv-5.html type f size 28736 cksum 3675785879 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc-summary.html type f size 4279 cksum 1290603316 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc-syscmp.html type f size 4737 cksum 2782294964 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc-transfer.html type f size 9105 cksum 1723882933 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc-update.html type f size 5600 cksum 1135963334 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc-wrapper.cgi.html type f size 1799 cksum 4140280248 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/doc/scc.cgi.html type f size 2907 cksum 109359006 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/man type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/man/man1 type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/man/man1/scc-baseline.1 type f size 2195 cksum 55075146 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/man/man1/scc-debug.1 type f size 2207 cksum 2928254511 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-pack.1 type f size 1855 cksum 2436199867 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-pull.1 type f size 7223 cksum 1580092082 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-realm.1 type f size 9032 cksum 224571913 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-receive-mail.1 type f size 2995 cksum 3888948994 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-rules.1 type f size 5480 cksum 952980701 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-setup.1 type f size 3390 cksum 1361271762 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-smt.1 type f size 3809 cksum 4066700447 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /opt/scc-srv/man/man1/scc-summary.1 type f size 3341 cksum 1570649663 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/man/man1/scc-syscmp.1 type f size 3857 cksum 3657756070 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/man/man1/scc-transfer.1 type f size 8018 cksum 3154655764 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/man/man1/scc-update.1 type f size 4620 cksum 1878335110 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/man/man1/scc-wrapper.cgi.1 type f size 1036 cksum 2547548678 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /opt/scc-srv/man/man1/scc.cgi.1 type f size 2033 cksum 163464949 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /opt/scc-srv/man/man5 type d mode 0755 uid 0 gid 3 owner root group sys file path /opt/scc-srv/man/man5/scc-srv.5 type f size 26826 cksum 3130767147 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/conf type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/README type f size 862 cksum 337927104 mode 0644 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/log type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/transfer type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/transfer/cp type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/transfer/mail type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/custom type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/custom/favicon.ico type f size 15087 cksum 2273524166 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/www/custom/scc-logo.png type f size 9439 cksum 472084520 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/www/custom/scc-realm.conf type f size 444 cksum 535337584 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/www/scc-help type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/scc-help/scc type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/scc-help/scc-compare-index.html type f size 878 cksum 1000308611 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-log-index.html type f size 818 cksum 872222821 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-realm-index.html type f size 2875 cksum 3738733313 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-rules-index.html type f size 858 cksum 2326887167 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-search-index.html type f size 2234 cksum 3520148841 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-smt-index.html type f size 961 cksum 2409621259 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/www/scc-help/scc-srv type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-baseline.html type f size 2982 cksum 3987364579 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-debug.html type f size 3030 cksum 1273835450 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-pack.html type f size 2691 cksum 785996256 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-pull.html type f size 8377 cksum 3541458762 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-realm.html type f size 10231 cksum 2380269306 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-receive-mail.html type f size 3823 cksum 566931511 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-rules.html type f size 6499 cksum 1096991306 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-setup.html type f size 4261 cksum 2788468859 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-smt.html type f size 4794 cksum 3820477164 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891808 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-srv-5.html type f size 28736 cksum 3675785879 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-summary.html type f size 4279 cksum 1290603316 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-syscmp.html type f size 4737 cksum 2782294964 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-transfer.html type f size 9105 cksum 1723882933 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-update.html type f size 5600 cksum 1135963334 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc-wrapper.cgi.html type f size 1799 cksum 4140280248 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-srv/scc.cgi.html type f size 2907 cksum 109359006 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891807 file path /var/opt/scc-srv/data/www/scc-help/scc-summary-index.html type f size 808 cksum 1263079884 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/data/www/scc-help/scc-win type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-collect.html type f size 3062 cksum 1775047846 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-log.html type f size 2145 cksum 2578622873 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-log2html.html type f size 2611 cksum 1825925980 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-plugin.html type f size 1952 cksum 3722694233 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-snap2html.html type f size 2841 cksum 833518796 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-win-4.html type f size 5127 cksum 3702465511 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc-win-5.html type f size 10623 cksum 3512801175 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc-win/scc.html type f size 7380 cksum 406411848 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-4.html type f size 6145 cksum 3423302663 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-5.html type f size 14387 cksum 3670788765 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-cmp.html type f size 2696 cksum 3065799739 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-collect.html type f size 7378 cksum 3138162112 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-log.html type f size 9116 cksum 522346034 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-log2html.html type f size 2528 cksum 1555776890 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-plugin.html type f size 2496 cksum 3038560065 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc-snap2html.html type f size 2749 cksum 967238668 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/data/www/scc-help/scc/scc.html type f size 14945 cksum 36584815 mode 0444 uid 0 gid 3 owner root group sys mtime 1323891809 file path /var/opt/scc-srv/newconfig type d mode 0755 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/newconfig/index.html type f size 979 cksum 3657223721 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/newconfig/scc-auto-realm.conf type f size 493 cksum 3231618672 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/newconfig/scc-rules.conf type f size 3312 cksum 2659914041 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/newconfig/scc-smt-select type f size 1917 cksum 3754806270 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/newconfig/scc.conf type f size 1043 cksum 583396248 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/newconfig/style.css type f size 2369 cksum 842822769 mode 0440 uid 0 gid 3 owner root group sys mtime 1323891810 file path /var/opt/scc-srv/tmp type d mode 0755 uid 0 gid 3 owner root group sys catalog/scc-srv/scc-srv-run/postinstall010054400140500013562000000166231167217614200215350ustar00cz2rgtmrhuxbr00000000000000#!/bin/sh # Shell script to run after the install of the SCC-SRV software. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/pkg_files/postin $ # ID: $Id: postin 4151 2010-10-27 17:29:58Z siemkorteweg $ # NOTE: # On Solaris this file is executed by sh. Do not use Posix functions!!!!! if [ -x /usr/xpg4/bin/awk ] then alias awk=/usr/xpg4/bin/awk fi SCC_BIN=/opt/scc-srv/bin SCC_DOC=/opt/scc-srv/doc SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP SCC_DOC SCC_DATA=${SCC_TOP}/data SCC_TMP=${SCC_TOP}/tmp SCC_CONF=${SCC_TOP}/conf SCC_NEWCONF=${SCC_TOP}/newconfig SCC_WWW=${SCC_DATA}/www export SCC_DATA SCC_TMP SCC_CONF SCC_NEWCONF umask 077 # For the package software that is unable to install empty directories. for dir in "${SCC_TMP}" "${SCC_CONF}" "${SCC_DATA}/log" "${SCC_DATA}/transfer/cp" "${SCC_DATA}/transfer/mail" do mkdir -p "${dir}" done for f in scc.conf do if [ ! -f ${SCC_CONF}/${f} ] then cp -p ${SCC_NEWCONF}/${f} ${SCC_CONF} fi done if [ -d /var/opt ] # Test existence, in case of relocation. then chmod a+x /var/opt # Correction for fresh install on some systems fi chmod a+x ${SCC_TOP} # Correction for fresh install on some systems cd ${SCC_WWW} if [ -f custom/style.css ] then # Check for default, comment only style sheet from one of the previous releases. echo "/* Default stylesheet for scc-srv */" >custom/style.check cmp -s custom/style.css custom/style.check if [ $? -eq 0 ] # Identical? then rm custom/style.css # New file required. else # Check for definitions for colors when comparing systems. # This was added after release 1.5.11 grep "^\.scc_var" custom/style.css >/dev/null 2>/dev/null if [ $? -ne 0 ] then # Add the extensions. cat <<-_X_ >>custom/style.css /* * The following tag is used to specify the color of variable data in the snapshot. * In previous versions of scc the variable SCC_VAR_COLOR was used for this purpose. */ .scc_var { color: purple; } /* * The following tags are used to specify the colors used for the output when comparing systems. * Used to be hard-coded in previous versions of scc-srv. */ .scc_sys_a { color: red; } .scc_sys_b { color: blue; } _X_ fi fi rm -f custom/style.check fi if [ ! -f custom/style.css ] then cp ${SCC_NEWCONF}/style.css custom chmod 644 custom/style.css fi if [ ! -f custom/scc-auto-realm.conf ] then cp ${SCC_NEWCONF}/scc-auto-realm.conf custom chmod 644 custom/scc-auto-realm.conf fi if [ ! -f index.html ] then cp -p ${SCC_NEWCONF}/index.html . else # There is already an index.html. So this is not a fresh install, but an update. # Change the contents of the main index.html and the location of the manual pages of scc and scc-srv. # Installs with the new layout should not be affected by the following code. # Check for an old layout of the index file and try to update it. Use ed to preserve the permissions. cat <<-_X_ | ed -s index.html 2>/dev/null | sed -e '/^?$/d' 1,$ s@OpenEyeT@QNH@g 1,$ s@scc-help/scc-5@scc-help/scc/scc-5@g 1,$ s@scc-help/scc-srv-5@scc-help/scc-srv/scc-srv-5@g w q _X_ # In releases of scc-src prior to 1.5.2, the SCC resources in the index file # indicated the SCC client. Now we have to add the scc-win client and change # the client to Unix client. grep -l "scc-win" index.html 2>/dev/null >/dev/null if [ $? -ne 0 ] then set dummy `ls -ld index.html` case "${2}" in ?r??r??r??) new_mode=0444; umask 222;; ?r??r??-??) new_mode=0440; umask 227;; ?r??-??-??) new_mode=0400; umask 277;; ?r??-??r??) new_mode=0404; umask 272;; *) new_mode=0400; umask 077;; esac new_owner_group="${4}:${5}" awk '/scc-5.html>SCC client/ { sub( "scc-5.html>SCC client", "scc-5.html>SCC Unix client" ); print; sub( "scc/scc-5.html", "scc-win/scc-win-5.html" ); sub( "Unix", "Windows" ); print; next; } { print; }' index.html >index.html.tmp rm -f index.html mv index.html.tmp index.html chown "${new_owner_group}" index.html umask 077 # Reset to default fi # In releases of scc-srv up to and including 1.4.22, the manual pages # of scc resided in /opt/scc-srv/doc and /var/opt/scc-srv/data/www/scc-help. # Now they reside only in /var/opt/scc-srv/data/www/scc-help/scc. # Check the contents of this directory to determine which files to remove from the old directories. for man in scc-help/scc/*html do file=`basename ${man}` rm -f scc-help/${file} ${SCC_DOC}/${file} done # In releases of scc-srv up to and including 1.4.22, the manual pages # of scc resided in /opt/scc-srv/doc and /var/opt/scc-srv/data/www/scc-help. # The manual pages in the latter directory are moved to the subdirectory scc-srv in ./scc-help. # Check the contents of this subdirectory to determine which files to remove from the old directoriy. for man in scc-help/scc-srv/*html do file=`basename ${man}` rm -f scc-help/${file} done fi if [ ! -d All ] then warning=yes # There is no existing website. All files will be owned by root:root. # The administrator has to determine the correct settings. ${SCC_BIN}/scc-realm -a All cp ${SCC_NEWCONF}/scc-rules.conf ${SCC_NEWCONF}/scc-smt-select All/custom else # We renew the CGI-script in all realms. for d in */cgi-bin do if [ -d "${d}" ] then rm -f "${d}"/scc-wrapper.cgi cp -p ${SCC_BIN}/scc-wrapper.cgi "${d}" fi done # There is an existing website. Use the settings recorded in scc-update (-m option) if [ -f ${SCC_DATA}/transfer/mail_user_group ] then mail_opt="-m `cat ${SCC_DATA}/transfer/mail_user_group`" fi if [ -f "${SCC_WWW}/All/index.html" ] then set dummy `ls -ld "${SCC_WWW}/All/index.html"` web_opt="-w ${4}" fi rm -f ${SCC_DATA}/mail_owner_group ${SCC_DATA}/web_owner if [ ! -f All/custom/scc-rules.conf ] then cp ${SCC_NEWCONF}/scc-rules.conf All/custom fi if [ ! -f All/custom/favicon.ico ] then ( cd All/custom ln -s ../../custom/favicon.ico favicon.ico ) fi if [ ! -f All/custom/scc-smt-select ] then cp ${SCC_NEWCONF}/scc-smt-select All/custom fi if [ "${mail_opt}${web_opt}" ] then ${SCC_BIN}/scc-update -f ${mail_opt} ${web_opt} else warning=yes # Nothing saved during preinstall ?!?!?!? fi fi if [ "${warning}" ] then echo "WARNING: All files for the website are owned by root:root" echo "WARNING: Use the -m and -w options of scc-update to correct this." echo "WARNING: " cat ${SCC_DATA}/README fi # Do not exit as this code is also sourced. exit 0 catalog/scc-srv/scc-srv-run/postremove010054400140500013562000000031301167217614200213510ustar00cz2rgtmrhuxbr00000000000000#!/bin/sh # Shell script to run after the uninstall of the SCC-SRV software. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/pkg_files/postrem $ # ID: $Id: postrem 4099 2010-07-15 10:05:33Z siemkorteweg $ SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP if [ -x "${SCC_BIN}/scc-summary" ] then # Upon upgrading by means of rpm -U scc-srv-X.rpm, # the postremove is called after installing the new version. # In that case we should not remove anything. : else # This is the "real" remove. Remove additional directories and files. rm -rf ${SCC_TOP} rm -rf /opt/scc-srv fi exit 0 scc-srv/scc-srv-run/opt/scc-srv/004075500000000000003000000000003777777777700167145ustar00rootsys00000000000000scc-srv/scc-srv-run/opt/scc-srv/bin/004075500000000000003000000000003777777777700174645ustar00rootsys00000000000000scc-srv/scc-srv-run/opt/scc-srv/bin/scc-baseline010055500000000000003000000063121167217613700217000ustar00rootsys00000000000000#!/bin/sh # Shell script to extract data with certain classifications from a snapshot. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-baseline $ # ID: $Id: scc-baseline 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH umask 077 # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi if [ -x /usr/xpg4/bin/awk ] then alias awk=/usr/xpg4/bin/awk fi if [ -x /usr/xpg4/bin/grep ] then alias grep=/usr/xpg4/bin/grep fi # Do not cd to ${SCC_TMP} in case of a relative pathname for the class-file. TMP_FILE=${SCC_TMP}/scc_base_$$; export TMP_FILE trap "rm -f ${TMP_FILE}" 0 trap "exit 2" 1 2 3 15 if [ $# -ne 1 ] then echo "Syntax error, use: ${ProgName} " >&2 exit 1 fi if [ ! -f ${1} ] then echo "${ProgName}: file ${1} not found" >&2 exit 2 fi # Rebuild the class-file to an awk-script that filters lines with classifications # that contain text out of the class-file. # Ignore comment-lines, then escape all special-characters for # the regular expressions in the awk-script. # The classifications will be used as regular expressions in the awk-script. # Therefore we have to escape the meta-characters of the regular expressions and # also the delimiter of the regular expressions. The full list is: /.[\(*+$| sed -e '/^#/d' \ -e 's@/@\\/@g' \ -e 's@\.@\\.@g' \ -e 's@\[@\\[@g' \ -e 's@\\@\\@g' \ -e 's@(@\\(@g' \ -e 's@*@\\*@g' \ -e 's@+@\\+@g' \ -e 's@\$@\\$@g' \ -e 's@|@\\|@g' ${1} | awk '{ # Add fix to the classifications to ensure that # - only fixed data is extracted # - only matching toplevel classes are extracted prefix="fix:" if ( $0 ~ "^:" ) { prefix="fix" } postfix=":" if ( $0 ~ ":$" ) { postfix="" } printf( "/%s%s%s/ { print; next }\n", prefix, $0, postfix ); }' >${TMP_FILE} # Get the data and limit the result to "fixed" data. awk -F: -f ${TMP_FILE} - exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-debug010055500000000000003000000055111167217613700212040ustar00rootsys00000000000000#!/bin/sh # Shell script to collect configuration data of the webinterface of scc-srv for debugging # Copyright (C) 2010-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-debug $ # ID: $Id: scc-debug 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH umask 077 SYNTAX="Syntax error, use: ${ProgName} " if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ ! -d "${1}" ] then echo "${ProgName}: directory ${1} not found" >&2 exit 2 fi if [ ! -d "${1}"/All ] then echo "${ProgName}: realm ${1}/All not found" >&2 exit 2 fi for dir in "${SCC_DATA}" \ "${SCC_DATA}"/transfer/cp \ "${SCC_DATA}"/transfer/mail \ "${SCC_WWW}" \ "${SCC_WWW}"/All \ "${1}" \ "${1}"/All do echo "=========================" echo "Directory: ${dir}" ls -ld "${dir}" done echo "=========================" echo "scc-data for transfer: cp" ls -la "${SCC_DATA}"/transfer/cp echo "=========================" echo "scc-data for transfer: mail" ls -la "${SCC_DATA}"/transfer/mail for file in /etc/httpd/conf.d/scc.conf \ /etc/apache2/conf.d/scc.conf \ "${SCC_CONF}"/setup.conf \ "${SCC_CONF}"/scc.conf \ "${SCC_DATA}"/transfer/mail_user_group \ "${SCC_WWW}"/index.html \ "${SCC_WWW}"/All/index.html do echo "=========================" echo "File: ${file}" if [ -f "${file}" ] then cat "${file}" else echo "does not exist" fi done for log_file in /var/opt/scc-srv/data/log/scc.cgi.log \ /var/opt/scc-srv/data/log/scc-transfer.log do echo "=========================" echo "File: ${log_file}" if [ -f "${log_file}" ] then tail -n 200 "${log_file}" else echo "does not exist (no actions are logged)" fi done exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-pack010055500000000000003000000036041167217614000210270ustar00rootsys00000000000000#!/bin/sh # Shell script to pack SCC-data for processing by scc-transfer. # Copyright (C) 2010-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-pack $ # ID: $Id: scc-pack 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH umask 077 if [ $# -eq 0 ] then echo "Syntax error, use: ${ProgName} *" >&2 exit 2 fi while [ $# -gt 0 ] do if [ -f scc.${1}.cur -a -f scc.${1}.html -a -f scc.${1}.log -a -f scc.${1}.log.html ] then tar cf ${SCC_DATA}/transfer/cp/scc.${1}.tar scc.${1}.cur scc.${1}.html scc.${1}.log scc.${1}.log.html echo "done" >${SCC_DATA}/transfer/cp/scc.${1}.signal shift 1 # Next host else echo "${ProgName}: missing file(s) for ${1}" >&2 exit 1 fi done exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-pull010055500000000000003000000223231167217614000210640ustar00rootsys00000000000000#!/bin/sh # Shell script pull scc-data from clients. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-pull $ # ID: $Id: scc-pull 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi if [ -x /usr/xpg4/bin/awk ] then alias awk=/usr/xpg4/bin/awk fi if [ -x /usr/xpg4/bin/grep ] then alias grep=/usr/xpg4/bin/grep fi # On some systems remsh does not exist, use rsh instead. which remsh >/dev/null 2>/dev/null if [ $? -eq 1 ] then alias remsh="$(which rsh 2>/dev/null)" fi alias ovdeploy=/opt/OV/bin/ovdeploy client_list() { case ${client_select_method} in file) sed -e "/^#/d" \ -e "/^[ ]*$/d" \ <"${client_select_arg}" ;; list) echo "${client_select_arg}" | tr "," "\012" ;; realm) ls "${client_select_arg}" | sed -n -e "s@scc.@@" \ -e "s@\.cur@@p" ;; esac } SYNTAX="Syntax error, use: ${ProgName} [ -B ] [ -c ] [ -D ] [ -d ] [ -I ] [ -P ] [ -n ] [ -p ] [ -s ] [ -k ] [ -U ] [ -e ] [ -m ] [ -u ] [ -R | -L | -S ]" client_bin_dir="$(echo ${SCC_BIN} | sed -e 's/scc-srv/scc/')" client_data_dir="$(echo ${SCC_DATA}/transfer | sed -e 's/scc-srv/scc/')" delay=600 do_run=1 client_options=" -p pull " dest=${SCC_DATA}/transfer/cp ident_file="" port=22 client_select_method="realm" client_select_arg="${SCC_WWW}/All" prog="ssh" # Remote activation of scc is alway done by root. # The following user transfers the files from the clients to the server. # This feature has been suggested by Sven Weise. remote_user="root" user="$(id | sed -e 's/).*//' -e 's/.*(//')" if [ "${user}" != "root" ] then remote_user="${user}" fi keep=0 upstream=0 while [ $# -gt 1 ] do if [ $# -eq 1 ] then # All options, except the ones in the following list, should have an argument. if [ "x${1}" != "x-n" -a "x${1}" != "x-k" -a "x${1}" != "x-U" ] then echo "${ProgName}: Syntax error, missing argument for option: $1" exit 2 fi fi case "${1}" in -L) if [ ! -f "${2}" ] then echo "${ProgName}: cannot find file ${2}" >&2 exit 2 fi client_select_method="file" client_select_arg="${2}" shift 2 ;; -R) if [ ! -d "${SCC_WWW}/${2}" ] then echo "${ProgName}: cannot find realm ${2}" >&2 exit 2 fi client_select_method="realm" client_select_arg="${SCC_WWW}/${2}" shift 2 ;; -S) client_select_method="list" client_select_arg="${2}" shift 2 ;; -B) client_bin_dir="${2}" shift 2 ;; -D) client_data_dir="${2}" shift 2 ;; -d) delay="${2}" shift 2 ;; -I) if [ ! -f "${2}" ] then echo "${ProgName}: cannot find file ${2}" >&2 exit 2 fi ident_file=" -i ${2} " shift 2 ;; -k) keep=1 shift 1 ;; -n) do_run=0 shift 1 ;; -p) case "${2}" in ssh|rsh) prog="${2}";; ovdeploy) if [ ! -x /opt/OV/bin/ovdeploy ] then echo "${ProgName}: cannot find ovdeploy" >&2 exit 2 fi prog=ovdeploy ;; *) echo "${ProgName}: unsupported method: ${2}" >&2 exit 2 ;; esac shift 2 ;; -P) port="${2}" shift 2 ;; -s) if [ ! -d "${2}" ] then echo "${ProgName}: cannot find directory ${2}" >&2 exit 2 fi dest="${2}" shift 2 ;; -m|-e|-c) client_options="${client_options} ${1} \"${2}\"" shift 2 ;; -u) client_options="${client_options} ${1} \"${2}\"" remote_user=${2} shift 2 ;; -U) upstream=1 shift 1 ;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ $# -ne 0 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ ${do_run} -eq 1 ] then SCC="${client_bin_dir}/scc" client_cmd="${SCC} ${client_options} \"${client_data_dir}/scc-pull.log\" 2>&1" client_list | while read client do case "${prog}" in ovdeploy) if [ ${delay} -gt 0 ] then ovdeploy -ovrg server -cmd nohup -par "${client_cmd} &" -host ${client} else ovdeploy -ovrg server -cmd "${SCC}" -par "${client_options}" -host ${client} fi ;; rsh) if [ ${delay} -gt 0 ] then remsh -n ${client} "nohup ${client_cmd} &" >/dev/null 2>&1 else remsh -n ${client} "${client_cmd}" >/dev/null 2>&1 fi ;; ssh) if [ ${delay} -gt 0 ] then ssh -n -q -p ${port} ${ident_file} ${client} "nohup ${client_cmd} &" >/dev/null 2>&1 else ssh -n -q -p ${port} ${ident_file} ${client} "${client_cmd}" >/dev/null 2>&1 fi ;; esac done if [ ${delay} -gt 0 ] then sleep ${delay} fi fi # Make certain that we have an empty temporary sub-directory. rm -rf ${dest}/scc-pull mkdir -p ${dest}/scc-pull cd ${dest}/scc-pull # We cannot use a variable to indicate errors from within the loop, as the commands in the # loop are executed by a sub-shell. Therefore we use a file to indicate errors. exit_status=0 export MISSING_DATA=missing_data # Not (yet) present in the emptied directory. client_list | while read client do case "${prog}" in ovdeploy) ovdeploy -ovrg server -download -dir "${client_data_dir}" -targetdir ${dest}/scc-pull -host ${client} >/dev/null if [ $? -ne 0 ] then echo "${ProgName}: missing data for ${client}" >&2 touch ${MISSING_DATA} # Signal missing data from client continue fi # In contrast with the other methods, we downloaded not only the signal file(s), but also the data files. # Now we move them to the proper directory or remove them when the remote client was still running. for f in *.signal do host=${f%.signal} host=${host#scc.} if [ -s "${f}" ] then >${dest}/scc.${host}.signal mv scc.${host}.tar* ${dest} echo "done" >${dest}/scc.${host}.signal if [ ${keep} -eq 0 ] then ovdeploy -ovrg server -cmd rm -par "-f ${client_data_dir}/scc.${host}.*" -host ${client} fi else echo "${ProgName}: missing data for ${host}" >&2 touch ${MISSING_DATA} # Signal missing data from host fi rm -f scc.${host}.signal scc.${host}.tar* done ;; rsh) rcp ${remote_user}@${client}:${client_data_dir}/*.signal . 2>/dev/null if [ $? -ne 0 ] then echo "${ProgName}: missing data for ${client}" >&2 touch ${MISSING_DATA} # Signal missing data from client continue fi for f in *.signal do host=${f%.signal} host=${host#scc.} if [ -s "${f}" ] then >${dest}/scc.${host}.signal rcp ${remote_user}@${client}:${client_data_dir}/scc.${host}.tar* ${dest} echo "done" >${dest}/scc.${host}.signal if [ ${keep} -eq 0 ] then remsh "${client}" -l ${remote_user} "rm -f ${client_data_dir}/scc.${host}.*" &2 touch ${MISSING_DATA} # Signal missing data from host fi rm -f "${f}" done ;; ssh) scp -q -P ${port} ${ident_file} ${remote_user}@${client}:${client_data_dir}/*.signal . 2>/dev/null if [ $? -ne 0 ] then echo "${ProgName}: missing data for ${client}" >&2 touch ${MISSING_DATA} # Signal missing data from client continue fi for f in *.signal do # Each client can send data for several (virtual) hosts (using the -v option or a split-file). host=${f%.signal} host=${host#scc.} if [ -s "${f}" ] then >${dest}/scc.${host}.signal scp -q -P ${port} ${ident_file} ${remote_user}@${client}:${client_data_dir}/scc.${host}.tar* ${dest} echo "done" >${dest}/scc.${host}.signal if [ ${keep} -eq 0 ] then ssh -n -q -p ${port} ${ident_file} "${remote_user}@${client}" "rm -f ${client_data_dir}/scc.${host}.*" fi else echo "${ProgName}: missing data for ${host}" >&2 touch ${MISSING_DATA} # Signal missing data from host fi rm -f "${f}" done ;; esac done if [ -f ${MISSING_DATA} ] then exit_status=3 # Indicate runtime-error. fi # All files have been moved from ${dest}/scc-pull to ${dest}; get out of the way and remove temporary directory. cd ${SCC_WWW} rm -rf ${dest}/scc-pull if [ ${upstream} -eq 0 ] then if [ "${user}" = "root" ] then scc-update fi fi exit ${exit_status} scc-srv/scc-srv-run/opt/scc-srv/bin/scc-realm010055500000000000003000000246001167217614000212100ustar00rootsys00000000000000#!/bin/sh # Shell script maintain realms for SCC. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-realm $ # ID: $Id: scc-realm 4798 2011-11-18 17:08:33Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH if [ -d /usr/xpg4/bin ] then PATH="/usr/xpg4/bin:${PATH}" fi # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi SYNTAX="Syntax error, use: ${ProgName} [ -q ] -a | -A [ -w ] | -d [ -F | -L | -R ] " export SYSTEMS=${SCC_TMP}/systems_$$ export TMP_SYSTEMS=${SCC_TMP}/tmp_systems_$$ trap "rm -f ${SYSTEMS} ${TMP_SYSTEMS}" 0 trap "exit 2" 1 2 3 15 add=0 delete=0 quick=0 archive_dir="" html_files="" >${SYSTEMS} while [ $# -gt 1 ] do if [ $# -eq 1 ] then # All options, except the ones in the following list, should have an argument. if [ "x${1}" != "x-a" -a "x${1}" != "x-d" -a "x${1}" != "x-q" -a "x${1}" != "x-w" ] then echo "${ProgName}: Syntax error, missing argument for option: $1" exit 2 fi fi case "${1}" in -a) add=1 shift 1;; -d) delete=1 shift 1;; -q) quick=1 shift 1;; -A) archive_dir="${2}"; shift 2;; -F) if [ ! -f "${2}" ] then echo "${ProgName}: unable to access '${2}' for -F option" exit 2 fi sed -e "/^#/d" -e "/^[ ]*$/d" <"${2}" >>${SYSTEMS} shift 2;; -R) if [ ! -d "${SCC_WWW}/${2}" ] then echo "${ProgName}: unable to access '${2}' for -R option" exit 2 fi ls "${SCC_WWW}/${2}" | sed -n -e "s@^scc\.@@" \ -e "s@\.cur\$@@p" >>${SYSTEMS} shift 2;; -L) echo "${2}" | tr "," "\012" >>${SYSTEMS} shift 2;; -w) html_files="yes" shift 1;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ ${add} -eq 0 -a ${delete} -eq 0 -a -z "${archive_dir}" ] then echo "${SYNTAX}" >&2 exit 1 fi if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ "${1}" != "${1##*/}" ] then echo "${ProgName}: realm name should not contain '/': ${1}" exit 2 fi if [ -s "${SYSTEMS}" ] then sort -u "${SYSTEMS}" >${TMP_SYSTEMS} mv -f ${TMP_SYSTEMS} ${SYSTEMS} fi realm="${1}" cd ${SCC_WWW} if [ ${add} -eq 1 ] then if [ -d "${realm}" ] then template="${realm}" elif [ -d All ] then template=All else template=custom fi if [ ! -d "${template}" ] then echo "${ProgName}: template directory '${template}' does not exist" exit 2 fi set dummy $(ls -ld "${template}") case "${2}" in ?r??r??r??) new_mode=0444; umask 222;; ?r??r??-??) new_mode=0440; umask 227;; ?r??-??-??) new_mode=0400; umask 277;; ?r??-??r??) new_mode=0404; umask 272;; *) new_mode=0400; umask 077;; esac new_owner_group="${4}:${5}" if [ ! -d "${realm}" ] then # The realm does not yet exist, create it! mkdir -p "${realm}"/custom mkdir -p "${realm}"/cgi-bin # Start with the same access restrictions as for the All realm. if [ -f All/.htaccess ] then cp -p All/.htaccess "${realm}"/.htaccess fi cp -p ${SCC_BIN}/scc-wrapper.cgi "${realm}"/cgi-bin ln -s ../../custom/scc-logo.png "${realm}"/custom/scc-logo.png ln -s ../../custom/scc-realm.conf "${realm}"/custom/scc-realm.conf if [ -f custom/style.css ] then ln -s ../../custom/style.css "${realm}"/custom/style.css fi if [ -f custom/favicon.ico ] then ln -s ../../custom/favicon.ico "${realm}"/custom/favicon.ico fi if [ -f custom/scc-auto-realm.conf ] then cp custom/scc-auto-realm.conf "${realm}"/custom/ fi chown -R "${new_owner_group}" "${realm}" # Update the main index.html with the new realm. awk '// { if ( r != "All" ) # Already present in index.html { printf( "
  • %s index
  • \n", r, r ); } } { print; }' r="${realm}" index.html >new_index.html # The main index.html can have other ownership than the realm-files. set dummy $(ls -ld index.html) case "${2}" in ?r??r??r??) index_mode=0444;; ?r??r??-??) index_mode=0440;; ?r??-??-??) index_mode=0400;; ?r??-??r??) index_mode=0404;; *) index_mode=0400;; esac index_owner_group="${4}:${5}" mv -f new_index.html index.html chmod ${index_mode} index.html chown "${index_owner_group}" index.html elif [ ! -d "${realm}/custom" -o ! -d "${realm}/cgi-bin" ] then echo "${ProgName}: directory '${realm}' exists and is not a realm" exit 2 fi # Any systems to add to the (created) realm? if [ -s "${SYSTEMS}" ] then if [ "${realm}" = "All" ] then echo "${ProgName}: cannot add systems to realm 'All'" exit 2 fi cd "${realm}" while read sys do for suffix in cur html log log.html do if [ ! -f ../All/scc.${sys}.${suffix} ] then echo "${ProgName}: file All/scc.${sys}.${suffix} not found" >&2 else ln -s ../All/scc.${sys}.${suffix} . chown "${new_owner_group}" ../All/scc.${sys}.${suffix} fi done done <${SYSTEMS} cd "${SCC_WWW}" if [ ${quick} -eq 0 ] then ${SCC_BIN}/scc-update -f "${realm}" fi fi fi if [ -n "${archive_dir}" ] then if [ ! -d "${realm}" ] then echo "${Progname}: cannot access realm '${realm}' for archiving" exit 2 fi if [ ! -d "${archive_dir}" ] then mkdir -p "${archive_dir}" if [ ! -d "${archive_dir}" ] then echo "${ProgName}: unable to create directory '${archive_dir}'" exit 2 fi # Create a file in the archive and check access via the SCC_WWW hierarchy. touch "${archive_dir}/_$$_" if [ -f "${SCC_WWW}/${archive_dir##*/}/_$$_" ] then rm -rf "${archive_dir}" echo "${ProgName}: do not use subdirectory of ${SCC_WWW} for archiving" exit 2 fi rm -f "${archive_dir}/_$$_" fi if [ -d "${archive_dir}/cgi-bin" -a -d "${archive_dir}/custom" ] then echo "${ProgName}: do not archive in realm '${realm}'" exit 2 fi # Determine the types of files to archive. suffix_list="cur log" if [ -n "${html_files}" ] then suffix_list="${suffix_list} html log.html" fi # Copy the files from the realm to the archive directory: cd "${archive_dir}" if [ -s "${SYSTEMS}" ] then cat "${SYSTEMS}" # Specific systems to archive else # no specific systems, archive the entire realm ls "${SCC_WWW}/${realm}" | sed -n -e "s@^scc\.@@" \ -e "s@\.cur\$@@p" fi | while read sys do for suffix in ${suffix_list} do file="scc.${sys}.${suffix}" if [ ! -f "${SCC_WWW}/${realm}/${file}" ] then echo "${ProgName}: file '${realm}/${file}' not found" >&2 else rm -f "${file}" cp "${SCC_WWW}/${realm}/${file}" "${file}" fi done done cd "${SCC_WWW}" if [ -n "${html_files}" ] then # scc-summary generates html-files with absolute paths: / # As we want relative paths, we use a specific argument for the -d option and use this # later to change the absolute paths to relative paths. delete_pattern="ReMovE_ThIs" scc-summary -d "/${delete_pattern}" "${archive_dir}" mkdir -p "${archive_dir}"/custom for file in "${realm}/custom/"* do cp "${file}" "${archive_dir}/custom" done for file in "${archive_dir}"/*.html do # No help files, just point from logo to the index.html: sed -e "s@/${delete_pattern}/${archive_dir}/@@" \ -e "s@/${delete_pattern}/${archive_dir##*/}/@@" \ -e "s@/${delete_pattern}/scc-help/.*\.html@index.html@" \ <"${file}" >"${file}".tmp mv -f "${file}".tmp "${file}" done # Files from scc-summary we do not need: rm -f scc-summary.class scc-summary.data # Minimal index.html indicating the snapshot and logbook summaries. cat >"${archive_dir}"/index.html <<-_X_ Archive in ${archive_dir} Snapshots
    Logbooks _X_ # The owner of the base directory of the scc-srv website will be the user of the webserver. set dummy $(ls -ld "${SCC_WWW}/All") html_user="${4}" chown -R "${html_user}" "${archive_dir}" fi fi if [ ${delete} -eq 1 ] then if [ ! -d "${realm}" ] then echo "${ProgName}: attempt to delete (from) non-existent realm '${realm}'" exit 2 fi # Any systems to delete from the realm? if [ -s "${SYSTEMS}" ] then while read sys do for suffix in cur html log log.html smt.html do rm -f "${realm}/scc.${sys}.${suffix}" 2>/dev/null done # Cleanup the possibly saved snapshots and logfiles. rm -f "${realm}/scc.${sys}".cur.* "${realm}/scc.${sys}".log.* done <${SYSTEMS} if [ ${quick} -eq 0 ] then ${SCC_BIN}/scc-update -f "${realm}" fi else # No systems to delete, delete the realm itself if [ "${realm}" = "All" ] then echo "${ProgName}: cannot delete realm 'All'" exit 2 fi rm -rf "${realm}" # Attempt to remove the realm from the main index.html. # Use ed to preserve ownership and permissions. cat <<-_X_ | ed -s index.html 2>/dev/null /^[ ]*
  • .*<\/A><\/LI>[ ]*$/d w q _X_ fi fi exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-receive-mail010055500000000000003000000033671167217614000224610ustar00rootsys00000000000000#!/bin/sh # Shell script to receive configuration data for SCC. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-receive-mail $ # ID: $Id: scc-receive-mail 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C umask 077 dest=${SCC_DATA}/transfer/mail if [ $# -eq 1 ] then dest="${1}" fi if [ ! -d "${dest}" ] then # Do not signal any error, just leave. exit 0 fi id=$$ while [ -f "${dest}"/file_${id} ] do id=$(( ${id} + 1 )) done cat >"${dest}"/file_${id} cat "${dest}"/done_${id} exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-rules010055500000000000003000000506421167217614000212470ustar00rootsys00000000000000#!/bin/sh # Shell script to check snapshots/log files for SCC. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-rules $ # ID: $Id: scc-rules 4798 2011-11-18 17:08:33Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi if [ -x /usr/xpg4/bin/awk ] then alias awk=/usr/xpg4/bin/awk fi if [ -x /usr/xpg4/bin/grep ] then alias grep=/usr/xpg4/bin/grep fi if [ -x /usr/xpg4/bin/tail ] then alias tail=/usr/xpg4/bin/tail fi umask 077 export TMP_DATA=${SCC_TMP}/scc_data_$$ export TMP_FILE=${SCC_TMP}/scc_rules_$$ export TMP_DIFF=${SCC_TMP}/scc_diff_$$ export TMP_SIGNAL=${SCC_TMP}/scc_signal_$$ trap "rm -f ${TMP_DATA} ${TMP_FILE} ${TMP_DIFF} ${TMP_SIGNAL}" 0 trap "exit 2" 1 2 3 15 INTRO_SIGNAL="" scc_check_max_snap_age() { # Arguments: # 1: # comma separated list of systems or "all_systems" # 2: # maximum allowed age of snapshots # # Output: # CheckSnapAge last run on day=$(date '+%d') month=$(date '+%m') year=$(date '+%Y') max_age="${2}" if [ ${max_age} -gt 28 ] then echo "${ProgName}: reducing limit for max age of snapshots from ${max_age} to 28" >&2 max_age=28 fi # Checking the age limit is done by subtracting the limit from the current date. if [ ${max_age} -lt ${day} ] then day=$(( ${day} - ${max_age} )) else if [ ${month} -eq 1 ] then year=$(( ${year} - 1 )) month=12 else month=$(( ${month#0} - 1 )) fi last_day_prev_month=31 case ${month} in 4|6|9|11) last_day_prev_month=30;; 2) last_day_prev_month=28;; esac remainder=$(( ${max_age} - ${day#0} )) day=$(( ${last_day_prev_month} - ${remainder} )) fi snap_age_limit=$(printf "%04d%02d%02d" ${year} ${month#0} ${day#0}) if [ "${1}" != "all_systems" ] then check_sys="$(echo ${1} | sed -e 's/,/ /g')" else check_sys="${all_sys}" fi rm -f ${TMP_SIGNAL} for sys in ${check_sys} do last_run="$(tail -n 1 scc.${sys}.log 2>/dev/null | sed -e 's/:.*//' -e 's/-//g')" if [ -n "${last_run}" ] then if [ "${last_run}" -lt "${snap_age_limit}" ] then # We cannot do date arithmetic, just signal the "overflow" of the limit. last_run="$(tail -n 1 scc.${sys}.log | sed -e 's/:.*//')" if [ ! -f ${TMP_SIGNAL} ] then echo "# CheckSnapAge Check max. age of ${sys_label}: ${max_age} day(s)" touch ${TMP_SIGNAL} fi echo "CheckSnapAge ${sys} last run on ${last_run}, limit is ${max_age} days" fi else # Empty logfile ?!? Ignore : fi done rm -f ${TMP_SIGNAL} return 0; } scc_check_change() { # Arguments: # 1: # comma separated list of systems or "all_systems" # 2: # optional, no pattern means: signal any change # regular expression to check in log files or file (in custom) with classifications # # Output: # CheckLogEntries changes for run on if [ "${1}" != "all_systems" ] then check_sys="$(echo ${1} | sed -e 's/,/ /g')" else check_sys="${all_sys}" fi rm -f ${TMP_SIGNAL} for sys in ${check_sys} do last_line="$(tail -n 1 scc.${sys}.log 2>/dev/null | grep ":runtime::")" if [ -n "${last_line}" ] then continue # No changes, check next system fi # Retrieve the date of the last run last_date="$(tail -n 1 scc.${sys}.log 2>/dev/null | awk -F: '{ print $1 ":" $2 }')" if [ -z "${last_date}" ] then continue # Empty/absent log file??? fi if [ -n "${2}" ] then # Retrieve the changes of the last run. grep "^${last_date}:data::" scc.${sys}.log >${TMP_FILE} if [ -f "${rules_conf%/*}/${2}" -o -h "${rules_conf%/*}/${2}" ] then cnt="$(grep -c -f "${rules_conf%/*}/${2}" ${TMP_FILE} 2>/dev/null)" else cnt="$(grep -c "${2}" ${TMP_FILE} 2>/dev/null)" fi if [ $? -eq 1 ] then continue # No changes that match our criteria fi else # No specific changes, count all. cnt="$(grep -c "^${last_date}:data::" scc.${sys}.log)" fi if [ ! -f ${TMP_SIGNAL} ] then if [ -n "${2}" ] then echo "# CheckLogEntries Signal specific changes (${2}) in last run of ${sys_label}" else echo "# CheckLogEntries Signal any changes in last run of ${sys_label}" fi touch ${TMP_SIGNAL} fi echo "CheckLogEntries ${sys} ${cnt} changes for run on $(echo "${last_date}" | sed -e 's/:/ at /')" done rm -f ${TMP_FILE} rm -f ${TMP_SIGNAL} return 0; } scc_check_identical_cfg() { # Note: use with care as this can be very time-consuming! # # Arguments: # 1: # comma separated list of systems # first system in list is golden, compare with others # single system # system is golden, compare all other systems # "all_systems" # first (alphabeticsl) system is golden, compare with others # 2: # literal text of classification or file (in custom) with classifications # # Output: # CompareSnapData if [ -f "${rules_conf%/*}/${2}" -o -h "${rules_conf%/*}/${2}" ] then class_file="${rules_conf%/*}/${2}" else echo "${2}" >${TMP_FILE} class_file=${TMP_FILE} fi multiple="$(echo "${1}" | grep ",")" if [ -n "${multiple}" ] then # The first system in the list is the golden system. golden=${1%%,*} else golden="${1}" check_sys="${all_sys}" sys_label="all systems" fi rm -f ${TMP_SIGNAL} # Compare the other systems in the list with the golden system and report differences. for sys in ${check_sys} do if [ "${golden}" != "${sys}" ] then ${SCC_BIN}/scc-syscmp "${class_file}" scc."${golden}".cur scc."${sys}".cur 2>/dev/null | sed -e "s/^/CompareSnapData ${sys} /" >${TMP_DIFF} if [ -s ${TMP_DIFF} ] then if [ ! -f ${TMP_SIGNAL} ] then echo "# CompareSnapData Check ${sys_label} (${golden} is leading) for differences in configuration: ${2}" touch ${TMP_SIGNAL} fi cat ${TMP_DIFF} fi fi done rm -f ${TMP_SIGNAL} return 0; } scc_check_txt() { # Arguments: # 1: # comma separated list of systems or "all_systems" # 2: # literal text to search for # # Output: # CheckSnapData # Search for the classifications. # Ignore the specification of the patterns we are searching. for sys in ${check_sys} do echo "scc.${sys}.cur" done | xargs grep "${2}" /dev/null | grep -v ":fix:software:scc-srv:.*::scc-rules.conf:.*CheckSnapData:" >${TMP_FILE} if [ -s ${TMP_FILE} ] then echo "# CheckSnapData Check snapshots of ${sys_label} for occurences of \"${2}\"" sed -e 's/^scc./CheckSnapData /' \ -e 's/\.cur:/ /' ${TMP_FILE} fi rm -f ${TMP_FILE} return 0; } scc_unique() { # Arguments: # 1: # comma separated list of systems or "all_systems" # 2: # start of text that is checked for uniqueness # # Output: # CheckUnique|| # Search for the classifications. # Ignore the specification of the patterns we are searching. for sys in ${check_sys} do echo "scc.${sys}.cur" done | xargs fgrep "${2}" /dev/null | grep -v ":fix:software:scc-srv:.*::scc-rules.conf:.*Unique:" >${TMP_FILE} if [ -s ${TMP_FILE} ] then echo "# CheckUnique Check snapshots of ${sys_label} for uniqueness of \"${2}\"" sed -e 's/^scc\.//' \ -e 's/\.cur:/ /' \ <${TMP_FILE} | awk '{ host=$1; $1="" data[ $0 ] = sprintf( "%s %s", data[ $0 ], host ) } END { for ( line in data ) { cnt = split( data[ line ], parts ) if ( cnt > 1 ) { for ( i = 1; i <= cnt; i+=1 ) { printf( "CheckUnique %s %s\n", parts[ i ], line ) } } } }' - fi rm -f ${TMP_FILE} return 0; } scc_page_header() { cat <<-EndOfTxt ${html_title}

    ${HOME_URL} ${CONFIG_URL} ${html_hdr}

    EndOfTxt } scc_table_start( ) { description="${1}" title_1="${2}" title_2="${3}" cat <<-EndOfTxt

    ${description}

    EndOfTxt } scc_table_end() { cat <<-EndOfTxt
    ${title_1} ${title_2}
    EndOfTxt } scc_scrub_html() { grep "^#* *${1} " | sed -e 's/&/\&/g' \ -e 's//\>/g' \ -e "s/'/\'/g" \ -e 's/"/\"/g' } scc_format_html() { if [ -z "${INTRO_SIGNAL}" ] then if [ -s "${1}" ] then echo "

    The last run of scc-rules produced the following messages:

    " INTRO_SIGNAL="done" else return # No data to format, we are ready fi fi for check in CheckSnapAge CheckLogEntries CheckSnapData do grep "^${check}" "${1}" >/dev/null 2>/dev/null if [ $? -eq 0 ] then title="$(sed -n -e "s/# ${check} //p" "${1}")" scc_table_start "${title}" "System" "Message" scc_scrub_html "${check}" <"${1}" | awk 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; } /^#/ { tr_c = 0; # TR class; start new table with even prev_url = ""; next; } { if ( $1 == "CheckLogEntries" ) { url = sprintf( "%s",\ d, $2, $(NF - 2), $NF, $2 ); } else { url = sprintf( "%s", d, $2, $2 ); } $1 = ""; $2 = ""; # erase rule-id and system-name sub( "^ *", "", $0 ); if ( url != prev_url ) { if ( length( prev_url ) > 0 ) { # Terminate previous row. print " "; print " "; } prev_url = url; printf( "\n", c[ tr_c++ % 2 ] ); printf( " %s\n", url ); print "" } else { print "
    "; } printf( "
    %s
    \n", $0 ); }' d="${web_realm_dir}" scc_table_end fi done for check in CheckUnique do grep "^${check}" "${1}" >/dev/null 2>/dev/null if [ $? -eq 0 ] then title="$(sed -n -e "s/# ${check} //p" "${1}")" scc_table_start "${title}" "Text" "System" scc_scrub_html "${check}" <"${1}" | awk 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; } /^#/ { tr_c = 0; # TR class; start new table with even prev_txt = ""; next; } { url = sprintf( "%s", d, $2, $2 ); $1 = ""; $2 = ""; # erase rule-id and system-name sub( "^ *", "", $0 ); if ( $0 != prev_txt ) { if ( length( prev_txt ) > 0 ) { # Terminate previous row. print " "; print " "; } prev_txt = $0; printf( "\n", c[ tr_c++ % 2 ] ); printf( "
    %s
    \n", $0 ); print "" } else { print "
    "; } printf( " %s\n", url ); }' d="${web_realm_dir}" scc_table_end fi done for check in CompareSnapData do grep "^${check}" "${1}" >/dev/null 2>/dev/null if [ $? -eq 0 ] then title="$(sed -n -e "s/# ${check} //p" "${1}")" scc_table_start "${title}" "System" "Text" scc_scrub_html "${check}" <"${1}" | awk 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; } /^#/ { tr_c = 0; # TR class; start new table with even prev_txt = ""; next; } { url = sprintf( "%s", d, $2, $2 ); if ( url != prev_url ) { if ( length( prev_url ) > 0 ) { # Terminate previous row. print " "; print " "; } prev_url = url; printf( "\n", c[ tr_c++ % 2 ] ); printf( " %s\n", url ); print "" } else { print "
    "; } sys=$2 $1 = ""; $2 = ""; # erase rule-id and system-name sub( "^ *", "", $0 ); b_f = ""; e_f = ""; msg_sys = $1; sub( " *:", "", msg_sys ); if ( msg_sys == sys ) { b_f = ""; } else { b_f = ""; } e_f = ""; printf( "
    %s%s%s
    \n", b_f, $0, e_f ); }' d="${web_realm_dir}" scc_table_end fi done } now=$(date '+%Y-%m-%d %H:%M:%S') SYNTAX="Syntax error, use: ${ProgName} [ -d ] [ -f ] [ -h ] " scc_web_path_dir="" single_system="" rules_conf="custom/scc-rules.conf" while [ $# -gt 1 ] do if [ $# -eq 1 ] then echo "${ProgName}: Syntax error, missing argument for option: $1" exit 2 fi case "${1}" in -d) if [ "${2}" != "/" ] then scc_web_path_dir="$2" fi shift 2 ;; -f) rules_conf="${2}" shift 2 ;; -h) # Not usefull for single systems: # - uniqueness of data across systems # - comparing data across systems sed -e '/^#* *CheckUnique/d' \ -e '/^#* *CompareSnapData/d' \ >${TMP_FILE} single_system="${2}" shift 2 ;; *) echo "${SYNTAX}" >&2 exit 1 ;; esac done if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ -z "${scc_web_path_dir}" ] then scc_web_path_dir="$(sed -n 's/^SCC_WEB_PATH=//p' ${SCC_CONF}/scc.conf 2>/dev/null)" fi html_title="Messages for realm ${1}" html_hdr="Check rules for realm ${1}, last update on: ${now}" realm="${1}" web_realm_dir="${scc_web_path_dir}/${realm}" HOME_URL="Home    " CONFIG_URL="Configuration    " if [ "${single_system}" ] then html_title="Messages for system ${single_system}" html_hdr="Check rules for system ${single_system} in realm ${realm}" CONFIG_URL="" scc_page_header if [ -s "${TMP_FILE}" ] then scc_format_html "${TMP_FILE}" else echo "

    No messages

    " fi exit 0 fi if [ ! -d "${SCC_WWW}/${realm}" ] then echo "${ProgName}: directory ${SCC_WWW}/${realm} does not exist" >&2 exit 1 fi cd "${SCC_WWW}/${realm}" # Use the owner/group/permissions of the destination directory for the files we put there. # We are only interested in the read-permissions of the directory. set dummy $(ls -ld .) case "${2}" in ?r??r??r??) new_mode=0444; umask 333;; ?r??r??-??) new_mode=0440; umask 337;; ?r??-??-??) new_mode=0400; umask 377;; ?r??-??r??) new_mode=0404; umask 373;; *) new_mode=0400; umask 077;; esac new_owner_group="${4}:${5}" all_sys="$(find . -name "scc.*.cur" \( -type f -o -type l \) | sed -e 's@^\./@@' | grep -v "/" | sed -e 's/^scc\.//' \ -e 's/\.cur//' | sort -f)" # Check the rules. rm -f scc-rules.data scc-rules-index.html if [ -f "${rules_conf}" -o -h "${rules_conf}" ] then scc_page_header >scc-rules-index.html sed -e 's/:/ /' \ -e 's/:/ /' \ -e '/^[ ]*$/d' \ -e '/^[ ]*#/d' "${rules_conf}" 2>/dev/null | while read check systems parm do if [ "${systems}" != "all_systems" ] then check_sys="$(echo ${systems} | sed -e 's/,/ /g')" check_list="" for sys in ${check_sys} do if [ ! -f scc.${sys}.cur ] then echo "${ProgName}: ${realm} check ${check}: unknown system: ${sys}" >&2 else check_list="${check_list} ${sys}" fi done check_sys="${check_list}" sys_label="specific systems" else check_sys="${all_sys}" sys_label="all systems" fi case "${check}" in CheckSnapAge) scc_check_max_snap_age "${systems}" "${parm}" | tee -a scc-rules.data >"${TMP_DATA}" scc_format_html "${TMP_DATA}" >>scc-rules-index.html ;; CheckLogEntries) scc_check_change "${systems}" "${parm}" | tee -a scc-rules.data >"${TMP_DATA}" scc_format_html "${TMP_DATA}" >>scc-rules-index.html ;; CompareSnapData) scc_check_identical_cfg "${systems}" "${parm}" | tee -a scc-rules.data >"${TMP_DATA}" scc_format_html "${TMP_DATA}" >>scc-rules-index.html ;; CheckSnapData) scc_check_txt "${systems}" "${parm}" | tee -a scc-rules.data >"${TMP_DATA}" scc_format_html "${TMP_DATA}" >>scc-rules-index.html ;; Unique) scc_unique "${systems}" "${parm}" | tee -a scc-rules.data >"${TMP_DATA}" scc_format_html "${TMP_DATA}" >>scc-rules-index.html ;; SIGNAL*) : # Ignore signalling directions. ;; *) echo "${ProgName}: unknown check: ${check}" >&2 ;; esac done if [ ! -s scc-rules.data ] then if [ -f "${rules_conf}" -o -h "${rules_conf}" ] then echo "

    The last run of scc-rules produced NO messages

    " else echo "

    There is no file custom/scc-rules.conf to check for rules.

    " fi >>scc-rules-index.html fi fi # if [ -f "${rules_conf}" -o -h "${rules_conf}" ] # Signal the output. if [ -s scc-rules.data ] then s_prog="$(sed -n -e 's/^SIGNAL_PROG=//p' <"${rules_conf}")" s_dest="$(sed -n -e 's/^SIGNAL_DEST=//p' <"${rules_conf}")" case "X${s_prog}" in Xmail) ( echo "Results from scc-rules check for realm: ${realm}" echo "" cat scc-rules.data ) | mail "${s_dest}" ;; Xopc) cnt=$(wc -l "$(basename "${s_dest}")" ;; esac ;; X*) : # default: ignore! ;; esac fi # Add the configuration to the output. if [ -f "${rules_conf}" -o -h "${rules_conf}" ] then echo "
    " echo "" echo "

    Top    Configuration files

    " echo "

    The program scc-rules uses the following configuration files for this realm:

    " sed -e '/^#/d' "${rules_conf}" | awk -F: 'BEGIN { print "scc-rules.conf"; } { if ( $3 != "" ) { if ( ! visited[ $3 ] ) { print $3; visited[ $3 ] = 1; } } }' | while read file do if [ -f "${rules_conf%/*}/${file}" -o -h "${rules_conf%/*}/${file}" ] then echo "

    ${file}

    " echo "
    "
    			sed	-e '/^#/d'		\
    				-e '/^[ 	]*$/d'	\
    				-e 's/&/\&/g'	\
    				-e 's//\>/g'	\
    				-e "s/'/\'/g"	\
    				-e 's/"/\"/g' "${rules_conf%/*}/${file}"
    			echo "
    " fi done echo " " echo "" fi >>scc-rules-index.html chown "${new_owner_group}" scc-rules-index.html scc-rules.data 2>/dev/null exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-setup010055500000000000003000000115041167217614000212470ustar00rootsys00000000000000#!/bin/sh # Shell script to activate webinterface of SCC # Copyright (C) 2010-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-setup $ # ID: $Id: scc-setup 4780 2011-09-07 17:33:05Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH umask 077 # Initialize the variables required to perform the setup of the webinterface: init() { export WWW_USER="${WWW_USER:-}" export WWW_CONFIG="${WWW_CONFIG:-}" export WWW_PATH="${WWW_PATH:-}" export WWW_RESTART="${WWW_RESTART:-}" } # Assign defaults to the variables when they have no value. defaults() { # Check and source the configuration file: config_file=${SCC_CONF}/setup.conf if [ -f "${config_file}" ] then . "${config_file}" fi if [ -z "${WWW_USER}" ] then for u in webservd apache2 httpd www apache wwwrun nobody do id ${u} >/dev/null 2>/dev/null if [ $? -eq 0 ] then WWW_USER="${u}" ps -ef | grep "${u} .*[h]ttp" >/dev/null 2>/dev/null if [ $? -eq 0 ] then break fi fi done fi if [ -z "${WWW_CONFIG}" ] then for d in /etc/httpd/conf.d /etc/apache2/conf.d /etc/apache2/*/conf.d do if [ -d "${d}" ] then WWW_CONFIG="${d}" break fi done fi if [ -z "${WWW_PATH}" ] then WWW_PATH="/scc" fi if [ -z "${WWW_RESTART}" ] then WWW_RESTART=$(which apachectl 2>/dev/null) if [ ! -x "${WWW_RESTART}" ] then WWW_RESTART=$(locate apachectl 2>/dev/null | grep bin | head -n 1) if [ ! -x "${WWW_RESTART}" ] then for dir in /usr/apache2/*/bin do if [ -x "${dir}/apachectl" ] then WWW_RESTART="${dir}/apachectl" break fi done fi fi fi } # Show the values of the variables show() { echo "WWW_USER : ${WWW_USER}" echo "WWW_CONFIG : ${WWW_CONFIG}" echo "WWW_PATH : ${WWW_PATH}" echo "WWW_RESTART: ${WWW_RESTART}" } # Check the contents of the variables. check() { result=0 if [ -z "${WWW_USER}" ] then echo "${ProgName}: missing variable WWW_USER" >&2 result=1 fi if [ -z "${WWW_CONFIG}" ] then echo "${ProgName}: missing variable WWW_CONFIG" >&2 result=1 else if [ ! -d "${WWW_CONFIG}" ] then echo "${ProgName}: cannot access directory WWW_CONFIG: ${WWW_CONFIG}" >&2 result=1 fi fi if [ -z "${WWW_PATH}" ] then echo "${ProgName}: missing variable WWW_PATH" >&2 result=1 fi case "${WWW_PATH}" in /*) ;; *) WWW_PATH="/${WWW_PATH}" esac if [ -z "${WWW_RESTART}" ] then echo "${ProgName}: missing variable WWW_RESTART" >&2 result=1 else if [ ! -x "${WWW_RESTART}" ] then echo "${ProgName}: cannot access file WWW_RESTART: ${WWW_RESTART}" >&2 result=1 fi fi return ${result} } # Activate the configuration; assumes check has been executed. activate() { uid=$(id | sed -e 's/(.*//' -e 's/.*=//') if [ "${uid}" != "0" ] then echo "${ProgName}: only root should run this program" >&2 exit 2 fi ${SCC_BIN}/scc-update -d "${WWW_PATH}" -w ${WWW_USER} -f cat >${WWW_CONFIG}/scc.conf <<_X_ ScriptAliasMatch "^.*/([^/]*)/cgi-bin/scc-wrapper.cgi" "${SCC_WWW}/\$1/cgi-bin/scc-wrapper.cgi" Alias ${WWW_PATH} ${SCC_DATA}/www Options -Indexes FollowSymLinks +ExecCGI MultiViews AllowOverride AuthConfig Order allow,deny allow from all _X_ chmod 644 ${WWW_CONFIG}/scc.conf ${WWW_RESTART} restart } SYNTAX="Syntax error, use: ${ProgName} [ -a | -f | -p ]" init defaults case "X${1:-}" in X-a) check if [ $? -eq 0 ] then activate fi ;; X-f) new_cfg="${2}" if [ ! "${new_cfg}" ] then echo "${ProgName}: cannot read file ${new_cfg}" >&2 exit 2 fi init . ${new_cfg} check if [ $? -eq 0 ] then activate fi ;; X-p|X) check show; ;; *) echo "${SYNTAX}" >&2 exit 1 ;; esac exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-smt010055500000000000003000000441151167217614000207160ustar00rootsys00000000000000#!/bin/sh # Shell script to summarize System Tools from snapshots for SCC. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-smt $ # ID: $Id: scc-smt 4798 2011-11-18 17:08:33Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi if [ -x /usr/xpg4/bin/awk ] then alias awk=/usr/xpg4/bin/awk fi if [ -x /usr/xpg4/bin/grep ] then alias grep=/usr/xpg4/bin/grep fi SYNTAX="Syntax error, use: ${ProgName} [ -d ] " scc_web_path_dir="" while [ $# -gt 1 ] do if [ $# -eq 1 ] then echo "${ProgName}: Syntax error, missing argument for option: $1" exit 2 fi case "${1}" in -d) if [ "${2}" != "/" ] then scc_web_path_dir="$2" fi shift 2;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi realm="${1}" if [ ! -d "${SCC_WWW}/${realm}" ] then echo "${ProgName}: directory ${SCC_WWW}/${realm} does not exist" >&2 exit 1 fi cd "${SCC_WWW}/${realm}" if [ -z "${scc_web_path_dir}" ] then scc_web_path_dir="$(sed -n 's/^SCC_WEB_PATH=//p' ${SCC_CONF}/scc.conf 2>/dev/null)" fi web_realm_dir="${scc_web_path_dir}/${realm}" HOME_URL="Home    " # Use the owner/group/permissions of the destination directory for the files we put there. # We are only interested in the read-permissions of the directory. set dummy $(ls -ld .) case "${2}" in ?r??r??r??) new_mode=0444; umask 333;; ?r??r??-??) new_mode=0440; umask 337;; ?r??-??-??) new_mode=0400; umask 377;; ?r??-??r??) new_mode=0404; umask 373;; *) new_mode=0400; umask 077;; esac new_owner_group="${4}:${5}" smt_file="" if [ -f "custom/scc-smt-select" -o -h "custom/scc-smt-select" ] then smt_file="$(pwd)/custom/scc-smt-select" else # No SMT selection file present. Remove all files from a possible, previous run. rm -f scc-smt.data scc-smt-index.html find . -type f -name "scc.*.smt.html" 2>/dev/null | xargs rm -f exit 0 fi bg_color="" if [ -f ./custom/scc-realm.conf ] then color="$(sed -n 's/^BG_COLOR=//p' ./custom/scc-realm.conf)" if [ "${color}" ] then bg_color=" bgcolor=\"${color}\"" fi fi logo_tag="HelpInfo" if [ ! -f scc-summary.data ] then echo "${ProgName}: file scc-summary.data does not exist" >&2 exit 1 fi system_cnt=$(wc -l &2 exit 1 fi # Ignore comments and blank lines in the selection-file. sed -e '/^#/d' -e '/^[ ]*$/d' ${smt_file} >${TMP_FILE} # Ignore snapshots in sub-directories (with more than one '/' in the name). # The awk-script could detect extracted data that is not matched. # This is not (yet) implemented. find . -name "scc.*.cur" | sed -e '/\/.*\//d' | xargs fgrep -f ${TMP_FILE} /dev/null | awk -F: '/'"$(basename ${smt_file})"'/ { # The client collects the contents of the specification file of this program. # The contents match the patterns of the next line. # Ignore the contents of this file to avoid bogus data in the report. next; } /\.cur:fix:software:installed-filesets::/ { # Format of input is: # scc.host.cur:fix:software:installed-filesets::# SCC 1.2.10 System Configuration Collector sub( "^[# ]*", "", $6 ); # remove leading chars sub( "[ ][ ]*", ":", $6 ); # join name and version sub( "[ ].*", "", $6 ); # erase description printf( "%s:%s\n", $1, $6 ); # Name and version are joined in $6 next; } /\.cur:fix:software:installed-packages:/ { # Format of input is: # scc.host.cur:fix:software:installed-packages:::::: if ( $7 == "OPC" && $8 == "HP" ) { # OPC-agent on Sun is indicated by OPC and HP. # Map this to the same name as on HP-UX. # "system::OPC:HP:A.6.11 printf( "%s:%s:%s\n", $1, "OVOPC-AGT", $9 ); } else { # We do not need the detailed (date) version sub( ",REV=.*", "", $9 ); printf( "%s:%s:%s\n", $1, $7, $9 ); } next; } /\.cur:fix:software:installed-aix-filesets::/ { # Format of the input is: # scc.host.cur:fix:software:installed-aix-filesets::/usr/lib/objrepos:IMNSearch.rte.httpdlite:2.0.0.1::COMMITTED:I:NetQuestion Web Server if ( $7 == "scc.rte" || $7 == "scc-srv.rte" ) { # For installp ".rte" is added to indicate the fileset in the package. # As installp requires four elements in the version, our packaging scripts add a ".1". # Convert the version of scc and scc-srv for scc-smt only to indicate that the version # is identical with other formats. sub( "[.]rte", "", $7 ); sub( "[.]1$", "", $8 ); } printf( "%s:%s:%s\n", $1, $7, $8 ); next; } /\.cur:fix:software:installed-BSD-packages::/ { # Format of the input is: # scc.host.cur:fix:software:installed-BSD-packages::scc-1.6.3 System Conf... # scc.host.cur:fix:software:installed-BSD-packages::scc-srv-1.3.25-OpenBSD .... sub( "[ ].*", "", $6 ); # erase description sub( "-OpenBSD$", "", $6 ); # erase OS cnt = split( $6, parts, "-" ); version = parts[ cnt ]; name = parts[ 1 ]; for ( i = 2; i < cnt; i++ ) { name = sprintf( "%s-%s", name, parts[ i ] ); } printf( "%s:%s:%s\n", $1, name, version ); next; } /\.cur:fix:software:installed Debian packages::/ { # Format of the input is: # scc.host.cur:fix:software:installed Debian packages::ii scc 1.6.3 System Conf... cnt = split( $6, parts, " " ); name = parts[ 2 ]; version = parts[ 3 ]; printf( "%s:%s:%s\n", $1, name, version ); next; } /\.cur:fix:software:installed pisi packages::/ { # Format of the input is: # scc.host.cur:fix:software:installed pisi packages::scc:1.8.9:System Configuration Collector printf( "%s:%s:%s\n", $1, $6, $7 ); next; } /\.cur:fix:software:installed CRUX packages::/ { # Format of the input is: # scc.host.cur:fix:software:installed CRUX packages::autoconf:2.61-1 printf( "%s:%s:%s\n", $1, $6, $7 ); next; } /\.cur:fix:software:slitaz packages:/ { # Format of the input is: # scc.host.cur:fix:software:slitaz packages:::autoconf:2.61-1 printf( "%s:%s:%s\n", $1, $7, $8 ); next; } /\.cur:fix:software:installed software::/ { # Suggested by Jacco Dunweg: # This classification is not produced by scc_0630_s_pkgmngt, # but added to provide a mechanism for software that is not installed # by one of the supported package management software in the client. # To add other software to the summaries of scc-smt, add data to # the snapshot with classification: fix:software:installed software::: # Format of the input is: # scc.host.cur:fix:software:installed software::autoconf:2.61-1 printf( "%s:%s:%s\n", $1, $6, $7 ); next; } /\.cur:fix:software:installed-source:/ { # This is a specific hack in the client to registrate the # version of scc installed from source. # Format of input is: # "scc.host.cur:fix:software:installed-source::scc:1.6.3 printf( "%s:%s:%s\n", $1, $6, $7 ); next; } /\.cur:fix:software:product:.*::Version[ ]/ { # This is for Windows hosts, format of the input is: # scc.host.cur:fix:software:product:QuickTime::Version : 7.1 # For some products, the version is absent. # We need a value to display the systems per version. if ( $8 ~ "^[ ]*$" ) { $8 = "-"; } printf( "%s:%s:%s\n", $1, $5, $8 ); next; } /\.cur:fix:software:installed-rpms:/ { # Format of input is: # scc.host.cur:fix:software:installed-rpms:%{GROUP}::%{NAME}:%{VERSION}-%{RELEASE} if ( $7 == "scc" || $7 == "scc-srv" ) { # RPM uses a dash to separate the least significant part of the version. # Other package management software only use dots to separate elements of the version. # Convert the version of scc and scc-srv for scc-smt only to indicate that the version # is identical with other formats. sub( "[-]", ".", $8 ); } printf( "%s:%s:%s\n", $1, $7, $8 ); next; }' | sed -e 's@^\./scc\.@smt-data:@' \ -e 's/\.cur//' | sort -f -u >${SMT_VERSIONS} chown "${new_owner_group}" ${SMT_VERSIONS} now=$(date '+%Y-%m-%d %H:%M:%S') # Build all the scc..smt.html files awk -F: 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; } /^general_data:/ { # Format of scc-summary.data is: #general_data:::::: curr_smt = sprintf( "./scc.%s.smt.html", $2 ); visited[ $2 ] = 1; print "" >curr_smt; print "" >>curr_smt; print "" >>curr_smt; printf( "\n",\ d, r ) >>curr_smt; printf( "\n",\ d, r ) >>curr_smt; printf( "System Tools: %s\n", $2 ) >>curr_smt; print "" >>curr_smt; printf( "\n", b ) >>curr_smt; printf( "

    System Tools: %s

    \n", $2 ) >>curr_smt; printf( "%s\n", h ) >>curr_smt; snapshot = sprintf( "scc.%s.html", $2 ); printf( "Configuration    ",\ d, r, snapshot ) >>curr_smt; logbook = sprintf( "scc.%s.log.html", $2 ); printf( "Logbook\n", d, r, logbook ) >>curr_smt; printf( "

    Last update on '"${now}"'

    \n" ) >>curr_smt; print "
    "								>>curr_smt;
    		print "Model   : " $3							>>curr_smt;
    		print "OS      : " $4							>>curr_smt;
    		print "Release : " $5							>>curr_smt;
    		print "
    " >>curr_smt; print "" >>curr_smt; print "" >>curr_smt; print " " >>curr_smt; printf( " \n", "Product" ) >>curr_smt; printf( " \n", "Version" ) >>curr_smt; print " " >>curr_smt; print "" >>curr_smt; print "" >>curr_smt; close( curr_smt ); tr_c = 2; next; } /^smt-data:/ { # Format of SMT_VERSIONS is: #smt-data::: if ( ! visited[ $2 ] ) { next; # Ignore when absent in scc-summary.data } curr_smt = sprintf( "./scc.%s.smt.html", $2 ); if ( length( prev ) && ( curr_smt != prev ) ) { print "" >>prev; print "
    %s%s
    " >>prev; print "" >>prev; print "" >>prev; close( prev ); tr_c = 1; } prev = curr_smt; printf( "\n", c[ tr_c++ % 2 ] ) >>curr_smt; printf( " %s\n", $3 ) >>curr_smt; printf( " %s\n", $4 ) >>curr_smt; print "" >>curr_smt; } END { if ( length( curr_smt ) ) { print "" >>curr_smt; print "" >>curr_smt; print "" >>curr_smt; print "" >>curr_smt; } }' b="${bg_color}" \ d="${scc_web_path_dir}" \ h="${HOME_URL}" \ r="${realm}" \ scc-summary.data ${SMT_VERSIONS} # From now on, these files are accessible again by the web server. # Ignore files in sub-directories (with more than one '/' in the name). find . -name "scc.*.smt.html" | sed -e '/\/.*\//d' | xargs chown "${new_owner_group}" 2>/dev/null find . -name "scc.*.smt.html" | sed -e '/\/.*\//d' | xargs chmod "${new_mode}" 2>/dev/null # Build the start-table of scc-smt-index.html, containing a # summary of all the System Tools and their versions. rm -f scc-smt-index.html cat >scc-smt-index.html <<-EndOfTxt System Tools for ${realm}
    ${logo_tag}

    ${HOME_URL} Configuration     System Tools for ${realm}, last update on: ${now}

    EndOfTxt if [ -s ${SMT_VERSIONS} ] then cat <<-EndOfTxt EndOfTxt sort -t: -f -k 3 -k 4 -k 2 ${SMT_VERSIONS} | awk -F: '{ # Format of SMT_VERSIONS is: #smt-data::: # This script counts all the systems for each version of each tool. id = sprintf( "%s:%s", $3, $4 ); count[ id ] += 1; prev=id; } END { for ( s in count ) { # Format of the output is: :: printf( "%s:%d\n", s, count[ s ] ); } }' | sort -t: -f -k 1 -k 2 -k 3n | awk -F":" 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; tr_c = 2; # TR class; TR from THEAD already done } { printf( "\n", c[ tr_c++ % 2 ] ); if ( $1 != prev ) { if ( total > 0 ) { print " "; print " "; print " " print ""; total = 0; printf( "\n", c[ tr_c++ % 2 ] ); } print " "; prev=$1; } else { print " "; } # Format of the input is: :: url = sprintf( "%s_%s", $1, $2 ); gsub( /[^A-Za-z0-9_.-]/, "_", url ); # W3C restrictions and no ":". printf( " \n", url, $2 ); print " "; total += $3; print ""; } END { if ( total > 0 ) { printf( "\n", c[ tr_c++ % 2 ] ); print " "; print " "; print " " print ""; } print ""; print "
    Product Version Count
     total" total "
    " $1 "" " " "%s" $3 "
     total" total "
    "; }' else echo "

    No tools detected

    " fi >>scc-smt-index.html chown "${new_owner_group}" scc-smt-index.html # Build the additional tables for each version of each tool. sort -f -t: -k 3 -k 4 -k 1 ${SMT_VERSIONS} | awk -F: 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; tr_c = 1; # TR class } { # Format of SMT_VERSIONS is: #smt-data::: # Format of scc-summary.data is: #general_data::::::
    "; }' d="${scc_web_path_dir}" r="${realm}" scc-summary.data - >>scc-smt-index.html { echo "
    " echo " " echo "

    Top    Configuration files

    " echo "

    The program scc-smt uses the following configuration file for this realm:

    " echo "

    scc-smt-select

    " echo "
    "
    	sed	-e '/^#/d'		\
    		-e '/^[ 	]*$/d'	\
    		-e 's/&/\&/g'	\
    		-e 's//\>/g'	\
    		-e "s/'/\'/g"	\
    		-e 's/"/\"/g' custom/scc-smt-select
    	echo "	
    " echo " " echo "" } >>scc-smt-index.html exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-summary010055500000000000003000000515541167217614000216150ustar00rootsys00000000000000#!/bin/sh # Shell script to summarize snapshots for SCC. # Copyright (C) 2001-2004 Open Challenge B.V. # Copyright (C) 2004-2005 OpenEyeT Professional Services. # Copyright (C) 2005-2011 QNH. # # 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; see the file COPYING. # If not, write to the Free Software Foundation, # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # Contact information: http://sourceforge.net/projects/sysconfcollect/support # SCC-release: 1.11.18 # URL: $URL: https://sysconfcollect.svn.sourceforge.net/svnroot/sysconfcollect/scc-srv/trunk/scc-summary $ # ID: $Id: scc-summary 4798 2011-11-18 17:08:33Z siemkorteweg $ ProgName=${0##*/}; export ProgName set -u SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP export SCC_DATA=${SCC_TOP}/data export SCC_TMP=${SCC_TOP}/tmp export SCC_CONF=${SCC_TOP}/conf export SCC_WWW=${SCC_DATA}/www export TMPDIR=${SCC_TMP} export TMP=${SCC_TMP} export SHELL=/bin/sh export LANG=C PATH=/sbin:/usr/sbin:/usr/bin:/bin:${SCC_BIN}; export PATH if [ -d /usr/xpg4/bin ] then PATH="/usr/xpg4/bin:${PATH}" fi # Use the following utilities for SunOS. if [ -x /usr/ccs/bin/what ] then alias what=/usr/ccs/bin/what fi SYNTAX="Syntax error, use: ${ProgName} [ -d ] [ -f ] " export TMP_FILE_1=${SCC_TMP}/scc_summary_1_$$ export TMP_FILE_2=${SCC_TMP}/scc_summary_2_$$ trap "rm -f ${TMP_FILE_1} ${TMP_FILE_2}" 0 trap "exit 2" 1 2 3 15 scc_web_path_dir="" force=0; while [ $# -gt 1 ] do if [ $# -eq 1 ] then # All options, except the ones in the following list, should have an argument. if [ "x${1}" != "x-f" ] then echo "${ProgName}: Syntax error, missing argument for option: $1" exit 2 fi fi case "${1}" in -d) if [ "${2}" != "/" ] then scc_web_path_dir="$2" fi shift 2;; -f) force=1; shift 1;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ -z "${scc_web_path_dir}" ] then scc_web_path_dir="$(sed -n 's/^SCC_WEB_PATH=//p' ${SCC_CONF}/scc.conf 2>/dev/null)" fi if [ -d "${SCC_WWW}/${1}" ] then # The argument is the name of a realm, use absolute paths realm="${1}" web_realm_dir="${scc_web_path_dir}/${realm}" cd "${SCC_WWW}/${realm}" elif [ -d "${1}" ] then # The argument is a directory, use relative paths realm="${1##*/}" web_realm_dir="." cd "${1}" else echo "${ProgName}: directory ${1} does not exist" >&2 exit 1 fi HOME_URL="Home    " now=$(date '+%Y-%m-%d %H:%M:%S') # Use the owner/group/permissions of the destination directory for the files we put there. # We are only interested in the read-permissions of the directory. set dummy $(ls -ld .) case "${2}" in ?r??r??r??) new_mode=0444; umask 333;; ?r??r??-??) new_mode=0440; umask 337;; ?r??-??-??) new_mode=0400; umask 377;; ?r??-??r??) new_mode=0404; umask 373;; *) new_mode=0400; umask 077;; esac new_owner_group="${4}:${5}" bg_color="" if [ -f ./custom/scc-realm.conf ] then color="$(sed -n 's/^BG_COLOR=//p' ./custom/scc-realm.conf)" if [ "${color}" ] then bg_color=" bgcolor=\"${color}\"" fi fi logo_tag="HelpInfo" # Ignore snapshots in sub-directories (with more than one '/' in the name). # The following file records errors from head, use the contents to detect broken symbolic links. rm -f ${TMP_FILE_1} ${TMP_FILE_2} find . -name "scc.*.cur" 2>/dev/null | sed -e '/\/.*\//d' | xargs head -n 30 /dev/null 2>>${TMP_FILE_1} | sed -e '/\/dev\/null/d' | awk -F: '/^==> .* <==$/ { if ( length( host ) > 0 ) { printf( "general_data:%s:%s:%s:%s:%s:%s:%s\n",\ host, model, os, release, last_d, last_t, domain ); release_done = ""; model = ""; doamin = ""; os = ""; release = ""; last_d = ""; last_t = ""; } host=$0; sub( /.*[ ]\.\/scc\./, "", host ); sub( /\.cur.*/, "", host ); next; } /^var:general::date:/ { last_d = $5; next } /^var:general::time:start:/ { last_t = $6; next; } /^var:general::start time:/ { last_t = $5; next; } /^fix:general::model:/ { model = $5; next } /^fix:general::domain:/ { domain = $5; next } /^fix:general::OS-name:/ { os = $5; next } /^fix:general::OS-release:/ { release = $5; next } /^fix:general::linux distro name:/ { os = $5; next } /^fix:general::linux distro version:/ { release = $5; release_done = "yes"; next } /^fix:general::linux distro details:/ { # When the client software did not set the distro version data, # we check the last line of the details data for the first field starting with a number. if ( length( release_done ) == 0 ) { gsub( "\"", " ", $5 ); sub( "^[^0-9]*", "", $5 ); sub( " .*", "", $5 ); release = $5; } next; } END { if ( length( host ) ) { printf( "general_data:%s:%s:%s:%s:%s:%s:%s\n",\ host, model, os, release, last_d, last_t, domain ); } }' | sort -f >${TMP_FILE_2} mv -f ${TMP_FILE_2} scc-summary.data chown "${new_owner_group}" scc-summary.data system_cnt=$(wc -l : No such file or directory. # or # : No such file or directory. sed -e 's/^head: //' \ -e 's/:.*//' ${TMP_FILE_1} | while read snapshot do # Check for broken links. sys=${snapshot%%.cur} sys=${sys#*scc.} if [ -h ${snapshot} -a ! -f ${snapshot} ] then for suffix in cur log html log.html smt.html do rm -f scc.${sys}.${suffix} done fi done # Ignore log files in sub-directories (with more than one '/' in the name). # Find all the reported counts of differences. rm -f ${TMP_FILE_1} ${TMP_FILE_2} find . -name "scc.*.log" | sed -e '/\/.*\//d' | xargs grep "^[^:]*:[^:]*:count::" /dev/null | sed -e 's@^\./scc\.@@' \ -e 's/\.log:/ /' \ -e 's/:/ /' \ -e 's/:.*:/ /' \ -e 's/ */:/g' | sort -t: -k 2,2r -k 1,1f -k 3,3r >${TMP_FILE_1} # Remove all the html-files pointing to the changes per day. # We wille generate them again. From this point of time, the files # are not accessible by the web server until we chown them. find . -name "scc-log-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].html" | sed -e '/\/.*\//d' | xargs rm -f export STYLE_CSS="" export FAVICON_ICO="" # Initialize the main log file. rm -f scc-log-index.html cat >scc-log-index.html <<-EndOfTxt ${STYLE_CSS} ${FAVICON_ICO} Configuration changes for ${realm}
    ${logo_tag}

    Home     Configuration changes for ${realm}, last update on: ${now}

    EndOfTxt chown "${new_owner_group}" scc-log-index.html # Initialize the main-summary file # Be sure to pick the same names as below when these html-files are generated. rm -f scc-summary-init.html cat >scc-summary-init.html <<-EndOfTxt ${STYLE_CSS} ${FAVICON_ICO} Summary of SCC-data for ${realm}
    ${logo_tag}

    Home     Summary of SCC-data for ${realm} (${system_cnt} systems), last update on: ${now}

    Date System count
    EndOfTxt awk -F: 'BEGIN { c[ 0 ] = "Even"; c[ 1 ] = "Odd"; tr_m = 1; # TR class for main file tr_d = 1; # TR class for detail files } /general_data/ { # Get some general system data to add to the logs per day. # Format of the input is: "general_data"::::::: if ( NF == 8 ) { model[ $2 ] = $3; os[ $2 ] = $4; rel[ $2 ] = $5; } next; } { # Format of the input is: %s\n",\ c[ tr_m++ % 2 ], " class=Even", d, r, curr_day, curr_day, " class=Odd", cnt_per_day ); close( curr_log ); } curr_day = $2; curr_log = sprintf( "scc-log-%s.html", $2 ); cnt_per_day = 0; visited[ curr_log ] = 1; tr_d = 1; # Initialize the log file for this day print "" >curr_log; print "" >>curr_log; print "" >>curr_log; # Stylesheet: print s >>curr_log; # Favicon.ico: print f >>curr_log; print "Configuration changes for", r, "on", $2, "" >>curr_log; print "" >>curr_log; printf( "\n", b ) >>curr_log; print "
    " >>curr_log; printf( "%s\n", d,l ) >>curr_log; print "

    " >>curr_log; printf( " Home    \n",d,r) >>curr_log; print " Configuration changes for", r, "on", $2 >>curr_log; print "

    " >>curr_log; printf( "
    System_SORT_LABEL_ Model_SORT_LABEL_ OS_SORT_LABEL_ Last run_SORT_LABEL_ Last change_SORT_LABEL_
    %s
    \n", $2) >>curr_log; print "" >>curr_log; printf( " \n", c[ tr_d++ %2 ] ) >>curr_log; print " " >>curr_log; print " " >>curr_log; print " " >>curr_log; print " " >>curr_log; print " " >>curr_log; print " " >>curr_log; print "" >>curr_log; print "" >>curr_log; } # Write the data to the log-files per day. cnt_per_day++; printf( "\n", c[ tr_d++ % 2 ] ) >>curr_log; printf( " \n", d, r, $1, $1 ) >>curr_log; if ( length( model[ $1 ] ) > 0 ) { printf( " \n", model[ $1 ] ) >>curr_log; } else { printf( " \n" ) >>curr_log; } printf( " \n", os[ $1 ], rel[ $1 ] ) >>curr_log; printf( " \n",\ d, r, $1, $2, $3, $2, $3 ) >>curr_log; printf( " \n", $4 ) >>curr_log; print "" >>curr_log; } END { if ( length( curr_day ) ) { # Write the data to the main log file. printf( "%s\n",\ c[ tr_m %2 ], " class=Even", d, r, curr_day, curr_day, " class=Odd", cnt_per_day ); printf( "
    SystemModelOSDetectionLine count
    %s%s %s %s%s %s%s
    %s
    \n" ); } # Finish all the html-files pointing to the changes per day. for ( curr_log in visited ) { print "" >>curr_log; close( curr_log ); } }' b="${bg_color}" \ l="${logo_tag}" \ d="${scc_web_path_dir}" \ r="${realm}" \ s="${STYLE_CSS}" \ f="${FAVICON_ICO}" \ scc-summary.data ${TMP_FILE_1} >>scc-log-index.html # From now on, these files are accessible again by the web server. find . -name "scc-log-*.html" -type f | sed -e '/\/.*\//d' | xargs chown "${new_owner_group}" 2>/dev/null # Record for all systems the date and time of the last detected change on the system. # Combine the general summary-data and the data of the changes. sort -t: -k 2,3r -k 1,1 ${TMP_FILE_1} | awk -F: '/general_data/ { # Format of the input is: "general_data"::::::: printf( "%s:%s:%s:%s:%s:%s:%s:%s\n", $2, $3, $4, $5, $6, $7, last_day[ $2 ], last_time[ $2 ] ); next; } { # Format of the input is: