Commit c241caf1 authored by Jondy Zhao's avatar Jondy Zhao

Fix suffix of template file name

parent 02439eed
......@@ -11,19 +11,20 @@ slapos_client_home=~/.slapos
client_configure_file=$slapos_client_home/slapos.cfg
client_certificate_file=$slapos_client_home/certificate
client_key_file=$slapos_client_home/key
template_configure_file=/etc/slapos/slapos-client.cfg.example
mkdir -p $slapos_client_home
#
# Generate desktop configure file
# Generate desktop configure file
#
echo
echo
echo Before continue to configure, make sure you have an account in the
echo slapos.org community, and have obtained X509 certificate and key
echo which are needed for the following configuration process.
echo
echo Refer to http://community.slapos.org/wiki/osoe-Lecture.SlapOS.Extended/developer-Installing.SlapOS.Client
echo
echo
if [[ -f "$1" ]] ; then
echo "Copy certificate from $2 to $client_certificate_file"
......@@ -33,7 +34,7 @@ elif [[ ! -f $client_certificate_file ]] ; then
[[ ! -f "$certificate_file" ]] && \
echo "Certificate file %s doesn't exists." && exit 1
echo "Copy certificate from $certificate_file to $client_certificate_file"
cp $certificate_file $client_certificate_file
cp $certificate_file $client_certificate_file
fi
if [[ -f "$2" ]] ; then
......@@ -44,14 +45,14 @@ elif [[ ! -f $client_key_file ]] ; then
[[ ! -f "$key_file" ]] && \
echo "Key file %s doesn't exists." && exit 1
echo "Copy key from $key_file to $client_key_file"
cp $key_file $client_key_file
cp $key_file $client_key_file
fi
if [[ ! -f $client_configure_file ]] ; then
[[ -f /etc/slapos/slapos-client.cfg.sample ]] || \
[[ -f $template_configure_file ]] || \
(cd /etc/slapos; wget -O slapos.cfg http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/slapos-client.cfg.example) || \
(echo "Download slapos-client.cfg.example failed."; exit 1)
cp /etc/slapos/slapos.cfg.sample $client_configure_file
(echo "Download slapos-client.cfg.example failed."; exit 1)
cp $template_configure_file $client_configure_file
fi
sed -i -e "s/^cert_file.*$/cert_file = $client_certificate_file/" \
......
......@@ -153,11 +153,11 @@ mkdir -p /etc/opt/slapos/ssl/partition_pki
nodecfgfile=/etc/opt/slapos/slapos.cfg
if [[ ! -f $nodecfgfile ]] ; then
[[ -f /etc/slapos/slapos.cfg.sample ]] || \
[[ -f /etc/slapos/slapos.cfg.example ]] || \
(cd /etc/slapos; wget -O slapos.cfg http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/slapos.cfg.example) || \
(echo "Download slapos.cfg.example failed."; exit 1)
cp /etc/slapos/slapos.cfg.sample $nodecfgfile
cp /etc/slapos/slapos.cfg.example $nodecfgfile
fi
interface_guid=$(connection2guid re6stnet-lo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment