vmwareのinitスクリプト修正for Squeeze

■squeezeのアップデートエラー
 またお前か。。。squeeze。

■以下のように「apt-get upgrade」で失敗、x11-commonがインストール出来ない。
 insservのメッセージは、試行回数分のログが出るはず。

$ sudo apt-get upgrade
insserv: Starting vmware-USBArbitrator depends on rmnologin 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: x11-common の処理中にエラーが発生しました (--configure):
 サブプロセス インストール済みの post-installation スクリプト はエラー終了ステータス 1 を返しました
configured to not write apport reports
                                      以下のパッケージの処理中にエラーが発生しました:
 x11-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
■以下のようになっている。

$ sudo chkconfig --list vmware-USBArbitrator vmware
vmware-USBArbitrator      0:off  1:off  2:on   3:on   4:off  5:on   6:off
vmware                    0:off  1:off  2:on   3:on   4:on   5:on   6:off

$ sudo ls /etc/rc*/[SK]*vmware*
/etc/rc0.d/K01vmware                /etc/rc3.d/S50vmware-USBArbitrator
/etc/rc1.d/K01vmware                /etc/rc4.d/S18vmware
/etc/rc2.d/K08vmware-USBArbitrator  /etc/rc5.d/K08vmware-USBArbitrator
/etc/rc2.d/S18vmware                /etc/rc5.d/S18vmware
/etc/rc2.d/S50vmware-USBArbitrator  /etc/rc5.d/S50vmware-USBArbitrator
/etc/rc3.d/K08vmware-USBArbitrator  /etc/rc6.d/K01vmware
/etc/rc3.d/S18vmware

■「insserv」のエラーって、oracle-xeの時と同じじゃない?

 oracle-xeのLSB tagを修正する(debian lenny / squeeze)
 http://d.hatena.ne.jp/labunix/20111227

■oracle-xeは仮想マシンに導入したので気づかなかった。

$ head -1 /etc/init.d/vmware*
==> /etc/init.d/vmware <==
#!/usr/bin/env bash

==> /etc/init.d/vmware-USBArbitrator <==
#!/usr/bin/env bash

■一行目の「#!/usr/bin/env bash」の直ぐ後に以下を追記

$ head -10 /etc/init.d/vmware*
==> /etc/init.d/vmware <==
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides:          vmware
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 5
# Default-Stop:      2 3 5
# Short-Description: VMware VMX service for virtual machines
# Description:       Allows running of VMware virtual machines.                 
### END INIT INFO

==> /etc/init.d/vmware-USBArbitrator <==
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides:          vmware-USBArbitrator
# Required-Start:    $remote_fs $syslog vmware
# Required-Stop:     $remote_fs $syslog vmware
# Default-Start:     2 3 5
# Default-Stop:      2 3 5
# Short-Description: Start daemon when vmware starts
# Description:       Enable service provided by daemon.
### END INIT INFO

$ sudo apt-get upgrade
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。
1 個のパッケージが完全にインストールまたは削除されていません。
この操作後に追加で 0 B のディスク容量が消費されます。
続行しますか [Y/n]? Y
x11-common (1:7.5+8+squeeze1) を設定しています ...

■lennyではこんなに強制されないが、いずれ同様にエラーとなるかも知れない。
 以下のスクリプトを流してサードパーティ製のinitスクリプトがあるなら修正する。

 ★Squeeze

$ find /etc/init.d/ | \
  for list in `xargs`;do \
    test -f "$list" && grep BEGIN "$list" > /dev/null 2>&1 || echo "Check LSB tag $list"; \
  done
Check LSB tag /etc/init.d/
Check LSB tag /etc/init.d/.depend.boot
Check LSB tag /etc/init.d/rcS
Check LSB tag /etc/init.d/rc
Check LSB tag /etc/init.d/.depend.stop
Check LSB tag /etc/init.d/.depend.start

 ★Lenny
  ※やはり、「vmware-USBArbitrator」はいずれエラーの原因となるだろう。

$  find /etc/init.d/ | \
   for list in `xargs`;do \
     test -f "$list" && grep BEGIN "$list" > /dev/null 2>&1 || echo "Check LSB tag $list"; \
   done
Check LSB tag /etc/init.d/
Check LSB tag /etc/init.d/README
Check LSB tag /etc/init.d/.depend.start
Check LSB tag /etc/init.d/.depend.boot
Check LSB tag /etc/init.d/vmware-USBArbitrator
Check LSB tag /etc/init.d/rc
Check LSB tag /etc/init.d/.depend.stop
Check LSB tag /etc/init.d/rcS