mirror of
https://github.com/rancher/os.git
synced 2025-08-15 21:43:42 +00:00
Boot banner correction + code cleanup
This commit is contained in:
parent
50dcc4b7ba
commit
1fb4bcb505
@ -67,7 +67,7 @@ ARG KERNEL_URL_arm64=https://github.com/burmilla/os-kernel/releases/download/v${
|
||||
ARG BUILD_DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3
|
||||
ARG BUILD_DOCKER_URL_arm64=https://github.com/burmilla/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm64
|
||||
|
||||
ARG OS_RELEASES_YML=https://raw.githubusercontent.com/burmilla/releases/kernel-4.14.x
|
||||
ARG OS_RELEASES_YML=https://raw.githubusercontent.com/burmilla/releases/v1.9.x
|
||||
|
||||
ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services
|
||||
ARG IMAGE_NAME=${OS_REPO}/os
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/burmilla/os/config"
|
||||
@ -40,31 +39,16 @@ func autologinAction(c *cli.Context) error {
|
||||
|
||||
usertty := ""
|
||||
user := "root"
|
||||
tty := ""
|
||||
if c.NArg() > 0 {
|
||||
usertty = c.Args().Get(0)
|
||||
s := strings.SplitN(usertty, ":", 2)
|
||||
user = s[0]
|
||||
if len(s) > 1 {
|
||||
tty = s[1]
|
||||
}
|
||||
}
|
||||
|
||||
mode := filepath.Base(os.Args[0])
|
||||
console := CurrentConsole()
|
||||
|
||||
cfg := config.LoadConfig()
|
||||
// replace \n and \l
|
||||
banner := config.Banner
|
||||
banner = strings.Replace(banner, "\\v", config.Version, -1)
|
||||
banner = strings.Replace(banner, "\\s", "BurmillaOS "+runtime.GOARCH, -1)
|
||||
banner = strings.Replace(banner, "\\r", config.GetKernelVersion(), -1)
|
||||
banner = strings.Replace(banner, "\\n", cfg.Hostname, -1)
|
||||
banner = strings.Replace(banner, "\\l", tty, -1)
|
||||
banner = strings.Replace(banner, "\\\\", "\\", -1)
|
||||
banner = banner + "\n"
|
||||
banner = banner + "Autologin " + console + "\n"
|
||||
fmt.Printf(banner)
|
||||
|
||||
loginBin := ""
|
||||
args := []string{}
|
||||
|
@ -154,21 +154,6 @@ func consoleInitFunc() error {
|
||||
})
|
||||
}
|
||||
|
||||
// Disbled because Debian is now default console
|
||||
/*
|
||||
if cfg.Rancher.Console == "default" {
|
||||
// add iptables symlinks for default console
|
||||
baseSymlink = append(baseSymlink, []symlink{
|
||||
{"/usr/sbin/iptables", "/usr/sbin/iptables-save"},
|
||||
{"/usr/sbin/iptables", "/usr/sbin/iptables-restore"},
|
||||
{"/usr/sbin/iptables", "/usr/sbin/ip6tables"},
|
||||
{"/usr/sbin/iptables", "/usr/sbin/ip6tables-save"},
|
||||
{"/usr/sbin/iptables", "/usr/sbin/ip6tables-restore"},
|
||||
{"/usr/sbin/iptables", "/usr/bin/iptables-xml"},
|
||||
}...)
|
||||
}
|
||||
*/
|
||||
|
||||
// create placeholder for docker-compose binary
|
||||
const ComposePlaceholder = `
|
||||
#!/bin/bash
|
||||
|
@ -11,11 +11,11 @@ import (
|
||||
|
||||
const Banner = `
|
||||
____ _ _ _ ____ _____
|
||||
| _ \ (_) | | / __ \ / ____|
|
||||
| _ \\ (_) | | / __ \\ / ____|
|
||||
| |_) |_ _ _ __ _ __ ___ _| | | __ _| | | | (___
|
||||
| _ <| | | | '__| '_ ' _ \| | | |/ _' | | | |\___ \
|
||||
| _ <| | | | '__| '_ ' _ \\| | | |/ _' | | | |\\___ \\
|
||||
| |_) | |_| | | | | | | | | | | | (_| | |__| |____) |
|
||||
|____/ \__,_|_| |_| |_| |_|_|_|_|\__,_|\____/|_____/
|
||||
|____/ \\__,_|_| |_| |_| |_|_|_|_|\\__,_|\\____/|_____/
|
||||
|
||||
BurmillaOS \v \n \l
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user