Browse Source

Use sudo consistently.

Changelog: None

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
change-dependabot-prefix
Kristian Amlie 3 years ago
parent
commit
47c1b9c529
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 8
      scripts/test/test-utils.sh

8
scripts/test/test-utils.sh

@ -163,15 +163,15 @@ prepare_ssh_keys() {
sudo chown -R root:root tests/ssh-public-key-overlay/root
fi
if [ "$(stat -c %a tests/ssh-public-key-overlay/root)" != "755" ]; then
chmod 755 tests/ssh-public-key-overlay/root
sudo chmod 755 tests/ssh-public-key-overlay/root
fi
if [ "$(stat -c %a tests/ssh-public-key-overlay/root/.ssh)" != "755" ]; then
chmod 700 tests/ssh-public-key-overlay/root/.ssh
sudo chmod 700 tests/ssh-public-key-overlay/root/.ssh
fi
if [ "$(stat -c %a tests/ssh-public-key-overlay/root/.ssh/authorized_keys)" != "755" ]; then
chmod 600 tests/ssh-public-key-overlay/root/.ssh/authorized_keys
sudo chmod 600 tests/ssh-public-key-overlay/root/.ssh/authorized_keys
fi
if [ "$(stat -c %a tests/ssh-priv-key/key)" != "600" ]; then
chmod 600 tests/ssh-priv-key/key
sudo chmod 600 tests/ssh-priv-key/key
fi
}

Loading…
Cancel
Save