File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
pkg/configure/oneagent/pmc Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const (
1313 InputFileName = "ruxitagentproc.json"
1414
1515 SourceRuxitAgentProcPath = "agent/conf/ruxitagentproc.conf"
16- DestinationRuxitAgentProcPath = "oneagent/config/ruxitagentproc.conf"
16+ DestinationRuxitAgentProcPath = "oneagent/agent/ config/ruxitagentproc.conf"
1717)
1818
1919func GetSourceRuxitAgentProcFilePath (targetDir string ) string {
Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ func (pm ProcMap) SetupReadonly(installPath string) ProcMap {
9090 volume := filepath .VolumeName (value )
9191 fmt .Printf ("%s" , volume )
9292
93- if strings .HasPrefix (value , "\" ../ " ) {
93+ if strings .HasPrefix (entry , "libraryPath " ) {
9494 sanitizedEntry := strings .ReplaceAll (value , "../" , "" )
9595 sanitizedEntry , found := strings .CutPrefix (sanitizedEntry , "\" " )
9696
9797 if found {
98- pm [section ][entry ] = "\" " + filepath .Join (installPath , sanitizedEntry )
98+ pm [section ][entry ] = "\" " + filepath .Join (installPath , "agent" , sanitizedEntry )
9999 } else {
100- pm [section ][entry ] = filepath .Join (installPath , sanitizedEntry )
100+ pm [section ][entry ] = filepath .Join (installPath , "agent" , sanitizedEntry )
101101 }
102102 }
103103 }
Original file line number Diff line number Diff line change @@ -204,8 +204,13 @@ func TestSetupReadonly(t *testing.T) {
204204 {
205205 // overwritten to be absolute path
206206 Section : "test" ,
207- Key : "keyWithPath" ,
208- Value : "\" /absolute/path/relative/path\" " ,
207+ Key : "libraryPath123" ,
208+ Value : "\" /absolute/path/agent/relative/path\" " ,
209+ },
210+ {
211+ Section : "general" ,
212+ Key : "libraryPathMusl64" ,
213+ Value : "\" /absolute/path/agent/bin/1.2.3.4-5/linux-musl-x86-64\" " ,
209214 },
210215 {
211216 // added from override
@@ -229,8 +234,13 @@ func TestSetupReadonly(t *testing.T) {
229234 },
230235 {
231236 Section : "test" ,
232- Key : "keyWithPath" ,
233- Value : "\" ../../relative/path\" " ,
237+ Key : "libraryPath123" ,
238+ Value : "\" ../relative/path\" " ,
239+ },
240+ {
241+ Section : "general" ,
242+ Key : "libraryPathMusl64" ,
243+ Value : "\" ../bin/1.2.3.4-5/linux-musl-x86-64\" " ,
234244 },
235245 {
236246 // will be removed, as it is not needed in readonly
You can’t perform that action at this time.
0 commit comments