我有一个与Debian Squeeze上的nagios,cacti和nedi监控服务器。 当我尝试通过apt-get来安装syslog-ng时,我看到下面的错误。 我认为rc中的sym-link存在问题。 但我不知道如何解决这个问题。
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: libdbd-mysql libdbd-pgsql libdbd-sqlite3 The following NEW packages will be installed: syslog-ng 0 upgraded, 1 newly installed, 0 to remove and 109 not upgraded. Need to get 0 B/350 kB of archives. After this operation, 705 kB of additional disk space will be used. Selecting previously deselected package syslog-ng. (Reading database ... 39405 files and directories currently installed.) Unpacking syslog-ng (from .../syslog-ng_3.1.3-3_amd64.deb) ... Processing triggers for man-db ... Setting up syslog-ng (3.1.3-3) ... insserv: warning: script 'K02networker' missing LSB tags and overrides insserv: warning: script 'S99nagios' missing LSB tags and overrides insserv: warning: script 'nagios' missing LSB tags and overrides insserv: warning: script 'networker' missing LSB tags and overrides insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true! . . . insserv: Max recursions depth 99 reached insserv: Starting nagios depends on stop-bootlogd-single and therefore on system facility `$all' which can not be true! . . . Stopping system logging: syslog-ng seems to be stopped already Starting system logging: syslog-ng.
那些警告LSB标签丢失,这意味着在服务脚本/etc/init.d/service_name是缺less这样的东西:
### BEGIN INIT INFO # Provides: scriptname # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO
简单的解决方法是删除insserv(在Debian 6.0中取代了update-rc.d):
apt-get remove insserv
或者更好的解决办法是在所有需要的脚本中添加这些缺less的标签。
这里是debian wiki上LSB标签的详细描述: LSBInitScripts
在这个页面上很好地描述了什么是LSB: 基于LSB Init标准的Init脚本