Browse Source
Use sudo consistently.
Changelog: None
Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
change-dependabot-prefix
Kristian Amlie
3 years ago
No known key found for this signature in database
GPG Key ID: F464407C996AF03F
1 changed files with
4 additions and
4 deletions
-
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 |
|
|
|
} |
|
|
|