Fix configtest to match fast and deep scan mode

This commit is contained in:
kota kanbe
2017-08-01 12:47:32 +09:00
parent 5f49e7da8e
commit 2887dc0d36
4 changed files with 28 additions and 15 deletions

View File

@@ -137,6 +137,10 @@ func trim(str string) string {
}
func (o *debian) checkIfSudoNoPasswd() error {
if !config.Conf.Deep {
o.log.Infof("sudo ... No need")
return nil
}
cmd := util.PrependProxyEnv("apt-get update")
o.log.Infof("Checking... sudo %s", cmd)
r := o.exec(cmd, sudo)
@@ -149,6 +153,10 @@ func (o *debian) checkIfSudoNoPasswd() error {
}
func (o *debian) checkDependencies() error {
if !config.Conf.Deep {
o.log.Infof("Dependencies... No need")
return nil
}
switch o.Distro.Family {
case config.Ubuntu, config.Raspbian:
return nil