| Summary: | Augeas lens bug: shellvars and multivariable export lines | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Dominic Cleal <dcleal> |
| Component: | augeas | Assignee: | Dominic Cleal <dcleal> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | asanders, bfan, leiwang, lkong, wshi, yuliu |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | augeas-1.1.0-6.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1033795 | Environment: | |
| Last Closed: | 2014-06-13 09:21:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 1033795 | ||
| Bug Blocks: | |||
|
Description
Dominic Cleal
2013-12-17 09:37:20 UTC
For RHEL 7.0, I plan on changing the node layout to:
{ "@export"
{ "1" = "TestVar1" }
{ "2" = "TestVar2" } }
Provided that https://github.com/hercules-team/augeas/pull/66 is accepted.
Can reproduce with augeas-1.1.0-4.el7, the same steps and results with 'Description' Steps to reproduce: 1. Create a script with multiple variables on a single export line: [host]#cat test.sh #!/bin/sh TestVar1="test1" TestVar2="test2" export TestVar1 TestVar2 2. Run "augtool --noautoload", load the file, and print the variables: [host]#augtool --noautoload augtool> set /augeas/load/test/lens "Shellvars.lns" augtool> set /augeas/load/test/incl /root/test.sh augtool> load augtool> print /files/root/test.sh augtool> Additional info: Exporting the variables on their own separate "export" line works: [host]#cat test.sh #!/bin/sh TestVar1="test1" TestVar2="test2" #export TestVar1 TestVar2 export TestVar1 export TestVar2 Run "augtool --noautoload", load the file, and print the variables: [host]#augtool --noautoload augtool> set /augeas/load/test/lens "Shellvars.lns" augtool> set /augeas/load/test/incl /root/test.sh augtool> load augtool> print /files/root/test.sh /files/root/test.sh /files/root/test.sh/#comment[1] = "!/bin/sh" /files/root/test.sh/TestVar1 = "\"test1\"" /files/root/test.sh/TestVar2 = "\"test2\"" /files/root/test.sh/#comment[2] = "export TestVar1 TestVar2" /files/root/test.sh/@export[1] = "TestVar1" /files/root/test.sh/@export[2] = "TestVar2" augtool> Verified with augeas-1.1.0-6.el7 Steps to verified: 1. Create a script with multiple variables on a single export line: #cat test.sh #!/bin/sh TestVar1="test1" TestVar2="test2" export TestVar1 TestVar2 2. Run "augtool --noautoload", load the file, and print the variables: #augtool --noautoload augtool> set /augeas/load/test/lens "Shellvars.lns" augtool> set /augeas/load/test/incl /root/test.sh augtool> load augtool> print /files/root/test.sh /files/root/test.sh /files/root/test.sh/#comment = "!/bin/sh" /files/root/test.sh/TestVar1 = "\"test1\"" /files/root/test.sh/TestVar2 = "\"test2\"" /files/root/test.sh/@export /files/root/test.sh/@export/1 = "TestVar1" /files/root/test.sh/@export/2 = "TestVar2" Can export the two shellvars successfully, so bug is fixed. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |