Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/website/static/security/patches/EN-07:05/freebsd-update.patch
18096 views
1
Index: usr.sbin/freebsd-update/freebsd-update.sh
2
===================================================================
3
RCS file: /home/ncvs/src/usr.sbin/freebsd-update/freebsd-update.sh,v
4
retrieving revision 1.2.2.2.2.1
5
diff -u -I__FBSDID -I$FreeBSD -r1.2.2.2.2.1 freebsd-update.sh
6
--- usr.sbin/freebsd-update/freebsd-update.sh 27 Nov 2006 21:27:33 -0000 1.2.2.2.2.1
7
+++ usr.sbin/freebsd-update/freebsd-update.sh 13 Mar 2007 12:56:06 -0000
8
@@ -499,6 +499,24 @@
9
exit 1
10
fi
11
12
+ # Figure out what kernel configuration is running. We start with
13
+ # the output of `uname -i`, and then make the following adjustments:
14
+ # 1. Replace "SMP-GENERIC" with "SMP". Why the SMP kernel config
15
+ # file says "ident SMP-GENERIC", I don't know...
16
+ # 2. If the kernel claims to be GENERIC _and_ ${ARCH} is "amd64"
17
+ # _and_ `sysctl kern.version` contains a line which ends "/SMP", then
18
+ # we're running an SMP kernel. This mis-identification is a bug
19
+ # which was fixed in 6.2-STABLE.
20
+ KERNCONF=`uname -i`
21
+ if [ ${KERNCONF} = "SMP-GENERIC" ]; then
22
+ KERNCONF=SMP
23
+ fi
24
+ if [ ${KERNCONF} = "GENERIC" ] && [ ${ARCH} = "amd64" ]; then
25
+ if sysctl kern.version | grep -qE '/SMP$'; then
26
+ KERNCONF=SMP
27
+ fi
28
+ fi
29
+
30
# Define some paths
31
BSPATCH=/usr/bin/bspatch
32
SHA256=/sbin/sha256
33
@@ -1084,8 +1102,8 @@
34
# /boot/kernel
35
# (or more generally, `sysctl -n kern.bootfile` minus the trailing "/kernel").
36
fetch_filter_kernel_names () {
37
- grep ^/boot/`uname -i` $1 |
38
- sed -e "s,/boot/`uname -i`,${KERNELDIR}," |
39
+ grep ^/boot/${KERNCONF} $1 |
40
+ sed -e "s,/boot/${KERNCONF},${KERNELDIR},g" |
41
sort - $1 > $1.tmp
42
mv $1.tmp $1
43
}
44
45