我正在使用insserv -r nfs-common来禁用RPC.我怎么知道它是否有效?有没有办法列出启动的服务?它应该从/etc/init.d中消失(因为它仍然存在)?
解决方法
How do I know if it worked?
重启后,查看ps auxw | grep rpc.statd,如果您将其视为正在运行的进程,它仍在运行.
is there a way to list the services starting up?
这是一种方式……
[mpenning@tsunami ~]$grep initdefault /etc/inittab id:2:initdefault: [mpenning@tsunami ~]$
从这里,我知道运行级别2是机器启动的级别…现在看看/etc/rc2.d
[mpenning@tsunami ~]$ls /etc/rc2.d K01gdm3 S02dbus S03apache2 S06bootlogs README S02fail2ban S04avahi-daemon S06samba S01binfmt-support S02loadcpufreq S04bluetooth S14portmap S01fancontrol S02lwresd S04cpufrequtils S15nfs-common S01rsyslog S02ntp S04cron S16nfs-kernel-server S01sudo S02openbsd-inetd S04exim4 S17rc.local S02acpid S02smartmontools S04kerneloops S17rmnologin S02anacron S02snmpd S04network-manager S17stop-bootlogd S02atd S02ssh S05cups S02bind9 S02winbind S05saned [mpenning@tsunami ~]$
任何在开头都有“S”的东西都是在启动时启动的.开头任何带有“K”的东西都不会在启动时启动.
Is it supposed to disappear from /etc/init.d (because it still there)?
所有启动脚本符号链接到/etc/init.d,因此rpc启动脚本应该仍然存在.看看/etc/rcX.d肯定知道