mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-20 09:22:17 +00:00
0ac354f931
pre.sle substitutes the install server for XCATNEXTSERVERHOOK in the media_url that xCAT::Template writes for every install source. The substitution read sed -e 's!XCATNEXTSERVERHOOK!'$nextserver'!', with the value unquoted, and shopt -s nullglob is set earlier in the same script. An IPv6 server is bracketed, so "[2001:db8::1]" is a glob that matches no file and the whole sed script word is removed. sed then reads the profile as its script and writes nothing, so /tmp/profile/modified.xml is empty. AutoYaST falls back to the unmodified profile and stops on "Disk 'XCATPARTITIONHOOK' was not found", because the pre-script also substitutes the install disk into that profile. The substitution moves into substitute_nextserver, which quotes the value. An IPv4 server was never affected, because it carries no bracket. Captured by xCAT-test/bats/ipv6_pre_sle_nextserver.bats. With the quotes removed again, assertions 9 and 10 fail and the IPv4 assertion 11 still passes. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>