3

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)?

3 Answers 3

6

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

2
  • I don't understand the "levels". Could you explain to me why there are levels and what each one does?
    – Strawberry
    Jul 5, 2012 at 0:51
  • Run levels are a way to keep multiple boot "configurations" available on your box. Typically I have a run-level for a graphical login and another for a text login, although it's really up to you whether you use more than one (or what you keep configured in each run level). This DebianHelp article will do a better job than I would describing run levels from scratch Jul 5, 2012 at 0:56
1

You could try installing rcconf via aptitude. It lists services that are started on boot. Rcconf will list all installed services -- services that start on boot are clearly marked. To run rcconf simply run rcconf as root.

1

chkconfig method

For the height of laziness / efficiency, you can also use chkconfig

To see how portmap, nfs-common, and nfs-kernel-server are used at all runlevels...

[mpenning@tsunami ~]$ sudo chkconfig --list | grep -Ei "nfs|portmap"
mountkernfs.sh            0:off  1:off  2:off  3:off  4:off  5:off  6:off  S:on
mountnfs-bootclean.sh     0:off  1:off  2:off  3:off  4:off  5:off  6:off  S:on
mountnfs.sh               0:off  1:off  2:off  3:off  4:off  5:off  6:off  S:on
nfs-common                0:off  1:off  2:off  3:off  4:off  5:off  6:off
nfs-kernel-server         0:off  1:off  2:off  3:off  4:off  5:off  6:off
portmap                   0:off  1:off  2:off  3:off  4:off  5:off  6:off
umountnfs.sh              0:off  1:off  2:off  3:off  4:off  5:off  6:off
[mpenning@tsunami ~]$

To disable portmap, nfs-common, and nfs-kernel-server at all runlevels...

sudo chkconfig portmap off nfs-common off nfs-kernel-server off
2
  • chkconfig is a RH/RPM utility. You can install it under Debian, though it's not installed by default. update-rc.d is probably the more appropriate tool to use. Jul 8, 2012 at 2:16
  • yes Iinstalled it on my debian machine... Jul 8, 2012 at 2:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .