catalog/INDEX010064400000000000003000000014640775212471700131400ustar00rootsys00000000000000distribution layout_version 1.0 data_model_revision 2.40 uuid 8e2cc15a-0f63-11d8-8eb0-0800095405f7 mod_time 1068018126 create_time 1068018126 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.2.8 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1068018126 create_time 1068018126 machine_type 9000/* 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 406126 revision 1.2.8 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1068018127 create_time 1068018127 state available catalog/dfiles/INDEX010064400000000000003000000003010775212471600143720ustar00rootsys00000000000000distribution layout_version 1.0 data_model_revision 2.40 uuid 8e2cc15a-0f63-11d8-8eb0-0800095405f7 mod_time 1068018126 create_time 1068018126 path_max 255 name_max 100 media sequence_number 1 catalog/dfiles/INFO010064400000000000003000000002120775212471600142570ustar00rootsys00000000000000control_file path INDEX size 193 mode 0444 mtime 1068018126 tag INDEX control_file path INFO size 198 mode 0444 mtime 1068018126 tag INFO catalog/scc-srv/pfiles/INDEX010044400000000000003000000005360775212471600157760ustar00rootsys00000000000000product tag scc-srv data_model_revision 2.40 instance_id 1 control_directory scc-srv revision 1.2.8 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1068018126 create_time 1068018126 machine_type 9000/* os_name HP-UX os_release ?.1?.* directory / all_filesets scc-srv-run is_locatable false catalog/scc-srv/pfiles/INFO010044400000000000003000000002120775212471700156520ustar00rootsys00000000000000control_file path INDEX size 350 mode 0444 mtime 1068018126 tag INDEX control_file path INFO size 198 mode 0444 mtime 1068018127 tag INFO catalog/scc-srv/scc-srv-run/INDEX010044400000000000003000000004250775212471700166740ustar00rootsys00000000000000fileset tag scc-srv-run data_model_revision 2.40 instance_id 1 control_directory scc-srv-run size 406126 revision 1.2.8 title "System Configuration Collector Server" description "System Configuration Collector Server" mod_time 1068018127 create_time 1068018127 state available catalog/scc-srv/scc-srv-run/INFO010044400000000000003000000302100775212471700165530ustar00rootsys00000000000000control_file path INDEX size 277 mode 0444 mtime 1068018127 tag INDEX control_file path INFO size 12482 mode 0444 mtime 1068018127 tag INFO control_file path postinstall size 2541 cksum 187729729 mode 0544 mtime 1068014967 tag postinstall control_file path postremove size 1394 cksum 3475454974 mode 0544 mtime 1068014967 tag postremove control_file path preinstall size 1510 cksum 1057205098 mode 0544 mtime 1068014967 tag preinstall file path /opt type d mode 0755 uid 0 gid 3 owner root group sys 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 2998 cksum 4021253453 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-realm type f size 4128 cksum 2742998111 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-receive-mail type f size 1497 cksum 2300771890 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-smt type f size 11233 cksum 915935664 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-summary type f size 17044 cksum 800038070 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-syscmp type f size 2734 cksum 2860456805 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-transfer type f size 11691 cksum 3263519821 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-update type f size 4887 cksum 1699497905 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc-wrapper.cgi type f size 1570 cksum 908137800 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/bin/scc.cgi type f size 14176 cksum 2537094364 mode 0555 uid 0 gid 3 owner root group sys mtime 1068014967 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 18009 cksum 3111790264 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-4.html type f size 6097 cksum 781750196 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-5.html type f size 6835 cksum 1356568251 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-baseline.html type f size 2957 cksum 295269727 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-collect.html type f size 7608 cksum 1073422600 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-log.html type f size 6782 cksum 2677096677 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-log2html.html type f size 2018 cksum 3889210973 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-plugin.html type f size 2654 cksum 502448658 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-realm.html type f size 6200 cksum 3230186619 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-receive-mail.html type f size 3809 cksum 2320290734 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-smt.html type f size 4223 cksum 3597825883 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-snap2html.html type f size 2059 cksum 3257721496 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-srv-5.html type f size 23942 cksum 3917519549 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-summary.html type f size 3864 cksum 382260530 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-syscmp.html type f size 4431 cksum 3941346138 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-transfer.html type f size 7053 cksum 2454687995 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-update.html type f size 3958 cksum 3662103729 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc-wrapper.cgi.html type f size 1642 cksum 2994753930 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc.cgi.html type f size 2956 cksum 3056939512 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/doc/scc.html type f size 10065 cksum 895412654 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 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 1949 cksum 896013874 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-realm.1 type f size 4667 cksum 935298888 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-receive-mail.1 type f size 2702 cksum 457758703 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-smt.1 type f size 2926 cksum 1117404961 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-summary.1 type f size 2644 cksum 3276167498 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-syscmp.1 type f size 3352 cksum 2892389518 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-transfer.1 type f size 5413 cksum 346274557 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-update.1 type f size 2775 cksum 990243489 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc-wrapper.cgi.1 type f size 872 cksum 2043492569 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /opt/scc-srv/man/man1/scc.cgi.1 type f size 1902 cksum 4208779459 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 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 17954 cksum 3467697780 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt type d mode 0755 uid 0 gid 3 owner root group sys 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 0770 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 191 cksum 2156268241 mode 0444 uid 0 gid 3 owner root group sys mtime 1068014967 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 0711 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/transfer/mail type d mode 0700 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 0700 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/custom/scc-logo.png type f size 23871 cksum 4211410351 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/custom/scc-realm.conf type f size 444 cksum 535337584 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help type d mode 0700 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/data/www/scc-help/index.html type f size 451 cksum 3605619167 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-4.html type f size 6097 cksum 781750196 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-5.html type f size 6835 cksum 1356568251 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-baseline.html type f size 2957 cksum 295269727 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-collect.html type f size 7608 cksum 1073422600 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-compare.html type f size 628 cksum 3139137569 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-log-index.html type f size 578 cksum 3381201718 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-log.html type f size 6782 cksum 2677096677 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-log2html.html type f size 2018 cksum 3889210973 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-plugin.html type f size 2654 cksum 502448658 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-realm-index.html type f size 1735 cksum 1259942908 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-realm.html type f size 6200 cksum 3230186619 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-receive-mail.html type f size 3809 cksum 2320290734 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-search-index.html type f size 1342 cksum 2349177553 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-smt-index.html type f size 660 cksum 3947001044 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-smt.html type f size 4223 cksum 3597825883 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-snap2html.html type f size 2059 cksum 3257721496 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-srv-5.html type f size 23942 cksum 3917519549 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-summary-index.html type f size 568 cksum 3968656903 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-summary.html type f size 3864 cksum 382260530 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-syscmp.html type f size 4431 cksum 3941346138 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-transfer.html type f size 7053 cksum 2454687995 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-update.html type f size 3958 cksum 3662103729 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc-wrapper.cgi.html type f size 1642 cksum 2994753930 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc.cgi.html type f size 2956 cksum 3056939512 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/data/www/scc-help/scc.html type f size 10065 cksum 895412654 mode 0400 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/newconfig type d mode 0770 uid 0 gid 3 owner root group sys file path /var/opt/scc-srv/newconfig/scc-smt-select type f size 1450 cksum 654137889 mode 0440 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/newconfig/scc.conf type f size 575 cksum 2136927712 mode 0440 uid 0 gid 3 owner root group sys mtime 1068014967 file path /var/opt/scc-srv/tmp type d mode 0770 uid 0 gid 3 owner root group sys catalog/scc-srv/scc-srv-run/postinstall010054400000000000003000000047550775211656700204200ustar00rootsys00000000000000#!/bin/sh # Shell script to run after the install of the SCC-SRV software. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.5 $ SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP 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 f in scc.conf scc-smt-select do if [ ! -f ${SCC_CONF}/${f} ] then cp -p ${SCC_NEWCONF}/${f} ${SCC_CONF} fi done cd ${SCC_WWW} if [ ! -f index.html ] then cp -p scc-help/index.html . else rm -f scc-help/index.html 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 -c All else # There is an existing website. Use the settings recorderd in the preinstall to override # the root:root ownerships we have set during the install. if [ -f ${SCC_DATA}/mail_owner_group ] then mail_opt="-m `cat ${SCC_DATA}/mail_owner_group`" fi if [ -f ${SCC_DATA}/web_owner ] then web_opt="-w `cat ${SCC_DATA}/web_owner`" fi rm -f ${SCC_DATA}/mail_owner_group ${SCC_DATA}/web_owner 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 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 exit 0 catalog/scc-srv/scc-srv-run/postremove010054400000000000003000000025620775211656700202410ustar00rootsys00000000000000#!/bin/sh # Shell script to run after the uninstall of the SCC-SRV software. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.2 $ SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP scripts_present=`ls ${SCC_BIN} 2>/dev/null` if [ -n "${scripts_present}" ] 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 catalog/scc-srv/scc-srv-run/preinstall010054400000000000003000000027460775211656700202170ustar00rootsys00000000000000#!/bin/sh # Shell script to run before the install of the SCC-SRV software. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.3 $ SCC_BIN=/opt/scc-srv/bin SCC_TOP=/var/opt/scc-srv export SCC_BIN SCC_TOP 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 rm -f ${SCC_DATA}/mail_owner_group ${SCC_DATA}/web_owner if [ -d ${SCC_DATA}/transfer/mail ] then set dummy `ls -ld ${SCC_DATA}/transfer/mail` echo "${4}:${5}" >${SCC_DATA}/mail_owner_group fi if [ -d "${SCC_WWW}/All" ] then set dummy `ls -ld "${SCC_WWW}/All"` echo "${4}" >${SCC_DATA}/web_owner fi exit 0 scc-srv/scc-srv-run/opt/004075500000000000003000000000003777777777700153345ustar00rootsys00000000000000scc-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-baseline010055500000000000003000000056660775211656700217200ustar00rootsys00000000000000#!/bin/sh # Shell script to extract data with certain classifications from a snapshot. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.26 $ ProgName=${0##*/}; export ProgName 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 umask 077 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 # 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-realm010055500000000000003000000100400775211656700212140ustar00rootsys00000000000000#!/bin/sh # Shell script maintain realms for SCC. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.17 $ ProgName=${0##*/}; export ProgName 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 SYNTAX="Syntax error, use: ${ProgName} [ -a | -d ] [ -c | -r ] " create=0 remove=0 add_sys=0 del_sys=0 sys_list="" while [ $# -gt 1 ] do case "${1}" in -a) sys_list="${2}"; add_sys=1; shift 2;; -c) create=1 shift 1;; -d) sys_list="${2}"; del_sys=1; shift 2;; -r) remove=1 shift 1;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ ${del_sys} -eq 0 -a ${add_sys} -eq 0 -a ${create} -eq 0 -a ${remove} -eq 0 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ ${del_sys} -eq 1 -a ${add_sys} -eq 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi realm="${1}" cd ${SCC_WWW} if [ ${remove} -eq 1 ] then if [ ! -d "${realm}" ] then echo "${ProgName}: attempt to remove non-existent realm '${realm}'" exit 2 else rm -rf "${realm}" exit 0 fi fi if [ ! -d "custom" ] then echo "${ProgName}: example directory 'custom' does not exist" exit 2 fi if [ ${create} -eq 1 ] then if [ -d All ] then example=All else example=custom fi else example="${realm}" fi set dummy $(ls -ld "${example}") 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 [ ${create} -eq 1 ] then if [ -d "${realm}" ] then echo "${ProgName}: realm directory '${realm}' already exists" exit 2 fi mkdir -p "${realm}"/custom mkdir -p "${realm}"/cgi-bin 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 chown -R "${new_owner_group}" "${realm}" fi if [ "${sys_list}" ] then if [ ! -d "${realm}" ] then echo "${ProgName}: realm '${realm}' does not exist, use the -c option" >&2 exit 2 fi cd "${realm}" for sys in $(echo ${sys_list} | tr -s "," " " ) do if [ ${add_sys} -eq 1 ] then 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 touch scc.${sys}.${suffix} else for suffix in cur html log log.html smt.html do rm -f scc.${sys}.${suffix} 2>/dev/null done fi done ${SCC_BIN}/scc-update "${SCC_WWW}/${realm}" fi exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-receive-mail010055500000000000003000000027310775211656700224660ustar00rootsys00000000000000#!/bin/sh # Shell script to receive configuration data for SCC. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.9 $ ProgName=${0##*/}; export ProgName 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-smt010055500000000000003000000257410775211656700207350ustar00rootsys00000000000000#!/bin/sh # Shell script to summarize System Management Tools from snapshots for SCC. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.50 $ ProgName=${0##*/}; export ProgName 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 cd ${SCC_TMP} 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="" while [ $# -gt 1 ] do case "${1}" in -d) if [ "${2}" != "/" ] then scc_web_path="$2" fi shift 2;; *) echo "${SYNTAX}" >&2 exit 1;; esac done if [ $# -ne 1 ] then echo "${SYNTAX}" >&2 exit 1 fi if [ ! -d "${1}" ] then echo "${ProgName}: directory ${1} does not exist" >&2 exit 1 fi cd "${1}" # 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="${SCC_CONF}/scc-smt-select" if [ -f custom/scc-smt-select ] then smt_file="$(pwd)/custom/scc-smt-select" fi realm_dir="$(pwd)" realm_dir="${realm_dir##*/}" # Get the basename of the current dir. bg_color="" if [ -f ./custom/scc-realm.conf ] then bg_color=" bgcolor=\"$(sed -n 's/^BG_COLOR=//p' ./custom/scc-realm.conf)\"" 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). 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 this file. # The contents match the patterns of the next line. # Ignore the contents of this file. next; } /\.cur:fix:software:installed-filesets::/ { # Format of swlist-data is: # "# 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 ); next; } /\.cur:fix:software:installed-packages:/ { # Format of package-data is: # "SUNWcsu:Core:11.6.0,REV=1997.07.15.21.46" 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 file-set data is: # "/usr/lib/objrepos:IMNSearch.rte.httpdlite:2.0.0.1::COMMITTED:I:NetQuestion Web Server" printf( "%s:%s:%s\n", $1, $8, $9 ); next; } /\.cur:fix:software:installed-rpms:/ { # Format of rpm-data is: # "fix:software:installed-rpms:%{GROUP}::%{NAME}:%{VERSION}-%{RELEASE} printf( "%s:%s:%s\n", $1, $7, $8 ); next; }' | sed -e 's@^\./scc\.@smt-data:@' \ -e 's/-CONF-/-/g' \ -e 's/-DATA-/-/g' \ -e 's/-EXEC-/-/g' \ -e 's/\.cur//' | sort -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: '/^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; printf( "System Management Tools: %s\n", $2 ) >>curr_smt; print "" >>curr_smt; printf( "\n", c ) >>curr_smt; printf( "

