You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/30 04:24:28 UTC

[GitHub] [inlong] ZuoFengZhang opened a new issue, #6685: [Feature] The bin/init-config.sh compatible with MacOS

ZuoFengZhang opened a new issue, #6685:
URL: https://github.com/apache/inlong/issues/6685

   ### Description
   
   When executing the bin/init-config.sh script in the MacOS environment, the following error will occur:
   
   ```shell
   $ bin/init-config.sh
   Init agent configuration parameters
   sed: 1: "agent.properties": command a expects \ followed by text
   sed: 1: "agent.properties": command a expects \ followed by text
   sed: 1: "agent.properties": command a expects \ followed by text
   sed: 1: "agent.properties": command a expects \ followed by text
   sed: 1: "agent.properties": command a expects \ followed by text
   Init audit configuration parameters
   sed: 1: "application.properties": command a expects \ followed by text
   sed: 1: "application.properties": command a expects \ followed by text
   sed: 1: "application.properties": command a expects \ followed by text
   sed: 1: "audit-proxy-pulsar.conf": command a expects \ followed by text
   sed: 1: "application.properties": command a expects \ followed by text
   Init dataproxy configuration parameters
   sed: 1: "common.properties": command c expects \ followed by text
   sed: 1: "common.properties": command c expects \ followed by text
   sed: 1: "dataproxy-pulsar.conf": extra characters at the end of d command
   Init inlong manager configuration
   sed: 1: "application.properties": command a expects \ followed by text
   sed: 1: "application.properties": command a expects \ followed by text
   sed: 1: "application-dev.properties": command a expects \ followed by text
   sed: 1: "application-dev.properties": command a expects \ followed by text
   sed: 1: "application-dev.properties": command a expects \ followed by text
   Init inlong manager flink plugin configuration
   sed: 1: "flink-sort-plugin.prope ...": invalid command code f
   sed: 1: "flink-sort-plugin.prope ...": invalid command code f
   ```
   Because the syntax of the sed command in the MacOS environment is different from that in the GNU environment, it is not compatible.
   
   ```shell
   sed -i -e ... # does not work on OS X as it creates -e backups
   sed -i'' -e ... # does not work on OS X 10.6 but works on 10.9+
   sed -i '' -e ... # not working on GNU
   ```
   
   ### Use case
   
   Therefore, when the init-config.sh script executes the sed command, it is necessary to first determine the current OS type and perform respective adaptations. The `sed` command is used for substitution in MacOS,
   
   ```shell
   sed -i ...
   ```
   
    while GNU syntax can be used in Linux.
   
   ```shell
   sed -i '' ...
   ```
   
   ### Are you willing to submit PR?
   
   - [X] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang closed issue #6685: [Bug][Script] The bin/init-config.sh compatible with MacOS

Posted by GitBox <gi...@apache.org>.
dockerzhang closed issue #6685: [Bug][Script] The bin/init-config.sh compatible with MacOS
URL: https://github.com/apache/inlong/issues/6685


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org