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