raid, resize, etc.
by David Lehman
pyanaconda/storage/__init__.py | 9 +++-
pyanaconda/storage/devicelibs/mdraid.py | 14 +++---
pyanaconda/storage/partitioning.py | 8 ++--
pyanaconda/ui/gui/spokes/custom.glade | 9 ++++
pyanaconda/ui/gui/spokes/custom.py | 63 +++++++++++++++++++++----------
pyanaconda/ui/gui/spokes/lib/resize.py | 14 ++-----
pyanaconda/ui/gui/spokes/storage.py | 34 ++++++++++++++--
7 files changed, 102 insertions(+), 49 deletions(-)
11 years, 8 months
[PATCH 1/2] liveinst should recognize inst.updates too (#865398).
by Chris Lumens
---
data/liveinst/liveinst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/data/liveinst/liveinst b/data/liveinst/liveinst
index f6bf686..b129966 100755
--- a/data/liveinst/liveinst
+++ b/data/liveinst/liveinst
@@ -99,6 +99,12 @@ for opt in `cat /proc/cmdline` $*; do
--updates=*)
UPDATES="${opt#--updates=}"
;;
+ inst.updates=*)
+ UPDATES="${opt#inst.updates=}"
+ ;;
+ --inst.updates=*)
+ UPDATES="${opt#--inst.updates=}"
+ ;;
esac
done
--
1.7.11.2
11 years, 8 months
[PATCH 1/4] Another attempt at fixing the squished screen bug (#849211).
by y@redhat.com
From: Chris Lumens <clumens(a)redhat.com>
This doesn't fix the redraw-related size problem. I think that might just
be an artifact of not using a compositing manager. This merely attempts to
fix it so we don't display a spoke entirely smashed up in the upper left
corner of the screen.
---
widgets/src/BaseWindow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index bc212e3..dd7d41f 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -194,6 +194,7 @@ static void anaconda_base_window_init(AnacondaBaseWindow *win) {
/* Set properties on the parent (Gtk.Window) class. */
gtk_window_set_decorated(GTK_WINDOW(win), FALSE);
gtk_window_maximize(GTK_WINDOW(win));
+ g_object_set(win, "expand", TRUE, NULL);
gtk_container_set_border_width(GTK_CONTAINER(win), 0);
/* First, construct a top-level box that everything will go in. Remember
--
1.7.11.2
11 years, 8 months
[PATCH] Use a capital "B" in the size module (#859932).
by Chris Lumens
"b" means bits, which is definitely not what we want to display.
---
pyanaconda/storage/size.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/storage/size.py b/pyanaconda/storage/size.py
index 5b531f1..65b3e20 100644
--- a/pyanaconda/storage/size.py
+++ b/pyanaconda/storage/size.py
@@ -53,7 +53,7 @@ _binaryPrefix = [(1024, _("kibi"), _("Ki")),
(1024**7, _("zebi"), None),
(1024**8, _("yobi"), None)]
-_bytes = [_('b'), _('byte'), _('bytes')]
+_bytes = [_('B'), _('byte'), _('bytes')]
_prefixes = _decimalPrefix + _binaryPrefix
def _makeSpecs(prefix, abbr):
@@ -227,7 +227,7 @@ class Size(Decimal):
retval = "%s.%s" % (whole, fraction[:max_places])
if abbr:
- return retval + " " + abbr + _("b")
+ return retval + " " + abbr + _("B")
else:
return retval + " " + prefix + P_("byte", "bytes", newcheck)
--
1.7.11.2
11 years, 8 months
[Lorax Patch] Change the install user's shell for tmux
by Jesse Keating
---
share/runtime-postinstall.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/share/runtime-postinstall.tmpl b/share/runtime-postinstall.tmpl
index 41df26d..e87a627 100644
--- a/share/runtime-postinstall.tmpl
+++ b/share/runtime-postinstall.tmpl
@@ -55,7 +55,7 @@ install ${configdir}/pam.sshd etc/pam.d/login
install ${configdir}/pam.sshd etc/pam.d/remote
## set up "install" user account
-append etc/passwd "install:x:0:0:root:/root:/sbin/anaconda"
+append etc/passwd "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda"
append etc/shadow "install::14438:0:99999:7:::"
## remove root password
replace "root:\*:" "root::" etc/shadow
--
1.7.11.4
11 years, 8 months
[PATCH] Bundle more of data/ in updates.img
by Jesse Keating
---
scripts/makeupdates | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 6842eca..89e12fa 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -159,12 +159,16 @@ def copyUpdatedFiles(tag, updates, cwd):
install_to_dir(file, "lib/systemd/system-generators")
elif file == "data/tmux.conf":
install_to_dir(file, "usr/share/anaconda")
+ elif file == "data/interactive-defaults.ks":
+ install_to_dir(file, "usr/share/anaconda")
elif file == "data/liveinst/liveinst":
install_to_dir(file, "usr/sbin")
elif file == "data/70-anaconda.rules":
install_to_dir(file, "lib/udev/rules.d")
elif file.startswith("data/ui/"):
install_to_dir(file, "usr/share/anaconda/ui")
+ elif file.startswith("data/post-scripts/"):
+ install_to_dir(file, "usr/share/anaconda/post-scripts")
elif file.find('/') != -1:
fields = file.split('/')
subdir = fields[0]
--
1.7.11.4
11 years, 8 months
[PATCH] Revive reipl (#860244)
by Jesse Keating
reIPL used to be ran via dispatch, and would trigger either a reboot or
a shut down. Now we'll run it as part of the s390 bootloader install.
The message warning users to reipl themselves is somewhat lost here,
something for another day perhaps. This at least gets the system
working right.
---
pyanaconda/bootloader.py | 4 ++++
pyanaconda/iutil.py | 19 +++++--------------
2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 1333c75..a8c969e 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2013,6 +2013,10 @@ class ZIPL(BootLoader):
if not self.stage1_name:
raise BootLoaderError("could not find IPL device")
+ # do the reipl
+ message = iutil.reIPL(self.stage1_name)
+ log.info(message)
+
class SILO(YabootSILOBase):
name = "SILO"
_config_file = "silo.conf"
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index b39d4f4..730da8c 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -860,14 +860,7 @@ def numeric_type(num):
return num
-def reIPL(anaconda, loader_pid):
- try:
- ipldev = anaconda.storage.bootloader.stage1_name
- except AttributeError:
- message = _("Error determining boot device's disk name")
- log.warning(message)
- return message
-
+def reIPL(ipldev):
try:
rc = execWithRedirect("chreipl", ["node", "/dev/" + ipldev],
stdout = "/dev/tty5",
@@ -878,7 +871,6 @@ def reIPL(anaconda, loader_pid):
ipldev, e)
if rc:
- anaconda.canReIPL = False
devstring = None
for disk in anaconda.storage.disks:
@@ -892,13 +884,12 @@ def reIPL(anaconda, loader_pid):
message = _("After shutdown, please perform a manual IPL from %s "
"to continue installation." % devstring)
- log.info("reIPL configuration failed => halt")
- os.kill(os.getppid(), signal.SIGUSR1)
+ log.info("reIPL configuration failed")
+ #os.kill(os.getppid(), signal.SIGUSR1)
else:
- anaconda.canReIPL = True
message = None
- log.info("reIPL configuration successful => reboot")
- os.kill(os.getppid(), signal.SIGUSR2)
+ log.info("reIPL configuration successful")
+ #os.kill(os.getppid(), signal.SIGUSR2)
return message
--
1.7.11.4
11 years, 8 months
[master] [PATCH] Don't try to load ifcfg files for wifi devices (#865355)
by Vratislav Podzimek
Wifi connections have separate ifcfg files, not specified by the
device name.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/installclasses/fedora.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 3fe2bd3..013b9ed 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -118,7 +118,8 @@ class InstallClass(BaseInstallClass):
def setNetworkOnbootDefault(self, ksdata):
# if something's already enabled, we can just leave the config alone
for devName in network.getDevices():
- if network.get_ifcfg_value(devName, "ONBOOT", ROOT_PATH) == "yes":
+ if not isys.isWirelessDevice(devName) and \
+ network.get_ifcfg_value(devName, "ONBOOT", ROOT_PATH) == "yes":
return
# the default otherwise: bring up the first wired netdev with link
--
1.7.11.4
11 years, 8 months
[master] [PATCH] Rewrite isWirelessDevice to Python and DBus calls (#862801)
by Vratislav Podzimek
Using libnm-glib from a separate thread results in a hang, probably
because libnm-glib has to do some "loops magic" for its internal use
of DBus.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/isys/__init__.py | 19 +++++++++++++++++--
pyanaconda/isys/iface.c | 33 ---------------------------------
pyanaconda/isys/iface.h | 5 -----
pyanaconda/isys/isys.c | 16 ----------------
4 files changed, 17 insertions(+), 56 deletions(-)
diff --git a/pyanaconda/isys/__init__.py b/pyanaconda/isys/__init__.py
index 8195f0d..ca72438 100755
--- a/pyanaconda/isys/__init__.py
+++ b/pyanaconda/isys/__init__.py
@@ -66,6 +66,7 @@ NM_STATE_CONNECTED_LOCAL = 50
NM_STATE_CONNECTED_SITE = 60
NM_STATE_CONNECTED_GLOBAL = 70
NM_DEVICE_STATE_ACTIVATED = 100
+NM_DEVICE_TYPE_WIFI = 2
DBUS_PROPS_IFACE = "org.freedesktop.DBus.Properties"
@@ -362,8 +363,22 @@ def getNetDevDesc(dev):
return desc
# Determine if a network device is a wireless device.
-def isWirelessDevice(dev):
- return _isys.isWirelessDevice(dev)
+def isWirelessDevice(dev_name):
+ bus = dbus.SystemBus()
+ nm = bus.get_object(NM_SERVICE, NM_MANAGER_PATH)
+ devlist = nm.get_dbus_method("GetDevices")()
+
+ for path in devlist:
+ device = bus.get_object(NM_SERVICE, path)
+ device_props_iface = dbus.Interface(device, DBUS_PROPS_IFACE)
+
+ iface = device_props_iface.Get(NM_DEVICE_IFACE, "Interface")
+ if iface == dev_name:
+ device_type = device_props_iface.Get(NM_DEVICE_IFACE, "DeviceType")
+ return device_type == NM_DEVICE_TYPE_WIFI
+
+ return False
+
# Get IP addresses for a network device.
# Returns list of ipv4 or ipv6 addresses, depending
diff --git a/pyanaconda/isys/iface.c b/pyanaconda/isys/iface.c
index 7d11600..af64264 100644
--- a/pyanaconda/isys/iface.c
+++ b/pyanaconda/isys/iface.c
@@ -620,36 +620,3 @@ ifacemtu_error1:
return ret;
}
-/*
- * Checks if interface is wireless
- */
-int is_wireless_device(char *ifname){
- NMClient *client = NULL;
- NMDevice *candidate = NULL;
- const GPtrArray *devices;
- const char *iface;
- int i;
-
- g_type_init();
-
- client = nm_client_new();
- if (!client) {
- return 0;
- }
-
- devices = nm_client_get_devices(client);
- for (i = 0; devices && (i < devices->len); i++) {
- candidate = g_ptr_array_index(devices, i);
- if (NM_IS_DEVICE_WIFI (candidate)) {
- iface = nm_device_get_iface(candidate);
- if (!strcmp(ifname, iface)) {
- g_object_unref(client);
- return 1;
- }
- }
-
- }
- g_object_unref(client);
- return 0;
-}
-
diff --git a/pyanaconda/isys/iface.h b/pyanaconda/isys/iface.h
index b249394..c4167b0 100644
--- a/pyanaconda/isys/iface.h
+++ b/pyanaconda/isys/iface.h
@@ -171,11 +171,6 @@ int iface_restart_NetworkManager(void);
int iface_set_interface_mtu(char *ifname, int mtu);
/*
- * Checks if interface is wireless
- */
-int is_wireless_device(char *ifname);
-
-/*
* Checks if the state means nm is connected
*/
int is_connected_state(NMState state);
diff --git a/pyanaconda/isys/isys.c b/pyanaconda/isys/isys.c
index e6c56de..ba2d324 100644
--- a/pyanaconda/isys/isys.c
+++ b/pyanaconda/isys/isys.c
@@ -109,7 +109,6 @@ static PyObject * doIsCapsLockEnabled(PyObject * s, PyObject * args);
static PyObject * doGetLinkStatus(PyObject * s, PyObject * args);
static PyObject * doGetAnacondaVersion(PyObject * s, PyObject * args);
static PyObject * doInitLog(PyObject * s);
-static PyObject * doIsWirelessDevice(PyObject * s, PyObject * args);
static PyObject * doTotalMemory(PyObject * s);
static PyMethodDef isysModuleMethods[] = {
@@ -138,7 +137,6 @@ static PyMethodDef isysModuleMethods[] = {
{ "getLinkStatus", (PyCFunction) doGetLinkStatus, METH_VARARGS, NULL },
{ "getAnacondaVersion", (PyCFunction) doGetAnacondaVersion, METH_VARARGS, NULL },
{ "initLog", (PyCFunction) doInitLog, METH_VARARGS, NULL },
- { "isWirelessDevice", (PyCFunction) doIsWirelessDevice, METH_VARARGS, NULL },
{ "total_memory", (PyCFunction) doTotalMemory, METH_NOARGS, NULL },
{ NULL, NULL, 0, NULL }
} ;
@@ -606,20 +604,6 @@ static PyObject * doInitLog(PyObject * s) {
return Py_None;
}
-static PyObject * doIsWirelessDevice(PyObject * s, PyObject * args) {
- char *dev = NULL;
-
- if (!PyArg_ParseTuple(args, "s", &dev)) {
- return NULL;
- }
-
- if (is_wireless_device(dev) == 1) {
- return PyBool_FromLong(1);
- }
-
- return PyBool_FromLong(0);
-}
-
static PyObject * doTotalMemory(PyObject * s) {
unsigned long long tm = totalMemory();
return PyLong_FromUnsignedLongLong(tm);
--
1.7.11.4
11 years, 8 months
[PATCH master] Don't display "None" for NIC vendors and products we can't identify (#859540)
by Radek Vykydal
---
pyanaconda/ui/gui/spokes/network.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 27266ff..8752502 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -545,8 +545,8 @@ class NetworkControlBox():
title = '<span size="large">%s (%s%s)</span>' % (self._dev_type_str(device),
device.get_iface(),
unplugged)
- title += '\n<span size="small">%s %s</span>' % (device.get_vendor(),
- device.get_product())
+ title += '\n<span size="small">%s %s</span>' % (device.get_vendor() or "",
+ device.get_product() or "")
return title
def _dev_type_str(self, device):
--
1.7.4
11 years, 8 months