修改源

备份

cp  /usr/local/etc/pkg/repos/local.conf  /usr/local/etc/pkg/repos/local.conf.bak
cp /usr/local/etc/pkg/repos/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf.bak
cp /etc/pkg/FreeBSD.conf /etc/pkg/FreeBSD.conf.bak

打开在线源开关

sed -i '' 's/enabled: yes/enabled: no/' /usr/local/etc/pkg/repos/local.conf
sed -i '' 's/enabled: no/enabled: yes/' /usr/local/etc/pkg/repos/FreeBSD.conf

修改/etc/pkg/FreeBSD.conf,改成中科大源

FreeBSD: {
  url: "pkg+http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

更新

pkg update

参考

https://bigdata.bihell.com/tools/liqi/freenas.html#