Linux – Disabling a startup service

debiandebian-squeezelinux

I am using insserv -r nfs-common to disable RPC. How do I know if it worked? Is there a way to list the services starting up? Is it supposed to disappear from /etc/init.d (because it still there)?

Best Answer

How do I know if it worked?

After rebooting, look at ps auxw | grep rpc.statd, if you see it as a running process it's still running.

is there a way to list the services starting up?

This is one way...

[mpenning@tsunami ~]$ grep initdefault /etc/inittab
id:2:initdefault:
[mpenning@tsunami ~]$

From this, I know run-level 2 is the level the machine boots into... now look at /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 ~]$

Anything that has an "S" at the beginning is started at boot. Anything with a "K" at the beginning does not start at boot.

Is it supposed to disappear from /etc/init.d (because it still there)?

All the startup scripts symlink to /etc/init.d, so the rpc startup script should still be there. Look at /etc/rcX.d to know for sure