Author: jsuchome
Date: Fri Nov 7 13:25:09 2008
New Revision: 53061
URL: http://svn.opensuse.org/viewcvs/yast?rev=53061&view=rev
Log:
- offer new lines in /etc/fstab with new device names (bnc#431418)
- 2.17.7
Modified:
trunk/repair/VERSION
trunk/repair/package/yast2-repair.changes
trunk/repair/src/OSRFstab.ycp
Modified: trunk/repair/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/VERSION?rev=53061&r1=53060&r2=53061&view=diff
==============================================================================
--- trunk/repair/VERSION (original)
+++ trunk/repair/VERSION Fri Nov 7 13:25:09 2008
@@ -1 +1 @@
-2.17.6
+2.17.7
Modified: trunk/repair/package/yast2-repair.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/package/yast2-repair.changes?rev=53061&r1=53060&r2=53061&view=diff
==============================================================================
--- trunk/repair/package/yast2-repair.changes (original)
+++ trunk/repair/package/yast2-repair.changes Fri Nov 7 13:25:09 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Nov 7 13:17:16 CET 2008 - jsuchome@suse.cz
+
+- offer new lines in /etc/fstab with new device names (bnc#431418)
+- 2.17.7
+
+-------------------------------------------------------------------
Thu Nov 6 11:05:56 CET 2008 - jsuchome@suse.cz
- added "Boot Installed System" option to Repair Tools (bnc#441188)
Modified: trunk/repair/src/OSRFstab.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/repair/src/OSRFstab.ycp?rev=53061&r1=53060&r2=53061&view=diff
==============================================================================
--- trunk/repair/src/OSRFstab.ycp (original)
+++ trunk/repair/src/OSRFstab.ycp Fri Nov 7 13:25:09 2008
@@ -1094,7 +1094,10 @@
define list<term> missing_devs_items( map new_entries)``{
list<term> item_list = [];
foreach (string k, map e, (map >)new_entries, ``{
- item_list = add (item_list, `item(`id(k), k, e["mount"]:""));
+ string dev_label = k;
+ if (e["device_by"]:"" != "")
+ dev_label = sformat ("%1 (%2)", k, e["device_by"]:"");
+ item_list = add (item_list, `item(`id(k), dev_label, e["mount"]:""));
});
return item_list;
}
@@ -1132,6 +1135,8 @@
integer other_nr = 1; // count other mounts -> global for wirte_fstab
map new_entries = $[];
+ symbol mount_by = Storage::GetDefaultMountBy ();
+
missing_devs = sort (string d1, string d2, missing_devs , ``( d1 < d2));
foreach (string dev, missing_devs, {
@@ -1147,6 +1152,7 @@
string start = "/data";
integer count = 2;
+
// fstabentry could be empty map for some partitions (e.g.
// with LVM group) -> suggest_missing_entries could report error 4
while (contains (used_mountpoints , fstabentry["mount"]:""))
@@ -1158,6 +1164,22 @@
}
if (size (fstabentry)>0)
{
+ // this is ugly hack - no, this hack could be the definition
+ // of ugliness, it is the ugliness in its deepest form
+ // so: we are trying to build the device name used in current
+ // /etc/fstab (bnc#431418) and adding it to fstab info provided
+ // by Storage.ycp... bleah
+ string device_by = "";
+ // check only `id, others may require additional options
+ if (mount_by == `id && part["udev_id"]:[] != [])
+ {
+ device_by = "/dev/disk/by-id/" + part["udev_id",0]:"";
+ }
+ if (device_by != "")
+ {
+ fstabentry["device_by"] = device_by;
+ y2internal ("updated fstab entry: %1", fstabentry);
+ }
new_entries[dev] = fstabentry;
}
}
@@ -1358,7 +1380,8 @@
integer fack_lnr = 0;
foreach (string k, map e, (map >)new_entries, ``{
if (e["spec"]:"" != "" && e["mount"]:"" != ""){
- list<string> fstlist = [ k , e["mount"]:"",
+ string dev = e["device_by"]:k;
+ list<string> fstlist = [ dev , e["mount"]:"",
e["vfstype"]:"", e["mntops"]:"",
sformat ("%1",e["freq"]:nil),
sformat ("%1",e["passno"]:nil) ];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org