Skip to content

Commit

Permalink
Preserve database sources
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Feb 7, 2020
1 parent aa7c552 commit 41d529d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/Nis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ def WriteNssConf
if db == "netgroup"
db_l = ["nis"]
else
db_l = ["files", "nis"]
db_l << "nis"
end
Nsswitch.WriteDb(db, db_l)
end
Expand All @@ -1109,7 +1109,7 @@ def WriteNssConf
Builtins.foreach(nis_dbs) do |db|
db_l = Nsswitch.ReadDb(db)
db_l = Builtins.filter(db_l) { |s| s != "nis" }
db_l = ["files"] if db_l == []
db_l = ["files", "usrfiles"] if db_l == []
Nsswitch.WriteDb(db, db_l)
end
end
Expand Down

0 comments on commit 41d529d

Please sign in to comment.