* Peter Samuelson ([EMAIL PROTECTED]) [061111 23:07]: > > [Andreas Barth] > > I propose to change this check > > if [ ! -L /etc/apache2/sites-enabled/000-default -a \ > > ! -f /etc/apache2/sites-enabled/000-default ]; then > > ln -s /etc/apache2/sites-available/default > > /etc/apache2/sites-enabled/000-default > > fi > > to > > if [ ! -L /etc/apache2/sites-enabled/000-default -a \ > > ! -f /etc/apache2/sites-enabled/000-default -a] && \ > ^^^typo > > [ $(find /etc/apache2/sites-enabled/ -mindepth 1 -type f -o > > -type l | wc -l) -eq 0 ]; then > > ln -s /etc/apache2/sites-available/default > > /etc/apache2/sites-enabled/000-default > > fi > > I don't understand the need for -mindepth since it we're specifically > looking for "-type f -o -type l". Anyway, I'll stare at it a bit and > do something similar to what you propose.
I'm not too sure if -mindepth is required as well, but I'm quite confident it doesn't hurt. I stole the find from one of my shell scripts which had -mindepth and -maxdepth. Cheers, Andi -- http://home.arcor.de/andreas-barth/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

