FreeBSDのパッケージメンテナンスをしていたら、isc-dhcpd 4.2が無くなっていることに今頃気が付きました。
なかなかバージョンアップされないな〜と思っていたら、ディレクトリが無くなっていました。
#pkg version -vL= | grep isc isc-dhcp42-server-4.2.8_1 ? orphaned: net/isc-dhcp42-server
/usr/ports/UPDATING を確認してみたものの、dhcpd をどうすればいいのか情報が見つかりません。/usr/ports/net ディレクトリを確認してみると isc-dhcp43-server というのがあり、どうもバージョンアップされたようです。残念ながら isc-dhcp42-server から自動でアップデートされないようです。
通常はUPDATINGで portmaster や portupgrade コマンドによるバージョンアップの方法が紹介されるのですけど、今回は無し。我が家のDHCPDは、グローバルネットとは遮断されているので、今のバージョンのままでもセキュリティーを心配する必要はないのですけど、パッケージ更新チェックやセキュリティーチェック毎にメッセージが表示されるのも嫌なので対策することに決めました。
幸い isc-dhcp server は他のパッケージと依存関係がないようですので、dhcpd.conf だけバックアップしておいて dhcpd 4.2 を削除して 4.3 を再インストールすることにしました。要するに dhcpd を入れ直すことで解決を図ります。
# pkg delete isc-dhcp42-server Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: isc-dhcp42-server-4.2.8_1 The operation will free 4 MiB. Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling isc-dhcp42-server-4.2.8_1... You should stop the dhcpd and dhcpd6 daemons if you are permanently removing this port. ==> You should manually remove the "dhcpd" user. [1/1] Deleting files for isc-dhcp42-server-4.2.8_1: 100%
で、削除完了。
続いて、
# pkg install isc-dhcp43-server
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
isc-dhcp43-server: 4.3.3P1_1
The process will require 4 MiB more space.
937 KiB to be downloaded.
Proceed with this action? [y/N]: y
Fetching isc-dhcp43-server-4.3.3P1_1.txz: 100% 937 KiB 240.0kB/s 00:04
Checking integrity... done (0 conflicting)
[1/1] Installing isc-dhcp43-server-4.3.3P1_1...
===> Creating users and/or groups.
Using existing group 'dhcpd'.
Using existing user 'dhcpd'.
[1/1] Extracting isc-dhcp43-server-4.3.3P1_1: 100%
Message from isc-dhcp43-server-4.3.3P1_1:
**** To setup dhcpd, please edit /usr/local/etc/dhcpd.conf.
**** This port installs the dhcp daemon, but doesn't invoke dhcpd by default.
If you want to invoke dhcpd at startup, add these lines to /etc/rc.conf:
dhcpd_enable="YES" # dhcpd enabled?
dhcpd_flags="-q" # command option(s)
dhcpd_conf="/usr/local/etc/dhcpd.conf" # configuration file
dhcpd_ifaces="" # ethernet interface(s)
dhcpd_withumask="022" # file creation mask
**** If compiled with paranoia support (the default), the following rc.conf
options are also supported:
dhcpd_chuser_enable="YES" # runs w/o privileges?
dhcpd_withuser="dhcpd" # user name to run as
dhcpd_withgroup="dhcpd" # group name to run as
dhcpd_chroot_enable="YES" # runs chrooted?
dhcpd_devfs_enable="YES" # use devfs if available?
dhcpd_rootdir="/var/db/dhcpd" # directory to run in
dhcpd_includedir="" # directory with config-
files to include
**** WARNING: never edit the chrooted or jailed dhcpd.conf file but
/usr/local/etc/dhcpd.conf instead which is always copied where
needed upon startup.
で作業完了。
このあと isc-dhcpd を起動し直し、動作確認。問題無さそうです。