mirror of
https://github.com/rancher/os.git
synced 2025-09-20 18:13:35 +00:00
- Use burmilla GitHub repos - Release under burmilla Docker Hub - GitHub action for create releases - Updated boot image and login banner - Use Debian as default console - Updated system-cron to v0.5.0 - Updated services to latest versions - Bump up kernel to 4.14.206 - Include burmilla/os-debianconsole:v1.9.0 to initrd
30 lines
691 B
Go
30 lines
691 B
Go
package env
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/burmilla/os/config"
|
|
"github.com/burmilla/os/pkg/init/fsmount"
|
|
"github.com/burmilla/os/pkg/log"
|
|
"github.com/burmilla/os/pkg/util/network"
|
|
)
|
|
|
|
func Init(c *config.CloudConfig) (*config.CloudConfig, error) {
|
|
os.Setenv("PATH", "/sbin:/usr/sbin:/usr/bin")
|
|
if fsmount.IsInitrd() {
|
|
log.Debug("Booting off an in-memory filesystem")
|
|
// Magic setting to tell Docker to do switch_root and not pivot_root
|
|
os.Setenv("DOCKER_RAMDISK", "true")
|
|
} else {
|
|
log.Debug("Booting off a persistent filesystem")
|
|
}
|
|
|
|
return c, nil
|
|
}
|
|
|
|
func Proxy(cfg *config.CloudConfig) (*config.CloudConfig, error) {
|
|
network.SetProxyEnvironmentVariables()
|
|
|
|
return cfg, nil
|
|
}
|