Changes

Jump to: navigation, search

Ubuntu Precise template creation

715 bytes added, 14:40, 16 February 2016
Disabled services added/fixed.
locale-gen ru_RU.UTF-8
locale-gen en_US.UTF-8
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
Configure packages:
echo $NAME > /etc/mailname
echo '
# dma-0.0.2010.xx syntax
SMARTHOST 192.0.2.2
DBOUNCEPROG dbounce-simple-safecat
:
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends dma bsd-mailx safecat
 
'''14.04 note:''' config syntax for dma-0.9 was changed:
echo '
# dma-0.9 syntax
SMARTHOST 192.0.2.2
MAILNAME /etc/mailname
' > /etc/dma/dma.conf
Disable hardware-related configs:
sed -i.orig -e 's,^#!.*,#!/bin/true,' /etc/init.d/ondemand sed -i.orig -e 's,\Disable(.* | \)\(sysctl .*\),\1 /bin/true \2,' { local f="/etc/init/procps$1.conf" sed -i.orig -e 's,^console output,, ; s,^env INIT_VERBOSE,,' local o="/etc/init/rc$1.confoverride" sed test -i.orig s "$o" && grep -e 's/qw "^\manual" "$ModLoad imklog/o" && return echo "manual ## \DISABLE UNDER OPENVZ" >> "$ModLoad imklog/g' /etc/rsyslog.confo" } Disable console Disable console-font Disable console-setup : Disable ondemand Disable setvtrgb : Disable hwclock Disable hwclock-save : Disable ureadahead Disable ureadahead-other : Disable plymouth Disable plymouth-log Disable plymouth-ready Disable plymouth-shutdown Disable plymouth-splash Disable plymouth-stop Disable plymouth-upstart-bridge : Disable tty2 Disable tty3 Disable tty4 Disable tty5 Disable tty6 : Disable udev Disable udev-fallback-graphics Disable udev-finish Disable udevmonitor Disable udevtrigger
:
mkdir sed -i.orig -e '/root| sysctl /etc_init_console_tty mv s,$, || :,' /etc/init/console* procps.conf sed -i.orig -e 's,^\$ModLoad imklog,## \$ModLoad imklog,g' /etc/init/tty* /root/etc_init_console_ttyrsyslog.conf
Cleanup and leave chroot:
apt-get clean
find /var/cache/apt /var/lib/apt/lists -type f -delete
apt-get clean
exit
12
edits

Navigation menu