Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145030561
D41893.id127471.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
900 B
Referenced Files
None
Subscribers
None
D41893.id127471.diff
View Options
Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -2906,8 +2906,21 @@
sort -k 1,1 -t '|' $1 |
tr '|' ' ' |
while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do
+ if [ -e ${BASEDIR}/${FPATH} ]; then
+ if [ ${TYPE} = d ] && ! [ -d ${BASEDIR}/${FPATH} ]; then
+ rm -f ${BASEDIR}/${FPATH}
+ elif [ ${TYPE} = 'f' || ${TYPE} = 'L' ] && \
+ [ -d ${BASEDIR}/${FPATH} ]; then
+ rm -rf ${BASEDIR}/${FPATH}
+ fi
+ fi
case ${TYPE} in
d)
+ if [ -e ${BASEDIR}/${FPATH} ] && \
+ ! [ -d ${BASEDIR}/${FPATH} ]; then
+ # Exists but not a directory
+ rm -f ${BASEDIR}/${FPATH}
+ fi
# Create a directory
install -d -o ${OWNER} -g ${GROUP} \
-m ${PERM} ${BASEDIR}/${FPATH}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 16, 5:41 AM (1 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28768774
Default Alt Text
D41893.id127471.diff (900 B)
Attached To
Mode
D41893: freebsd-update: handle file->directory change on upgrade
Attached
Detach File
Event Timeline
Log In to Comment