rootfs_post_build_script 421 B

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. # This is run as part of:
  3. # make target-finalize
  4. # which gets called by the default target.
  5. # To test it out, arguments can be passed with:
  6. # make BR2_ROOTFS_POST_SCRIPT_ARGS="asdf qwer"
  7. target_dir="$1"
  8. shift
  9. net=true
  10. while getopts 'n' OPT; do
  11. case "$OPT" in
  12. n)
  13. net=false
  14. ;;
  15. esac
  16. done
  17. shift $(($OPTIND - 1))
  18. if ! "$net"; then
  19. rm -f "${target_dir}/etc/init.d/"S*network
  20. fi