[TD-2531]<fix> support interactive in rpm package

This commit is contained in:
Hui Li 2020-12-23 12:03:00 +08:00
parent 2a3aa6323a
commit d61f1d26eb
1 changed files with 6 additions and 0 deletions

View File

@ -266,8 +266,14 @@ function install_config() {
${csudo} chmod 644 ${cfg_install_dir}/*
fi
# Save standard input to 6 and open / dev / TTY on standard input
exec 6<&0 0</dev/tty
local_fqdn_check
# restore the backup standard input, and turn off 6
exec 0<&6 6<&-
${csudo} mv ${cfg_dir}/taos.cfg ${cfg_dir}/taos.cfg.org
${csudo} ln -s ${cfg_install_dir}/taos.cfg ${cfg_dir}
#FQDN_FORMAT="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"