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.

30 lines
1.1 KiB

  1. diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
  2. index dc1d02c..61ecf2f 100755
  3. --- a/utilities/ovs-ctl.in
  4. +++ b/utilities/ovs-ctl.in
  5. @@ -108,7 +108,7 @@ set_system_ids () {
  6. esac
  7. set "$@" external-ids:system-id="\"$SYSTEM_ID\""
  8. - set "$@" external-ids:hostname="\"$(hostname -f)\""
  9. + set "$@" external-ids:hostname="\"$(cat /proc/sys/kernel/hostname)\""
  10. set "$@" external-ids:rundir="\"$rundir\""
  11. diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
  12. index 8665698..7931bc6 100644
  13. --- a/utilities/ovs-lib.in
  14. +++ b/utilities/ovs-lib.in
  15. @@ -157,7 +157,11 @@ install_dir () {
  16. [ "${OVS_USER##*:}" != "" ] && INSTALL_GROUP="${OVS_USER##*:}"
  17. if test ! -d "$DIR"; then
  18. - install -d -m "$INSTALL_MODE" -o "$INSTALL_USER" -g "$INSTALL_GROUP" "$DIR"
  19. + mkdir -p "$DIR"
  20. + [ -n "$INSTALL_MODE" ] && chmod "$INSTALL_MODE" "$DIR"
  21. + local OWN="$INSTALL_USER"
  22. + [ -n "$OWN" ] && [ -n "$INSTALL_GROUP" ] && OWN="${OWN}:${INSTALL_GROUP}"
  23. + [ -n "$OWN" ] && chown "$OWN" "$DIR"
  24. restorecon "$DIR" >/dev/null 2>&1
  25. fi
  26. }