bootdisk/trunk/batch-installer/ui: ui-main ui-wizard
hawk
cvs at pld-linux.org
Tue Mar 21 22:42:31 CET 2006
Author: hawk
Date: Tue Mar 21 22:42:28 2006
New Revision: 7261
Modified:
bootdisk/trunk/batch-installer/ui/ui-main
bootdisk/trunk/batch-installer/ui/ui-wizard
Log:
- depending on bootdisk type show only available installation source types
Modified: bootdisk/trunk/batch-installer/ui/ui-main
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-main (original)
+++ bootdisk/trunk/batch-installer/ui/ui-main Tue Mar 21 22:42:28 2006
@@ -72,10 +72,15 @@
<br>
<meta title="$(nls "Type of installation")">
<menu id=res_menu res=1>
- <item id=cdrom>_cdrom: `nls "CD-ROM device"`
- <item id=net>_net: `nls "network server (ftp, http)"`
- <item id=nfs>_nfs: `nls "NFS server"`
- <item id=disk>_disk: `nls "Hard disk partition"`
+ $(
+ if test -f /etc/bootdisk_cd || test -f /etc/bootdisk_iso; then
+ echo "<item id=cdrom>_cdrom: `nls "CD-ROM device"`"
+ echo "<item id=disk>_disk: `nls "Hard disk partition"`"
+ elif test -f /etc/bootdisk_net || test -f /etc/bootdisk_pcmcia || test -f /etc/bootdisk_iso; then
+ echo "<item id=net>_net: `nls "network server (ftp, http)"`"
+ echo "<item id=nfs>_nfs: `nls "NFS server"`"
+ fi
+ )
</menu>
$@
EOF
Modified: bootdisk/trunk/batch-installer/ui/ui-wizard
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-wizard (original)
+++ bootdisk/trunk/batch-installer/ui/ui-wizard Tue Mar 21 22:42:28 2006
@@ -208,28 +208,30 @@
<meta active=source>
<br>
<menu id=source res=1002 selected=$source>
-<item id=cdrom>_cdrom: $(nls "CD-ROM device")
-<item id=net>_net: $(nls "network server (ftp, http)")
-<item id=nfs>_nfs: $(nls "NFS server")
-<item id=disk>_disk: $(nls "Hard disk partition")
+$(
+ if test -f /etc/bootdisk_cd || test -f /etc/bootdisk_iso; then
+ echo "<item id=cdrom>_cdrom: $(nls "CD-ROM device")"
+ echo "<item id=disk>_disk: $(nls "Hard disk partition")"
+ elif test -f /etc/bootdisk_net || test -f /etc/bootdisk_pcmcia || test -f /etc/bootdisk_iso; then
+ echo "<item id=net>_net: $(nls "network server (ftp, http)")"
+ echo "<item id=nfs>_nfs: $(nls "NFS server")"
+ fi
+)
</menu>
<br>
$(nls "Please select device you are going to install from, then press <br>Enter or Next >>.")
+<br><br>
+$(
+ if test -f /etc/bootdisk_cd ; then
+ echo $(nls "For network based installation, please use bootdisk_net.img<br>or boot your computer from installation CD. If you have PCMCIA<br>network card, please use bootdisk_pcmcia.img.")
+ elif test -f /etc/bootdisk_net || test -f /etc/bootdisk_pcmcia ; then
+ echo $(nls "For CD or disk based installation, please use bootdisk_cd.img<br>or boot your computer from installation CD.")
+ fi
+)
EOF
}
post_source1 () {
- if [ $source = cdrom ] || [ $source = disk ]; then
- if ! test -f /etc/bootdisk_cd && ! test -f /etc/bootdisk_iso; then
- info $(nls "For CD or disk based installation, please use bootdisk_cd.img<br>or boot your computer from installation CD.")
- return 1;
- fi
- elif [ $source = net ] || [ $source = nfs ]; then
- if ! test -f /etc/bootdisk_net && ! test -f /etc/bootdisk_pcmcia && ! test -f /etc/bootdisk_iso; then
- info $(nls "For network based installation, please use bootdisk_net.img<br>or boot your computer from installation CD. If you have PCMCIA<br>network card, please use bootdisk_pcmcia.img.")
- return 1;
- fi
- fi
}
###
More information about the pld-cvs-commit
mailing list