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.

26 lines
870 B

  1. From 7385d1e67dda100853cf748034220cdbed6b3d7c 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. --- a/utilities/ovn-lib.in
  11. +++ b/utilities/ovn-lib.in
  12. @@ -54,7 +54,10 @@ ovn_install_dir () {
  13. [ "${OVN_USER##*:}" != "" ] && INSTALL_GROUP="${OVN_USER##*:}"
  14. if test ! -d "$DIR"; then
  15. - install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
  16. + mkdir -p "$DIR"
  17. + chmod "$INSTALL_MODE" "$DIR"
  18. + chown "$INSTALL_USER" "$DIR"
  19. + chgrp "$INSTALL_GROUP" "$DIR"
  20. restorecon "$DIR" >/dev/null 2>&1
  21. fi
  22. }