Commit c241caf1 authored by Jondy Zhao's avatar Jondy Zhao

Fix suffix of template file name

parent 02439eed
...@@ -11,6 +11,7 @@ slapos_client_home=~/.slapos ...@@ -11,6 +11,7 @@ slapos_client_home=~/.slapos
client_configure_file=$slapos_client_home/slapos.cfg client_configure_file=$slapos_client_home/slapos.cfg
client_certificate_file=$slapos_client_home/certificate client_certificate_file=$slapos_client_home/certificate
client_key_file=$slapos_client_home/key client_key_file=$slapos_client_home/key
template_configure_file=/etc/slapos/slapos-client.cfg.example
mkdir -p $slapos_client_home mkdir -p $slapos_client_home
...@@ -48,10 +49,10 @@ elif [[ ! -f $client_key_file ]] ; then ...@@ -48,10 +49,10 @@ elif [[ ! -f $client_key_file ]] ; then
fi fi
if [[ ! -f $client_configure_file ]] ; then 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) || \ (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) (echo "Download slapos-client.cfg.example failed."; exit 1)
cp /etc/slapos/slapos.cfg.sample $client_configure_file cp $template_configure_file $client_configure_file
fi fi
sed -i -e "s/^cert_file.*$/cert_file = $client_certificate_file/" \ sed -i -e "s/^cert_file.*$/cert_file = $client_certificate_file/" \
......
...@@ -153,11 +153,11 @@ mkdir -p /etc/opt/slapos/ssl/partition_pki ...@@ -153,11 +153,11 @@ mkdir -p /etc/opt/slapos/ssl/partition_pki
nodecfgfile=/etc/opt/slapos/slapos.cfg nodecfgfile=/etc/opt/slapos/slapos.cfg
if [[ ! -f $nodecfgfile ]] ; then 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) || \ (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) (echo "Download slapos.cfg.example failed."; exit 1)
cp /etc/slapos/slapos.cfg.sample $nodecfgfile cp /etc/slapos/slapos.cfg.example $nodecfgfile
fi fi
interface_guid=$(connection2guid re6stnet-lo) 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