Skip to content

Commit

Permalink
Merge pull request #83 from yast/review_140924_chroot_scripts
Browse files Browse the repository at this point in the history
[Review] Request from 'schubi2' @ 'yast/yast-autoinstallation/review_140924_chroot_scripts'
  • Loading branch information
schubi2 committed Sep 25, 2014
2 parents c49541d + db0a9e2 commit 06030cf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 8 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Sep 24 11:24:39 CEST 2014 - schubi@suse.de

- Fixed path of change-root scripts which have been
defined in autoinst.xml.
(bnc#897212)
- 3.1.62

-------------------------------------------------------------------
Tue Sep 23 15:51:13 CEST 2014 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/autoyast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: autoyast2
Version: 3.1.61
Version: 3.1.62
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
14 changes: 12 additions & 2 deletions src/modules/AutoinstScripts.rb
Expand Up @@ -824,8 +824,15 @@ def Write(type, special)
# special == true ---> The script has to be installed into /mnt
# because it will be called in a chroot environment.
# (bnc#889931)
# Add /mnt only if the script is getting via GetURL.
# In the other case SCR will do it via target setting.
# (bnc#897212)
#
# FIXME: Find out why "nfs" has a special behavior.
if special || toks["scheme"] == "nfs"
# Take another name for "s"
if (special && s["location"] && !s["location"].empty?) ||
toks["scheme"] == "nfs"

scriptPath = Builtins.sformat(
"%1%2/%3",
AutoinstConfig.destdir,
Expand Down Expand Up @@ -856,7 +863,10 @@ def Write(type, special)
Ops.get_string(s, "source", "echo Empty script!")
)
end
if special || toks["scheme"] == "nfs"
# FIXME: That's duplicate code
if (special && s["location"] && !s["location"].empty?) ||
toks["scheme"] == "nfs"

scriptPath = scriptPath[AutoinstConfig.destdir.length..-1] # cut off the e.g. /mnt for later execution
end
else
Expand Down

0 comments on commit 06030cf

Please sign in to comment.