home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / initramfs-tools / scripts / casper-bottom / 25configure_init < prev    next >
Encoding:
Text File  |  2006-07-21  |  1.1 KB  |  52 lines

  1. #!/bin/sh
  2.  
  3. PREREQ=""
  4. DESCRIPTION="Setting up init..."
  5.  
  6. . /scripts/functions
  7.  
  8. prereqs()
  9. {
  10.        echo "$PREREQ"
  11. }
  12.  
  13. case $1 in
  14. # get pre-requisites
  15. prereqs)
  16.        prereqs
  17.        exit 0
  18.        ;;
  19. esac
  20.  
  21. log_begin_msg "$DESCRIPTION"
  22.  
  23. # Arrange for shells on virtual consoles, rather than login prompts
  24.  
  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
  27. fi
  28.  
  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. if [ -x /root/etc/init.d/anacron ]; then
  32.     for f in /root/etc/rc?.d/S??anacron; do
  33.         mv ${f} ${f%/*}/K00anacron
  34.     done
  35. fi
  36.  
  37. # No point, really
  38. rm -f /root/etc/rc?.d/[SK]??postfix
  39.  
  40. # Avoid clobbering the user's clock
  41. rm -f /root/etc/rc?.d/K??hwclock.sh
  42.  
  43. # Disable readahead since it doesn't play well with squashfs + unionfs
  44. # use chmod instead of mv to not trigger unionfs bugs.
  45. if [ -e /root/sbin/readahead-list ]; then
  46.     chmod -x /root/sbin/readahead-list
  47. fi
  48.  
  49. log_end_msg
  50.  
  51. exit 0
  52.