System Management Tools: %s

\n", $2 ) >>curr_smt; printf( "

Home    ",\ d, r ) >>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; printf( " \n", "Product" ) >>curr_smt; printf( " \n", "Version" ) >>curr_smt; print "" >>curr_smt; close( curr_smt ); 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 "
%s%s
" >>prev; print "" >>prev; print "" >>prev; close( prev ); } prev = curr_smt; print "" >>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; } }' c="${bg_color}" d="${scc_web_path}" l="${logo_tag}" r="${realm_dir}" scc-summary.data ${SMT_VERSIONS} # From now on, these files are accessible again by the webserver. # 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 Management Tools and their versions. rm -f scc-smt-index.html cat >scc-smt-index.html <<-EndOfTxt System Management Tools for ${realm_dir}
${logo_tag}

Home     System Management Tools for ${realm_dir}, last update on: ${now}

EndOfTxt sort -t: -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 ) { printf( "%s %d\n", s, count[ s ] ); } }' | sed -e 's/:/ /' | sort -k 1 -k 2 -k 3n | awk '{ print ""; if ( $1 != prev ) { if ( total > 0 ) { print " "; print " "; print " " print ""; total = 0; print ""; } print " "; prev=$1; } else { print " "; } printf( " \n", $1, $2, $2 ); print " "; total += $3; print ""; } END { if ( total > 0 ) { print ""; print " "; print " "; print " " print ""; } print "
Product Version Count
 total" total "
" $1 "" " " "%s" $3 "
 total" total "
"; }' >>scc-smt-index.html chown "${new_owner_group}" scc-smt-index.html # Build the additional tables for each version of each tool. sort -t: -k 3 -k 4 -k 1 ${SMT_VERSIONS} | awk -F: '{ # Format of SMT_VERSIONS is: #smt-data::: # Format of scc-summary.data is: #general_data::::::
"; print ""; print ""; }' d="${scc_web_path}" r="${realm_dir}" scc-summary.data - >>scc-smt-index.html exit 0 scc-srv/scc-srv-run/opt/scc-srv/bin/scc-summary010055500000000000003000000412240775211656700216210ustar00rootsys00000000000000#!/bin/sh # Shell script to summarize snapshots for SCC. # Copyright (C) 2001-2003 Open Challenge B.V. # # 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, # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Contact information: www.open-challenge.nl/scc/index.html # SCC-release: 1.2.8 # file-version: $Revision: 1.57 $ ProgName=${0##*/}; export ProgName 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 ] [ -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="" force=0; while [ $# -gt 1 ] do case "${1}" in -d) if [ "${2}" != "/" ] then scc_web_path="$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 [ ! -d "${1}" ] then echo "${ProgName}: directory ${1} does not exist" >&2 exit 1 fi now=$(date '+%Y-%m-%d %H:%M:%S') cd "${1}" # 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}" realm_dir="$(pwd)" realm_dir="${realm_dir##*/}" # Get the basename of the current dir. snap_age_limit="" bg_color="" if [ -f ./custom/scc-realm.conf ] then bg_color="$(sed -n '/^BG_COLOR=/p' ./custom/scc-realm.conf)" max_age="$(sed -n 's/MAX_SNAP_AGE=//p' ./custom/scc-realm.conf | sed -e 's/[^0-9]//g')" day=$(date '+%d') month=$(date '+%m') year=$(date '+%Y') if [ "${max_age}" ] then 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} - 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} )) day=$(( ${last_day_prev_month} - ${remainder} )) fi snap_age_limit=$(printf "%04d%02d%02d" ${year} ${month} ${day}) 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 -20 /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\n",\ host, model, os, release, last_d, last_t ); model = ""; 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::OS-name:/ { os = $5; next } /^fix:general::OS-release:/ { release = $5; next } END { if ( length( host ) ) { printf( "general_data:%s:%s:%s:%s:%s:%s\n",\ host, model, os, release, last_d, last_t ); } }' | sort >${TMP_FILE_2} mv -f ${TMP_FILE_2} scc-summary.data chown "${new_owner_group}" scc-summary.data system_cnt=$(wc -l ::::: snap_age=$6; gsub( "-", "", snap_age ); if ( snap_age < l ) { printf( "%s: last run of SCC on %s more than %d days ago: %s\n",\ p, $2, m, $6 ); } }' l="${snap_age_limit}" m="${max_age}" p="${ProgName}" scc-summary.data >&2 fi # The format of the contents of this file is: # head: : 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 logfiles 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,1 -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 webserver 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 # Initialize the main-logfile. rm -f scc-log-index.html cat >scc-log-index.html <<-EndOfTxt Configuration changes for ${realm_dir}
${logo_tag}

Home     Configuration changes for ${realm_dir}, 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 Summary of SCC-data for ${realm_dir}
${logo_tag}

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

Date System count
EndOfTxt awk -F: '/general_data/ { # Get some general system data to add to the logs per day. # Format of the input is: "general_data":::::: if ( NF == 7 ) { model[ $2 ] = $3; os[ $2 ] = $4; rel[ $2 ] = $5; } next; } { # Format of the input is: \n",\ d, r, curr_day, curr_day, 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; # Initialize the logfile for this day print "" >curr_log; print "" >>curr_log; print "Configuration changes for", r, "on", $2, "" >>curr_log; print "" >>curr_log; printf( "\n", c ) >>curr_log; print "
" >>curr_log; printf( "%s\n", d,l ) >>curr_log; print "

" >>curr_log; printf( " Home    \n",d,r) >>curr_log; print " SCC: Changes for", r, "on", $2 >>curr_log; print "

" >>curr_log; printf( "
System Model OS Last run Last change
%s%s
\n", $2) >>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++; print "" >>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-logfile. printf( "\n",\ d, r, curr_day, curr_day, cnt_per_day ); printf( "
SystemModelOSLast changeLine count
%s%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 ); } }' c="${bg_color}" l="${logo_tag}" d="${scc_web_path}" r="${realm_dir}" scc-summary.data ${TMP_FILE_1} >>scc-log-index.html # From now on, these files are accessible again by the webserver. 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: