[PC-BSD Commits] r11974 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Mon Aug 8 10:15:31 PDT 2011
Author: kris
Date: 2011-08-08 10:15:31 -0700 (Mon, 08 Aug 2011)
New Revision: 11974
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
Improve removal of PBIs to ensure we get files which have been set r-- only
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-08-08 17:11:40 UTC (rev 11973)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2011-08-08 17:15:31 UTC (rev 11974)
@@ -3984,11 +3984,18 @@
remove_pbidir() {
if [ -z "${PBI_PROGDIRPATH}" ] ; then return 0 ; fi
if [ ! -d "${PBI_PROGDIRPATH}" ] ; then return 0 ; fi
- chflags -R noschg "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+ if [ "${PBI_PROGDIRPATH}" = "/" ] ; then return 0 ; fi
if [ "$PBI_VERBOSE" = "YES" ] ; then
echo "Removing: ${PBI_PROGDIRPATH}"
fi
- rm -rf "${PBI_PROGDIRPATH}"
+ rm -rf "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+
+ # Do we have leftovers?
+ if [ -d "${PBI_PROGDIRPATH}" ] ; then
+ chflags -R noschg "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+ chmod -R 777 "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+ rm -rf "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+ fi
}
# Remove this PBI registration
More information about the Commits
mailing list