11 #exec > results 2>&1 |
11 #exec > results 2>&1 |
12 |
12 |
13 #aptitude --allow-untrusted --quiet --without-recommends --assume-yes install mercurial |
13 #aptitude --allow-untrusted --quiet --without-recommends --assume-yes install mercurial |
14 #hg --version |
14 #hg --version |
15 |
15 |
|
16 aptitude --allow-untrusted --quiet --without-recommends --assume-yes install \ |
|
17 make mercurial xsltproc docbook-xsl openssh-server \ |
|
18 python python-support adduser |
|
19 |
16 #aptitude --allow-untrusted --quiet --without-recommends --assume-yes install \ |
20 #aptitude --allow-untrusted --quiet --without-recommends --assume-yes install \ |
17 # make mercurial xsltproc docbook-xsl openssh-server |
21 # debconf python python-support adduser mercurial openssh-server |
18 |
|
19 aptitude --allow-untrusted --quiet --without-recommends --assume-yes install \ |
|
20 debconf python python-support adduser mercurial openssh-server |
|
21 |
22 |
22 |
23 |
23 perl -i -pe 's/^Port 22$/Port 2222/' /etc/ssh/sshd_config |
24 perl -i -pe 's/^Port 22$/Port 2222/' /etc/ssh/sshd_config |
24 /etc/init.d/ssh start |
25 /etc/init.d/ssh start |
25 ssh-keyscan -p 2222 localhost > /etc/ssh/ssh_known_hosts |
26 ssh-keyscan -p 2222 localhost > /etc/ssh/ssh_known_hosts |
26 |
27 |
27 dpkg -i mercurial-server_1.0-1_all.deb |
28 #dpkg -i mercurial-server_1.0-1_all.deb |
28 #cd mercurial-server |
29 cd mercurial-server |
29 #make setup-adduser |
30 make setup-adduser |
30 |
31 |
31 for user in test1 test2 ; do |
32 for user in test1 test2 ; do |
32 adduser --gecos $user --disabled-password $user |
33 adduser --gecos $user --disabled-password $user |
33 su -l -c 'mkdir .ssh' $user |
34 su -l -c 'mkdir .ssh' $user |
34 su -l -c 'ssh-keygen -N "" -f .ssh/id_rsa -t rsa' $user |
35 su -l -c 'ssh-keygen -N "" -f .ssh/id_rsa -t rsa' $user |
35 done |
36 done |
36 cp /home/test1/.ssh/id_rsa.pub /etc/mercurial-server/keys/root/test1 |
37 cp /home/test1/.ssh/id_rsa.pub /etc/mercurial-server/keys/root/test1 |
37 su -l -c /usr/share/mercurial-server/refresh-auth hg |
38 su -l -c /usr/local/share/mercurial-server/refresh-auth hg |
38 su -l -c /action/test1 test1 |
39 su -l -c /action/test1 test1 |
39 su -l -c /action/test2 test2 |
40 su -l -c /action/test2 test2 |
40 |
41 |
41 /etc/init.d/ssh stop |
42 /etc/init.d/ssh stop |
42 |
43 |