Annotation of openbsd/update_openbsd/update_openbsd, Revision 1.39
1.1 andrew 1: #!/bin/sh
1.39 ! andrew 2: # $AFresh1: update_openbsd,v 1.38 2012/04/19 04:03:47 andrew Exp $
1.7 andrew 3:
1.2 andrew 4: installed_sets() {
1.5 andrew 5: local misc=/usr/share/doc/README
6: local man=/usr/share/man/cat1/intro.0
7: local comp=/usr/bin/cc
8: local game=/usr/games/
9: local xbase=/usr/X11R6/
10: local xetc=/etc/X11/xinit/xinitrc
11: local xfont=/usr/X11R6/lib/X11/fonts
12: local xserv=/usr/X11R6/bin/X
13: local xshare=/usr/X11R6/bin/startx
14:
15: local _c _d _e
16: echo -n base
17: echo -n ' etc'
1.3 andrew 18: for _d in misc man comp game xbase xetc xfont xserv xshare; do
19: eval _e=\$${_d}
20: _c=`ls $_e 2> /dev/null | wc -l`
21: #echo $_c $_d $_e
22: if [ $_c -ne 0 ]; then
1.5 andrew 23: echo -n " $_d"
1.2 andrew 24: fi
25: done
1.19 andrew 26:
1.34 andrew 27: sendmail -d0.1 --badoption </dev/null 2>/dev/null | grep -q SASL
1.19 andrew 28: if [ $? == 0 ]; then
29: echo -n ' sendmail-smtp_auth'
30: fi
1.2 andrew 31: }
1.7 andrew 32:
1.39 ! andrew 33: kernel_file_version() {
! 34: echo exit | config -e $1 | grep -A1 ^OpenBSD
! 35: #what $1 | sed -ne 's/[[:blank:]]\{1,\}//p'
! 36: }
! 37:
1.16 andrew 38: version_in() {
1.10 andrew 39: local _proto=${FTP%%://*}
1.16 andrew 40: local _file
1.10 andrew 41:
42: if [ X"ftp" == X"${_proto}" ]; then
1.16 andrew 43: local _list=`echo "ls base*.tgz" | ${FTP_CMD} ${FTP}/`
44: _file=`echo ${_list} | awk '/base[0-9][0-9].tgz/ { print $9 }'`
1.15 andrew 45:
1.10 andrew 46: elif [ X"http" == X"${_proto}" ]; then
1.16 andrew 47: local _list=`${FTP_CMD} -V -o - ${FTP}/`
48: _file=`echo ${_list} | awk '/[^x]base[0-9][0-9]*\.tgz/ {
1.15 andrew 49: sub("^.*base","base");
50: sub("\.tgz.*",".tgz");
51: print $0;
1.16 andrew 52: }'`
1.15 andrew 53:
54: elif [ X"scp" == X"${_proto}" ]; then
55: echo SCP is not yet supported >&2
56: return 2
57:
1.10 andrew 58: else
59: echo Unsupported FTP ${FTP} >&2
1.12 andrew 60: return 2
1.15 andrew 61:
1.10 andrew 62: fi
1.16 andrew 63:
64: local _v=${_file##*base}
65: _v=${_v%.tgz*}
66: echo $_v
1.10 andrew 67: }
1.2 andrew 68:
69: set_version() {
70: CUR_VER=`uname -r`
1.3 andrew 71: NEW_VER=`dc -e "$CUR_VER 0.1 + p"`
1.5 andrew 72: FILE_VER=""
73: FTP=""
1.2 andrew 74:
1.5 andrew 75: local _cv=`echo $CUR_VER | sed -e 's/\.//'`
76: local _nv=`echo $NEW_VER | sed -e 's/\.//'`
1.9 andrew 77: local _v
1.5 andrew 78:
1.10 andrew 79: if [ X"No" != X"$FORCE_DIR" -a -d $FORCE_DIR ]; then
1.5 andrew 80: _dir=$FORCE_DIR
81: if [ -e ${_dir}/base${_nv}.tgz ]; then
82: _v=$_nv
83: elif [ -e ${_dir}/base${_cv}.tgz ]; then
84: NEW_VER=$CUR_VER
85: _v=$_cv
86: fi
1.2 andrew 87:
1.5 andrew 88: elif [ -d $CUR_VER ]; then
89: _dir=$CUR_VER
1.2 andrew 90: NEW_VER=$CUR_VER
1.5 andrew 91: if [ -e ${_dir}/base${_cv}.tgz ]; then
92: _v=$_cv
93: fi
1.2 andrew 94:
1.5 andrew 95: elif [ -d $NEW_VER ]; then
96: _dir=$NEW_VER
97: if [ -e ${_dir}/base${_nv}.tgz ]; then
98: _v=$_nv
99: fi
1.2 andrew 100:
101: fi
102:
1.17 andrew 103: if [ X"" != X"${MIRROR}" -a X"" == X"${_v}" ]; then
1.10 andrew 104: if [ X"No" == X"${FORCE_DIR}" ]; then
1.5 andrew 105: _dir=${NEW_VER}
106: else
107: _dir=${FORCE_DIR}
108: fi
109: FTP=${MIRROR}/${_dir}/`machine`
1.2 andrew 110:
1.16 andrew 111: _v=`version_in`
1.10 andrew 112:
1.16 andrew 113: if [ X"" == X"${_v}" ]; then
1.10 andrew 114: if [ X"No" != X"$FORCE_DIR" ]; then
115: echo No sets in forced [${FTP}] >&2
1.12 andrew 116: return 2
1.10 andrew 117: fi
118:
119: NEW_VER=$CUR_VER
120: _dir=${NEW_VER}
121: FTP=${MIRROR}/${_dir}/`machine`
122:
1.16 andrew 123: _v=`version_in`
1.9 andrew 124: fi
125:
1.10 andrew 126: if [ X"" == X"${_v}" ]; then
1.16 andrew 127: echo No sets in [${FTP}] >&2
1.12 andrew 128: return 2
1.10 andrew 129: elif [ X"${_cv}" == X"${_v}" ]; then
1.5 andrew 130: NEW_VER=$CUR_VER
1.9 andrew 131: elif [ X"${_nv}" == X"${_v}" ]; then
132: NEW_VER=$NEW_VER
1.2 andrew 133: else
1.10 andrew 134: echo Invalid version [$_v] >&2
1.12 andrew 135: return 2
1.2 andrew 136: fi
137:
1.10 andrew 138: if [ X"No" == X"$FORCE_DIR" ]; then
1.5 andrew 139: _dir=$NEW_VER
1.2 andrew 140: fi
141:
142: fi
143:
1.5 andrew 144: if [ X"" == X"${_v}" ]; then
145: echo ERROR: Unable to determine file version! >&2
1.12 andrew 146: return 1
1.2 andrew 147: fi
148:
1.5 andrew 149: if [ X"" == X"$RELEASEDIR" ]; then
150: RELEASEDIR=`pwd`/$_dir
1.2 andrew 151: fi
1.9 andrew 152:
1.5 andrew 153: FILE_VER=$_v
1.17 andrew 154: if [ X"" != X"${MIRROR}" ]; then
155: FTP=${MIRROR}/${_dir}/`machine`
156: fi
1.39 ! andrew 157:
! 158: BOOT_KERNEL=`( \
! 159: echo bsd; \
! 160: [ -e /boot.conf ] && sed -E '/^ *(set +image|boot) +/!d ; \
! 161: s///; s/^.*://; s/ .*$//' /boot.conf \
! 162: ) | tail -1`
! 163: BOOT_KERNEL="/${BOOT_KERNEL#/}"
! 164: BOOT_KERNEL=`follow_symlink $BOOT_KERNEL`
! 165:
! 166: BOOT_KERNEL_VERSION=`kernel_file_version $BOOT_KERNEL`
! 167:
! 168: BOOTED_KERNEL_VERSION=`sysctl -n kern.version`
! 169: NEW_KERNEL_VERSION=""
! 170:
! 171: # We want to default to what we had
! 172: INSTALL_KERNELS="${BOOT_KERNEL#/}"
! 173: # with a second option of an mp kernel if is is a likely candidate
! 174: if [ X"$INSTALL_KERNELS" != X"bsd.mp" ]; then
! 175: local _ncpu=$(sysctl -n hw.ncpufound)
! 176: [ $_ncpu -gt 1 ] && INSTALL_KERNELS="$INSTALL_KERNELS bsd.mp"
! 177: fi
! 178: # or just bsd otherwise
! 179: if [ X"${INSTALL_KERNELS% *}" != X"bsd" ]; then
! 180: INSTALL_KERNELS="$INSTALL_KERNELS bsd"
! 181: fi
! 182: BOOT_KERNELS=$INSTALL_KERNELS
! 183: INSTALL_KERNELS="$INSTALL_KERNELS bsd.rd"
1.2 andrew 184: }
185:
186: get_sets() {
1.5 andrew 187: echo '### GETTING SETS ###'
1.2 andrew 188: if [ X"" == X"$FTP" ]; then
1.5 andrew 189: echo ERROR: No FTP site set! >&2
1.12 andrew 190: return 1
1.2 andrew 191: fi
192:
1.5 andrew 193: mkdir -p ${RELEASEDIR}
194: cd $RELEASEDIR
1.2 andrew 195:
1.5 andrew 196: local _v=$FILE_VER
1.2 andrew 197:
1.39 ! andrew 198: for _b in $INSTALL_KERNELS; do
1.2 andrew 199: if [ -e /${_b} -a ! -e ./${_b} ]; then
1.3 andrew 200: echo $FTP_CMD ${FTP}/${_b}
201: $FTP_CMD ${FTP}/${_b}
1.2 andrew 202: fi
203: done
204:
1.5 andrew 205: for _s in $INSTALLED_SETS; do
1.19 andrew 206: local _file=${_s}${_v}.tgz
207: if [ ${_s} == sendmail-smtp_auth ]; then
208: _file=${_s}.gz
209: fi
210:
211: if [ ! -e ./${_file} ]; then
212: echo $FTP_CMD ${FTP}/${_file}
213: $FTP_CMD ${FTP}/${_file}
1.5 andrew 214: fi
1.2 andrew 215: done
216:
1.20 andrew 217: local _type
218: for _type in $CHECKSUM_TYPES; do
219: if [ ! -e $_type ]; then
220: echo $FTP_CMD ${FTP}/$_type
221: $FTP_CMD ${FTP}/$_type
222: fi
223: done
1.17 andrew 224: }
225:
1.23 andrew 226: follow_symlink () {
227: local _file=$1
1.33 andrew 228: # This could go circular, but I dunno how to fix that.
229: if [ -h $_file ]; then
230: follow_symlink $( file $_file |
231: grep 'symbolic link' |
232: sed -e s/^.*\\\`// -e s/\\\'\$// )
1.23 andrew 233: else
1.33 andrew 234: echo $_file
1.23 andrew 235: fi
236: }
237:
1.20 andrew 238: check_sum () {
239: local _type=$1
240: echo "### CHECKING $_type SUMS ###"
1.17 andrew 241: cd $RELEASEDIR
242:
1.20 andrew 243: if [ ! -e $_type ]; then
244: echo $_type File does not exist!
1.17 andrew 245: return 1
246: fi
1.6 andrew 247:
1.19 andrew 248: ls bsd* *gz | sed -e 's/\(.*\)/(\1)/' > index
1.20 andrew 249: grep -f index $_type | sum -c
1.2 andrew 250:
251: if [ $? -ne 0 ]; then
1.20 andrew 252: echo ERROR: $_type does not match! >&2
1.12 andrew 253: return 1
1.2 andrew 254: fi
255: }
256:
1.17 andrew 257: check_sets() {
258: echo '### CHECKING SETS ###'
259: cd $RELEASEDIR
260:
1.18 andrew 261: local _missing_sets
1.17 andrew 262: local _v=$FILE_VER
263:
1.39 ! andrew 264: for _n in $INSTALL_KERNELS; do
! 265: local _o=$_n
! 266: [ X"bsd" == X"${_o}" -a -e /bsd.sp ] && _o=bsd.sp
! 267: if [ -e /${_o} -a ! -e ./${_n} ]; then
! 268: echo ${_o} does not exist
! 269: _missing_sets=1
1.17 andrew 270: fi
1.39 ! andrew 271:
! 272: if [ X"${BOOT_KERNEL}" == X"/${_o}" -a -e ./${_n} ]; then
! 273: NEW_KERNEL_VERSION=`kernel_file_version ./${_n}`
1.17 andrew 274: fi
275: done
276:
1.39 ! andrew 277: if [ X"$NEW_KERNEL_VERSION" == X"" ]; then
! 278: echo Missing replacement for boot kernel $BOOT_KERNEL >&2
! 279: _missing_sets=1
! 280: fi
! 281:
1.17 andrew 282: for _s in $INSTALLED_SETS; do
1.19 andrew 283: local _file=${_s}${_v}.tgz
284: if [ ${_s} == sendmail-smtp_auth ]; then
285: _file=${_s}.gz
286: fi
287: if [ ! -e ./${_file} ]; then
288: echo ${_file} does not exist
1.18 andrew 289: _missing_sets=1
1.17 andrew 290: fi
291: done
1.18 andrew 292:
293: if [ X"" == X"${_missing_sets}" ]; then
294: echo All OK
295: fi
1.17 andrew 296:
1.20 andrew 297: local _type
298: for _type in $CHECKSUM_TYPES; do
299: if [ -e $_type ]; then
300: check_sum $_type
301: fi
302: done
1.17 andrew 303: }
304:
305:
1.30 andrew 306: install_kernels() {
1.5 andrew 307: echo '### INSTALLING KERNEL ###'
1.3 andrew 308: if [ X"$USER" != X"root" -a X"$SUDO" == X"" ]; then
1.2 andrew 309: echo ${0##*/} must be run as root or SUDO must be set! >&2
310: exit 1
311: fi
312:
313: if [ X"" == X"$RELEASEDIR" ]; then
1.5 andrew 314: echo ERROR: no source for new kernels! >&2
1.2 andrew 315: exit 1
316: fi
317:
1.39 ! andrew 318: echo "Backing up $BOOT_KERNEL to /obsd"
! 319: $SUDO ln -f $BOOT_KERNEL /obsd
1.2 andrew 320: if [ $? -ne 0 ]; then
1.21 andrew 321: echo "Error copying old kernel!" >&2
1.2 andrew 322: exit 1
323: fi
324:
1.39 ! andrew 325: cd $RELEASEDIR
1.23 andrew 326:
1.39 ! andrew 327: for _b in $INSTALL_KERNELS; do
1.3 andrew 328: $SUDO rm -f /nbsd
1.39 ! andrew 329: local _bd=$_b
! 330: [ X"${_b}" == X"bsd" ] && _bd="bsd.sp"
1.2 andrew 331:
1.39 ! andrew 332: local _is_boot=""
! 333: [ X"$BOOT_KERNEL" == X"/${_bd}" ] && _is_boot="# boot kernel"
! 334:
! 335: echo "Copying $_b to /$_bd $_is_boot"
! 336: $SUDO cp ${_b} /nbsd && $SUDO mv /nbsd /${_bd}
1.2 andrew 337: if [ $? -ne 0 ]; then
1.39 ! andrew 338: echo ERROR: Could not copy new $_bd kernel! >&2
1.2 andrew 339: exit 1
340: fi
1.39 ! andrew 341: done
! 342:
! 343: cd $OLDPWD
1.23 andrew 344:
1.39 ! andrew 345: if [ ! -h /bsd ]; then
! 346: cd /
! 347: for _b in $BOOT_KERNELS; do
! 348: [ X"$_b" == X"bsd" ] && _b="bsd.sp"
! 349: if [ -e $_b ]; then
! 350: echo symlinking $_b to /bsd
! 351: $SUDO ln -sf $_b bsd
! 352: if [ $? -ne 0 ]; then
! 353: echo ERROR: Could not symlink new kernel! >&2
! 354: exit 1
! 355: fi
! 356: break
! 357: fi
! 358: done
! 359: cd $OLDPWD
1.2 andrew 360: fi
361: }
362:
363: install_sets() {
1.5 andrew 364: echo '### INSTALLING SETS ###'
1.3 andrew 365: if [ X"$USER" != X"root" -a X"$SUDO" == X"" ]; then
1.2 andrew 366: echo ${0##*/} must be run as root or SUDO must be set! >&2
367: exit 1
368: fi
369:
370: if [ X"" == X"$RELEASEDIR" ]; then
1.5 andrew 371: echo ERROR: no source for sets! >&2
1.2 andrew 372: exit 1
373: else
374: cd $RELEASEDIR
375: fi
376:
1.5 andrew 377: local _v=$FILE_VER
378:
1.21 andrew 379: if [ $CUR_VER != $NEW_VER -a ! -e /sbin/oreboot ]; then
380: $SUDO cp /sbin/reboot /sbin/oreboot
381: if [ $? -ne 0 ]; then
382: echo "Error copying old reboot command!" >&2
383: exit 1
384: fi
385: echo "/sbin/reboot copied to /sbin/oreboot"
386: fi
387:
388: local _sets=`ls *${_v}.tgz | grep -v ^base `
389: for _f in ${_sets} base${_v}.tgz; do
1.3 andrew 390: _path=$DESTDIR
391: if [ X"etc${_v}.tgz" == X"$_f" \
392: -o X"xetc${_v}.tgz" == X"$_f" ]; then
1.21 andrew 393: [ X"" != X"$SYSMERGE" ] && continue
1.2 andrew 394: _path=/var/tmp/temproot
395: fi
396:
1.3 andrew 397: echo Extracting $_f to $_path
398: $SUDO mkdir -p $_path
399: $SUDO tar -C $_path -xzphf ${RELEASEDIR}/${_f}
1.2 andrew 400: if [ $? -ne 0 ]; then
1.5 andrew 401: echo ERROR: Could not extract ${_f}! >&2
1.2 andrew 402: exit 1
403: fi
404: done
405:
406: echo Extracted all sets.
1.19 andrew 407:
408: if [ -e ${RELEASEDIR}/sendmail-smtp_auth.gz ]; then
409: gzcat ${RELEASEDIR}/sendmail-smtp_auth.gz > \
410: ${RELEASEDIR}/sendmail-smtp_auth
411: fi
412: if [ -e ${RELEASEDIR}/sendmail-smtp_auth ]; then
1.21 andrew 413: if ! pkg_info -qe 'cyrus-sasl-*'; then
414: $SUDO pkg_add -i cyrus-sasl
415: fi
416:
417: $SUDO install -o root -g smmsp -m 2555 \
1.19 andrew 418: ${RELEASEDIR}/sendmail-smtp_auth \
1.21 andrew 419: /usr/libexec/sendmail/sendmail
1.19 andrew 420:
421: echo Installed sendmail with smtp_auth
422: fi
1.2 andrew 423: }
424:
425: update_etc() {
1.5 andrew 426: echo '### UPDATING ETC ###'
1.10 andrew 427: if [ ! -e $SYSMERGE ]; then
428: SYSMERGE=
429: fi
430:
1.3 andrew 431: if [ X"" == X"$SYSMERGE" ]; then
1.2 andrew 432: if [ -e /var/tmp/temproot ]; then
433: MERGEMASTER=`which mergemaster`
434:
435: if [ $? != 0 ]; then
1.3 andrew 436: $SUDO pkg_add -i mergemaster
1.5 andrew 437:
1.2 andrew 438: MERGEMASTER=`which mergemaster`
439: if [ $? != 0 ]; then
440: echo ERROR: mergemaster not installed! >&2
441: exit 1
442: fi
443: fi
444:
445: echo '### RUNNING MERGEMASTER ###'
1.3 andrew 446: $SUDO $MERGEMASTER -irv
1.2 andrew 447: else
448: echo "ERROR: no source for etc!" >&2
449: exit 1
450: fi
451: else
452: if [ X"" == X"$RELEASEDIR" ]; then
453: echo "ERROR: no source for etc!" >&2
454: exit 1
455: else
456: cd $RELEASEDIR
457: fi
458:
1.5 andrew 459: local _v=$FILE_VER
1.30 andrew 460: local _args=""
1.5 andrew 461: if [ -e etc${_v}.tgz ]; then
462: _args="$_args -s etc${_v}.tgz"
1.2 andrew 463: fi
1.5 andrew 464: if [ -e xetc${_v}.tgz ]; then
465: _args="$_args -x xetc${_v}.tgz"
1.2 andrew 466: fi
467: if [ X"" == X"$_args" ]; then
468: echo ERROR: No upgrade sets found! >&2
469: else
470: echo '### RUNNING SYSMERGE ###'
1.27 andrew 471: if sysmerge 2>&1 | grep -- -a >/dev/null; then
472: _args="-a $_args"
473: fi
1.3 andrew 474: $SUDO $SYSMERGE $_args
1.2 andrew 475: fi
476: fi
477: }
1.14 andrew 478:
1.20 andrew 479:
1.14 andrew 480: if [ -e /etc/update_openbsd.conf ]; then
481: . /etc/update_openbsd.conf
482: fi
483:
484: if [ -e ${HOME}/.update_openbsdrc ]; then
485: . ${HOME}/.update_openbsdrc
486: fi
487:
1.17 andrew 488: #MIRROR=${MIRROR:=ftp://ftp.openbsd.org/pub/OpenBSD}
1.14 andrew 489: FTP_CMD=${FTP_CMD:=ftp -V}
490: PKG_PATH=${PKG_PATH:=/usr/ports/packages/`machine`/all/:${MIRROR}/`uname -r`/packages/`machine`/}
491:
492: DESTDIR=${DESTDIR:=/}
493: SYSMERGE=${SYSMERGE:=/usr/sbin/sysmerge}
494: FORCE_DIR=${FORCE_DIR:=No}
495:
496: INSTALLED_SETS=${INSTALLED_SETS:=`installed_sets`}
1.2 andrew 497:
1.21 andrew 498: CHECKSUM_TYPES=${CHECKSUM_TYPES:=SHA256 MD5}
1.20 andrew 499:
1.2 andrew 500: set_version
1.12 andrew 501: local _error=$?
1.2 andrew 502:
503: echo
504: echo "-= update_openbsd - helper script to update OpenBSD =-"
505: echo "------------------------------------------------------"
506: echo
1.39 ! andrew 507: echo " SUDO: $SUDO"
! 508: echo " SYSMERGE: $SYSMERGE"
! 509: echo " MIRROR: $MIRROR"
! 510: echo " RELEASEDIR: $RELEASEDIR"
! 511: echo " DESTDIR: $DESTDIR"
! 512: echo " BOOT_KERNEL: $BOOT_KERNEL"
! 513: echo "INSTALL_KERNELS: $INSTALL_KERNELS"
! 514: echo " INSTALLED_SETS: $INSTALLED_SETS"
1.8 andrew 515: echo
1.39 ! andrew 516: echo " CUR_VER: $CUR_VER"
! 517: echo " NEW_VER: $NEW_VER"
! 518: #echo " FILE_VER: $FILE_VER"
1.2 andrew 519: echo
1.12 andrew 520:
521: if [ ${_error} -ne 0 ]; then
522: exit ${_error}
523: fi
1.2 andrew 524:
1.17 andrew 525: if [ X"" != X"${FTP}" ]; then
1.20 andrew 526: get_sets
1.17 andrew 527: fi
528:
529: check_sets || exit
1.39 ! andrew 530:
! 531: echo "Last booted:\n$BOOTED_KERNEL_VERSION"
! 532: if [ X"$BOOT_KERNEL_VERSION" != X"$BOOTED_KERNEL_VERSION" \
! 533: -a X"$BOOT_KERNEL_VERSION" != X"$NEW_KERNEL_VERSION" ]; then
! 534: echo "Next boot (unless replaced):\n$BOOT_KERNEL_VERSION"
! 535: fi
! 536: if [ -n "$NEW_KERNEL_VERSION" ]; then
! 537: echo "New $BOOT_KERNEL:\n$NEW_KERNEL_VERSION";
! 538: else
! 539: echo "\n!!! WARNING: Will not replace boot kernel $BOOT_KERNEL! !!!\n" >&2
! 540: echo "ctrl+C to cancel, enter to continue anyway" >&2
! 541: local _temp
! 542: read _temp
! 543: fi
1.2 andrew 544:
545: if [ X"" != X"$SUDO" ]; then
546: echo Please enter your sudo password if prompted.
547: echo You may be asked for it again later in the process.
548: $SUDO -v
549: fi
550:
1.30 andrew 551: install_kernels
1.21 andrew 552: install_sets
1.2 andrew 553:
1.5 andrew 554: if [ $CUR_VER == $NEW_VER ]; then
1.21 andrew 555: if [ -e /sbin/oreboot ]; then
556: echo Removing /sbin/oreboot
557: $SUDO rm -f /sbin/oreboot
558: fi
1.2 andrew 559: update_etc
560:
561: echo '### UPDATING PACKAGES ###'
562: $SUDO pkg_add -ui -F update -F updatedepends
563:
564: else
565: echo Instructions for updating to the new version available from
1.36 andrew 566: if [ X"snapshots" == X"$FORCE_DIR" ]; then
1.30 andrew 567: echo " http://www.openbsd.org/faq/current.html"
568: else
569: echo " http://www.openbsd.org/faq/upgrade${FILE_VER}.html"
570: fi
1.2 andrew 571: fi
572:
573: echo New kernel installed. Please reboot!
1.22 andrew 574: if [ -e /sbin/oreboot ]; then
575: echo Possibly using /sbin/oreboot
1.31 andrew 576: fi
577:
578: local _send_dmesg=`dirname $0`/send_dmesg
579: if [ -e "$_send_dmesg" ]; then
1.32 andrew 580: if [ -e $RELEASEDIR/.send_dmesg ]; then
1.31 andrew 581: $_send_dmesg
582: rm -f $RELEASEDIR/.send_dmesg
1.32 andrew 583: elif [ X"$CUR_VER" != X"$NEW_VER" ]; then
1.31 andrew 584: touch $RELEASEDIR/.send_dmesg
585: fi
1.22 andrew 586: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>