home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd2.bin / suse / inst-sys / lib / YaST2 / bin / dolilo < prev    next >
Encoding:
Text File  |  2000-03-30  |  737 b   |  40 lines

  1. #! /bin/sh
  2.  
  3. # Script to create an initial LILO config file & initrd.
  4. #
  5. # Usage:
  6. #   dolilo [args]
  7. #
  8. #   args: cf. mk_lilo_conf
  9. #
  10. # Example:
  11. #
  12. # dolilo /blub -m /dev/hda
  13. #
  14. # As an alternative, specify the root & boot devices via environment
  15. # variables. e.g.: rootdev=/dev/hda bootdev=/dev/hda1 mk_lilo_conf
  16. #
  17. # on errors:
  18. #   exit code > 0
  19. #
  20. # Version 1.06
  21. #
  22. # Author: Steffen Winterfeldt <wfeldt@suse.de>
  23. # (c) 1999 SuSE GmbH
  24.  
  25.  
  26. root_dir=$1
  27. [ "$root_dir" ] || root_dir=/
  28.  
  29. PATH=/lib/YaST2/bin:$root_dir/lib/YaST2/bin:$root_dir/sbin:$PATH
  30.  
  31. # create a fallback kernel
  32. cp $root_dir/boot/vmlinuz $root_dir/boot/vmlinuz.suse || exit 31
  33.  
  34. # make an initial ram disk
  35. mk_initrd $root_dir || exit $?
  36.  
  37. # configure lilo
  38. mk_lilo_conf "$@" || exit $?
  39.  
  40.