2020-05-06 18:03:53 +00:00
|
|
|
#!/bin/sh
|
2020-05-15 18:54:34 +00:00
|
|
|
discnum=$(basename $1)
|
|
|
|
if [ "$discnum" != 1 ]; then exit 0; fi
|
2020-05-07 13:32:11 +00:00
|
|
|
if [ -e $2/boot/kernel ]; then exit 0; fi
|
2021-07-01 17:43:31 +00:00
|
|
|
|
|
|
|
if [[ $profile =~ ^sle.* ]]; then
|
|
|
|
if ls $1/Product-* >& /dev/null; then
|
|
|
|
ln -s $1 $2/product
|
|
|
|
else
|
|
|
|
ln -s ${1%1}2 $2/product
|
|
|
|
fi
|
2020-05-15 18:54:34 +00:00
|
|
|
fi
|
2020-05-07 12:57:15 +00:00
|
|
|
sed -i 's/sle 15/SUSE Linux Enterprise 15/; s/opensuse_leap/openSUSE Leap/' $2/profile.yaml
|
2020-05-07 13:32:11 +00:00
|
|
|
ln -s $1/boot/x86_64/loader/linux $2/boot/kernel && \
|
|
|
|
ln -s $1/boot/x86_64/loader/initrd $2/boot/initramfs/distribution && \
|
2020-05-07 15:12:24 +00:00
|
|
|
mkdir -p $2/boot/efi/boot && \
|
|
|
|
ln -s $1/EFI/BOOT/bootx64.efi $1/EFI/BOOT/grub.efi $2/boot/efi/boot/
|
2020-05-16 14:14:23 +00:00
|
|
|
profile=$(basename $2)
|
|
|
|
if [[ $profile =~ ^sle.* ]]; then
|
|
|
|
sed -i 's/%%IFSLE%%//;s/%%ENDIFSLE%%//' $2/autoyast
|
|
|
|
else
|
2021-06-22 16:19:54 +00:00
|
|
|
sed -i '/%%IFSLE%%/<!--/,/%%ENDIFSLE%%/d' $2/autoyast
|
2020-05-16 14:14:23 +00:00
|
|
|
fi
|