Skip to content

Commit

Permalink
Write udev rules during autoinstallation - bnc#787296
Browse files Browse the repository at this point in the history
Udev rules (70-persistent-net.rule) wasn't written during
autoinstallation. It was excluded explicitly in Lan::Write.

Also added support for obsolete ID= attribute when detecting
device according rule from AutoYast profile. Customer uses it
and it is still supported in udev present in SLES11.
  • Loading branch information
mchf committed Nov 20, 2012
1 parent f7977f5 commit fc83eba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/Lan.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ global define boolean Write() {
if(Abort()) return false;
/* Progress step 3 - multiple devices may be present, really plural*/
ProgressNextStage(_("Writing device configuration..."));
if (!Mode::autoinst() && LanUdevAuto::AllowUdevModify()) {
if (LanUdevAuto::AllowUdevModify()) {
LanItems::WriteUdevDriverRules();
// wait so that ifcfgs written in NetworkInterfaces are newer
// (1-second-wise) than netcontrol status files,
Expand Down
6 changes: 5 additions & 1 deletion src/modules/LanUdevAuto.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ global string GetDevnameByMAC(string mac)
}
else
{
if (rule["rule"]:""=="KERNELS")
// ID= is deprecated. It should be replaced by KERNELS since udev 148 and
// is completely removed in udev 174. However SLES11 uses udev 147, so
// id is used for backward compatibility. Conclusion: bnc#787296 (see customer's
// AutoYaST profile).
if( contains( [ "KERNELS", "ID"], rule["rule"]:"") )
{
y2milestone("rule: %1", rule);
map cmd = (map)SCR::Execute(.target.bash_output,
Expand Down

0 comments on commit fc83eba

Please sign in to comment.