Update FreeBSD with freebsd-update

After fresh install freebsd 4.11 in old machine I need to update it right away since many security advisories. Quick way to do that using freebsd-update :

Installing freebsd-update

dns# whereis freebsd-update
freebsd-update: /usr/ports/security/freebsd-update
dns# cd /usr/ports/security/freebsd-update/
dns# make install

===> Vulnerability check disabled, database not found
=> freebsd-update-1.6.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.daemonology.net/freebsd-update/.
freebsd-update-1.6.tar.gz 100% of 30 kB 6810 Bps
Configuration

dns# cp /usr/local/etc/freebsd-update.conf.sample /usr/local/etc/freebsd-update.conf

Running

dns# rehash

dns# freebsd-update

usage: freebsd-update [options] command [URL]

Options:
-b basedir — Set the base directory to basedir (default: /)
–branch bname — Force updates to be downloaded from the bname
distribution branch, even if files have been
locally modified.
-d workdir — Store working files in workdir
(default: /usr/local/freebsd-update/)
-f conffile — Read configuration options from conffile
(default: /usr/local/etc/freebsd-update.conf)
-k KEY — Expect an RSA key with MD5 hash KEY.
-q | -v — Quiet / Verbose.
URL — Fetch updates from given URL.
Commands:
fetch — Fetch updates from server
cron — Sleep rand(3600) seconds, fetch updates, and send an
email to root if updates were found.
install — Install downloaded updates
rollback — Uninstall most recently installed updates
IDS — For every file which is installed as part of a
binary RELEASE install, compare against a signed
index of “known good” files.

dns# freebsd-update fetch

Fetching public key…
Fetching updates signature…
Fetching updates…
Fetching hash list signature…
Fetching hash list…
Examining local system…
Fetching updates…
/bin/rcp…
/bin/rmail…
/etc/ssh/ssh_config…
/etc/ssh/sshd_config…
/kernel…
/kernel.GENERIC…
/modules/firewire.ko…
/modules/iir.ko…
/modules/nfs.ko…
/modules/smbfs.ko…
/modules/sppp.ko…
/sbin/dump…
/sbin/rdump…
/sbin/restore…
/sbin/rrestore…
/usr/bin/bunzip2…
/usr/bin/bzcat…
/usr/bin/bzip2…
/usr/bin/cpio…
/usr/bin/cvs…
/usr/bin/cvsbug…
/usr/bin/edit…
/usr/bin/ee…
/usr/bin/gunzip…
/usr/bin/gzcat…
/usr/bin/gzip…
/usr/bin/openssl…
/usr/bin/opiepasswd…
/usr/bin/ree…
/usr/bin/scp…
/usr/bin/sftp…
/usr/bin/ssh-agent…
/usr/bin/tar…
/usr/bin/telnet…
/usr/bin/texindex…
/usr/bin/vacation…
/usr/bin/zcat…
/usr/include/machine/cpufunc.h…
/usr/include/netinet/tcp_seq.h…
/usr/include/openssl/dh.h…
/usr/include/openssl/dsa.h…
/usr/include/openssl/rsa.h…
/usr/lib/libbz2.a…
/usr/lib/libbz2.so.1…
/usr/lib/libbz2_p.a…
/usr/lib/libcrypto.a…
/usr/lib/libcrypto.so.3…
/usr/lib/libcrypto_p.a…
/usr/lib/libmilter.a…
/usr/lib/libmilter.so.2…
/usr/lib/libmilter_p.a…
/usr/lib/libssh.a…
/usr/lib/libssh.so.2…
/usr/lib/libssh_p.a…
/usr/lib/libssl.a…
/usr/lib/libssl.so.3…
/usr/lib/libssl_p.a…
/usr/lib/libstand.a…
/usr/libdata/perl/5.00503/mach/netinet/tcp_seq.ph…
/usr/libexec/mail.local…
/usr/libexec/sendmail/sendmail…
/usr/libexec/smrsh…
/usr/sbin/editmap…
/usr/sbin/mailstats…
/usr/sbin/makemap…
/usr/sbin/praliases…
/usr/sbin/sshd…
/usr/share/man/man1/cpio.1.gz…
/usr/share/man/man5/ssh_config.5.gz…
/usr/share/man/man5/sshd_config.5.gz…
Updates fetched

