Vps

Debian 擠壓 vzquota

  • July 19, 2012

顯然,我讓 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

有什麼建議麼?

關鍵詞:vzquota debian squeeze 安裝vps,虛擬專用伺服器。

我檢查vzquota並發現它不符合 Debian 6.0 標準(初始化腳本) - 很自然,因為提供商當時只支持 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

並且安裝成功。但是在重新啟動以驗證我的更改後,我發現原始文件再次接管了。

也許其他人可以提出更持久的解決方案。

**Edit0:**當我最終決定送出錯誤報告時,我發現了這個. 因此,我建議的解決方法對於無法訪問必須修復的文件的人很有用。

引用自:https://serverfault.com/questions/248325