Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 194 lines (164 sloc) 4.48 KB
#!/bin/sh
SUSEDISTROS=$(w3m -dump http://download.opensuse.org/distribution/ |sed -re '/DIR/!d;/leap/d;/Parent/d;s/.DIR. //g;s@/.*@@g'|sort -n -r)
SUSEDISTROSLEAP=$(w3m -dump http://download.opensuse.org/distribution/leap |sed -re '/DIR/!d;/Parent/d;s/.DIR. //g;s@/.*@@g'|sort -n -r)
cat <<EOF
#!ipxe
ifopen net0
dhcp net0 ||
set menu-timeout 5000
set opensuse http://download.opensuse.org/distribution
:selection
menu Boot Selection
item --gap -- ------------- Boot Selection ------------
item --key c advanced Advanced Boot Settings
item tumbleweed openSUSE Tumbleweed Rolling Release
item tumbleweed_32bit openSUSE Tumbleweed Rolling Release 32bit
item openSUSEstable openSUSE stable
item openSUSEstable_32bit openSUSE stable 32bit
EOF
for version in ${SUSEDISTROSLEAP}; do
case "$version" in
openSUSE-*)
;;
*-*)
;; # ignore not released version... no repo here
*)
cat << EOF
item openSUSELeap${version} openSUSE Leap ${version}
EOF
;;
esac
done
#duplicated i know but...
for version in ${SUSEDISTROS}; do
case "$version" in
openSUSE-*)
;;
*-*)
;; # ignore not released version... no repo here
*)
cat << EOF
item openSUSE${version} openSUSE ${version}
item openSUSE${version}_32bit openSUSE ${version} 32bit
EOF
;;
esac
done
cat << EOF
item --gap -- ------------- Boot Selection End ------------
choose --timeout \${menu-timeout} --default openSUSEstable selected || goto selection
set menu-timeout 0
goto \${selected}
:advanced
set menu-timeout 5000
menu Advanced Boot Settings
item --gap -- ------------- Advanced Boot Settings Menu ------------
item --key c settings Configure network settings
item bootdisk Boot from local disk
item shell iPXE shell
item factory openSUSE Factory
item factory_32bit openSUSE Factory 32bit
item factorysnapshot openSUSE Factory snapshot
item factorysnapshot_32bit openSUSE Factory snapshot 32bit
item factorytested openSUSE Factory Tested
item factorytested_32bit openSUSE Factory Tested 32bit
item back Back to main menu (or press ESC)
item --gap -- ------------- Advanced Boot settings End ------------
choose --timeout \${menu-timeout} --default shell selected || goto selection
set menu-timeout 0
goto \${selected}
:back
goto selection
:settings
config
goto advanced
:bootdisk
sanboot --no-describe --drive 0x80
:shell
echo type exit to return back to menu
shell
goto advanced
:realboot
kernel \${base-url}/boot/\${susearch}/loader/linux
initrd \${base-url}/boot/\${susearch}/loader/initrd
imgargs linux install=\${base-url}
boot
EOF
for version in ${SUSEDISTROS}; do
case "$version" in
openSUSE-*)
;;
*-*)
;; # ignore not released version... no repo here
*)
cat << EOF
:openSUSE${version}_32bit
set susearch i386
set base-url \${opensuse}/${version}/repo/oss
goto realboot
:openSUSE${version}
set susearch x86_64
set base-url \${opensuse}/${version}/repo/oss
goto realboot
EOF
;;
esac
done
for version in ${SUSEDISTROSLEAP}; do
case "$version" in
openSUSE-*)
;;
*-*)
;; # ignore not released version... no repo here
*)
cat << EOF
:openSUSELeap${version}
set susearch x86_64
set base-url \${opensuse}/leap/${version}/repo/oss
goto realboot
EOF
;;
esac
done
cat << EOF
:openSUSEstable
set susearch x86_64
set base-url \${opensuse}/openSUSE-stable/repo/oss
goto realboot
:openSUSEstable_32bit
set susearch i386
set base-url \${opensuse}/openSUSE-stable/repo/oss
goto realboot
:tumbleweed
set susearch x86_64
set base-url \${opensuse}/../tumbleweed/repo/oss
goto realboot
:tumbleweed_32bit
set susearch i386
set base-url \${opensuse}/../tumbleweed/repo/oss
goto realboot
:factory
set susearch x86_64
set base-url \${opensuse}/../factory/repo/oss
goto realboot
:factory_32bit
set susearch i386
set base-url \${opensuse}/../factory/repo/oss
goto realboot
:factorytested
set susearch x86_64
set base-url \${opensuse}/../factory-tested/repo/oss
goto realboot
:factorytested_32bit
set susearch i386
set base-url \${opensuse}/../factory-tested/repo/oss
goto realboot
:factorysnapshot
set susearch x86_64
set base-url \${opensuse}/../factory-snapshot/repo/oss
goto realboot
:factorysnapshot_32bit
set susearch i386
set base-url \${opensuse}/../factory-snapshot/repo/oss
goto realboot
EOF