Created
January 5, 2011 00:50
-
-
Save tobert/765741 to your computer and use it in GitHub Desktop.
Gutted rc.sysinit for EL5 running under LXC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Print a text banner. | |
echo -en $"\t\tWelcome to " | |
read -r redhat_release < /etc/redhat-release | |
PRODUCT=`sed "s/CentOS \(.*\) release.*/\1/" /etc/redhat-release` | |
echo -e "\\033[0;36m$PRODUCT\\033[0;39m" | |
# Clean up utmp/wtmp | |
> /var/run/utmp | |
touch /var/log/wtmp | |
chgrp utmp /var/run/utmp /var/log/wtmp | |
chmod 0664 /var/run/utmp /var/log/wtmp | |
rm -f /var/lock/subsys/* | |
rm -f /var/run/*.pid | |
cat /proc/mounts > /etc/mtab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment