| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From 444991b95ed25d58c3cd1646fa823620380b6ce6 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] ovs-lib: fix install_dir() |
| 5 | |
| 6 | The command "install" is not available in OpenWrt by default |
| 7 | |
| 8 | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> |
| 9 | --- |
| 10 | utilities/ovs-lib.in | 5 ++++- |
| 11 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 12 | |
| 13 | --- a/utilities/ovs-lib.in |
| 14 | +++ b/utilities/ovs-lib.in |
| 15 | @@ -159,7 +159,10 @@ install_dir () { |
| 16 | [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}" |
| 17 | |
| 18 | if test ! -d "$DIR"; then |
| 19 | - install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR" |
| 20 | + mkdir -p "$DIR" |
| 21 | + chmod "$INSTALL_MODE" "$DIR" |
| 22 | + chown "$INSTALL_USER" "$DIR" |
| 23 | + chgrp "$INSTALL_GROUP" "$DIR" |
| 24 | restorecon "$DIR" >/dev/null 2>&1 |
| 25 | fi |
| 26 | } |