Merge pull request #12357 from zexi/automated-cherry-pick-of-#12355-upstream-release-3.7

Automated cherry pick of #12355: fix(baremetal): change cat path
This commit is contained in:
yunion-ci-robot
2021-10-06 20:53:42 +08:00
committed by GitHub
+1 -1
View File
@@ -404,7 +404,7 @@ func (p *SSHPartition) CheckOrAddUser(user, homeDir string, isSys bool) (realHom
}
func (p *SSHPartition) checkUser(user string) (exist bool, homeDir string, err error) {
cmd := fmt.Sprintf("/usr/sbin/chroot %s /usr/bin/cat /etc/passwd", p.mountPath)
cmd := fmt.Sprintf("/usr/sbin/chroot %s /bin/cat /etc/passwd", p.mountPath)
lines, err := p.term.Run(cmd)
if err != nil {
return