aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-26 12:20:30 +0200
committerGitHub <noreply@github.com>2022-07-26 12:20:30 +0200
commita298909decc9091da8cc134e6eb2f38a70635a30 (patch)
treebd5f735ef0d32d3d7b29d4fc969ae0b4739d9305 /pkg
parent43d6f89d12c10e4605759174bb2bc583035ee118 (diff)
parent8e56a5605fbcd8c978308985e7f5b08dbdb948ee (diff)
downloadpodman-a298909decc9091da8cc134e6eb2f38a70635a30.tar.gz
podman-a298909decc9091da8cc134e6eb2f38a70635a30.tar.bz2
podman-a298909decc9091da8cc134e6eb2f38a70635a30.zip
Merge pull request #15061 from cfergeau/always-true
machine: Fix check which is always true
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/qemu/machine.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 3b57455c4..7974c261e 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -670,11 +670,11 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
// because / is immutable, we have to monkey around with permissions
// if we dont mount in /home or /mnt
args := []string{"-q", "--"}
- if !strings.HasPrefix(mount.Target, "/home") || !strings.HasPrefix(mount.Target, "/mnt") {
+ if !strings.HasPrefix(mount.Target, "/home") && !strings.HasPrefix(mount.Target, "/mnt") {
args = append(args, "sudo", "chattr", "-i", "/", ";")
}
args = append(args, "sudo", "mkdir", "-p", mount.Target)
- if !strings.HasPrefix(mount.Target, "/home") || !strings.HasPrefix(mount.Target, "/mnt") {
+ if !strings.HasPrefix(mount.Target, "/home") && !strings.HasPrefix(mount.Target, "/mnt") {
args = append(args, ";", "sudo", "chattr", "+i", "/", ";")
}
err = v.SSH(name, machine.SSHOptions{Args: args})