#!/bin/sh # Disable services we don't want for service in ConsoleKit avahi-daemon crond cups exim gpm iptables ip6tables \ iscsi iscsid kudzu lvm2-monitor mcstrans mdmonitor netfs network nfs \ pcscd rpcbind rpcgssd rpcidmapd rpcsvcgssd; do if [ ! -e /etc/init.d/$service ]; then continue fi #echo "Disabling Service: $service" /sbin/chkconfig $service off done # Enable services we do want for service in haldaemon messagebus rsyslog udev-post; do if [ ! -e /etc/init.d/$service ]; then continue fi #echo "Enabling Service: $service" /sbin/chkconfig $service on done # Setup readonly-root Mode sed -i 's/READONLY=no/READONLY=yes/' /etc/sysconfig/readonly-root # Set ltsp-launch-client as DM echo "DISPLAYMANAGER=/usr/sbin/ltsp-client-launch" > /etc/sysconfig/desktop # Link /etc/mtab to /proc/mounts # This is not perfect, but it enables fuse mounts to work. rm -f /etc/mtab ln -sf ../proc/mounts /etc/mtab # Blacklist pcspkr /bin/grep -q "blacklist pcspkr" /etc/modprobe.d/blacklist-pcspkr.conf 2> /dev/null if [ $? -ne 0 ]; then echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist-pcspkr.conf fi # Files to silence warning messages touch /etc/alsa/asound.state touch /etc/asound.state # Silence /etc/mtab rwtab error message during bootup sed -i 's/^files[[:space:]]\/etc\/mtab//' /etc/rwtab # Silence /etc/mtab* removal errors sed -i 's/^rm -f \/etc\/mtab/#rm -f \/etc\/mtab/' /etc/rc.d/rc.sysinit # Silence local filesystems mount errors during bootup sed -i '/^sysfs/d' /etc/fstab # F10+: install default boot-duration so plymouth can guess the startup progress bar better if [ -e /var/lib/plymouth/boot-duration ]; then cp /usr/share/ltsp/template/plymouth-default-boot-duration /var/lib/plymouth/boot-duration fi # Allow clean shutdown to complete when rootfs is mounted on a nbd or iscsi block device sed -i 's/^action $"Sending all processes/#action $"Sending all processes/' /etc/init.d/halt sed -i 's/^sleep 2/#sleep 2/' /etc/init.d/halt sed -i 's/^rm -f/#rm -f/' /etc/init.d/halt