在ubuntu中添加运行级别

在ubuntu中添加运行级别

我希望我的 postgres 服务在运行级别 2、3、4、5 启动并在 0、1、6 停止。

所以,我运行了以下命令

$ sudo update-rc.d postgresql start 30 2 3 4 5 . stop 30 0 1 6 .

当我停止实例并重新启动它时,我可以看到我的 postgres 服务已启动。但是,当我运行以下命令时:

$ls -C /etc/rc*.d|more
/etc/rc0.d:
K10unattended-upgrades  K20screen-cleanup  README           S40umountfs
K15landscape-client     K20td-agent        S20sendsigs      S59cryptdisks-early
K20ds_agent             K20zabbix-agent    S30urandom       S60umountroot
K20rsync                K38open-vm-tools   S31umountnfs.sh  S90halt

/etc/rc1.d:
K00postgresql        K20screen-cleanup  K77ntp        S70pppd-dns
K15landscape-client  K20td-agent        README        S90single
K20ds_agent          K20zabbix-agent    S30killprocs
K20rsync             K38open-vm-tools   S70dns-clean

/etc/rc2.d:
README         S20screen-cleanup  S38open-vm-tools     S99grub-common
S00postgresql  S20td-agent        S45landscape-client  S99ondemand
S20ds_agent    S20zabbix-agent    S70dns-clean         S99rc.local
S20rsync       S23ntp             S70pppd-dns

/etc/rc3.d:
README         S20screen-cleanup  S38open-vm-tools     S99grub-common
S00postgresql  S20td-agent        S45landscape-client  S99ondemand
S20ds_agent    S20zabbix-agent    S70dns-clean         S99rc.local
S20rsync       S23ntp             S70pppd-dns

/etc/rc4.d:
README         S20screen-cleanup  S38open-vm-tools     S99grub-common
S00postgresql  S20td-agent        S45landscape-client  S99ondemand
S20ds_agent    S20zabbix-agent    S70dns-clean         S99rc.local
S20rsync       S23ntp             S70pppd-dns

/etc/rc5.d:
README         S20screen-cleanup  S38open-vm-tools     S99grub-common
S00postgresql  S20td-agent        S45landscape-client  S99ondemand
S20ds_agent    S20zabbix-agent    S70dns-clean         S99rc.local
S20rsync       S23ntp             S70pppd-dns

/etc/rc6.d:
K00postgresql           K20screen-cleanup  S20sendsigs          S60umountroot
K10unattended-upgrades  K20td-agent        S30urandom           S90reboot
K15landscape-client     K20zabbix-agent    S31umountnfs.sh
K20ds_agent             K38open-vm-tools   S40umountfs
K20rsync                README             S59cryptdisks-early

我不确定为什么K*没有在 中进行输入/etc/rc0.d。有人可以帮我理解吗?

我使用的是 Ubuntu 14.04。

相关内容