Commits

m0e_lnx  committed 3809434

Fixed issue #2.

  • Participants
  • Parent commits ffb5260

Comments (0)

Files changed (2)

File src/vasm/backend/networking.py

         """ Return a list of Nic objects """
         ret = []
         for nic in netinfo.list_devs():
+	    if nic not in netinfo.list_active_devs():
+		continue
             if nic == 'lo':
                 continue
             ip = netinfo.get_ip(nic)

File src/vasm/ui/tui/modules/tui_bootloaders.py

             body = _body,
             buttons = [("Save", self.module_ok_event),
                 ("Cancel", self.parent.return_home)])
+	
+	# run a check if we are on a chroot and pop a warning dialog
+	self._run_chroot_test()
         # Set the default values
         bootsec = bootloaders.get_current_bootsector()
         currentroot = bootsec[:len('/dev/sda'):]
         # Move the focus to the body section of the module
         self.set_focus('body')
 
+    def _run_chroot_test(self):
+	bootsec = BOOTLOADERS.get_current_bootsector()
+	if bootsec is None:
+	    dia = dialogs.Warning(
+			parent = self.parent,
+			message = _("Unable to detect current / partition.  You will not be able to save changes."),
+			buttons = [("OK",self.close_module)])
+	    return self.pop_dialog(dia)
+
     def _check_selections(self):
         # check if target has a value
         assert self.targetpicker.get_value().startswith("/"),\