freebsd-update命令在下载后打印更新条目.但它显示了更多.所以我必须按一些空格才能继续.有没有办法避免这种行为?我想以完全自动化的方式执行更新. 在执行任何此操作之前,请确保您
使用以下命令创建文件/usr/local/etc/periodic/weekly/912.freebsd-update:
#!/bin/sh -
#
#
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
case "$weekly_freebsd-update_enable" in
[Yy][Ee][Ss])
echo ""
echo "Updating system via freebsd-update:"
freebsd-update cron install;;
*) rc=0;;
esac
exit $rc
别忘了chmod x 912.freebsd-update
通过在/etc/periodic.conf中添加weekly_freebsd-update_enable =“YES”来启用它
您的正常定期报告将包含操作的日志结果(默认情况下通过电子邮件发送到root).
数字912是任意的,它只是我使用的数字.你可以选择900范围内的任何东西,它应该工作正常.
