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
963 B

  1. From b476094a64213da20f88976d7562cb4e8d9f2101 Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Wed, 14 Mar 2018 16:44:13 +0800
  4. Subject: [PATCH 3/4] ovs-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/ovs-lib.in | 5 ++++-
  9. 1 file changed, 4 insertions(+), 1 deletion(-)
  10. diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
  11. index 9a0af2e82..68ab3f250 100644
  12. --- a/utilities/ovs-lib.in
  13. +++ b/utilities/ovs-lib.in
  14. @@ -159,7 +159,10 @@ install_dir () {
  15. [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_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. }