Skip to content

Commit a350863

Browse files
committed
BUGFIX: the sles15 pallet patch was still using zypper - which may not work if networking is down, or if the pallet isn't in the frontend's box
1 parent c324cbe commit a350863

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

sles/pallet_hooks/stacki-sles15/010-add-stacki-images.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22

33
set -e
44

5-
# Install the stack SLES images.
6-
zypper --non-interactive install stack-sles-sles15-images
5+
# Install the stack SLES images. Use find + rpm because networking might be in a bad state.
6+
PALLET_DIR=/export/stack/pallets/${name}/${version}/${rel}/${os}/${arch}/
7+
images=$(find $PALLET_DIR -name stack-${os}-${rel}-images*rpm)
8+
if (( $(echo $images | wc --lines) > 1 )); then
9+
echo found more than one stack-images package in ${PALLET_DIR}:
10+
echo $images
11+
exit 1
12+
else
13+
echo installing $images
14+
rpm --force -Uv $images
15+
fi
716

817
# Copy the vmlinuz and initrd
918
cp /opt/stack/images/initrd-sles-sles15-15sp1-x86_64 /tftpboot/pxelinux/

0 commit comments

Comments
 (0)