Debian Codegraph @

debian/tests/remote-tests

raw symbols SCIP
1 #!/bin/sh
2
3 set -e
4
5 HOMEDIR="$AUTOPKGTEST_TMP/home"
6 adduser --home "$HOMEDIR" --disabled-password --gecos autopkgtest rsync
7 mkdir -m 700 "$HOMEDIR/.ssh"
8
9 if ! systemctl --quiet is-active ssh.service; then
10 systemctl start ssh.service
11 fi
12
13 ssh-keyscan localhost > "$HOMEDIR/.ssh/known_hosts" 2>/dev/null
14 ssh-keygen -q -N '' -f "$HOMEDIR/.ssh/id_rsa"
15 cp "$HOMEDIR/.ssh/id_rsa.pub" "$HOMEDIR/.ssh/authorized_keys"
16 chown -R rsync: "$HOMEDIR/.ssh/"
17
18 runuser -u rsync -- env REMOTE=rsync@localhost /bin/sh debian/tests/local-tests
19