You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by tbouron <gi...@git.apache.org> on 2016/06/15 12:59:17 UTC

[GitHub] brooklyn-library pull request #34: Fix sed command that update the MySQL con...

Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/34#discussion_r67155972
  
    --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java ---
    @@ -75,7 +75,7 @@ public Void call(ConfigBag parameters) {
                 DynamicTasks.queue(
                         SshTasks.newSshExecTaskFactory(machine, 
                                         "cd "+entity().getAttribute(MySqlNode.RUN_DIR),
    -                                    "sed -i'' -e 's@^\\(\\s*password\\s*=\\s*\\).*$@\\1" + newPass.replace("\\", "\\\\") + "@g' mymysql.cnf")
    +                                    "sed -i.bak 's/\\(password.*\\)=.*/\\1= " + newPass.replace("\\", "\\\\") + "/' mymysql.cnf")
    --- End diff --
    
    You are right for the 2 mentioned cases @neykov, I didn't think this through.
    
    I'll need to go back to the drawing board.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---