projects
/
etcdiff.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some fixes.
[etcdiff.git]
/
etcdiff.sh
diff --git
a/etcdiff.sh
b/etcdiff.sh
index
ea0de33
..
3a022b6
100755
(executable)
--- 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.
#
# 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="/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"
# 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=$(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
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."
if [ ! -e $file ];
then
echo "ERROR, file $file does not exist."