6,534
edits
Changes
→Customizing the installation: for Jessie -- create vzfifo script, disable services
=== Remove some unneeded packages ===
If you have any packages you'd like to remove, now's the time for it. Here's an example — note that not all of those packages are installed by default in Debian Squeeze (although they were in earlier versions):
dpkg --purge modutils ppp pppoeconf pppoe pppconfig module-init-tools
=== Disable services ===
update-rc.d-insserv -f klogd remove
update-rc.d-insserv -f exim4 remove
update-rc.d-insserv -f inetd remove
==== for older releases (Lenny, Sarge etc.) ====
update-rc.d -f klogd remove
update-rc.d -f quotarpc remove
update-rc.d -f exim4 remove
update-rc.d -f inetd remove
=== Fix SSH host keys ===
<source lang="bash">
dpkg-reconfigure tzdata
</source>
=== Create vzfifo script (for Jessie only) ===
This step is required '''for Jessie only''' (and is handled automatically by vzctl for earlier Debian releases). It ensures that <code>vzctl start --wait</code> works as expected.
<source lang="bash">
# Create vzfifo service
cat >> /lib/systemd/system/vzfifo.service << EOF
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
[Unit]
Description=Tell that Container is started
ConditionPathExists=/proc/vz
ConditionPathExists=!/proc/bc
After=multi-user.target quotaon.service quotacheck.service
[Service]
Type=forking
ExecStart=/bin/touch /.vzfifo
TimeoutSec=0
RemainAfterExit=no
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
EOF
# Enable service
for service in vzfifo; do
systemctl enable $service > /dev/null 2>&1
done
</source>