From: Antonio Ospite Date: Sun, 1 Mar 2009 17:57:50 +0000 (+0100) Subject: Some fixes. X-Git-Url: https://git.ao2.it/etcdiff.git/commitdiff_plain/0115975ea962c7463b38bbfdd267e843daa6d18b Some fixes. * use bash instead of sh, it is actually a bash script * remove version info in code * show how etcdiffing by package should be used * skip dirs when etcdiffing --- diff --git a/etcdiff.sh b/etcdiff.sh index ea0de33..3a022b6 100755 --- a/etcdiff.sh +++ b/etcdiff.sh @@ -1,6 +1,4 @@ -#!/bin/sh -# -# Version 0.2 +#!/bin/bash # # etcdiff (deb-etcdiff?) shows how your current /etc dir # diverges from the debian distribution standard one. @@ -36,7 +34,7 @@ rm $PROMPT_RM -rf conf && mkdir conf #FILES="/etc/sysctl.conf /etc/init.d/procps /etc/passwd-" # by command -FILES=$(find /etc/apache2 -type f $USERMODE | grep -v '.dpkg-') +#FILES=$(find /etc/apache2 -type f $USERMODE | grep -v '.dpkg-') # by command, public files, limited #USERMODE="-perm /o+r" @@ -44,10 +42,19 @@ FILES=$(find /etc/apache2 -type f $USERMODE | grep -v '.dpkg-') #FILES=$(find /etc/ $MAXDEPTH -type f $USERMODE | grep -v '.dpkg-') # by package name -#FILES=$(dpkg -L apache2.2-common | grep '^/etc') +FILES=$(dpkg -L apache2-doc | grep '^/etc') +FILES+=" " +FILES+=$(dpkg -L apache2.2-common | grep '^/etc') +FILES+=" " +FILES+=$(dpkg -L libapache2-mod-php5 | grep '^/etc') + for file in ${FILES}; do + + # skip dirs, they will be put in the list of files when using 'dpkg -L' + [ -d $file ] && continue + if [ ! -e $file ]; then echo "ERROR, file $file does not exist."