linux - How to take user input during install -


So when I create a Debian package, I can write a post-installation shell script which just works fine. Currently I have been configured to do this

  echo "Please enter your MySQL database user (default route)" Read MYSQL_USER echo "Please enter the MySQL database user password (default route) "Read -s MYSQL_PASS DBEXIST = 0 cmd =" ​​create database loportal; use lportal; " (Mysql -u $ MYSQL_USER -p $ MYSQL_PASS -e "$ CMD") || ((DBEXIST ++)) if [$ DBEXIST -ne 0]; Then the "echo" setup has ended, but MySQL already has a lportal table, it can be from Liferay's previous installation. If you want a fresh installation of this bundle, please remove the lportal table and reinstall this package. "Fi  

This works fine for Ubuntu, however, I can not get user input to work with RPM for Fedora Is a good way to get user input? What I think, RPM was not designed to be interactive installed. However, I can not see a better way of doing this.

Does the user automatically do not have any local MySQL settings automatically? Is there a way to find out? Otherwise, what's the best way to ask for user input?

OK I have given it without any real answer - basically what I understand, I have two options - a rapper script like a bind or CUPS. Although this is not considered good packaging practice, and I am still unsure that How to go about doing this. Just to assign default values% POST scripts, and create the first fern flag. The user launches the first software, it prompts you for the configuration settings.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -