File: remote-tests

package info (click to toggle)
rsync 3.4.1%2Bds1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,388 kB
  • sloc: ansic: 35,682; sh: 6,538; python: 1,759; asm: 829; perl: 479; makefile: 365; cpp: 298; awk: 191
file content (19 lines) | stat: -rw-r--r-- 527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

HOMEDIR="$AUTOPKGTEST_TMP/home"
adduser --home "$HOMEDIR" --disabled-password --gecos autopkgtest rsync
mkdir -m 700 "$HOMEDIR/.ssh"

if ! systemctl --quiet is-active ssh.service; then
    systemctl start ssh.service
fi

ssh-keyscan localhost > "$HOMEDIR/.ssh/known_hosts" 2>/dev/null
ssh-keygen -q -N '' -f "$HOMEDIR/.ssh/id_rsa"
cp "$HOMEDIR/.ssh/id_rsa.pub" "$HOMEDIR/.ssh/authorized_keys"
chown -R rsync: "$HOMEDIR/.ssh/"

runuser -u rsync -- env REMOTE=rsync@localhost /bin/sh debian/tests/local-tests