[Bug 196257] New: freebsd-update does not use BASEDIR as set by -b in backup_kernel ()
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Dec 24 19:01:37 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196257
Bug ID: 196257
Summary: freebsd-update does not use BASEDIR as set by -b in
backup_kernel ()
Product: Base System
Version: 10.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: manon at manon.de
The followning patch allows the install proicess to complete in BASEDIR, not
shuzre if additional places need to be changeds
[manon at oscar10-host ~]$ diff -ur /usr/sbin/freebsd-update freebsd-update
--- /usr/sbin/freebsd-update 2014-12-13 00:12:36.249505000 +0000
+++ freebsd-update 2014-12-24 18:47:01.000000000 +0000
@@ -2661,23 +2661,25 @@
return 0
fi
+ BASE_BACKUPKERNELDIR="$BASEDIR/$BACKUPKERNELDIR"
+ BASE_KERNELDIR="$BASEDIR/$KERNELDIR"
# Decide which directory name to use for kernel backups.
backup_kernel_finddir
- # Remove old kernel backup files. If $BACKUPKERNELDIR was
+ # Remove old kernel backup files. If $BASE_BACKUPKERNELDIR was
# "not ours", backup_kernel_finddir would have exited, so
# deleting the directory content is as safe as we can make it.
- if [ -d $BACKUPKERNELDIR ]; then
- rm -fr $BACKUPKERNELDIR
+ if [ -d $BASE_BACKUPKERNELDIR ]; then
+ rm -fr $BASE_BACKUPKERNELDIR
fi
# Create directories for backup.
- mkdir -p $BACKUPKERNELDIR
+ mkdir -p $BASE_BACKUPKERNELDIR
mtree -cdn -p "${KERNELDIR}" | \
- mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null
+ mtree -Ue -p "${BASE_BACKUPKERNELDIR}" > /dev/null
# Mark the directory as having been created by freebsd-update.
- touch $BACKUPKERNELDIR/.freebsd-update
+ touch $BASE_BACKUPKERNELDIR/.freebsd-update
if [ $? -ne 0 ]; then
echo "Could not create kernel backup directory"
exit 1
@@ -2695,8 +2697,8 @@
fi
# Backup all the kernel files using hardlinks.
- (cd $KERNELDIR && find . -type f $FINDFILTER -exec \
- cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;)
+ (cd $BASE_KERNELDIR && find . -type f $FINDFILTER -exec \
+ cp -pl '{}' ${BASE_BACKUPKERNELDIR}/'{}' \;)
# Re-enable patchname expansion.
set +f
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list