How to: Debian stop MTA start up at boot and other services

I always get this with wireless and MTA when booting Debian due to the way I configure my network card.

My Wireless card config is setup in /etc/network/interfaces, nameservers in /etc/resolv.conf, but I use /etc/rc.local to issue my ESSID, WEP pass and restart the network which means that MTA (Mail Transfer Agent, exim4 to be precise) tries to startup at boot but can’t as there isn’t a wireless network connection yet.

So how do I disable MTA at boot, or any service for that matter?
It’s easy, all those services that start at boot are in the /etc/rc2.d directory and only have to be renamed using the mv command.

1. cd to /etc/rc2.d
2. issue the mv Snameofservice Knameofservice

Here is an example from my Debian terminal:

cd /etc/rc2.d

README S20cups S20openbsd-inetd S89atd
S05loadcpufreq S20exim4 S20policycoreutils S89cron
S10sysklogd S20hotkey-setup S20rsync S99rc.local
S11klogd S20netapplet S20wicd S99rmnologin
S12acpid S20nfs-common S24avahi-daemon S99stop-bootlogd
S12dbus S20nvidia-glx S30gdm
S19cpufrequtils S20nvidia-kernel S89anacron

sudo mv S20exim4 K20exim4

K20exim4 S19cpufrequtils S20openbsd-inetd S89atd
README S20cups S20policycoreutils S89cron
S05loadcpufreq S20hotkey-setup S20rsync S99rc.local
S10sysklogd S20netapplet S20wicd S99rmnologin
S11klogd S20nfs-common S24avahi-daemon S99stop-bootlogd
S12acpid S20nvidia-glx S30gdm
S12dbus S20nvidia-kernel S89anacron

That’s it, painless, took 2 seconds and will knock about a minute off the boot-time on a box which has no network at boot.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s