mirror of
https://github.com/rancher/os.git
synced 2025-07-16 16:11:03 +00:00
remove symlink error messages on second run of entrypoint
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
parent
9962e4c232
commit
242d42fbb1
@ -78,19 +78,6 @@ func writeFiles(cfg *config.CloudConfig) error {
|
||||
}
|
||||
|
||||
func setupCommandSymlinks() {
|
||||
for _, powerOperation := range []string{
|
||||
"/sbin/poweroff",
|
||||
"/sbin/shutdown",
|
||||
"/sbin/reboot",
|
||||
"/sbin/halt",
|
||||
"/usr/sbin/poweroff",
|
||||
"/usr/sbin/shutdown",
|
||||
"/usr/sbin/reboot",
|
||||
"/usr/sbin/halt",
|
||||
} {
|
||||
os.Remove(powerOperation)
|
||||
}
|
||||
|
||||
for _, link := range []symlink{
|
||||
{config.RosBin, "/usr/bin/cloud-init-execute"},
|
||||
{config.RosBin, "/usr/bin/cloud-init-save"},
|
||||
@ -99,11 +86,16 @@ func setupCommandSymlinks() {
|
||||
{config.RosBin, "/usr/bin/system-docker"},
|
||||
{config.RosBin, "/usr/sbin/netconf"},
|
||||
{config.RosBin, "/usr/sbin/wait-for-docker"},
|
||||
{config.RosBin, "/usr/sbin/poweroff"},
|
||||
{config.RosBin, "/usr/sbin/reboot"},
|
||||
{config.RosBin, "/usr/sbin/halt"},
|
||||
{config.RosBin, "/usr/sbin/shutdown"},
|
||||
{config.RosBin, "/sbin/poweroff"},
|
||||
{config.RosBin, "/sbin/reboot"},
|
||||
{config.RosBin, "/sbin/halt"},
|
||||
{config.RosBin, "/sbin/shutdown"},
|
||||
} {
|
||||
os.Remove(link.newname)
|
||||
if err := os.Symlink(link.oldname, link.newname); err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user