package install_steps_newt; # $Id$ use diagnostics; use strict; use vars qw(@ISA); @ISA = qw(install_steps_interactive interactive_newt); #-###################################################################################### #- misc imports #-###################################################################################### use install_steps_interactive; use interactive_newt; use install_any; use devices; use lang; use common qw(:common); my $banner = __(); sub banner { my $banner = translate(__("Mandrake Linux Installation %s")); my $l = first(Newt::GetScreenSize) - length($banner) - length($_[0]) + 1; Newt::DrawRootText(0, 0, sprintf($banner, ' ' x $l . $_[0])); } sub new($$) { my ($type, $o) = @_; interactive_newt->new; banner(''); Newt::PushHelpLine(_(" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen ")); (bless {}, ref $type || $type)->SUPER::new($o); } sub enteringStep { my ($o, $step) = @_; $o->SUPER::enteringStep($step); banner(translate($o->{steps}{$step}{text})); } sub exitInstall { &install_steps_interactive::exitInstall; interactive_newt::end; } #-###################################################################################### #- Steps Functions #-###################################################################################### sub selectLanguage { my ($o) = @_; $o->SUPER::selectLanguage; lang::load_console_font($o->{lang}); } 1; >distro/mga3</option> <option value='distro/mga4'>distro/mga4</option> <option value='distro/mga5'>distro/mga5</option> <option value='distro/mga6'>distro/mga6</option> <option value='distro/mga7'>distro/mga7</option> <option value='distro/mga8'>distro/mga8</option> <option value='distro/mga9'>distro/mga9</option> <option value='master'>master</option> <option value='topic/Corpo_2_1'>topic/Corpo_2_1</option> <option value='topic/KA9_0'>topic/KA9_0</option> <option value='topic/MDK-10-update'>topic/MDK-10-update</option> <option value='topic/MDK-10_1-update'>topic/MDK-10_1-update</option> <option value='topic/MDK-10_2-update'>topic/MDK-10_2-update</option> <option value='topic/MDK-2006_0-update'>topic/MDK-2006_0-update</option> <option value='topic/MDK92-branch'>topic/MDK92-branch</option> <option value='topic/MDKC_1_0'>topic/MDKC_1_0</option> <option value='topic/PCMCIA_CS_DISTRO'>topic/PCMCIA_CS_DISTRO</option> <option value='topic/R9_0-64bit-branch'>topic/R9_0-64bit-branch</option> <option value='topic/R9_1_HP-branch'>topic/R9_1_HP-branch</option> <option value='topic/a'>topic/a</option> <option value='topic/before_matchbox_wm'>topic/before_matchbox_wm</option> <option value='topic/bug-13680'>topic/bug-13680</option> <option value='topic/dietlibc'>topic/dietlibc</option> <option value='topic/efi'>topic/efi</option> <option value='topic/extlinux'>topic/extlinux</option> <option value='topic/firewall'>topic/firewall</option> <option value='topic/gdk-pixbuf-0-branch'>topic/gdk-pixbuf-0-branch</option> <option value='topic/gi-ppc'>topic/gi-ppc</option> <option value='topic/ia64-8_1'>topic/ia64-8_1</option> <option value='topic/mandrakesoft'>topic/mandrakesoft</option> <option value='topic/mlcd4'>topic/mlcd4</option> <option value='topic/ppp'>topic/ppp</option> <option value='topic/rp-pppoe'>topic/rp-pppoe</option> <option value='topic/switching_to_dnf'>topic/switching_to_dnf</option> <option value='topic/switching_to_urpmi'>topic/switching_to_urpmi</option> <option value='topic/unlabeled-1.1.1'>topic/unlabeled-1.1.1</option> <option value='topic/v_webmin_0_87'>topic/v_webmin_0_87</option> <option value='topic/x86_64-branch'>topic/x86_64-branch</option> <option value='user/animtim/designWork'>user/animtim/designWork</option> <option value='user/colin/rescue-systemd'>user/colin/rescue-systemd</option> <option value='user/ennael/mga6'>user/ennael/mga6</option> <option value='user/erwan/bug-13680'>user/erwan/bug-13680</option> <option value='user/jibz/aarch64'>user/jibz/aarch64</option> <option value='user/martinw/mga6'>user/martinw/mga6</option> <option value='user/pterjan/arm64'>user/pterjan/arm64</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>Mageia Installer and base platform for many utilities</td><td class='sub right'>Thierry Vignaud [tv]</td></tr></table> <table class='tabs'><tr><td> <a href='/software/drakx/?h=17.0'>summary</a><a href='/software/drakx/refs/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>refs</a><a href='/software/drakx/log/?h=17.0'>log</a><a href='/software/drakx/tree/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>tree</a><a class='active' href='/software/drakx/commit/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>commit</a><a href='/software/drakx/diff/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>diff</a><a href='/software/drakx/stats/?h=17.0'>stats</a></td><td class='form'><form class='right' method='get' action='/software/drakx/log/'> <input type='hidden' name='h' value='17.0'/><input type='hidden' name='id' value='9c2224905d0d4b6a80ee34c7c847b40bac6619a3'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='17.0'/><input type='hidden' name='id' value='9c2224905d0d4b6a80ee34c7c847b40bac6619a3'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'> <tr><th>author</th><td>Stew Benedict <stewb@mandriva.org></td><td class='right'>2005-09-26 16:57:59 +0000</td></tr> <tr><th>committer</th><td>Stew Benedict <stewb@mandriva.org></td><td class='right'>2005-09-26 16:57:59 +0000</td></tr> <tr><th>commit</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>9c2224905d0d4b6a80ee34c7c847b40bac6619a3</a> (<a href='/software/drakx/patch/?id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='sha1'><a href='/software/drakx/tree/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>b78aca53c716d15cefcaedbd77f9c46518ee261c</a></td></tr> <tr><th>parent</th><td colspan='2' class='sha1'><a href='/software/drakx/commit/?h=17.0&id=87b1c3f69fe70fefafc0757a620925c9d5462c87'>87b1c3f69fe70fefafc0757a620925c9d5462c87</a> (<a href='/software/drakx/diff/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3&id2=87b1c3f69fe70fefafc0757a620925c9d5462c87'>diff</a>)</td></tr><tr><th>download</th><td colspan='2' class='sha1'><a href='/software/drakx/snapshot/drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar'>drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar</a><br/><a href='/software/drakx/snapshot/drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.gz'>drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.gz</a><br/><a href='/software/drakx/snapshot/drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.bz2'>drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.bz2</a><br/><a href='/software/drakx/snapshot/drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.xz'>drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.tar.xz</a><br/><a href='/software/drakx/snapshot/drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.zip'>drakx-9c2224905d0d4b6a80ee34c7c847b40bac6619a3.zip</a><br/></td></tr></table> <div class='commit-subject'>Install mkisofs if needed. Refuse to creates images without a NIC.</div><div class='commit-msg'></div><div class='diffstat-header'><a href='/software/drakx/diff/?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>Diffstat</a></div><table summary='diffstat' class='diffstat'><tr><td class='mode'>-rwxr-xr-x</td><td class='upd'><a href='/software/drakx/diff/perl-install/standalone/drakTermServ?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>perl-install/standalone/drakTermServ</a></td><td class='right'>28</td><td class='graph'><table summary='file diffstat' width='28%'><tr><td class='add' style='width: 57.1%;'/><td class='rem' style='width: 42.9%;'/><td class='none' style='width: 0.0%;'/></tr></table></td></tr> </table><div class='diffstat-summary'>1 files changed, 16 insertions, 12 deletions</div><table summary='diff' class='diff'><tr><td><div class='head'>diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ<br/>index bac06a5a6..506ecd9c8 100755<br/>--- a/<a href='/software/drakx/tree/perl-install/standalone/drakTermServ?h=17.0&id=87b1c3f69fe70fefafc0757a620925c9d5462c87'>perl-install/standalone/drakTermServ</a><br/>+++ b/<a href='/software/drakx/tree/perl-install/standalone/drakTermServ?h=17.0&id=9c2224905d0d4b6a80ee34c7c847b40bac6619a3'>perl-install/standalone/drakTermServ</a></div><div class='hunk'>@@ -1577,7 +1577,8 @@ sub write_and_check {</div><div class='ctx'> </div><div class='ctx'> sub write_eb_image {</div><div class='ctx'> #- write a bootable etherboot CD image or floppy - pxe images too</div><div class='del'>- my ($nic, $rom_path, $type) = @_; </div><div class='add'>+ my ($nic, $rom_path, $type) = @_;</div><div class='add'>+ $in->ask_warn(N("Error"), N("No NIC selected!")) and return if $nic eq ''; </div><div class='ctx'> if ($type eq 'floppy') {</div><div class='ctx'> my $in = interactive->vnew;</div><div class='ctx'> if (-e "/dev/fd0") {</div><div class='hunk'>@@ -1601,17 +1602,20 @@ sub write_eb_image {</div><div class='ctx'> $in->ask_warn(N("Error"), N("Error writing %s/%s", $tftpboot, $nic));</div><div class='ctx'> } </div><div class='ctx'> } else {</div><div class='del'>- my $tmp = "/root/tmp";</div><div class='del'>- mkdir_p("$tmp/eb");</div><div class='del'>- run_program::run("cat $rom_path/zdsk/$nic > $tmp/eb/eb.img");</div><div class='del'>- run_program::run("dd if=/dev/zero of=$tmp/eb/eb.img bs=512 seek=72 count=2808");</div><div class='del'>- run_program::run("mkisofs -b eb.img -o $tmp/$nic.iso $tmp/eb");</div><div class='del'>- rm_rf("$tmp/eb");</div><div class='del'>- if (-e "$tmp/$nic.iso") {</div><div class='del'>- $in->ask_warn(N("Information"), N("Etherboot ISO image is %s", "$tmp/$nic.iso"));</div><div class='del'>- } else { </div><div class='del'>- $in->ask_warn(N("Error"), N("Something went wrong! - Is mkisofs installed?"));</div><div class='del'>- } </div><div class='add'>+ my $installed = $in->do_pkgs->install('mkisofs') || -f "/usr/bin/mksofs";</div><div class='add'>+ if ($installed) {</div><div class='add'>+ my $tmp = "/root/tmp";</div><div class='add'>+ mkdir_p("$tmp/eb");</div><div class='add'>+ run_program::run("cat $rom_path/zdsk/$nic > $tmp/eb/eb.img");</div><div class='add'>+ run_program::run("dd if=/dev/zero of=$tmp/eb/eb.img bs=512 seek=72 count=2808");</div><div class='add'>+ run_program::run("mkisofs -b eb.img -o $tmp/$nic.iso $tmp/eb");</div><div class='add'>+ rm_rf("$tmp/eb");</div><div class='add'>+ if (-e "$tmp/$nic.iso") {</div><div class='add'>+ $in->ask_warn(N("Information"), N("Etherboot ISO image is %s", "$tmp/$nic.iso"));</div><div class='add'>+ return;</div><div class='add'>+ }</div><div class='add'>+ }</div><div class='add'>+ $in->ask_warn(N("Error"), N("Something went wrong! - Is mkisofs installed?")); </div><div class='ctx'> }</div><div class='ctx'> }</div><div class='ctx'> </div></td></tr></table></div> <!-- class=content --> <div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.1</a> (<a href='https://git-scm.com/'>git 2.21.0</a>) at 2025-02-23 16:59:51 +0000</div> </div> <!-- id=cgit --> </body> </html>