mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-30 19:11:13 +02:00
fix(init): bad variable name and missing package (#78)
This commit is contained in:
parent
e18cf83a8e
commit
7c37272dfd
@ -13,11 +13,12 @@ import (
|
|||||||
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/mount"
|
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/mount"
|
||||||
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/rootfs"
|
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/rootfs"
|
||||||
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/service"
|
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/service"
|
||||||
|
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/switchroot"
|
||||||
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/userdata"
|
"github.com/autonomy/dianemo/initramfs/cmd/init/pkg/userdata"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
switchroot *bool
|
switchRoot *bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func hang() {
|
func hang() {
|
||||||
@ -37,7 +38,7 @@ func init() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
switchroot = flag.Bool("switch-root", false, "perform a switch_root")
|
switchRoot = flag.Bool("switch-root", false, "perform a switch_root")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ func root() (err error) {
|
|||||||
func main() {
|
func main() {
|
||||||
defer hang()
|
defer hang()
|
||||||
|
|
||||||
if *switchroot {
|
if *switchRoot {
|
||||||
if err := root(); err != nil {
|
if err := root(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user