Guy Maor wrote: >"Oliver Elphick" <olly@lfix.co.uk> writes: >
This is in the context of `postrm purge': >> case answer in >> y|Y|YES|yes|Yes) >> rm -rf postgres/data >> ;; > >Should you not add > *) echo "Purge aborted."; exit 1;; > >? Packaging manual: ====================================================================== 6.5 Details of removal and/or configuration purging 1.prerm remove 2.The package's files are removed (except conffiles). 3.postrm remove 4.All the maintainer scripts except the postrm are removed. If we aren't purging the package we stop here. Note that packages which have no postrm and no conffiles are automatically purged when removed, as there is no difference except for the dpkg status. 5.The conffiles and any backup files (~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc.) are removed. 6.postrm purge 7.The package's file list is removed. No attempt is made to unwind after errors during removal. ====================================================================== The only thing left to abort by this stage is the removal of the file list. What's the point? I interpreted the sentence `No attempt is made to unwind after errors during removal.' to mean that exit status is not checked. Is that the case? If I set the exit status to non-zero and stop the purge, it would leave the package in a half-purged state, which doesn't seem to be a good idea. Bear in mind that I am merely concerned with protecting the data files, not the package itself, which can always be re-installed. If I wanted to abort a purge, the place to do it would be in prerm, but that doesn't get called with a `purge' parameter. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Search me, O God, and know my heart; try me, and know my thoughts. And see if there be any wicked way in me, and lead me in the way everlasting." Psalms 139:23,24 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]