OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../mkinitramfs/mkinitramfs.conf
  5. # Copyright (C) 2007 - 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. srctar=none
  15. libdir=$libdir/mkinitrd
  16. makeopt=
  17. makeinstopt=
  18. hook_add postmake 5 'mkinitrd_install'
  19. hook_add postmake 7 'mkinitrd_install_img'
  20. mkinitrd_install() {
  21. install -v -m 755 "$confdir/mkinitramfs.sh" "$root$sbindir/mkinitramfs"
  22. for x in $( ls -1d "$confdir/files"/* 2> /dev/null ); do
  23. cp -vf "$x" "$root$libdir/"
  24. done
  25. }
  26. mkinitrd_install_img() {
  27. local image=initrd.img
  28. if [ -r "$base/config/$config/$image" ]; then
  29. echo_status "Injecting $image file from config/$config"
  30. cp -vf "$base/config/$config"/$image "$root/boot/"
  31. else
  32. echo_warning "No $image file found in config/$config"
  33. fi
  34. }