mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
* Handle all flags, not just schg
* Make chflags -R more efficient by deleting everything we can first
This commit is contained in:
parent
74fc979a09
commit
3a33dac41f
1 changed files with 8 additions and 3 deletions
|
|
@ -397,6 +397,12 @@ fi
|
|||
#
|
||||
CVS_ID_TAG=FreeBSD
|
||||
|
||||
delete_temproot () {
|
||||
rm -rf "${TEMPROOT}"
|
||||
chflags -R 0 "${TEMPROOT}"
|
||||
rm -rf "${TEMPROOT}"
|
||||
}
|
||||
|
||||
case "${RERUN}" in
|
||||
'')
|
||||
# Set up the loop to test for the existence of the
|
||||
|
|
@ -425,8 +431,7 @@ case "${RERUN}" in
|
|||
echo ''
|
||||
echo " *** Deleting the old ${TEMPROOT}"
|
||||
echo ''
|
||||
chflags -R noschg "${TEMPROOT}"
|
||||
rm -rf "${TEMPROOT}"
|
||||
delete_temproot || exit 1
|
||||
unset TEST_TEMP_ROOT
|
||||
;;
|
||||
[tT])
|
||||
|
|
@ -848,7 +853,7 @@ case "${AUTO_RUN}" in
|
|||
|
||||
case "${DEL_TEMPROOT}" in
|
||||
[yY]*)
|
||||
if chflags -R noschg "${TEMPROOT}" && rm -rf "${TEMPROOT}"; then
|
||||
if delete_temproot; then
|
||||
echo " *** ${TEMPROOT} has been deleted"
|
||||
else
|
||||
echo " *** Unable to delete ${TEMPROOT}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue