Debian Squeeze vzquota

显然,我得到了Debian Squeeze(Debian 6),使用debootstrap和chroot在VPS上工作。
随后安装的harden,exim4,mysql-server软件包部分失败。

相关信息:

insserv: warning: script 'S10vzquota' missing LSB tags and overrides insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/S00vzreboot insserv: warning: script 'vzquota' missing LSB tags and overrides insserv: There is a loop between service vzquota and stop-bootlogd if started insserv: loop involving service stop-bootlogd at depth 2 insserv: loop involving service vzquota at depth 1 insserv: loop involving service rsyslog at depth 1 insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true! insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true! insserv: There is a loop between service vzquota and stop-bootlogd if started insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true! insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true! insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header dpkg: error processing exim4-base (--configure): subprocess installed post-installation script returned error exit status 1 

有什么build议么?

关键字:vzquota debian squeeze安装vps,虚拟专用服务器。

我检查了vzquota ,发现它不符合Debian 6.0标准(init脚本) – 很自然,因为提供者当时只支持5.0。

在我修复之前:

 #!/bin/sh start() { [ -e "/dev/vzfs" ] || mknod /dev/vzfs b 0 115 rm -f /etc/mtab >/dev/null 2>&1 echo "/dev/vzfs / reiserfs rw,usrquota,grpquota 0 0" > /etc/mtab mnt=`grep -v " / " /proc/mounts` if [ $? == 0 ]; then echo "$mnt" >> /etc/mtab fi } case "$1" in start) start ;; *) exit esac 

我在/etc/init.d/vzquota前面添加了以下部分(不要忘记删除第二个shabang行):

 #!/bin/sh ### BEGIN INIT INFO # Provides: vzquota # Required-Start: # Required-Stop: # Should-Start: $local_fs $syslog # Should-Stop: $local_fs $syslog # Default-Start: 0 1 2 3 4 5 6 # Default-Stop: # Short-Description: Fixed(?) vzquota init script ### END INIT INFO 

安装成功了。 但在重新启动以validation我的更改后,我发现原始文件再次接pipe。

也许别人可以build议一个更持久的解决scheme。

编辑0:当我最终决定提交一份错误报告时,我发现了这一点 。 所以我build议的解决方法可以对没有访问必须修复的文件的人有用。

如果您不能修改创build该文件的OpenVZ sh脚本,则可以这样做:

  • 1:cp /etc/init.d/vzquota /etc/init.d/vzquota.original(不需要,但备份总是有用的)

  • 2:只需用benjamin提供的补丁,用nano或vi编辑vzquota文件,并将修改后的文件复制到/etc/init.d/vzquota.works

  • 3:使用以下内容创build文件/etc/init.d/vzquotafix:

     #!/bin/sh ### BEGIN INIT INFO # Provides: vzquotafix # Required-Start: # Required-Stop: # Should-Start: $local_fs $syslog # Should-Stop: $local_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Fix for vzquota init script ### END INIT INFO set -e cat /etc/init.d/vzquota.works > /etc/init.d/vzquota exit 0 
  • 4:chmod 755 /etc/init.d/vzquotafix

  • 5:update-rc.d vzquotafix默认值

在每次重新启动时,该脚本将replace由OpenVZ创build的损坏的vzquota文件。