(params: ResolverParameters, containerProperties: ContainerProperties)
| 748 | } |
| 749 | |
| 750 | async function patchEtcEnvironment(params: ResolverParameters, containerProperties: ContainerProperties) { |
| 751 | const markerFile = path.posix.join(getSystemVarFolder(params), `.patchEtcEnvironmentMarker`); |
| 752 | if (params.allowSystemConfigChange && containerProperties.launchRootShellServer && !(await isFile(containerProperties.shellServer, markerFile))) { |
| 753 | const rootShellServer = await containerProperties.launchRootShellServer(); |
| 754 | if (await createFile(rootShellServer, markerFile)) { |
| 755 | await rootShellServer.exec(`cat >> /etc/environment <<'etcEnvironmentEOF' |
| 756 | ${Object.keys(containerProperties.env).map(k => `\n${k}="${containerProperties.env[k]}"`).join('')} |
| 757 | etcEnvironmentEOF |
| 758 | `); |
| 759 | } |
| 760 | } |
| 761 | } |
| 762 | |
| 763 | async function patchEtcProfile(params: ResolverParameters, containerProperties: ContainerProperties) { |
| 764 | const markerFile = path.posix.join(getSystemVarFolder(params), `.patchEtcProfileMarker`); |
no test coverage detected