"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "software/opt/scc-srv/bin/scc-transfer" between
scc-srv-1.20.30.src.tar.gz and scc-srv-1.20.32.src.tar.gz

About: SCC (System Configuration Collector) server generates summaries of scc-data sent by clients (offers a Web interface).

scc-transfer  (scc-srv-1.20.30.src):scc-transfer  (scc-srv-1.20.32.src)
skipping to change at line 26 skipping to change at line 26
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. # along with this program; see the file COPYING.
# If not, write to the Free Software Foundation, # If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# #
# Contact information: https://sourceforge.net/projects/sysconfcollect/support # Contact information: https://sourceforge.net/projects/sysconfcollect/support
# SCC-release: 1.20.30 # SCC-release: 1.20.32
# ID: $Id: scc-transfer 6217 2019-03-22 18:46:12Z siemkorteweg $ # ID: $Id: scc-transfer 6312 2020-04-25 17:41:57Z siemkorteweg $
ProgName=${0##*/}; export ProgName ProgName=${0##*/}; export ProgName
set -u set -u
export SCC_BIN=/opt/scc-srv/bin export SCC_BIN=/opt/scc-srv/bin
export SCC_CONF=/var/opt/scc-srv/conf export SCC_CONF=/var/opt/scc-srv/conf
export SCC_DATA=/var/opt/scc-srv/data export SCC_DATA=/var/opt/scc-srv/data
export SCC_TMP=/tmp export SCC_TMP=/tmp
skipping to change at line 496 skipping to change at line 496
elif [ -x /usr/bin/chcon ] elif [ -x /usr/bin/chcon ]
then then
( cd "${SCC_DEST}"; /usr/bin/chcon --reference="${SCC_DEST}" ${co ntents} 2>/dev/null ) ( cd "${SCC_DEST}"; /usr/bin/chcon --reference="${SCC_DEST}" ${co ntents} 2>/dev/null )
fi fi
scc_msg INFO "${ProgName}: received data from ${scc_host}" scc_msg INFO "${ProgName}: received data from ${scc_host}"
return 0 return 0
} }
SYNTAX="Syntax error, use: ${ProgName} [ -m|--minimal ] [ -u|--unpacked <host> ] [ -e|--encrypted ] [ -l|--log <log> ] [ -s|--source <src_dir> ] [ <dest_dir> ]" SYNTAX="Syntax error, use: ${ProgName} [ -m|--minimal ] [ -u|--unpacked <host> ] [ -e|--encrypted ] [ -l|--log <log> ] [ -L|--label <label> ] [ -s|--source <src _dir> ] [ <dest_dir> ]"
MISSING_OPT_ARG="${ProgName}: Syntax error, missing argument for option:" MISSING_OPT_ARG="${ProgName}: Syntax error, missing argument for option:"
logfile=${SCC_LOG}/scc-transfer.log logfile=${SCC_LOG}/scc-transfer.log
label=""
decrypt_content=0 decrypt_content=0
minimal="" minimal=""
unpacked_host="" unpacked_host=""
while [ $# -gt 0 ] while [ $# -gt 0 ]
do do
case "${1}" in case "${1}" in
-m|--minimal) minimal="yes" -m|--minimal) minimal="yes"
shift 1;; shift 1;;
-u|--unpacked) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1 -u|--unpacked) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1
skipping to change at line 521 skipping to change at line 522
shift 2;; shift 2;;
-e|--encrypted) decrypt_content=1 -e|--encrypted) decrypt_content=1
shift 1;; shift 1;;
-l|--log) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1 -l|--log) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1
logfile=$2 logfile=$2
touch ${logfile} # when log file is specified, mak e sure that it exist to start logging touch ${logfile} # when log file is specified, mak e sure that it exist to start logging
shift 2;; shift 2;;
-L|--label) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 &&
exit 1
label="$(echo "${2}" | sed -e 's/[^a-zA-Z0-9_-]//g')"
# same restrictions as in scc-log
shift 2;;
-s|--source) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1 -s|--source) [ -z "${2:-}" ] && echo "${MISSING_OPT_ARG}: ${1}" >&2 && exit 1
SCC_SRC="${2}" SCC_SRC="${2}"
shift 2;; shift 2;;
-*) scc_msg SYNTAX "${SYNTAX}";; -*) scc_msg SYNTAX "${SYNTAX}";;
*) break;; *) break;;
esac esac
done done
skipping to change at line 603 skipping to change at line 608
d_n="" d_n=""
fi fi
now_date="$(date '+%Y-%m-%d')" now_date="$(date '+%Y-%m-%d')"
now_time="$(date '+%H.%M.%S')" now_time="$(date '+%H.%M.%S')"
{ {
echo "fix:general::hostname:${h_n}" echo "fix:general::hostname:${h_n}"
echo "fix:general::domain:${d_n}" echo "fix:general::domain:${d_n}"
echo "var:general::date:${now_date}" echo "var:general::date:${now_date}"
echo "var:general::start time:${now_time}" echo "var:general::start time:${now_time}"
if [ "${label}" ]
then
echo "fix:general::label:${label}"
fi
} >scc.${h_n}.cur } >scc.${h_n}.cur
echo "${now_date}:${now_time}:result::(re)start" > scc.${ h_n}.log echo "${now_date}:${now_time}:result::(re)start" > scc.${ h_n}.log
for file in scc.${h_n}.html scc.${h_n}.log.html for file in scc.${h_n}.html scc.${h_n}.log.html
do do
cat >${file} <<-EndOfTxt cat >${file} <<-EndOfTxt
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <head> <title>empty placeholder</title> </ head> <body> <p>placeholder</p> </body> </html> <html> <head> <title>empty placeholder</title> </ head> <body> <p>placeholder</p> </body> </html>
EndOfTxt EndOfTxt
done done
 End of changes. 5 change blocks. 
3 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)