Skip to content

Commit

Permalink
Use the correct location for ypdomainname (bnc#916031)
Browse files Browse the repository at this point in the history
 * It's actually placed in /usr/bin for SLE12, openSUSE13.2 and Factory.
 * The old location works in SLE12 and 13.2 because there is still a
   symlink added for compatibility (that would be removed at some point)
  • Loading branch information
ancorgs committed Feb 4, 2015
1 parent 2140267 commit 4722050
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/modules/Nis.rb
Expand Up @@ -908,10 +908,8 @@ def Read
@multidomain_broadcast = {} if @multidomain_broadcast == nil
@slp_domain = {} if @slp_domain == nil

out = Convert.to_map(
SCR.Execute(path(".target.bash_output"), "/bin/ypdomainname")
)
@domain = Builtins.deletechars(Ops.get_string(out, "stdout", ""), "\n")
out = SCR.Execute(path(".target.bash_output"), "/usr/bin/ypdomainname")
@domain = out["stdout"].strip
@old_domain = @domain

@dhcpcd_running = SCR.Execute(
Expand Down
4 changes: 2 additions & 2 deletions testsuite/tests/readwrite.out
@@ -1,7 +1,7 @@
Dump no policy
Read .sysconfig.network.config.NETCONFIG_NIS_POLICY ""
Dir .sysconfig.network.config: ["NETCONFIG_NIS_POLICY"]
Execute .target.bash_output "/bin/ypdomainname" $["exit":0, "stderr":"", "stdout":"mydomain\n"]
Execute .target.bash_output "/usr/bin/ypdomainname" $["exit":0, "stderr":"", "stdout":"mydomain\n"]
Execute .target.bash "ls /var/run/dhcpcd-*.pid" 0
Read .sysconfig.ypbind.YPBIND_LOCAL_ONLY "no"
Read .sysconfig.ypbind.YPBIND_BROADCAST "no"
Expand All @@ -27,7 +27,7 @@ Return true
Dump auto policy
Read .sysconfig.network.config.NETCONFIG_NIS_POLICY "auto"
Dir .sysconfig.network.config: ["NETCONFIG_NIS_POLICY"]
Execute .target.bash_output "/bin/ypdomainname" $["exit":0, "stderr":"", "stdout":"mydomain\n"]
Execute .target.bash_output "/usr/bin/ypdomainname" $["exit":0, "stderr":"", "stdout":"mydomain\n"]
Execute .target.bash "ls /var/run/dhcpcd-*.pid" 0
Read .sysconfig.ypbind.YPBIND_LOCAL_ONLY "no"
Read .sysconfig.ypbind.YPBIND_BROADCAST "no"
Expand Down

0 comments on commit 4722050

Please sign in to comment.