How to prevent server (daemons) from starting during apt-get install

in newbie, ubuntu server

Some times you may not want a server or daemon to start as part of the postinstall scrip when installing with apt-get or dpkg. To prevent servers from starting, do the following:

# Prevent launch of servers during apt-get install
mkdir -p /usr/sbin/
cat < /usr/sbin/policy-rc.d
#!/bin/sh
exit 101
EOF
chmod 755 /usr/sbin/policy-rc.d

When you are done, don’t forget to remove this file with:

rm -f /usr/sbin/policy-rc.d

redthor August 16, 2011 at 6:57 am

brilliant, i needed that

Comments on this entry are closed.

Previous post:

Next post: