Package: aide-common Version: 0.15.1-8 Severity: normal 1) Doesn't exclude template.d in /etc/amanda if one is using the templating system. This results in configs from the template being included, with bad effects 2) Something in the sample templates from amanda produces syntax errors in the autogenerated aide config file. It appears that for some reason host is blank and dev has the hash (#) and host (e.g. ("#host")) 3) Alternatively the error could be due to a line with only a hash (#) and maybe whitespace 4) amgetconf changerfile returns "changer" (sans quotes) if there is no changerfile defined, which confuses the 31_aide-amanda-server script and results in a line with a syntax error (define with not /)
Here is what I have a work around: #!/bin/bash if ! [ -d /etc/amanda ]; then exit 0 fi for configfile in $(find /etc/amanda -name amanda.conf ! -path '/etc/amanda/template.d*'); do config="$(dirname $configfile)" cd $config CONF="${config##*/}" AMANDA_TAPEDEV="$(amgetconf $CONF tapedev)" AMANDA_TAPEDEV="${AMANDA_TAPEDEV#file:}" if [ -d "$AMANDA_TAPEDEV" ]; then echo "@@define AMANDA_TAPEDEV $AMANDA_TAPEDEV" for slot in $(find $AMANDA_TAPEDEV -type d -regex '.*/slot[0-9]+' -printf "%P\n"); do if [ -f "disklist" ]; then while read host dev rest; do if echo $host | grep -q '^\(#.*\)\?$'; then continue; fi dev="$(echo $dev | sed 's|/|_|g')" echo "!@@{AMANDA_TAPEDEV}/$slot/[0-9]{5}[-\.]$host\.$dev\.[0123]$" done < disklist fi cat <<EOF @@{AMANDA_TAPEDEV}/$slot/00000[-\.]$CONF-$(printf "%03d" ${slot#slot})$ VarFile !@@{AMANDA_TAPEDEV}/$slot/[0-9]{5}[-\.]TAPEEND$ @@{AMANDA_TAPEDEV}/$slot$ VarDir EOF done cat <<EOF @@{AMANDA_TAPEDEV}/(data|info)$ VarFile @@{AMANDA_TAPEDEV}$ VarDir EOF fi AMANDA_LOGDIR="$(amgetconf $CONF logdir)" if [ -n "$AMANDA_LOGDIR" ]; then cat <<EOF @@define AMANDA_LOGDIR $AMANDA_LOGDIR @@{AMANDA_LOGDIR}/log\.@@{YEAR4D}[0-9]{4}\.0$ LowDELog @@{AMANDA_LOGDIR}/oldlog/log\.@@{YEAR4D}[0-9]{4}\.0$ SerMemberDELog @@{AMANDA_LOGDIR}/amdump\.1$ LoSerMemberLog @@{AMANDA_LOGDIR}/amdump\.[2-8]$ SerMemberLog @@{AMANDA_LOGDIR}/amdump\.9$ HiSerMemberLog @@{AMANDA_LOGDIR}(/oldlog)?$ VarDir EOF fi AMANDA_INDEXDIR="$(amgetconf $CONF indexdir)" if [ -n "$AMANDA_INDEXDIR" ]; then echo "@@define AMANDA_INDEXDIR $AMANDA_INDEXDIR" if [ -f "disklist" ]; then while read host dev rest; do if echo $host | grep -q '^\(#.*\)\?$'; then continue; fi dev="$(echo $dev | sed 's|/|_|g')" echo "!@@{AMANDA_INDEXDIR}/$host/$dev/@@{YEAR4D}[0-9]{4}_[0123]\.gz$" echo "@@{AMANDA_INDEXDIR}/$host/$dev$ VarDir" done < disklist fi fi AMANDA_CHANGERFILE="$(amgetconf $CONF changerfile)" AMANDA_CHANGERDIR="${AMANDA_CHANGERFILE%changer}" if [ -n "$AMANDA_CHANGERDIR" ]; then echo "@@define AMANDA_CHANGERDIR $AMANDA_CHANGERDIR" echo "@@{AMANDA_CHANGERDIR}/(changer-(access|clean|slot)|tapelist(\.yesterday)?)$ VarFile" echo "@@{AMANDA_CHANGERDIR}$ VarDir" fi AMANDA_INFOFILE="$(amgetconf $CONF infofile)" if [ -n "$AMANDA_INFOFILE" ]; then echo "@@define AMANDA_INFOFILE $AMANDA_INFOFILE" if [ -f "disklist" ]; then while read host dev rest; do if echo $host | grep -q '^#.*$'; then continue; fi dev="$(echo $dev | sed 's|/|_|g')" echo "@@{AMANDA_INFOFILE}/$host/$dev/info$ VarFile" echo "@@{AMANDA_INFOFILE}/$host/$dev$ VarDir" done < disklist fi fi # this is hardcoded since amgetconf refuses to deliver diskdir AMANDA_HOLDING="/srv/amanda/holding" if [ -n "$AMANDA_HOLDING" ]; then echo "$AMANDA_HOLDING$ VarDir" fi echo "@@define AMANDALOG /var/log/amanda/server/$CONF" cat <<EOF !@@{AMANDALOG}/(amcheck|amlogroll|amreport|amtrm(idx|log)|chunker|driver|dumper|planner|taper)\.@@{YEAR4D}[0-9]{10}\.debug$ !@@{AMANDALOG}/(chunker|dumper)\.@@{YEAR4D}[0-9]{13}\.debug$ @@{AMANDALOG}$ VarDir /var/log/amanda/server$ VarDir EOF done cat <<EOF @@define AMANDALOG /var/log/amanda/amandad !@@{AMANDALOG}/(amandad)\.@@{YEAR4D}[0-9]{10}\.debug$ @@{AMANDALOG}$ VarDir /tmp/amanda$ VarDir EOF #cat <<EOF #!@@{AMANDATMP}/(amandad|amcheck|amtrm(idx|log)|killpgrp|selfcheck|sendbackup|sendsize)\.@@{YEAR4D}[0-9]{10}\.debug$ #@@{AMANDATMP}$ RamdiskData-Size #/var/lib/dumpdates$ VarFile #EOF Regards, Daniel -- System Information: Debian Release: 7.0 APT prefers stable-updates APT policy: (990, 'stable-updates'), (990, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages aide-common depends on: ii aide 0.15.1-8 ii bsd-mailx [mailx] 8.1.2-0.20111106cvs-1 ii debconf [debconf-2.0] 1.5.49 ii initscripts 2.88dsf-41 ii liblockfile1 1.09-5 ii ucf 3.0025+nmu3 Versions of packages aide-common recommends: ii cron 3.0pl1-124 aide-common suggests no packages. -- debconf information: * aide/aideinit: false * aideinit/copynew: true aideinit/overwritenew: true aide/newlibdir: false -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org