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-release-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130404201534.gb31...@x230-buxy.home.ouaza.com