fix /modules symlink problem (lorax deleting modules on host!)

symlinking /modules to '/lib/modules' inside the runtime image is fine,
but since we're operating outside the runtime image, the absolute
symlink will point to the host's /lib/modules, which can cause us to
delete kernel modules. Yikes.

Instead:
1) use /lib/modules rather than the symlink, and
2) use a relative symlink, just to be safe.
This commit is contained in:
Will Woods 2011-10-25 16:09:32 -04:00
parent 87eef3ff00
commit 601fef6874
2 changed files with 4 additions and 4 deletions

View File

@ -85,9 +85,9 @@ arch/x86/kvm
"""
%>
%for kmodpath in removekmods.split():
remove /modules/*/kernel/${kmodpath}
remove lib/modules/*/kernel/${kmodpath}
%endfor
remove /modules/*/{build,source,*.map}
remove lib/modules/*/{build,source,*.map}
## NOTE: depmod gets re-run after cleanup finishes
## remove generated locales - anaconda >=16.x builds them at runtime

View File

@ -108,8 +108,8 @@ move usr/share/anaconda/loader.tr etc
move usr/libexec/anaconda/auditd sbin
## for compatibility with Ancient Anaconda Traditions
symlink /lib/modules /modules
symlink /lib/firmware /firmware
symlink ../lib/modules /modules
symlink ../lib/firmware /firmware
## create_depmod_conf()
append etc/depmod.d/dd.conf "search updates built-in"