On Thu, 2006-10-26 at 11:46 +0300, Rich wrote:
Bernhard Dübi wrote:
Hi everybody, ... 3) What's the best way to create an interactiv postinstall script ? I tried the init-script option, but the script runs in parallel with other scripts an never gets the hold of the console. In sles9 I had a post-install script which dropped a S00setup file in rc5.d, but in sles10 this files is ignored. Any ideas ?
for some interactiveness, you could try switching terminal, for example :
/bin/chvt 9 exec < /dev/tty9 > /dev/tty9
I have now 2 versions, one as init-script and one as a post-script. With the init-script the machine boots up to the xdm login screen and the chvt changes then to another console (8 in my case). The post-script installs a script in /etc/init.d and activates it with chkconfig. This has the advantage that I can place the script more precisely in the boot process and the machine stops booting at some point. My problem is that YaST comes up all messed up. It looks like YaST draws the screen correctly. But then it activates the input fields with wrong offsets. My Script looks like this (the real script is much larger, but this is essentially what I do to start YaST): <init-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <filename>sysetup.sh</filename> <location></location> <source><![CDATA[#!/bin/bash chvt 8 exec 0<> /dev/tty8 1>&0 2>&0 REDIRECT="`showconsole 2>/dev/null`" export REDIRECT set -- $(stty size < $REDIRECT) LINES=$1 COLUMNS=$2 if test $COLUMNS -eq 0 ; then LINES=24 COLUMNS=80 test "$TERM" = "linux" -o -z "$TERM" && TERM=vt102 fi export LINES COLUMNS yast2 lan ]]></source> </script> </init-scripts> Any idea how I can make YaST look clean and easy ? Sincerely Bernhard