dev/chroot-test/action/go
changeset 283 01eca64f77ab
parent 282 1239880543cf
child 299 f41666a08b87
equal deleted inserted replaced
282:1239880543cf 283:01eca64f77ab
    15 
    15 
    16 perl -i -pe 's/^Port 22$/Port 2222/' /etc/ssh/sshd_config
    16 perl -i -pe 's/^Port 22$/Port 2222/' /etc/ssh/sshd_config
    17 /etc/init.d/ssh start
    17 /etc/init.d/ssh start
    18 ssh-keyscan -p 2222 localhost > /etc/ssh/ssh_known_hosts
    18 ssh-keyscan -p 2222 localhost > /etc/ssh/ssh_known_hosts
    19 
    19 
    20 if [ -e mercurial-server ] ; then
    20 . ./install-installables
    21     aptitude --allow-untrusted --quiet --without-recommends --assume-yes  install \
       
    22         make mercurial xsltproc docbook-xsl openssh-server \
       
    23         python python-support adduser 
       
    24     cd mercurial-server
       
    25     make setup-adduser
       
    26 else
       
    27     aptitude --allow-untrusted --quiet --without-recommends --assume-yes  install \
       
    28          debconf python python-support adduser mercurial openssh-server 
       
    29     dpkg -i *.deb
       
    30 fi
       
    31 
    21 
    32 for user in test1 test2 ; do
    22 for user in test1 test2 ; do
    33     adduser --gecos $user --disabled-password $user
    23     adduser --gecos $user --disabled-password $user
    34     su -l -c 'mkdir .ssh' $user
    24     su -l -c 'mkdir .ssh' $user
    35     su -l -c 'ssh-keygen -N "" -f .ssh/id_rsa -t rsa' $user
    25     su -l -c 'ssh-keygen -N "" -f .ssh/id_rsa -t rsa' $user
    36 done
    26 done
    37 cp /home/test1/.ssh/id_rsa.pub /etc/mercurial-server/keys/root/test1
    27 cp /home/test1/.ssh/id_rsa.pub /etc/mercurial-server/keys/root/test1
    38 su -l -c /usr/local/share/mercurial-server/refresh-auth hg
    28 
       
    29 su -l -c /action/refresh-auth hg
    39 su -l -c /action/test1 test1
    30 su -l -c /action/test1 test1
    40 su -l -c /action/test2 test2
    31 su -l -c /action/test2 test2
    41 
    32 
    42 /etc/init.d/ssh stop
    33 /etc/init.d/ssh stop
    43 
    34