Strange problems with dialog in %post

John Monaco xjmonaco at ti.com
Wed Aug 18 17:46:50 UTC 2004


Dan,

     I've recognized the problem on the systems that we build; because 
in the %post section, the last the we do is sys-unconfig. When the 
system boots back up, there are dialog boxes with the issue that you 
describe. ${SYSFONT} is set to something like "latcyrheb" by default.

     After having given this some additional thought, I'm not really 
sure how to make the redefined value part of the %post environment. 
Maybe if you copied in the new /etc/sysconfig/i18n, and then re-run the 
initscript that reads that file (whatever script that may be). Then 
start your dialog stuff.

         Sincerely,

         John S. Monaco

         System Administrator & "Linux Dude"
         WW Make IT
         E-mail: xjmonaco at ti.com
         Phone:  (214) 567-5831


Daniel Segall wrote:
> Thanks for the quick reply. How exactly is this set/read during the
> kickstart process? Do I need to have my post edit this file before running
> my dialog post-install? I wasn't aware that this was used at all during
> the actual kickstart.
> 
> Thanks,
> -Dan
> 
> 
>>Daniel,
>>
>>     I have done some checking on this. I think it's caused by the
>>default font. I changed /etc/sysconfig/i18n to look like this:
>>
>>
>>LANG="en_US.iso885915"
>>SUPPORTED="en_US.iso885915:en_US:en"
>>SYSFONT="lat0-sun16"
>>SYSFONTACM="iso15"
>>
>>         Sincerely,
>>
>>         John S. Monaco
>>
>>         System Administrator & "Linux Dude"
>>         WW Make IT
>>         E-mail: xjmonaco at ti.com
>>         Phone:  (214) 567-5831
>>
>>
>>Daniel Segall wrote:
>>
>>>Hey all,
>>>
>>>I'm trying to finish up some custom kickstarts, and I'm down to this
>>>last
>>>problem. I run a post-install script (using dialog) with a series of
>>>questions for adding a machine to our environment (NIS, IP, etc). I
>>>figured out how to get them working interactively with the chvt command,
>>>and everything works as it should.
>>>
>>>My problem is that I'm getting strange (ascii?) characters in all of my
>>>dialog boxes where the lines (borders) should be. I have tried several
>>>variations to my dialog commands, but none has worked. If I go to vt2
>>>and
>>>manually run the script, it shows up fine, so I believe the problem is
>>>something environmental to vt3. Like I said before, everything actually
>>>works, I can input the info it asks for, and it progresses through the
>>>different dialogs just fine. It just looks messed up. Below are the
>>>important sections of my ks.cfg & the post install script it calls.
>>>
>>>ks.cfg
>>>======================================================
>>>
>>>%post --interpreter /bin/sh
>>>exec < /dev/tty3 > /dev/tty3
>>>chvt 3
>>>
>>>cat <<EOF >>/etc/motd
>>>#######################################
>>>## KICKSTART STILL IN PROGRESS!!!!!! ##
>>>#######################################
>>>`cat /etc/redhat-release` - Installed `date`
>>>
>>>EOF
>>>cat /etc/motd >>/root/ks.log
>>>cat /etc/motd
>>>
>>>cd /root
>>>
>>>echo " * Mounting our NFS share..."
>>>
>>># Create a mount point, mount the kickstart NFS share, & grab the
>>>post-install script
>>>mkdir /mnt/ks
>>>mount -r -o nolock 10.1.1.1:/kickstart /mnt/ks
>>>
>>>echo " * Copying config files from share..."
>>>
>>>cp /mnt/ks/linux-postinstall.sh /root/
>>>cp /mnt/ks/redhatconfig.tar.gz /root
>>>
>>>-- snip --
>>>
>>># Execute our post install
>>>echo "  "                                       >>/root/ks.log
>>>if [ -f /root/linux-postinstall.sh ]; then
>>>        echo " * Executing Post-Install..."     >>/root/ks.log
>>>        echo " * Executing Post-Install..."
>>>        chmod +x /root/linux-postinstall.sh
>>>        exec /root/linux-postinstall.sh         >>/root/ks.log
>>>else
>>>        echo "Can't find linux-postinstall.sh." >>/root/ks.log
>>>        echo "Can't find linux-postinstall.sh."
>>>fi
>>>
>>># We done.
>>>echo " * Post-Install complete. System rebooting." >>/root/ks.log
>>>echo " * Post-Install complete. System rebooting."
>>>chvt 1
>>>sleep 10
>>>exit 0
>>>#EOF
>>>
>>>======================================================
>>>
>>>
>>>linux-postinstall.sh
>>>======================================================
>>>#!/bin/bash
>>>
>>>BT="ITRC Linux Post-Install"
>>># Exit the script if it has already been run.
>>>if [ -f /tmp/postinstall.done ]
>>>then
>>>        dialog --backtitle "$BT" --title "Error!" --msgbox "This script
>>>has already been run.  Remove /tmp/postinstall.done if you want to
>>>continue." 0 0
>>>    exit
>>>fi
>>>touch /tmp/postinstall.done
>>>
>>>#####################################
>>>######### Define Variables ##########
>>>#####################################
>>>dialog --backtitle "$BT" --title "NIS" --yesno "Is this system going
>>>into
>>>NIS?" 0 0
>>>if [ $? -eq 0 ]
>>>then
>>>        IPADDR=`dialog --backtitle "$BT" --title "IP Address?" --stdout
>>>--inputbox "Enter your IP address" 0 0`
>>>        HNAME=`dialog --backtitle "$BT" --title "Hostname?" --stdout
>>>--inputbox "Enter your hostname (without domain)" 0 0`
>>>else
>>>        dialog --backtitle "$BT" --title "See Ya!" --msgbox "Your on
>>>your
>>>own, Big Admin" 0 0
>>>        exit
>>>fi
>>>
>>>--snip--
>>>======================================================
>>>
>>>
>>>Thanks,
>>>-Dan
>>>
>>>
>>>_______________________________________________
>>>Kickstart-list mailing list
>>>Kickstart-list at redhat.com
>>>https://www.redhat.com/mailman/listinfo/kickstart-list
>>>
>>
>>
> 
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 





More information about the Kickstart-list mailing list