brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-library pull request: Fix sed command that update the MyS...
Date Mon, 30 May 2016 14:47:14 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/
    @@ -75,7 +75,7 @@ public Void call(ConfigBag parameters) {
                                         "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 --
    @tbouron Won't this replace lines containing the following as well?
    What about `password=se!=scret`. I think it will match greedily here, so won't do the
replacement right?
    Is the change fixing the case for passwords containing `@`? Could you add some more details
in the commit message.

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 or file a JIRA ticket
with INFRA.

View raw message