|
7 | 7 |
|
8 | 8 | batches = [] |
9 | 9 |
|
10 | | -batches += [ |
11 | | - [ |
12 | | - "sudo chown `whoami`: ~", |
13 | | - "chmod u=rwx,g=rx,o= ~", |
| 10 | +if os.uname()[0] == 'Linux': |
| 11 | + batches += [ |
| 12 | + [ |
| 13 | + "sudo chown `whoami`: ~", |
| 14 | + "chmod u=rwx,g=rx,o= ~", |
14 | 15 |
|
15 | | - "sudo mkdir /var/run/sshd", |
16 | | - "sudo /etc/init.d/ssh start", |
| 16 | + "sudo mkdir /var/run/sshd", |
| 17 | + "sudo /etc/init.d/ssh start", |
17 | 18 |
|
18 | | - "mkdir -p ~/.ssh", |
19 | | - "chmod u=rwx,go= ~/.ssh", |
| 19 | + "mkdir -p ~/.ssh", |
| 20 | + "chmod u=rwx,go= ~/.ssh", |
20 | 21 |
|
21 | | - "ssh-keyscan -H localhost >> ~/.ssh/known_hosts", |
22 | | - "chmod u=rw,go= ~/.ssh/known_hosts", |
| 22 | + "ssh-keyscan -H localhost >> ~/.ssh/known_hosts", |
| 23 | + "chmod u=rw,go= ~/.ssh/known_hosts", |
23 | 24 |
|
24 | | - "cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa", |
25 | | - "chmod u=rw,go= ~/.ssh/id_rsa", |
| 25 | + "cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa", |
| 26 | + "chmod u=rw,go= ~/.ssh/id_rsa", |
26 | 27 |
|
27 | | - "cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys", |
28 | | - "chmod u=rw,go=r ~/.ssh/authorized_keys", |
| 28 | + "cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys", |
| 29 | + "chmod u=rw,go=r ~/.ssh/authorized_keys", |
| 30 | + ] |
29 | 31 | ] |
30 | | -] |
31 | 32 |
|
32 | 33 | if ci_lib.have_apt(): |
33 | 34 | batches.append([ |
|
0 commit comments