From: <cod...@go...> - 2008-09-23 15:11:59
|
Author: m0e.lnx Date: Tue Sep 23 08:10:29 2008 New Revision: 174 Modified: branches/iVL/.lang/#project.pot branches/iVL/.lang/ClsGlobal.pot branches/iVL/.lang/ClsPartSel.pot branches/iVL/.lang/ClsWinDrives.pot branches/iVL/.lang/FMain.pot branches/iVL/.lang/FrmDiskPart.pot branches/iVL/.lang/FrmLicense.pot branches/iVL/.lang/FrmPartScheme.pot branches/iVL/.lang/FrmPartSel.pot branches/iVL/.lang/FrmPkgSel.pot branches/iVL/.lang/FrmSelISO.pot branches/iVL/.lang/FrmSummary.pot branches/iVL/.lang/FrmWinDrives.pot branches/iVL/.lang/MdlCore.pot branches/iVL/.lang/MdlDiskPart.pot branches/iVL/.lang/MdlObjSizer.pot branches/iVL/.lang/MdlPartSel.pot branches/iVL/.lang/MdlPkgSel.pot branches/iVL/.lang/MdlSetup.pot branches/iVL/.lang/MdlSummarize.pot branches/iVL/.lang/MdlWinDrives.pot branches/iVL/.project branches/iVL/FMain.class branches/iVL/FrmNetConf.class branches/iVL/FrmNetConf.form branches/iVL/MdlNetConf.module Log: - Modified the way the hostname is retreived to avoid getting a weird characted at EOL - Added code to read the nameserver addresses and write them to /etc/resolve.conf Modified: branches/iVL/.lang/#project.pot ============================================================================== --- branches/iVL/.lang/#project.pot (original) +++ branches/iVL/.lang/#project.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/.project +# /home/remote/area-51/projects/installer/.project # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsGlobal.pot ============================================================================== --- branches/iVL/.lang/ClsGlobal.pot (original) +++ branches/iVL/.lang/ClsGlobal.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/ClsGlobal.class +# /home/remote/area-51/projects/installer/ClsGlobal.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsPartSel.pot ============================================================================== --- branches/iVL/.lang/ClsPartSel.pot (original) +++ branches/iVL/.lang/ClsPartSel.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/ClsPartSel.class +# /home/remote/area-51/projects/installer/ClsPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/ClsWinDrives.pot ============================================================================== --- branches/iVL/.lang/ClsWinDrives.pot (original) +++ branches/iVL/.lang/ClsWinDrives.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/ClsWinDrives.class +# /home/remote/area-51/projects/installer/ClsWinDrives.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FMain.pot ============================================================================== --- branches/iVL/.lang/FMain.pot (original) +++ branches/iVL/.lang/FMain.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FMain.class +# /home/remote/area-51/projects/installer/FMain.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -14,19 +14,19 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: FMain.class:334 +#: FMain.class:341 msgid "Process Overview" msgstr "" -#: FMain.class:354 +#: FMain.class:361 msgid "Next" msgstr "" -#: FMain.class:360 +#: FMain.class:367 msgid "Back" msgstr "" -#: FMain.class:366 +#: FMain.class:373 msgid "Exit" msgstr "" Modified: branches/iVL/.lang/FrmDiskPart.pot ============================================================================== --- branches/iVL/.lang/FrmDiskPart.pot (original) +++ branches/iVL/.lang/FrmDiskPart.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmDiskPart.class +# /home/remote/area-51/projects/installer/FrmDiskPart.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmLicense.pot ============================================================================== --- branches/iVL/.lang/FrmLicense.pot (original) +++ branches/iVL/.lang/FrmLicense.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmLicense.class +# /home/remote/area-51/projects/installer/FrmLicense.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartScheme.pot ============================================================================== --- branches/iVL/.lang/FrmPartScheme.pot (original) +++ branches/iVL/.lang/FrmPartScheme.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmPartScheme.class +# /home/remote/area-51/projects/installer/FrmPartScheme.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPartSel.pot ============================================================================== --- branches/iVL/.lang/FrmPartSel.pot (original) +++ branches/iVL/.lang/FrmPartSel.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmPartSel.class +# /home/remote/area-51/projects/installer/FrmPartSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmPkgSel.pot ============================================================================== --- branches/iVL/.lang/FrmPkgSel.pot (original) +++ branches/iVL/.lang/FrmPkgSel.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmPkgSel.class +# /home/remote/area-51/projects/installer/FrmPkgSel.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSelISO.pot ============================================================================== --- branches/iVL/.lang/FrmSelISO.pot (original) +++ branches/iVL/.lang/FrmSelISO.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmSelISO.class +# /home/remote/area-51/projects/installer/FrmSelISO.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmSummary.pot ============================================================================== --- branches/iVL/.lang/FrmSummary.pot (original) +++ branches/iVL/.lang/FrmSummary.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmSummary.class +# /home/remote/area-51/projects/installer/FrmSummary.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/FrmWinDrives.pot ============================================================================== --- branches/iVL/.lang/FrmWinDrives.pot (original) +++ branches/iVL/.lang/FrmWinDrives.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/FrmWinDrives.class +# /home/remote/area-51/projects/installer/FrmWinDrives.class # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlCore.pot ============================================================================== --- branches/iVL/.lang/MdlCore.pot (original) +++ branches/iVL/.lang/MdlCore.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlCore.module +# /home/remote/area-51/projects/installer/MdlCore.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlDiskPart.pot ============================================================================== --- branches/iVL/.lang/MdlDiskPart.pot (original) +++ branches/iVL/.lang/MdlDiskPart.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlDiskPart.module +# /home/remote/area-51/projects/installer/MdlDiskPart.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlObjSizer.pot ============================================================================== --- branches/iVL/.lang/MdlObjSizer.pot (original) +++ branches/iVL/.lang/MdlObjSizer.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlObjSizer.module +# /home/remote/area-51/projects/installer/MdlObjSizer.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPartSel.pot ============================================================================== --- branches/iVL/.lang/MdlPartSel.pot (original) +++ branches/iVL/.lang/MdlPartSel.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlPartSel.module +# /home/remote/area-51/projects/installer/MdlPartSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlPkgSel.pot ============================================================================== --- branches/iVL/.lang/MdlPkgSel.pot (original) +++ branches/iVL/.lang/MdlPkgSel.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlPkgSel.module +# /home/remote/area-51/projects/installer/MdlPkgSel.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSetup.pot ============================================================================== --- branches/iVL/.lang/MdlSetup.pot (original) +++ branches/iVL/.lang/MdlSetup.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlSetup.module +# /home/remote/area-51/projects/installer/MdlSetup.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlSummarize.pot ============================================================================== --- branches/iVL/.lang/MdlSummarize.pot (original) +++ branches/iVL/.lang/MdlSummarize.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlSummarize.module +# /home/remote/area-51/projects/installer/MdlSummarize.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.lang/MdlWinDrives.pot ============================================================================== --- branches/iVL/.lang/MdlWinDrives.pot (original) +++ branches/iVL/.lang/MdlWinDrives.pot Tue Sep 23 08:10:29 2008 @@ -1,4 +1,4 @@ -# /home/moe/projects/installer/MdlWinDrives.module +# /home/remote/area-51/projects/installer/MdlWinDrives.module # Generated by Gambas compiler # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. Modified: branches/iVL/.project ============================================================================== --- branches/iVL/.project (original) +++ branches/iVL/.project Tue Sep 23 08:10:29 2008 @@ -1,6 +1,6 @@ # Gambas Project File 2.0 Title=VectorLinux Installer -Startup=FrmNetConf +Startup=MdlCore Version=0.0.54 Library=gb.gtk Library=gb.form Modified: branches/iVL/FMain.class ============================================================================== --- branches/iVL/FMain.class (original) +++ branches/iVL/FMain.class Tue Sep 23 08:10:29 2008 @@ -271,8 +271,15 @@ frmNext = FrmUserAdd + CASE "FrmUserAdd" + frmNext = FrmNetConf + + CASE "FrmNetConf" + MdlNetConf.SET_HOSTNAME + MdlNetConf.SET_DNS_ADDRESSES + MdlNetConf.WRITE_INET ' frmNext = FrmLilo ' this is already done END SELECT Modified: branches/iVL/FrmNetConf.class ============================================================================== --- branches/iVL/FrmNetConf.class (original) +++ branches/iVL/FrmNetConf.class Tue Sep 23 08:10:29 2008 @@ -17,38 +17,41 @@ PUBLIC FUNCTION GET_CURRENT_HOST_NAME() AS String DIM sRes AS String - IF Exist("/etc/HOSTNAME") THEN - File.Save(Temp("Host"), SConv(File.load("/etc/HOSTNAME"))) - - - sRes = DConv(File.Load(Temp("Host"))) - - 'sRes = File.Load(DConv("/etc/HOSTNAME")) + + SHELL "hostname" TO sRes + + sRes = Trim(sRes) IF sRes = "" THEN sRes = "Vector.Linux.net" END IF - ELSE - sRes = "Vector.Linux.net" - END IF - RETURN sRes + + RETURN Trim(sRes) END PUBLIC SUB Form_Open() + FMain.FrmCurr = ME ME.txtHostName.text = ME.GET_CURRENT_HOST_NAME() MdlNetConf.LIST_NETWORK_INTERFACES cbUseManDNS.Value = FALSE tlBanner.text = "<h2>" & tlBanner.text & "</h2>" + FMain.tvPlan["Conf2"].picture = MdlCore.sNowPic + FMain.tvPlan["Conf2"].Selected = TRUE + + IF ERROR THEN Message(Error.text & "\n" & Error.where) + + END PUBLIC SUB Form_Menu() - MdlNetConf.WRITE_INET() + 'MdlNetConf.WRITE_INET() ' only enabled for testing. THis will get triggered on the "next" button's click event + 'MdlNetConf.SET_DNS_ADDRESSES END @@ -56,8 +59,8 @@ DIM itxtboxleft AS Integer WITH ME - .tlBanner.Move(8, 10, MdlObjSizer.get_object_width(.tlBanner.text)) - .tlHostNameLbl.Move(.tlBanner.Left, .tlBanner.top + .tlBanner.Height + 8, MdlObjSizer.get_object_width(.tlHostNameLbl.text), 21) + .tlBanner.Move(8, 8, MdlObjSizer.get_object_width(.tlBanner.text)) + .tlHostNameLbl.Move(.tlBanner.Left, .tlBanner.top + .tlBanner.Height + 4, MdlObjSizer.get_object_width(.tlHostNameLbl.text), 21) .txtHostName.Move(.tlHostNameLbl.left + .tlHostNameLbl.Width + 4, .tlHostNameLbl.top) .cbUseManDNS.Move(.tlHostNameLbl.Left, .tlHostNameLbl.top + .tlHostNameLbl.Height + 10, MdlObjSizer.get_object_width(.cbUseManDNS.text) + 24) .tlPrimaryDNS.Move(.cbUseManDNS.left, .cbUseManDNS.top + .cbUseManDNS.Height + 4, MdlObjSizer.get_object_width(.tlPrimaryDNS.text)) Modified: branches/iVL/FrmNetConf.form ============================================================================== --- branches/iVL/FrmNetConf.form (original) +++ branches/iVL/FrmNetConf.form Tue Sep 23 08:10:29 2008 @@ -33,7 +33,7 @@ } { txtPrimaryDNS TextBox txtManDNSBoxes Name = "txtPrimaryDNS" - MoveScaled(24,16,18.5714,3) + MoveScaled(24,16,18.5,3) Enabled = False Text = ("192.168.1.254") } @@ -44,12 +44,12 @@ } { txtSecDNS TextBox txtManDNSBoxes Name = "txtSecDNS" - MoveScaled(26,19,18.5714,3) + MoveScaled(26,19,18.5,3) Enabled = False Text = ("") } { tlBanner TextLabel - MoveScaled(1,1,45,6) + MoveScaled(1,1,45,5) Text = ("NETWORK CONFIGURATION") Alignment = Align.Normal } Modified: branches/iVL/MdlNetConf.module ============================================================================== --- branches/iVL/MdlNetConf.module (original) +++ branches/iVL/MdlNetConf.module Tue Sep 23 08:10:29 2008 @@ -203,7 +203,7 @@ frmDetails = NEW Frame(FrmNetConf.TSNetDevices) AS "STaticDetails" WITH frmDetails .Move(ileft, itop + 8) - .text = "Settings for Static Method" + .text = " Static IP Address Settings " .Width = .Parent.Width - (.left * 2.5) .Height = 130 .tag = LAST.tag @@ -340,7 +340,7 @@ ' Base the function on the objects rather than the tabstrip FOR EACH cb IN objCheckboxes - IF cb.value = TRUE THEN + 'IF cb.value = TRUE THEN sDev = cb.Tag FOR EACH combo IN objCombos IF combo.tag = cb.tag THEN @@ -384,13 +384,17 @@ "## The Script \n \n" & "## You may make customized script here \n" & "## of source the starndard network script\n\n" & - ". /etc/rc.d/functions-network $@ " - - Message(sScript) + ". /etc/rc.d/functions-network $@ \n\n" + 'Message(sScript) + File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "rc.d" &/ "rc.inet" & ii, sScript) + IF cb.Value = TRUE THEN + SHELL "chmod +x /tmp/rc.inet" & ii WAIT + END IF + INC ii NEXT - + 'INC ii 'ME.SET_HOSTNAME("Test") END @@ -408,6 +412,22 @@ END +PUBLIC SUB SET_DNS_ADDRESSES() + + DIM sFile AS String + + IF FrmNetConf.cbUseManDNS.value = TRUE THEN + sFile = "# Generated by the VectorlLinux installer\n" + IF FrmNetConf.txtPrimaryDNS.text <> "" THEN sFile = sFile & "\n" & "nameserver " & FrmNetConf.txtPrimaryDNS.Text + IF FrmNetConf.txtSecDNS.text <> "" THEN sFile = sFile & "\n" & "nameserver " & FrmNetConf.txtSecDNS.Text + File.Save(ClsGlobal.sTargetMnt &/ "etc" &/ "resolv.conf", sFile) + END IF + 'Message(sFile) + ' If DHCP is used, then /etc/resolv.conf is generated by dhcpcd + +END + + |