Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/freebsd-update/freebsd-update.sh
Show First 20 Lines • Show All 680 Lines • ▼ Show 20 Lines | *) | ||||
upgraded by source or upgraded to a RELEASE/RELENG version | upgraded by source or upgraded to a RELEASE/RELENG version | ||||
prior to running `basename $0`. | prior to running `basename $0`. | ||||
Currently running: ${RELNUM} | Currently running: ${RELNUM} | ||||
EOF | EOF | ||||
exit 1 | exit 1 | ||||
;; | ;; | ||||
esac | esac | ||||
case ${ARCH} in | |||||
i386 | amd64) | |||||
emaste: FreeBSD shell style places the cases at the same indentation level as the case statement itself… | |||||
;; | |||||
*) | |||||
echo -n "`basename $0:`" | |||||
cat <<- EOF | |||||
Upgrading from '${ARCH}' is unsupported by `basename $0`. | |||||
Instead, FreeBSD can be directly upgraded by source. | |||||
EOF | |||||
exit 1 | |||||
;; | |||||
esac | |||||
# Figure out what directory contains the running kernel | # Figure out what directory contains the running kernel | ||||
BOOTFILE=`sysctl -n kern.bootfile` | BOOTFILE=`sysctl -n kern.bootfile` | ||||
KERNELDIR=${BOOTFILE%/kernel} | KERNELDIR=${BOOTFILE%/kernel} | ||||
if ! [ -d ${KERNELDIR} ]; then | if ! [ -d ${KERNELDIR} ]; then | ||||
echo "Cannot identify running kernel" | echo "Cannot identify running kernel" | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 2,644 Lines • Show Last 20 Lines |
FreeBSD shell style places the cases at the same indentation level as the case statement itself: