From 7c37272dfd46ff7d31e30f93556a8658b2051afc Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Fri, 11 May 2018 15:00:13 -0700 Subject: [PATCH] fix(init): bad variable name and missing package (#78) --- initramfs/cmd/init/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/initramfs/cmd/init/main.go b/initramfs/cmd/init/main.go index 3515e8961..94298a4aa 100644 --- a/initramfs/cmd/init/main.go +++ b/initramfs/cmd/init/main.go @@ -13,11 +13,12 @@ import ( "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/service" + "github.com/autonomy/dianemo/initramfs/cmd/init/pkg/switchroot" "github.com/autonomy/dianemo/initramfs/cmd/init/pkg/userdata" ) var ( - switchroot *bool + switchRoot *bool ) func hang() { @@ -37,7 +38,7 @@ func init() { panic(err) } - switchroot = flag.Bool("switch-root", false, "perform a switch_root") + switchRoot = flag.Bool("switch-root", false, "perform a switch_root") flag.Parse() } @@ -99,7 +100,7 @@ func root() (err error) { func main() { defer hang() - if *switchroot { + if *switchRoot { if err := root(); err != nil { panic(err) }