TT#49053 Run ngcp-initial-configuration in screen

The script ngcp-initial-configuration should be run in screen.
Wait when system is configured.

Change-Id: I81babed8f5d8d7db83f4f94d7402234afe468419
changes/29/25929/3
Mykola Malkov 6 years ago
parent bdce778764
commit f53d1776e8

@ -405,7 +405,19 @@ sed_regexp=''
sed_regexp+='s/^(export FORCE)=.+$/\1=yes/;' sed_regexp+='s/^(export FORCE)=.+$/\1=yes/;'
sed_regexp+='s/^(export DHCP)=.+$/\1=true/;' sed_regexp+='s/^(export DHCP)=.+$/\1=true/;'
sed -ri "\${sed_regexp}" /etc/ngcp-installer/config_deploy.inc sed -ri "\${sed_regexp}" /etc/ngcp-installer/config_deploy.inc
ngcp-installer && ngcp-initial-configuration ngcp-installer && screen -dm bash -c 'ngcp-initial-configuration'
attempt=0
max_attempt=1000
rc=1
while [[ "\${attempt}" -lt "\${max_attempt}" ]]; do
if grep 'System configured' -q /etc/sipwise_ngcp_version; then
rc=0
break
fi
sleep 1
attempt=\$((attempt + 1))
done
exit \${rc}
EOF EOF
else else
cat >> "${USER_DATA_FILE}" << EOF cat >> "${USER_DATA_FILE}" << EOF

Loading…
Cancel
Save