diff options
Diffstat (limited to 'main/syslinux/update-extlinux')
-rwxr-xr-x | main/syslinux/update-extlinux | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index a2488cc8df5..1ba98658e3e 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -89,6 +89,28 @@ echo "MENU AUTOBOOT Alpine will be booted automatically in # seconds." >> $conf. echo "TIMEOUT $rtimeout" >> $conf.new lst=0 +if [ -f "/boot/xen.gz" ]; then + for kernel in $(find /boot -name vmlinuz-* -type f); do + tag=$(basename $kernel | cut -b9-) + everbose "Found Xen hypervisor: /boot/xen.gz, kernel: $kernel" + + if [ -f "/boot/initramfs-$tag" ]; then + everbose "Found initramfs: /boot/initramfs-$tag" + initramfs="initrd=initramfs-$tag" + fi + + echo "LABEL $lst" >> $conf.new + if [ "$lst" = "$default" ]; then + echo " MENU DEFAULT" >> $conf.new + fi + echo " MENU LABEL Xen + Linux $tag" >> $conf.new + echo " KERNEL mboot.c32" >> $conf.new + echo " APPEND xen.gz $xen_opts --- $(basename $kernel) root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts --- $initramfs" >> $conf.new + echo "" >> $conf.new + lst=$(($lst + 1)) + done +fi + for kernel in $(find /boot -name vmlinuz-* -type f); do tag=$(basename $kernel | cut -b9-) everbose "Found kernel: $kernel" @@ -122,7 +144,7 @@ everbose "$lst entries found." for entry in /etc/update-extlinux.d/*; do [ -f "$entry" ] && cat $entry >> $conf.new -done +done if [ "$overwrite" = "1" ]; then # keep a backup just in case |