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.

28 lines
961 B

  1. From ecf232bf32dd433642bb9da2ac0c2de483b8736a Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Mon, 23 Mar 2020 15:54:26 +0800
  4. Subject: [PATCH] ovn-lib: fix install_dir()
  5. The command "install" is not available in OpenWrt by default
  6. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
  7. ---
  8. utilities/ovn-lib.in | 5 ++++-
  9. 1 file changed, 4 insertions(+), 1 deletion(-)
  10. diff --git a/utilities/ovn-lib.in b/utilities/ovn-lib.in
  11. index af1b72edb..f6ab5581c 100644
  12. --- a/utilities/ovn-lib.in
  13. +++ b/utilities/ovn-lib.in
  14. @@ -54,7 +54,10 @@ ovn_install_dir () {
  15. [ "${OVN_USER##*:}" != "" ] && INSTALL_GROUP="${OVN_USER##*:}"
  16. if test ! -d "$DIR"; then
  17. - install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
  18. + mkdir -p "$DIR"
  19. + chmod "$INSTALL_MODE" "$DIR"
  20. + chown "$INSTALL_USER" "$DIR"
  21. + chgrp "$INSTALL_GROUP" "$DIR"
  22. restorecon "$DIR" >/dev/null 2>&1
  23. fi
  24. }