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 (
13
13
InputFileName = "ruxitagentproc.json"
14
14
15
15
SourceRuxitAgentProcPath = "agent/conf/ruxitagentproc.conf"
16
- DestinationRuxitAgentProcPath = "oneagent/config/ruxitagentproc.conf"
16
+ DestinationRuxitAgentProcPath = "oneagent/agent/ config/ruxitagentproc.conf"
17
17
)
18
18
19
19
func 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 {
90
90
volume := filepath .VolumeName (value )
91
91
fmt .Printf ("%s" , volume )
92
92
93
- if strings .HasPrefix (value , "\" ../ " ) {
93
+ if strings .HasPrefix (entry , "libraryPath " ) {
94
94
sanitizedEntry := strings .ReplaceAll (value , "../" , "" )
95
95
sanitizedEntry , found := strings .CutPrefix (sanitizedEntry , "\" " )
96
96
97
97
if found {
98
- pm [section ][entry ] = "\" " + filepath .Join (installPath , sanitizedEntry )
98
+ pm [section ][entry ] = "\" " + filepath .Join (installPath , "agent" , sanitizedEntry )
99
99
} else {
100
- pm [section ][entry ] = filepath .Join (installPath , sanitizedEntry )
100
+ pm [section ][entry ] = filepath .Join (installPath , "agent" , sanitizedEntry )
101
101
}
102
102
}
103
103
}
Original file line number Diff line number Diff line change @@ -204,8 +204,13 @@ func TestSetupReadonly(t *testing.T) {
204
204
{
205
205
// overwritten to be absolute path
206
206
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\" " ,
209
214
},
210
215
{
211
216
// added from override
@@ -229,8 +234,13 @@ func TestSetupReadonly(t *testing.T) {
229
234
},
230
235
{
231
236
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\" " ,
234
244
},
235
245
{
236
246
// will be removed, as it is not needed in readonly
You can’t perform that action at this time.
0 commit comments