Find a way to get end user public and FQDN with out asking in postinst

Bug #996286 reported by Joseph Mills on 2012-05-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zpanel cp X

Bug Description

As is right now under the debian/postinst file
dialog is being used to ask for the FQDN and also the mysqlpassword and public ipaddress
I am sure that there is a work around for something like this.

snippet of code dialog in Debian postint

figlet -c "Welcome To ";
figlet -c "ZPanel X";
 sleep 4 ;

function funky1(){
 echo ""
 echo "Please Enter roots MySql Password."
 echo "Then press Enter."

touch ~/.temppassword
asd=$(tempfile 2>~/.temppassword)
dialog --backtitle "MySQL Password" --clear --insecure --passwordbox "\n ${funky1a} \n " 17 40 2>~/.temppassword
mysqlpassword=$(cat ~/.temppassword)

touch ~/.tempdomain
function funky2(){
 echo ""
 echo "Please Enter what you want your FQDN to be."
 echo "Then press Enter."
touch ~/.tempdomain
dialog --inputbox "\n ${funky2a} \n " 17 60 2>~/.tempdomain
FULL_DOMAIN=$(cat ~/.tempdomain)

touch ~/.tempdomain
function funky3(){
 echo ""
 echo "Please enter your public IP Address."
 echo "Then press Enter."
dialog --inputbox "\n ${funky3a} \n " 17 60 2>~/.tempip
IP_ADDR=$(cat ~/.tempip)

Changed in zpanelcp:
importance: Undecided → Medium
status: New → Confirmed
Joseph Mills (josephjamesmills) wrote :

One down
get public ipaddress
will run this in a loop for eth0 wlan0 ect
awk '/inet addr:/{print (substr($2,6,15))}' <(ifconfig eth0)

Joseph Mills (josephjamesmills) wrote :

Two Down
hostname -A
for fqdn

Changed in zpanelcp:
assignee: nobody → Joseph (josephjamesmills)
Joseph Mills (josephjamesmills) wrote :

All done using debconf for mysql

Changed in zpanelcp:
importance: Medium → Low
status: Confirmed → Fix Committed
Changed in zpanelcp:
status: Fix Committed → Triaged
assignee: Joseph (josephjamesmills) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints