4 DESCRIPTION="Setting up init..."
21 log_begin_msg "$DESCRIPTION"
23 # Arrange for shells on virtual consoles, rather than login prompts
25 if [ -n "$USERNAME" ]; then
26 sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
29 # This has the nice side effect of the cron.{daily,weekly,monthly} jobs in
30 # /etc/crontab remaining disabled, yet also not run by anacron
31 for f in /root/etc/rc?.d/S??anacron; do
32 mv ${f} ${f%/*}/K00anacron
36 rm -f /root/etc/rc?.d/[SK]??postfix
38 # Avoid clobbering the user's clock
39 rm -f /root/etc/rc?.d/K??hwclock.sh
41 # Disable readahead since it doesn't play well with squashfs + unionfs
42 # use chmod instead of mv to not trigger unionfs bugs.
43 chmod -x /root/sbin/readahead-list
45 # Install shutdown script
46 cp -a /lib/casper/shutdown /root/etc/init.d/casper-shutdown
47 if [ -f /root/etc/rc0.d/S90halt ]; then
48 ln -s ../init.d/casper-shutdown /root/etc/rc0.d/S89casper
50 if [ -f /root/etc/rc6.d/S90reboot ]; then
51 ln -s ../init.d/casper-shutdown /root/etc/rc6.d/S89casper