Several fixes

- set debug level via cmdline
 - set default RW paths needed ALWAYS to boot a working system, even
   with no config files(recovery)
 - Check for loop device before mounting it to avoid duplicated mounts
 - Force overlay and bind arrays to uniqueness
 - Rename OverlayDir to OverlayDirs to better represent the content

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-08 22:54:17 +01:00
parent accaa2a114
commit f490b08587
4 changed files with 40 additions and 8 deletions

View File

@@ -30,7 +30,12 @@ Sends a generic event payload with the configuration found in the scanned direct
},
},
Action: func(c *cli.Context) (err error) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Logger()
logLevel := zerolog.InfoLevel
debug := utils.ReadCMDLineArg("rd.immucore.debug")
if len(debug) > 0 {
logLevel = zerolog.DebugLevel
}
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Logger().Level(logLevel)
// If we boot from CD, we do nothing
cdBoot, err := utils.BootedFromCD()