To install these updates, run: ‘/usr/local/sbin/freebsd-update install’

Don’t forget to rebuild any statically linked ports
to use the updated libraries after you install them.

Install Update

dns# /usr/local/sbin/freebsd-update install
Backing up /bin/rcp…
Installing new /bin/rcp…
Backing up /bin/rmail…
Installing new /bin/rmail…
Backing up /etc/ssh/ssh_config…
Installing new /etc/ssh/ssh_config…
Backing up /etc/ssh/sshd_config…
Installing new /etc/ssh/sshd_config…
Backing up /kernel…
Installing new /kernel…
Backing up /kernel.GENERIC…
Installing new /kernel.GENERIC…
Backing up /modules/firewire.ko…
Installing new /modules/firewire.ko…
Backing up /modules/iir.ko…
Installing new /modules/iir.ko…
Backing up /modules/nfs.ko…
Installing new /modules/nfs.ko…
Backing up /modules/smbfs.ko…
Installing new /modules/smbfs.ko…
Backing up /modules/sppp.ko…
Installing new /modules/sppp.ko…
Backing up /sbin/dump…
Installing new /sbin/dump…
Backing up /sbin/rdump…
Recreating hard link from /sbin/dump to /sbin/rdump…
Backing up /sbin/restore…
Installing new /sbin/restore…
Backing up /sbin/rrestore…
Recreating hard link from /sbin/restore to /sbin/rrestore…
Backing up /usr/bin/bunzip2…
Installing new /usr/bin/bunzip2…
Backing up /usr/bin/bzcat…
Recreating hard link from /usr/bin/bunzip2 to /usr/bin/bzcat…
Backing up /usr/bin/bzip2…
Recreating hard link from /usr/bin/bunzip2 to /usr/bin/bzip2…
Backing up /usr/bin/cpio…
Installing new /usr/bin/cpio…
Backing up /usr/bin/cvs…
Installing new /usr/bin/cvs…
Backing up /usr/bin/cvsbug…
Installing new /usr/bin/cvsbug…
Backing up /usr/bin/edit…
Installing new /usr/bin/edit…
Backing up /usr/bin/ee…
Recreating hard link from /usr/bin/edit to /usr/bin/ee…
Backing up /usr/bin/ree…
Recreating hard link from /usr/bin/edit to /usr/bin/ree…
Backing up /usr/bin/gunzip…
Installing new /usr/bin/gunzip…
Backing up /usr/bin/gzcat…
Recreating hard link from /usr/bin/gunzip to /usr/bin/gzcat…
Backing up /usr/bin/gzip…
Recreating hard link from /usr/bin/gunzip to /usr/bin/gzip…
Backing up /usr/bin/zcat…
Recreating hard link from /usr/bin/gunzip to /usr/bin/zcat…
Backing up /usr/bin/openssl…
Installing new /usr/bin/openssl…
Backing up /usr/bin/opiepasswd…
Installing new /usr/bin/opiepasswd…
Backing up /usr/bin/scp…
Installing new /usr/bin/scp…
Backing up /usr/bin/sftp…
Installing new /usr/bin/sftp…
Backing up /usr/bin/ssh-agent…
Installing new /usr/bin/ssh-agent…
Backing up /usr/bin/tar…
Installing new /usr/bin/tar…
Backing up /usr/bin/telnet…
Installing new /usr/bin/telnet…
Backing up /usr/bin/texindex…
Installing new /usr/bin/texindex…
Backing up /usr/bin/vacation…
Installing new /usr/bin/vacation…
Backing up /usr/include/machine/cpufunc.h…
Installing new /usr/include/machine/cpufunc.h…
Backing up /usr/include/netinet/tcp_seq.h…
Installing new /usr/include/netinet/tcp_seq.h…
Backing up /usr/include/openssl/dh.h…
Installing new /usr/include/openssl/dh.h…
Backing up /usr/include/openssl/dsa.h…
Installing new /usr/include/openssl/dsa.h…
Backing up /usr/include/openssl/rsa.h…
Installing new /usr/include/openssl/rsa.h…
Backing up /usr/lib/libbz2.a…
Installing new /usr/lib/libbz2.a…
Backing up /usr/lib/libbz2.so.1…
Installing new /usr/lib/libbz2.so.1…
Backing up /usr/lib/libbz2_p.a…
Installing new /usr/lib/libbz2_p.a…
Backing up /usr/lib/libcrypto.a…
Installing new /usr/lib/libcrypto.a…
Backing up /usr/lib/libcrypto.so.3…
Installing new /usr/lib/libcrypto.so.3…
Backing up /usr/lib/libcrypto_p.a…
Installing new /usr/lib/libcrypto_p.a…
Backing up /usr/lib/libmilter.a…
Installing new /usr/lib/libmilter.a…
Backing up /usr/lib/libmilter.so.2…
Installing new /usr/lib/libmilter.so.2…
Backing up /usr/lib/libmilter_p.a…
Installing new /usr/lib/libmilter_p.a…
Backing up /usr/lib/libssh.a…
Installing new /usr/lib/libssh.a…
Backing up /usr/lib/libssh.so.2…
Installing new /usr/lib/libssh.so.2…
Backing up /usr/lib/libssh_p.a…
Installing new /usr/lib/libssh_p.a…
Backing up /usr/lib/libssl.a…
Installing new /usr/lib/libssl.a…
Backing up /usr/lib/libssl.so.3…
Installing new /usr/lib/libssl.so.3…
Backing up /usr/lib/libssl_p.a…
Installing new /usr/lib/libssl_p.a…
Backing up /usr/lib/libstand.a…
Installing new /usr/lib/libstand.a…
Backing up /usr/libdata/perl/5.00503/mach/netinet/tcp_seq.ph…
Installing new /usr/libdata/perl/5.00503/mach/netinet/tcp_seq.ph…
Backing up /usr/libexec/mail.local…
Installing new /usr/libexec/mail.local…
Backing up /usr/libexec/sendmail/sendmail…
Installing new /usr/libexec/sendmail/sendmail…
Backing up /usr/libexec/smrsh…
Installing new /usr/libexec/smrsh…
Backing up /usr/sbin/editmap…
Installing new /usr/sbin/editmap…
Backing up /usr/sbin/mailstats…
Installing new /usr/sbin/mailstats…
Backing up /usr/sbin/makemap…
Installing new /usr/sbin/makemap…
Backing up /usr/sbin/praliases…
Installing new /usr/sbin/praliases…
Backing up /usr/sbin/sshd…
Installing new /usr/sbin/sshd…
Backing up /usr/share/man/man1/cpio.1.gz…
Installing new /usr/share/man/man1/cpio.1.gz…
Backing up /usr/share/man/man5/ssh_config.5.gz…
Installing new /usr/share/man/man5/ssh_config.5.gz…
Backing up /usr/share/man/man5/sshd_config.5.gz…
Installing new /usr/share/man/man5/sshd_config.5.gz…
Before Update :

dns# uname -a

FreeBSD dns.rasyid.net 4.11-RELEASE FreeBSD 4.11-RELEASE #0: Fri Jan 21 17:21:22 GMT 2005 [email protected]:/usr/obj/usr/src/sys/GENERIC i386

dns# reboot

After Update :

$ uname -a

FreeBSD dns.rasyid.net 4.11-SECURITY FreeBSD 4.11-SECURITY #0: Mon Dec 4 00:19:59 GMT 2006 [email protected]:/usr/obj/usr/src/sys/GENERIC i386