Peter,<br>I've tested the code you offered, seems it can not stop anaconda doing partition erase while the your code promote the user to confirm, that means if user don't select 'reboot' action at the VT8 screen before anaconda keep processing 'package dependency check'  then perform partition and disk format at VT6, the user still will face data loss risk. Any trick to suspend anaconda to wait user indeed do a confirmation?<br>
<br>BR,<br>Kevin<br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 5:07 PM, Peter Åstrand <span dir="ltr"><<a href="mailto:astrand@cendio.se">astrand@cendio.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">><br>
> does anyone know how can I add a custom screen to prompt user to confirm the<br>
> disk operations(they  will lose their disk data) when perform a kickstart<br>
> auto-installation. It's just need add some magic in %pre scripts, Eg. use<br>
<br>
</div>This is what we are doing in TLCOS (ThinLinc Client OS):<br>
<br>
In ks.cfg:<br>
<br>
%pre<br>
/mnt/runtime/confirm-erase<br>
%end<br>
<br>
confirm-erase looks like:<br>
<br>
#!/usr/bin/python<br>
# -*-mode: python; coding: UTF-8 -*-<br>
#<br>
# Copyright 2002-2008 Cendio AB.<br>
# For more information, see <a href="http://www.cendio.com" target="_blank">http://www.cendio.com</a><br>
<br>
# FIXME: Determine current VT to switch back to<br>
<br>
VT = 8<br>
import os<br>
import sys<br>
import snack<br>
import time<br>
import fcntl<br>
import termios<br>
<br>
pid = os.fork()<br>
if pid != 0:<br>
    os.wait()<br>
    os._exit(0)<br>
os.system("chvt %d" % VT)<br>
fd = os.open("/dev/tty%d" % VT, os.O_RDWR)<br>
os.dup2(fd, 0)<br>
os.dup2(fd, 1)<br>
os.dup2(fd, 2)<br>
sys.stdin = os.fdopen(0, "r")<br>
sys.stdout = os.fdopen(1, "w")<br>
sys.stderr = os.fdopen(2, "w")<br>
os.setsid()<br>
fcntl.ioctl(fd, termios.TIOCSCTTY, 1)<br>
screen = snack.SnackScreen()<br>
if "reboot" == snack.ButtonChoiceWindow(screen, "WARNING",<br>
    "WARNING! All data on your hard disk will be DELETED!",<br>
    buttons=["reboot", "continue"]):<br>
    os.system("reboot")<br>
    while 1: time.sleep(10)<br>
screen.finish()<br>
os.system("chvt %d" % 1)<br>
<br>
<br>
Regards,<br>
---<br>
<font color="#888888">Peter Åstrand           ThinLinc Chief Developer<br>
Cendio AB               <a href="http://www.cendio.com" target="_blank">http://www.cendio.com</a><br>
Wallenbergs gata 4<br>
583 30 Linköping        Phone: +46-13-21 46 00</font><br>_______________________________________________<br>
Kickstart-list mailing list<br>
<a href="mailto:Kickstart-list@redhat.com">Kickstart-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/kickstart-list" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br></blockquote></div><br>