Hi,

On Thu, 04 Apr 2013, Gonéri Le Bouder wrote:
>      # remove the configuration file itself
>      rm -f /etc/fusioninventory/agent.cfg
> -    rm -r /etc/fusioninventory
> +    [ -d /etc/fusioninventory ] && rmdir --ignore-fail-on-non-empty 
> /etc/fusioninventory

AFAIK, this is not better since when /etc/fusioninventory doesn't exist
the first test fails and with set -e your script ends in error.

[ ! -d /etc/fusioninventory ] || rmdir --ignore-fail-on-non-empty 
/etc/fusioninventory

would be the correct thing to do (or use a proper "if" construct)

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Get the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to