mirror of
https://github.com/containers/podman.git
synced 2025-07-03 09:17:15 +08:00
pkg/machine: fix various linter warnings
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
//go:build (amd64 && !windows) || (arm64 && !windows)
|
//go:build (amd64 && !windows) || (arm64 && !windows)
|
||||||
// +build amd64,!windows arm64,!windows
|
|
||||||
|
|
||||||
package define
|
package define
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ func (i *initMachine) withRunPlaybook(p string) *initMachine {
|
|||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *initMachine) withUserModeNetworking(r bool) *initMachine { //nolint:unused
|
func (i *initMachine) withUserModeNetworking(r bool) *initMachine { //nolint:unused,nolintlint
|
||||||
i.userModeNetworking = r
|
i.userModeNetworking = r
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
@ -130,10 +130,7 @@ func launchWinProxy(opts WinProxyOpts) (bool, string, error) {
|
|||||||
return false, "", fmt.Errorf("could not start api proxy since expected pipe is not available: %s", machinePipe)
|
return false, "", fmt.Errorf("could not start api proxy since expected pipe is not available: %s", machinePipe)
|
||||||
}
|
}
|
||||||
|
|
||||||
globalName := false
|
globalName := PipeNameAvailable(GlobalNamedPipe, GlobalNameWait)
|
||||||
if PipeNameAvailable(GlobalNamedPipe, GlobalNameWait) {
|
|
||||||
globalName = true
|
|
||||||
}
|
|
||||||
|
|
||||||
command, err := FindExecutablePeer(winSSHProxy)
|
command, err := FindExecutablePeer(winSSHProxy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -12,10 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func isProcessAlive(pid int) bool {
|
func isProcessAlive(pid int) bool {
|
||||||
if checkProcessStatus("process", pid, nil) == nil {
|
return checkProcessStatus("process", pid, nil) == nil
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkProcessStatus(processHint string, pid int, stderrBuf *bytes.Buffer) error {
|
func checkProcessStatus(processHint string, pid int, stderrBuf *bytes.Buffer) error {
|
||||||
|
@ -24,7 +24,6 @@ const registriesConf = `unqualified-search-registries=["docker.io"]
|
|||||||
|
|
||||||
const appendPort = `grep -q Port\ %d /etc/ssh/sshd_config || echo Port %d >> /etc/ssh/sshd_config`
|
const appendPort = `grep -q Port\ %d /etc/ssh/sshd_config || echo Port %d >> /etc/ssh/sshd_config`
|
||||||
|
|
||||||
//nolint:unused
|
|
||||||
const changePort = `sed -E -i 's/^Port[[:space:]]+[0-9]+/Port %d/' /etc/ssh/sshd_config`
|
const changePort = `sed -E -i 's/^Port[[:space:]]+[0-9]+/Port %d/' /etc/ssh/sshd_config`
|
||||||
|
|
||||||
const configServices = `ln -fs /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
|
const configServices = `ln -fs /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
|
||||||
|
Reference in New Issue
Block a user